-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlamp.sh
25 lines (22 loc) · 927 Bytes
/
lamp.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
if [ "`lsb_release -is`" == "Ubuntu" ] || [ "`lsb_release -is`" == "Debian" ]
then
apt-get -y install mysql-server mysql-client;
apt-get -y install apache2-mpm-itk php5 libapache2-mod-php5 php5-mcrypt php5-imagick;
apt-get -y proftpd
service apache2 restart;
elif [ "`lsb_release -is`" == "CentOS" ] || [ "`lsb_release -is`" == "RedHat" ]
then
yum -y install httpd mysql-server mysql-devel php php-mysql php-fpm;
yum -y install epel-release phpmyadmin rpm-build redhat-rpm-config;
yum -y install mysql-community-release-el7-5.noarch.rpm proj;
yum -y install tinyxml libzip mysql-workbench-community;
chmod 777 -R /home/projects//;
printf "<?php\nphpinfo();\n?>" > /home/projects/users/info.php;
service mysqld restart;
service httpd restart;
chkconfig httpd on;
chkconfig mysqld on;
else
echo "Unsupported Operating System";
fi