1.在光盘里 centos目录下 安装如下 软件包
rpm -ivh cpp-4.1.2-42.el5.i386.rpm
rpm -ivh kernel-headers-2.6.18-92.el5.i386.rpm
rpm -ivh glibc-headers-2.5-24.i386.rpm
rpm -ivh glibc-devel-2.5-24.i386.rpm
rpm -ivh libgomp-4.1.2-42.el5.i386.rpm
rpm -ivh gcc-4.1.2-42.el5.i386.rpm
rpm -ivh libstdc++-devel-4.1.2-42.el5.i386.rpm
rpm -ivh gcc-c++-4.1.2-42.el5.i386.rpm
安装好后 ,就可以编译c,c++了
2.安装ngnix
a. 下载稳定版本源码 http://wiki.nginx.org/Install
b. 安装时提示,缺少pcre
先下载源码 http://sourceforge.net/projects/pcre/files/pcre/
进行安装,若提示缺少lib,需先安装
libsepol-devel-1.15.2-3.el5.i386.rpm,
libselinux-devel-1.33.4-5.7.el5.i386.rpm
krb5-devel-1.6.1-55.el5.i386.rpm
keyutils-libs-devel-1.2-1.el5.i386.rpm
e2fsprogs-devel-1.39-23.el5_5.1.i386.rpm
c 安装pcre 后,安装ngnix所需其他包文件
zlib-devel-1.2.3-3.i386.rpm
zlib-1.2.3-3.i386.rpm
openssl-devel-0.9.8e-12.el5_5.7.i386.rpm
openssl-0.9.8e-12.el5_5.7.i386.rpm
d 为了让 nginx 支持tcp,下载 nginx_tcp_proxy_module 源码
https://github.com/yaoweibin/nginx_tcp_proxy_module
e 安装方法
$ tar -xzvf nginx-version.tar.gz
$ cd nginx-version/
$ patch -p1 < /path/to/nginx_tcp_proxy_module/tcp.patch
$ ./configure --add-module=/path/to/nginx_tcp_proxy_module
$ make
$ make install
f 在安装的过程中 可以看到如下信息
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ md5: using system crypto library
+ sha1: using system crypto library
+ using system zlib library
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"
安装后 根据需要配置ngnix.conf 启动即可
rpm -ivh cpp-4.1.2-42.el5.i386.rpm
rpm -ivh kernel-headers-2.6.18-92.el5.i386.rpm
rpm -ivh glibc-headers-2.5-24.i386.rpm
rpm -ivh glibc-devel-2.5-24.i386.rpm
rpm -ivh libgomp-4.1.2-42.el5.i386.rpm
rpm -ivh gcc-4.1.2-42.el5.i386.rpm
rpm -ivh libstdc++-devel-4.1.2-42.el5.i386.rpm
rpm -ivh gcc-c++-4.1.2-42.el5.i386.rpm
安装好后 ,就可以编译c,c++了
2.安装ngnix
a. 下载稳定版本源码 http://wiki.nginx.org/Install
b. 安装时提示,缺少pcre
先下载源码 http://sourceforge.net/projects/pcre/files/pcre/
进行安装,若提示缺少lib,需先安装
libsepol-devel-1.15.2-3.el5.i386.rpm,
libselinux-devel-1.33.4-5.7.el5.i386.rpm
krb5-devel-1.6.1-55.el5.i386.rpm
keyutils-libs-devel-1.2-1.el5.i386.rpm
e2fsprogs-devel-1.39-23.el5_5.1.i386.rpm
c 安装pcre 后,安装ngnix所需其他包文件
zlib-devel-1.2.3-3.i386.rpm
zlib-1.2.3-3.i386.rpm
openssl-devel-0.9.8e-12.el5_5.7.i386.rpm
openssl-0.9.8e-12.el5_5.7.i386.rpm
d 为了让 nginx 支持tcp,下载 nginx_tcp_proxy_module 源码
https://github.com/yaoweibin/nginx_tcp_proxy_module
e 安装方法
$ tar -xzvf nginx-version.tar.gz
$ cd nginx-version/
$ patch -p1 < /path/to/nginx_tcp_proxy_module/tcp.patch
$ ./configure --add-module=/path/to/nginx_tcp_proxy_module
$ make
$ make install
f 在安装的过程中 可以看到如下信息
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ md5: using system crypto library
+ sha1: using system crypto library
+ using system zlib library
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"
安装后 根据需要配置ngnix.conf 启动即可