1
|
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel pcre pcre-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers
|
下載安裝nginxnginx
1
2
3
4
5
6
7
8
9
10
11
|
#進入下載目錄
/usr/local/src
#下載Nginx源碼,目前,最穩定的版本是1.4.1
wget http:
//nginx.org/download/nginx-1.4.1.tar.gz
#解壓tar包
tar -zxvf nginx-1.4.1.tar.gz
#進入nginx源碼目錄
cd nginx-1.4.1
./configure --prefix=/usr/local/nginx
make
make install
|
啓動nginxc++
1
|
/usr/local/nginx/sbin/nginx
|
關閉nginxcurl
1
2
|
ps -ef |grep nginx
kill -
9
[pid]
|
iptables開啓80tcp
1
|
/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
|
保存iptables設置url
1
|
service iptables save
|
查看設置spa
1
|
service iptables status
|
若是沒成功,能夠嘗試重啓iptablesrest
1
|
service iptables restart
|