Created
December 26, 2014 20:55
-
-
Save saleehk/d193ce0b5ec101f04e57 to your computer and use it in GitHub Desktop.
Bash for install LAMP in Centos 7
This file contains 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
read -p "MySQL Password: " rootpassword | |
# Apache php mysql mysql-server installing | |
echo "Installing httpd" | |
yum install -y httpd | |
echo "Installing MYSQL" | |
yum install -y mariadb-server mariadb | |
echo "Installing PHP" | |
yum install -y php php-mysql | |
# Starting httpd mysqld service | |
systemctl restart httpd.service | |
systemctl start mariadb | |
# Adding to auto Start httpd mysqld service | |
systemctl enable httpd.service | |
systemctl enable mariadb.service | |
/usr/bin/mysqladmin -u root password $rootpassword | |
clear | |
echo "Installing phpMyAdmin" | |
#phpMyadmin | |
yum -y install epel-release | |
yum -y install phpmyadmin | |
sed -e '/<IfModule mod_authz_core\.c>/,/<\/IfModule>/ s/Require ip 127.0.0.1//' -i.bak "/etc/httpd/conf.d/phpMyAdmin.conf" | |
sed -e '/<IfModule mod_authz_core\.c>/,/<\/IfModule>/ s/Require ip ::1/Require all granted/' -i.bak "/etc/httpd/conf.d/phpMyAdmin.conf" | |
systemctl restart httpd.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment