如何安装nginx
1个回答
2016-02-20
展开全部
#!bin/bash
service sshd start
chkconfig sshd on
******************
yum update -y
******************
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 21 -j ACCEPT
iptables -A INPUT -p tcp --dport 110 -j ACCEPT
iptables -A INPUT -p tcp --dport 25 -j ACCEPT
iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 53 -j ACCEPT
service iptables save
service iptables restart
*********************
yum -y install ntp make openssl openssl-devel pcre pcre-devel libpng libpng-devel libjpeg-6b libjpeg-devel-6b freetype freetype-devel gd gd-devel zlib zlib-devel gcc gcc-c++ libXpm libXpm-devel ncurses ncurses-devel libmcrypt libmcrypt-devel libxml2 libxml2-devel imake autoconf automake screen sysstat compat-libstdc++-33 curl curl-devel
yum install wget* -y
yum check-update -y
yum remove httpd* php* -y
rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
yum info nginx
yum install nginx -y
chkconfig nginx on && service nginx start
yum install mysql mysql-server -y
service mysqld start && chkconfig mysqld on
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
yum install php php-fpm -y
yum install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt php-apc* php lighttpd-fastcgi php-cli php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy php-common php-devel php-fpm php-mysql php-xcahe* -y
chkconfig php-fpm on && service php-fpm start
**************************************
mv /home/index.php /usr/share/nginx/html
chown nginx.nginx /usr/share/nginx/html -R
*********************************
service nginx restart && service mysqld restart && service php-fpm restart
service sshd start
chkconfig sshd on
******************
yum update -y
******************
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 21 -j ACCEPT
iptables -A INPUT -p tcp --dport 110 -j ACCEPT
iptables -A INPUT -p tcp --dport 25 -j ACCEPT
iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 53 -j ACCEPT
service iptables save
service iptables restart
*********************
yum -y install ntp make openssl openssl-devel pcre pcre-devel libpng libpng-devel libjpeg-6b libjpeg-devel-6b freetype freetype-devel gd gd-devel zlib zlib-devel gcc gcc-c++ libXpm libXpm-devel ncurses ncurses-devel libmcrypt libmcrypt-devel libxml2 libxml2-devel imake autoconf automake screen sysstat compat-libstdc++-33 curl curl-devel
yum install wget* -y
yum check-update -y
yum remove httpd* php* -y
rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
yum info nginx
yum install nginx -y
chkconfig nginx on && service nginx start
yum install mysql mysql-server -y
service mysqld start && chkconfig mysqld on
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
yum install php php-fpm -y
yum install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt php-apc* php lighttpd-fastcgi php-cli php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy php-common php-devel php-fpm php-mysql php-xcahe* -y
chkconfig php-fpm on && service php-fpm start
**************************************
mv /home/index.php /usr/share/nginx/html
chown nginx.nginx /usr/share/nginx/html -R
*********************************
service nginx restart && service mysqld restart && service php-fpm restart
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |