1.安装zlib-1.2.8.tar.xz;
(1). tar -xif zlib-1.2.8.tar.xz
(2). ./configure
(3). make
(4). make install
2.安装pcre-8.37.tar.gz;
(1). tar -xzvf pcre-8.37.tar.gz
(2). ./configure
(3). make
(4). make install
3.安装nginx-1.8.0.tar.gz.
(1). 可以设置安装路径,此处设置为/usr/local/nginx/
./configure --sbin-path=/usr/local/nginx/ --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module --with-pcre=../pcre-8.37 --with-zlib=../zlib-1.2.8
(2). make
(3). make install
(4). 用本文件夹下的nginx.conf替换安装后的nginx.conf
(5). 执行./nginx即可启动
4.安装fcgi.tar.gz.
(1).tar -xzvf fcgi.tar.gz
(2). ./configure
(3).在/include/fcgio.h中加上#include <cstdio>
(4).make
(5).make install
5.安装spawn-fcgi-master.zip.
(1). unzip spawn-fcgi-master.zip
(2). ./autogen.sh (如果有错误,yum install automake)
(3). ./configure
(4). make
(5). make install
6.启动程序:
spawn-fcgi -a 127.0.0.1 -p 8081 -F 1 -f /home/SoftWare/a.out
说明:/home/SoftWare/a.out为执行程序的绝对路径