1. 下载
# 进入安装目录
cd /user/local
# 下载nginx
wget http://nginx.org/download/nginx-1.6.2.tar.gz
# 解压
tar zxvf nginx-1.6.2.tar.gz
# 编译
make && make install
2. 配置
# 进入配置
cd ../nginx/conf/nginx.conf
进行配置端口域名等
3. 启动
# 启动
/user/local/nginx/sbin/nginx
# 重启
/user/local/nginx/sbin/nginx -s reload
4. 查看
查看配置的端口
netstate -nltp
5. 问题
1. make: *** 没有指明目标并且找不到 makefile。 停止。
使用make && make install 命令时报错,报上述错误
需要安装:
yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-deve