-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCentOS6_x64_NginX_PHP-FPM56_MariaDB-10.3.sh
31 lines (31 loc) · 2 KB
/
CentOS6_x64_NginX_PHP-FPM56_MariaDB-10.3.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
26
27
28
29
30
31
#!/bin/sh
yum install wget epel-release yum-utils -y;
yum update -y;
rpm -Uvh https://rpms.remirepo.net/enterprise/remi-release-6.rpm;
sed -i 's/SELINUX=[^\s]+/SELINUX=disabled/g' /etc/selinux/config;
wget "https://raw.githubusercontent.com/ariadata/PHP-FPM_NginX_shell-installers/master/static-files/MariaDB-10.3_C6_x64.repo" -O /etc/yum.repos.d/MariaDB.repo;
wget "https://raw.githubusercontent.com/ariadata/PHP-FPM_NginX_shell-installers/master/static-files/nginx.repo" -O /etc/yum.repos.d/nginx.repo;
service iptables stop;
chkconfig iptables off;
yum update -y;
yum-config-manager --enable remi-php56;
yum install php-fpm php-cli php-gd php-imap php-mbstring php-mcrypt php-mysqlnd php-odbc php-pear php-pear-DB php-pear-Date php-pear-File php-pear-HTTP-Request php-pear-Log php-pear-Mail php-pear-Mail-Mime php-pear-Net-SMTP php-pear-Net-Sieve php-pear-Net-Socket php-pecl-zip php-soap php-xml php-xmlrpc unzip zip curl openssl -y;
wget "https://raw.githubusercontent.com/ariadata/PHP-FPM_NginX_shell-installers/master/static-files/www_php-fpm_C6_x64.conf" -O /etc/php-fpm.d/www.conf;
yum install nginx -y;
wget "https://raw.githubusercontent.com/ariadata/PHP-FPM_NginX_shell-installers/master/static-files/nginx_conf_d_sample_C6_x64.conf" -O /etc/nginx/conf.d/sample.com.conf;
chmod 777 /var/lib/php -R;
yum install MariaDB-server MariaDB-client -y;
wget "https://raw.githubusercontent.com/ariadata/PHP-FPM_NginX_shell-installers/master/static-files/MariaDb_Config_my_cnf_C6_x64.cnf" -O /etc/my.cnf;
chkconfig mysql on;
chkconfig nginx on;
chkconfig php-fpm on;
mkdir /home/sample.com/;
wget "https://raw.githubusercontent.com/ariadata/PHP-FPM_NginX_shell-installers/master/static-files/under_cunstruction.html" -O /home/sample.com/index.html;
wget "https://raw.githubusercontent.com/ariadata/PHP-FPM_NginX_shell-installers/master/static-files/php_info.txt" -O /home/sample.com/phpinfo.php;
chown -R nginx:nginx /home/;
service mysql start;
service nginx start;
service php-fpm start;
yum update -y;
mysql_secure_installation;
#reboot;