红联Linux门户
Linux帮助

Solaris11_X86安装Nginx

发布时间:2015-05-15 11:30:40来源:CSDN作者:john

安装依赖包

配置repo

用repo来安装依赖包

root@Oracle:/usr/src/nginx-1.5.5# pkg list|grep -i gcc
system/library/gcc-3-runtime                      3.4.3-0.175.1.0.0.24.0    i--
root@oracle:/usr/src/nginx-1.5.5# pkg list|grep -i c++
library/c++/glibmm                                2.24.1-0.175.1.0.0.17.0    i--
library/c++/sigcpp                                2.2.8-0.175.1.0.0.17.0    i--
library/desktop/c++/cairomm                      1.8.2-0.175.0.0.0.0.0      i--
library/desktop/c++/gtkmm                        2.20.2-0.175.1.0.0.17.0    i--
library/desktop/c++/pangomm                      2.26.1-0.175.0.0.0.0.0    i--
system/library/c++-runtime                        0.5.11-0.175.1.0.0.19.0    i--
system/library/c++/sunpro                        0.5.11-0.168              i-r
root@oracle:/usr/src/nginx-1.5.5# pkg install *gcc*

root@oracle:/usr/src/nginx-1.5.5# pkg install *c++*

gcc和c++装完之后配置nginx的时候还会报cc找不到

错误:“./configure: error: C compiler cc is not found”

解决方法:

CC=gcc

export CC

设置这个环境变量,让gcc来代替cc!

安装gd(repo里的gd安装了 还会报not find),所以此处用源码包来安装gd

wget http://cdn.bitbucket.org/libgd/gd-libgd/downloads/libgd-2.1.0.tar.gz  //下载

此处gd的安装不能用sun的make得用gnu的make 否则编译过不去包标签错误

如果用sun的make会报错“make: Fatal error: Command failed for target `all-recursive'”,因为sun的make解释makefile和gnu的不一样,所以安装gnu的make

gun的make安装方法

wget http://ftp.gnu.org/gnu/make/make-3.82.tar.gz

./configure --prefix=/usr/local/make //必须指定路径否则和sun的make冲突

make && make install

然后退回gd的安装目录继续

./configure && /usr/local/make/bin/make && /usr/local/make/bin/make install

获取nginx的源码安装包

root@oracle:/usr/local# cd /usr/src
root@oracle:/usr/src# wget http://nginx.org/download/nginx-1.5.5.tar.gz

root@oracle:/usr/src# tar -zxvf nginx-1.5.5.tar.gz

root@oracle:/usr/src# cd nginx-1.5.5

root@oracle:/usr/src/nginx-1.5.5# ./configure --prefix=/usr/local/nginx155 --with-http_ssl_module --with-http_image_filter_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module            //配置模块自己help 不再多述

root@oracle:/usr/src/nginx-1.5.5# /usr/local/make/bin/make

root@oracle:/usr/src/nginx-1.5.5#/usr/local/make/bin/make install

至此 nginx安装完毕。


CentOS 6.3安装Nginx:http://www.linuxdiyf.com/linux/12123.html

ubuntu 15.04手动安装nginx 1.9.0:http://www.linuxdiyf.com/linux/12038.html

CentOS 6.4快速安装Nginx笔记:http://www.linuxdiyf.com/linux/11528.html

CentOS6编译安装Nginx:http://www.linuxdiyf.com/linux/11509.html

CentOS上安装Nginx报错解决一例:http://www.linuxdiyf.com/linux/10152.html