Created
November 11, 2016 12:45
-
-
Save barmatz/107a8cf08a9b2914742f9eee0867e894 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # verify membership in the www group | |
| groups | |
| # change the group overship | |
| sudo chown -R root:www /var/www | |
| # change the directory premissions | |
| sudo chmod 2775 /var/www | |
| find /var/www -type d -exec sudo chmod 2775 {} \; | |
| # recursively change the file permissions | |
| find /var/www -type f -exec sudo chmod 0664 {} \; | |
| # create a simple PHP file | |
| echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php | |
| # start the MySQL server | |
| sudo service mysqld start | |
| # run mysql_secure_installation | |
| sudo mysql_secure_installation | |
| # stop the MySQL server | |
| sudo service mysqld stop | |
| # start the MySQL server at every boot | |
| sudo chkconfig mysqld on | |
| # enable eextra packages for enterprise linux | |
| sudo yum-config-manager --enable epel | |
| # install phpMyAdmin | |
| sudo yum install -y phpMyAdmin | |
| # restart the Apache web server | |
| sudo service httpd restart | |
| # restart the MySQL server | |
| sudo service mysqld restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment