linux下安装nginx

1、下载nginx

http://nginx.org/en/download.html,本文使用nginx-1.6.2

2、将下载后的文件上传至服务器 /rsp 目录下

3、解压缩文件 nginx-1.6.2.tar.gz

tar –zxvf nginx-1.6.2.tar.gz

4、进入nginx目录准备安装

cd /rsp/nginx-1.6.2

5、执行./configure时提示错误“PCRE library is not found”,安装pcre

6、执行./configure --prefix=/rsp/nginx --conf-path=/rsp/nginx/nginx.conf --with-http_ssl_module  

标示nginx安装完成后的路径为/rsp/nginx

7、执行 make

8、执行 make install

9、进入/rsp/nginx/sbin 下执行./nginx 提示错误“./nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory”

解决:

image

10、启动nginx

image

posted on 2014-11-18 16:47  limiracle  阅读(183)  评论(0编辑  收藏  举报

导航