ubuntu12.04安装nginx1.2.2
来源:互联网 发布:淘宝店挣钱吗 编辑:程序博客网 时间:2024/06/05 19:27
1、下载最新nginx原码包解压
2、编译
./configure --prefix=/usr/local/nginx \
--with-http_ssl_module \
--with-http_stub_status_module
然后make && make install
可能出错的几处
(1)缺少gcc-c++和libtool,也就是c++编译包
libtool: compile: unrecognized option `-DHAVE_CONFIG_H'
libtool: compile: Try `libtool --help' for more information.
make[1]: *** [pcrecpp.lo] Error 1
make[1]: Leaving directory `/home/guangbo/work/pcre-8.12'
make: *** [all] Error 2
解决方法:直接在线安装apt-get install libtool
(2)缺少openssl库
./configure: error: SSL modules require the OpenSSL library.You can either do not enable the modules, or install the OpenSSL libraryinto the system, or build the OpenSSL library statically from the sourcewith nginx by using --with-openssl=<path> option解决方法:
sudo apt-get install libssl-dev
(3)启动报错
nginx启动出错 error while loading shared libraries: libpcre.so.1
解决方法:ln -s /usr/local/lib/libpcre.so.1 /lib最后测试
/usr/local/nginx/sbin/nginx 然后访问
停止: /usr/local/nginx/sbin/nginx -s stop
测试: /usr/local/nginx/sbin/nginx -t
参考网址
http://www.wangzhibo.com/windows_linux/969.html
http://blog.163.com/dingding_jacky/blog/static/1669127872010101904621142/
http://peterwei.iteye.com/blog/969991
http://wiki.nginx.org/
- ubuntu12.04安装nginx1.2.2
- Ubuntu12.04使用Dotdeb安装PHP5.4 / Nginx1.4/Redis2.6等新版本
- ubuntu11.04编译安装nginx1.0.5
- ubuntu11.04编译安装nginx1.0.5
- ubuntu12.04安装openvpn
- UBUNTU12.04安装笔记
- 安装Ubuntu12.04
- 虚拟机安装Ubuntu12.04
- Ubuntu12.04安装JDK
- Ubuntu12.04安装GTK
- Ubuntu12.04 安装vim
- ubuntu12.04安装QQ2012
- ubuntu12.04安装JDK
- ubuntu12.04安装问题
- Ubuntu12.04安装OracleJava7
- ubuntu12.04 安装xmind
- ubuntu12.04安装myeclipse
- Ubuntu12.04安装kvm
- qmodbus win32 使用qt creator编译
- sip 学习一 (概述)
- The processing instruction target matching "[xX][mM][lL]" is not allowed.
- windows NT 服务程序的创建,删除,启动,停止
- swing实现拖拽效果(将本地文件拖拽到程序的文本框中显示内容)
- ubuntu12.04安装nginx1.2.2
- 如何使用名为 Visual Basic 的 32 位程序中的管道
- 简单的 C++ SOCKET编程 ---基于TCP/IP协议(转)
- 几款黑莓开源软件
- RAID的相关知识
- oracle 学习 积累
- 仿京东商城商品图片 缩略图+放大镜效果
- 接口与抽象类
- eclipse内部启动tomcat(myeclipse等),eclipse外部启动tomcat