`

安装nginx

阅读更多
下载
tar
./configure

安装Nginx时报错

./configure: error: the HTTP rewrite module requires the PCRE library.

安装pcre-devel解决问题
yum -y install pcre-devel


make && make install

默认安装到
/usr/local/nginx 

启动

/usr/local/nginx/sbin/nginx 

关闭nginx
pkill -9 nginx

跳转
server {
    listen 80;
    server_name localhost;
    location / {
        proxy_pass http://192.168.1.100:8080;
    }
}

也可以通过yum安装
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
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics