mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
full pma install
This commit is contained in:
parent
ab95d5d88d
commit
70319b6a94
2 changed files with 73 additions and 58 deletions
|
@ -83,9 +83,6 @@ gen_pass() {
|
|||
echo "$PASS"
|
||||
}
|
||||
|
||||
# Defining 32 char blowfish_secret
|
||||
blowfish_secret=`openssl rand -base64 32`;
|
||||
|
||||
# Defining return code check function
|
||||
check_result() {
|
||||
if [ $1 -ne 0 ]; then
|
||||
|
@ -1045,8 +1042,15 @@ if [ "$mysql" = 'yes' ]; then
|
|||
if [ "$apache" = 'yes' ]; then
|
||||
cp -f $vestacp/pma/phpMyAdmin.conf /etc/httpd/conf.d/
|
||||
fi
|
||||
mysql < /usr/share/phpMyAdmin/sql/create_tables.sql
|
||||
p=$(gen_pass)
|
||||
mysql -e "GRANT ALL ON phpmyadmin.*
|
||||
TO phpmyadmin@localhost IDENTIFIED BY '$p'"
|
||||
cp -f $vestacp/pma/config.inc.conf /etc/phpMyAdmin/config.inc.php
|
||||
sed -i "s#%blowfish_secret#$blowfish_secret#g" /etc/phpMyAdmin/config.inc.php
|
||||
sed -i "s/%blowfish_secret%/$(gen_pass 32)/g" /etc/phpMyAdmin/config.inc.php
|
||||
sed -i "s/%phpmyadmin_pass%/$p/g" /etc/phpMyAdmin/config.inc.php
|
||||
chmod 777 /var/lib/phpMyAdmin/temp
|
||||
chmod 777 /var/lib/phpMyAdmin/save
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue