源码安装Nginx

yum groupinstall "development tools" -y
yum -y install gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* make cmake
yum install pcre-devel -y

tar –zxvf nginx-1.6.1.tar.gz

cd nginx-1.6.1

./configure

make&&make install

ls /usr/local/nginx --》 conf html logs sbin

启动nginx

/usr/local/nginx/sbin/nginx

查看进程

netstat –antlp |grep nginx

重启

/usr/local/nginx/sbin/nginx -s reload

打开浏览器访问 http://localhost --》 Welcome to nginx

你可能感兴趣的:(源码安装Nginx)