博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ubuntu15.10_x64 安装 nginx
阅读量:6993 次
发布时间:2019-06-27

本文共 1297 字,大约阅读时间需要 4 分钟。

 

浏览器到

下载 stable version的nginx 如nginx-1.10.1.tar.gz,这是一个nginx源码包,需要经过编译和安装才能使用。

解压命令: tar –zxvf  nginx-1.10.1.tar.gz

cd nginx解压后的源码目录 :  ./configure 命令

 

   问题一:gcc和gcc++ 编译器未安装

   ./configure: error:    C compiler cc is not found

   解决:安装gc++
    sudo apt-get install gcc
    sudo apt-get install gcc++

   

    问题二: http模块缺少prce正则表达式库
    ./configure: error: the HTTP rewrite module requires the PCRE library.
    You can either disable the module by using --without-http_rewrite_module
    option, or install the PCRE library into the system, or build the PCRE library
    statically from the source with nginx by using --with-pcre=<path> option.
    解决:安装pcre库

    sudo apt-get install libpcre3 libpcre3-dev

 

   问题三: http gzip 模块缺少  zlib库

    ./configure: error: the HTTP gzip module requires the zlib library.
    You can either disable the module by using --without-http_gzip_module
    option, or install the zlib library into the system, or build the zlib library
    statically from the source with nginx by using --with-zlib=<path> option.
    解决:安装zlib库

    $ sudo apt-get install zlib1g

    $ sudo apt-get install zlib1g.dev

 

再次:./configure

编译 make

安装 make install

 

进入nginx安装目录

cd /usr/local/

ls  可以看到nginx,则代表nginx在ubuntu上安装成功了

进入  cd /usr/local/nginx/sbin

sudo ./nginx  启动nginx

 

若nginx没有启动成功,很可能是80端口被占用了(ubuntu15默认安装了apache2),更换一下端口即可(编辑conf/nginx.conf文件  80改为81)

 

 

 

引申:《》

开始做,坚持做,重复做

转载地址:http://qsdvl.baihongyu.com/

你可能感兴趣的文章
juniper防火墙里面MIP、DIP、VIP协议
查看>>
医疗信息化 医学 医院管理 资料下载
查看>>
StoreFront与NetScaler集成配置
查看>>
VSAN性能测试
查看>>
新建用户的相关文件
查看>>
MySQL数据库主主复制
查看>>
20150830 Linux系统管理 --磁盘管理与系统管理
查看>>
Nginx反向代理https服务
查看>>
smbclient的一些使用技巧
查看>>
shell命令之---sed
查看>>
使用位图文本工具BMFont从图片生成自定义字体
查看>>
BizTalk请求JAVA的Web Service报错
查看>>
浅谈Get和Post方法的区别与TCP与UDP区别
查看>>
config内置对象
查看>>
再谈H5存储问题--浏览器无痕模式不支持
查看>>
解决datagridview 横向的scrollbar不显示
查看>>
如何从 GitHub 上下载单个文件夹
查看>>
C-C Radar Installation 解题报告
查看>>
LG_2051_[AHOI2009]中国象棋
查看>>
centos6.5环境下的web项目mysql编码方式导致的中文乱码问题
查看>>