linux安装nginx

一、下载nginx,解压到/usr/local/nginx  

tar -zxvf nginx-1.9.9.tar.gz 
mv nginx-1.9.9 /usr/local/nginx

二、安装相关依赖 yum -y install pcre-devel openssl openssl-devel

yum install gcc gcc-c++ ncurses-devel perl

三、执行

./configure --prefix=/usr/local/nginx

make

make install

查看是否安装成功

cd /usr/local/nginx/sbin

./nginx -t

启动nginx

./nginx

将nginx添加到系统服务:

http://www.ydcss.com/archives/18#why

 

posted @ 2016-07-02 23:13  until-u  阅读(234)  评论(0编辑  收藏  举报