Update phpmyadmin installation

This commit is contained in:
Michael RICOIS 2015-01-19 20:39:14 +01:00
parent b237485e9b
commit 3e8913dcc7
2 changed files with 17 additions and 12 deletions

View File

@ -38,15 +38,19 @@ then
sudo touch /etc/mysql/vagrant
fi
# Installation phpMyAdmin
# --- Installation phpMyAdmin
PHPMYADMIN_VERSION="4.3.7"
if [ ! -d "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages" ]
PHPMYADMIN_PATH="phpMyAdmin-$PHPMYADMIN_VERSION-all-languages"
if [ ! -d "/home/vhosts/$PHPMYADMIN_PATH" ]
then
if [ -f "/vagrant/data/Apps/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" ]
if [ -f "/vagrant/data/Apps/$PHPMYADMIN_PATH.tar.xz" ]
then
unzip "/vagrant/data/Apps/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" -d /home/vhosts/
mysql -hlocalhost -uroot -p$MYSQL_PASS < "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/examples/create_tables.sql"
cp /vagrant/data/Apps/config.inc.php "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/"
tar xJvf "/vagrant/data/Apps/$PHPMYADMIN_PATH.tar.xz" --directory /home/vhosts/
mysql -hlocalhost -uroot -p$MYSQL_PASS < /vagrant/data/Apps/phpmyadmin.sql
mysql -hlocalhost -uroot -p$MYSQL_PASS < /home/vhosts/$PHPMYADMIN_PATH/examples/create_tables.sql
sudo service mysql restart
cp /vagrant/data/Apps/config.inc.php /home/vhosts/$PHPMYADMIN_PATH/
chmod 0444 /home/vhosts/$PHPMYADMIN_PATH/config.inc.php
fi
fi

View File

@ -38,16 +38,17 @@ fi
# --- Installation phpMyAdmin
PHPMYADMIN_VERSION="4.3.7"
if [ ! -d "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages" ]
PHPMYADMIN_PATH="phpMyAdmin-$PHPMYADMIN_VERSION-all-languages"
if [ ! -d "/home/vhosts/$PHPMYADMIN_PATH" ]
then
if [ -f "/vagrant/data/Apps/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" ]
if [ -f "/vagrant/data/Apps/$PHPMYADMIN_PATH.tar.xz" ]
then
unzip "/vagrant/data/Apps/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip" -d /home/vhosts/
tar xJvf "/vagrant/data/Apps/$PHPMYADMIN_PATH.tar.xz" --directory /home/vhosts/
mysql -hlocalhost -uroot -p$MYSQL_PASS < /vagrant/data/Apps/phpmyadmin.sql
mysql -hlocalhost -uroot -p$MYSQL_PASS < /home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/examples/create_tables.sql
mysql -hlocalhost -uroot -p$MYSQL_PASS < /home/vhosts/$PHPMYADMIN_PATH/examples/create_tables.sql
sudo service mysql restart
cp /vagrant/data/Apps/config.inc.php "/home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/"
chmod 0444 /home/vhosts/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/config.inc.php
cp /vagrant/data/Apps/config.inc.php /home/vhosts/$PHPMYADMIN_PATH/
chmod 0444 /home/vhosts/$PHPMYADMIN_PATH/config.inc.php
fi
fi