Ubuntu下源码安装nginx
2015-09-15 18:17
645 查看
下载安装包
wget http://nginx.org/download/nginx-1.7.2.tar.gz[/code]
2.解压
切换到安装包的目录下tar zxvf nginx-1.7.2.tar.gz打开该文件cd nginx-1.7.2/
3.运行
./configure
我这里出现了个错误,没有安装gccchecking for OS + Linux 2.6.32-431.el6.x86_64 x86_64 checking for C compiler ... not found ./configure: error: C compiler cc is not found
更新源,在网上找到更新源(http://chenrongya.blog.163.com/blog/static/8747419620143185103297/),复制到/etc/apt/source.listapt-get install update deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse apt-get install update安装gcc相关的程序apt-get install gcc-4.8-aarch64-linux-gnu gcc-4.8-arm-linux-gnueabihf gcc-4.8-powerpc-linux-gnu gcc-4.8-powerpc64le-linux-gnu libdb5.1-java-gcj libgcrypt20-doc
安装PCRE库apt-get update apt-get install libpcre3 libpcre3-dev 还需要安装 apt-get install openssl libssl-dev安装Zlib库sudo apt-get install zlib1g-dev执行./configure
4.编译安装make && make install
相关文章推荐
- CentOS 5.9 下nginx proxy_store的使用
- nginx命令详解
- Nginx 的 proxy_store 缓存
- nginx+apache实现负载均衡+动静分离配置(编译安装)
- nginx下配置的虚拟服务器加载js文件异常
- nginx配置详细说明
- nginx利用fastcgi_cache模块缓存
- Nginx配置文件详细说明
- nginx不支持.htaccess解决办法
- Ubuntu下安装Nginx, MySQL, PHP (LEMP)
- nginx + modsecurity实现WAF功能
- linux 源码安装 Nginx
- nginx之安全基础(nginx+waf+lua)
- nginx+webpy+uswgi+jwplayer组合搭建流媒体服务器
- niginx:duplicate MIME type "text/html" in nginx.conf 错误(转载)
- Centos6.3编译安装nginx+php步骤
- 查看nginx的版本
- Linux深入篇之八:配置Nginx+keepalived主从架构
- linux系统安装nginx服务器
- CentOS上nginx不能正常转发到gitlab端口