Get the most out of your Centmin Mod LEMP stack
Become a Member

phpmyadmin.sh Addon

Discussion in 'Add Ons' started by eva2000, May 25, 2014.

  1. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:09 AM
    Nginx 1.13.x
    MariaDB 5.5
    The Centmin Mod Addon for phpmyadmin auto installation, phpmyadmin.sh has been in beta status for a while now with instructions at Addon phpmyadmin.sh - CentminMod.com LEMP Nginx web stack for CentOS.

    This thread is for feedback for this phpmyadmin installer.

    Background:

    There are many ways to configure and install phpmyadmin from phpmyadmin.net documentation with Nginx. Some not as secure as other methods. It's one of reason I have yet to include it in Centmin Mod.

    To be able to include phpmyadmin.sh auto installer as a Centmin Mod official Add On, it will have to be locked down tight:
    1. behind SSL and only accesible via https://
    2. password protected directory
    3. randomised directory install path unique to each Centmin Mod installation
    4. separate php-fpm pool with different user
    5. deny all access with only 127.0.0.1 and your ISP ip address allowed access
    6. auto updatable phpmyadmin

    phpmyadmin.sh 0.1.0 Update March 31, 2017



    You can check your existing /usr/local/src/centminmod/addons/phpmyadmin.sh version via command
    Code (Text):
    grep -w VER /usr/local/src/centminmod/addons/phpmyadmin.sh
    

    example
    Code (Text):
    grep -w VER /usr/local/src/centminmod/addons/phpmyadmin.sh
    VER='0.1.0'
    


    phpmyadmin.sh addon installs phpmyadmin via git so it can do update updates via git pull. However, phpmyadmin git stable branch is now 4.7.0. phpyadmin 4.7.0 requires composer so the updated phpmyadmin.sh 0.1.0 script does a local composer.phar install to phpmyadmin git cloned directory for the required composer updates to missing files like "./vendor/autoload.php missing" as seen at https://community.centminmod.com/th...php-missing-or-not-readable.10997/#post-47170.

    Auto Fix



    Easiest way to update is uninstall your existing phpmyadmin install using uninstall script listed at Addon phpmyadmin.sh - CentminMod.com LEMP Nginx web stack for CentOS and then download latest phpmyadmin.sh addon script
    Code (Text):
    cd /usr/local/src/centminmod/addons
    rm -rf phpmyadmin.sh
    wget --no-check-certificate https://github.com/centminmod/phpmyadmin/raw/master/phpmyadmin.sh
    

    and then reinstall phpmyadmin.sh as per instructions at Addon phpmyadmin.sh - CentminMod.com LEMP Nginx web stack for CentOS

    Manual Fix



    If you don't want to uninstall, you can manually update your phpmyadmin install to the new requirements. Using below steps.

    Step 1. If your phpmyadmin install is at say /usr/local/nginx/html/2040_mysqladmin14941 go into that directory and type these commands
    Code (Text):
    cd /usr/local/nginx/html/2040_mysqladmin14941
    git pull
    rm -rf composer.phar
    wget -cnv https://getcomposer.org/composer.phar -O composer.phar
    php composer.phar update --no-dev
    


    Step 2. Edit the phpmyadmin_update.sh script at /root/tools/phpmyadmin_update.sh, edit /root/tools/phpmyadmin_update.sh and add after the git pull line, these 3 additional lines
    Code (Text):
    git pull
    rm -rf composer.phar
    wget -cnv https://getcomposer.org/composer.phar -O composer.phar
    php composer.phar update --no-dev
    


    Then restart nginx and php services
    Code (Text):
    nprestart
    


    phpmyadmin 4.7.0 release notes

     
    Last edited: Mar 31, 2017
    • Like Like x 2
  2. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:09 AM
    Nginx 1.13.x
    MariaDB 5.5
  3. pamamolf

    pamamolf Well-Known Member

    2,725
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    12:09 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Does it works on the latest centminmod beta?

    Is it tha newest phpmyadmin version?
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:09 AM
    Nginx 1.13.x
    MariaDB 5.5
    yeah the Github repo will always have latest version

    It did work fine on previous .07 betas, haven't tested specifially for .07 beta 21 but you're welcome to try and provide feedback here :D
     
  5. pamamolf

    pamamolf Well-Known Member

    2,725
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    12:09 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Yes working great :)

    I hate that is using as default the latin1_swedish_ci collation when you create a new database :(
     
  6. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:09 AM
    Nginx 1.13.x
    MariaDB 5.5
    Last edited: Jun 9, 2014
    • Like Like x 1
  7. pamamolf

    pamamolf Well-Known Member

    2,725
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    12:09 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    How can i disable it when i do not need it and avoid access from the browser?

    I want to be able to disable it and enable it :)
     
  8. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:09 AM
    Nginx 1.13.x
    MariaDB 5.5
    well you could edit vhost with allow/deny and restart nginx server

    Code:
     location ^~ /22531_mysqladmin23762/ {
            include /usr/local/nginx/conf/php_22531_mysqladmin23762.conf;
    
            auth_basic      "Private Access";
            auth_basic_user_file  /usr/local/nginx/conf/htpassphpmyadmin;
            allow 127.0.0.1;
            deny all;
    }
    and to re-enable access comment it out and restart nginx

    Code:
            #allow 127.0.0.1;
            #deny all;
     
    • Like Like x 1
  9. Vishall

    Vishall New Member

    15
    10
    3
    Aug 3, 2014
    Ratings:
    +10
    Local Time:
    5:09 PM
    1.7
    MariaDB 10
    Hey guys, does this work with php version 5.5.15?
     
  10. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    5:09 AM
    1.11
    10.2
    Yes I think.
     
    • Like Like x 1
  11. Vishall

    Vishall New Member

    15
    10
    3
    Aug 3, 2014
    Ratings:
    +10
    Local Time:
    5:09 PM
    1.7
    MariaDB 10
    Thanks i'd try to install it, glad to see you over on this forum too @RoldanLT (y)
     
    • Like Like x 1
  12. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:09 AM
    Nginx 1.13.x
    MariaDB 5.5
    yeah should work for all PHP versions :D
     
    • Like Like x 1
  13. Vishall

    Vishall New Member

    15
    10
    3
    Aug 3, 2014
    Ratings:
    +10
    Local Time:
    5:09 PM
    1.7
    MariaDB 10
    Installed and working perfect guys, success (y)
     
    • Like Like x 1
  14. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:09 AM
    Nginx 1.13.x
    MariaDB 5.5
    Great to hear :)
     
    • Like Like x 1
  15. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    10:09 PM
    1.7.5
    5.5
    Im using vultr vps so the web url i got was like this:
    Code:
    https://vultr.guest/xxxx_mysqladminxxxx
    
    Instead of my domain name, is it normal?
     
  16. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:09 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  17. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    10:09 PM
    1.7.5
    5.5
  18. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:09 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  19. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    10:09 PM
    1.7.5
    5.5
    I edited virtual.conf as well yet still the same thing, im lost.
     
  20. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:09 AM
    Nginx 1.13.x
    MariaDB 5.5