标签:style http io color ar os sp for strong
能提供各种服务端管理工具包的极客们,请联系我,将给予ftp上传权限,墙内太坑了
下载gzip 模块需要 zlib 库
囧囧明主机zlib:
wget ftp://www.xuwenming.net/nginx/zlib-1.2.8.tar.gz --ftp-user=ftp1 --ftp-password=ftp1
官方zlib:
wget http://liquidtelecom.dl.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz
下载rewrite模块需要的pcre库
囧囧明主机pcre:
wget ftp://www.xuwenming.net/nginx/pcre-8.35.tar.gz --ftp-user=ftp1 --ftp-password=ftp1
pcre官方:
wget http://softlayer-sng.dl.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
下载ssl 功能需要 openssl 库
囧囧明的主机openssl:
wget ftp://www.xuwenming.net/nginx/openssl-1.0.1j.tar.gz --ftp-user=ftp1 --ftp-password=ftp1
or openssl官方
wget http://www.openssl.org/source/openssl-1.0.1j.tar.gz
下载nginx
我自己主机nginx:
wget ftp://www.xuwenming.net/nginx/nginx-1.6.0.tar.gz --ftp-user=ftp1 --ftp-password=ftp1
or nginx官方:
wget http://nginx.org/download/nginx-1.6.0.tar.gz
这下载速度确实有点坑爹
稍后给大家放上自己的ftp服务器供下载
确定都下载好了以后 进入编译安装步骤
编译安装openssl
tar -zxvf openssl-1.0.1j.tar.gz cd openssl-1.0.1j ./config make make install
编译安装zlib
tar -zxvf zlib-1.2.8.tar.gz cd zlib-1.2.8 ./configure make make install
以上操作三个组件都进行一次编译安装
编译安装pcre
tar -zxvf pcre-8.35.tar.gz cd pcre-8.35 ./configure make make install
我的Ubuntu安装pcre的时候报错:
: error: You need a C++ compiler for C++ support.
看来ubuntu需要编译C++支持
sudo apt-get install build-essential
然后再执行一边pcre的编译安装过程就ok 没有报错啦
最后安装nginx
tar -zxvf nginx-1.6.0.tar.gz cd nginx-1.6.0 ./configure --with-pcre=../pcre-8.35 --with-zlib=../zlib-1.2.8 --with-openssl=../openssl-1.0.1j make make install
nginx配置好的路径存着以后方便查询修改
nginx path prefix: "/usr/local/nginx" nginx binary file: "/usr/local/nginx/sbin/nginx" nginx configuration prefix: "/usr/local/nginx/conf" nginx configuration file: "/usr/local/nginx/conf/nginx.conf" nginx pid file: "/usr/local/nginx/logs/nginx.pid" nginx error log file: "/usr/local/nginx/logs/error.log" nginx http access log file: "/usr/local/nginx/logs/access.log" nginx http client request body temporary files: "client_body_temp" nginx http proxy temporary files: "proxy_temp" nginx http fastcgi temporary files: "fastcgi_temp" nginx http uwsgi temporary files: "uwsgi_temp" nginx http scgi temporary files: "scgi_temp"
注意这几个文件的版本号 否则安装失败
检查一下自己的劳动成果
cd /usr/local/nginx/sbin && ./nginx -t
启动nginx
./nginx
如果失败 用sudo权限 试一试
或者查看本机是不是还有apache之类的什么web服务工具
最后查看一下
netstat -ntlp
最后再为系统配置个软链接到全局命令
ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx
然后切换到任意目录 试一试吧
nginx -v
nginx 新手攻略 Ubuntu Linux下安装配置教程
标签:style http io color ar os sp for strong
原文地址:http://my.oschina.net/code33/blog/345229