Advertisement
Guest User

Untitled

a guest
May 4th, 2015
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. #!/bin/bash
  2. echo -e "Please provide a desired password for Mysql root account? : \c "
  3. read MYSQLROOTPASS
  4. echo "mysql-server mysql-server/root_password password $MYSQLROOTPASS" | debconf-set-selections
  5. echo "mysql-server mysql-server/root_password_again password $MYSQLROOTPASS" | debconf-set-selections
  6. echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | debconf-set-selections
  7. echo "phpmyadmin phpmyadmin/app-password-confirm password $MYSQLROOTPASS" | debconf-set-selections
  8. echo "phpmyadmin phpmyadmin/mysql/admin-pass password $MYSQLROOTPASS" | debconf-set-selections
  9. echo "phpmyadmin phpmyadmin/mysql/app-pass password $MYSQLROOTPASS" | debconf-set-selections
  10. echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2" | debconf-set-selections
  11. apt-get -y install mysql-server python-mysqldb phpmyadmin mytop
  12. sed -i 's|query_cache_size = 16M|query_cache_size = 1M|' /etc/mysql/my.cnf
  13. sed -i 's|key_buffer = 16M|key_buffer = 1M|' /etc/mysql/my.cnf
  14. sed -i 's|max_allowed_packet = 16M|max_allowed_packet = 1M|' /etc/mysql/my.cnf
  15. /etc/init.d/mysql restart
  16. mysqladmin -u root --password="$MYSQLROOTPASS" create sahana
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement