#安装oracle客户端
rpm -ivh oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm oracle-instantclient11.1-devel-11.1.0.7.0-1.x86_64.rpm oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.x86_64.rpm
echo "/usr/lib/oracle/11.1/client/lib/" > /etc/ld.so.conf.d/oracle_client.conf
#ldconfig命令的用途:主要是在默认搜寻目录(/lib和/usr/lib)以及动态库配置文件/etc/ld.so.conf内所列的目录下,搜索出可共享的动态链接库(格式如前介绍,lib*.so*),进而创建出动态装入程序(ld.so)所需的连接和缓存文件。缓存文件默认为 /etc/ld.so.cache,此文件保存已排好序的动态链接库名字列表。
/sbin/ldconfig
#Libxml2 是一个xml c语言版的解析器
tar zxvf libxml2-2.6.30.tar.gz
#zlib是个支援gzip档案格式的函数库
tar zxvf zlib-1.2.3.tar.gz
#安装gd库
tar zxvf freetype-2.1.10.tar.gz
tar zxvf libpng-1.2.8-config.tar.gz
tar zxvf jpegsrc.v6b.tar.gz
#安装php-5.3.0
tar zxvf php-5.3.0.tar.gz
#将php-fpm的补丁包应用到php-5.3.0
gzip -cd php-5.3.0-fpm-unofficial.diff.gz | patch -d php-5.3.0 -p1
#兼容perl的正则表达式
tar zxvf pcre-7.9.tar.gz
tar zxvf nginx-0.7.62.tar.gz
#memcache 内存缓存
tar zxvf memcache-2.2.5.tgz
cd zlib-1.2.3
./configure
make CFLAGS=-fpic
make install
cd ../jpeg-6b
#--prefix配置软件安装目录
./configure --prefix=/usr/local/jpeg6
make
mkdir /usr/local/jpeg6
mkdir /usr/local/jpeg6/include
mkdir /usr/local/jpeg6/lib
make install-lib
mkdir /usr/local/jpeg6/bin
mkdir /usr/local/jpeg6/man
mkdir /usr/local/jpeg6/man/man1
make install
cd ../libpng-1.2.8-config
./configure --prefix=/usr/local/libpng2
make CFLAGS=-fpic
make install
cd ../freetype-2.1.10
./configure --prefix=/usr/local/freetype2
make
make install
cd ../libxml2-2.6.30
./configure --prefix=/usr/local/libxml2
make
make install
cd ../php-5.3.0
./configure --prefix=/opt/install/php-5.3.0 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-zlib --with-gd --with-freetype-dir=/usr/local/freetype2 --with-jpeg-dir=/usr/local/jpeg6 --with-png-dir=/usr/local/libpng2 --with-libxml-dir=/usr/local/libxml2 --with-iconv --enable-fpm --enable-static --enable-maintainer-zts --enable-zend-multibyte --enable-inline-optimization --enable-sockets --enable-wddx --enable-zip --enable-calendar --enable-bcmath --enable-ftp --enable-mbstring --without-sqlite --disable-ipv6 --disable-debug --with-xml-config=/usr/local/libxml2/bin/xml2-config --with-oci8=share,instantclient,/usr/lib/oracle/11.1/client64/lib/
make
make install
cp ../php.ini /opt/install/php-5.3.0/lib/
#安装eaccelerator
mkdir /tmp/eaccelerator
chmod 777 /tmp/eaccelerator
cp ../eaccelerator.so /opt/install/php-5.3.0/
cd ../memcache-2.2.5
/opt/install/php-5.3.0/bin/phpize
./configure --enable-memcache --with-php-config=/opt/install/php-5.3.0/bin/php-config
make
make install
rm -f /opt/install/php-5.3.0/etc/php-fpm.conf
cp ../php-fpm.conf /opt/install/php-5.3.0/etc/php-fpm.conf
ulimit -SHn 65535
#启动php-fpm
/opt/install/php-5.3.0/sbin/php-fpm start
cd ../pcre-7.9/
./configure
make && make install
cd ../nginx-0.7.62/
./configure --user=nfsnobody --group=nfsnobody --prefix=/opt/install/nginx-0.7.62 --with-http_stub_status_module --without-http-cache
make && make install
mkdir -p /opt/install/nginx-0.7.62/logs
chmod +w /opt/install/nginx-0.7.62/logs
chown -R nfsnobody:nfsnobody /opt/install/nginx-0.7.62/logs
rm -f /opt/install/nginx-0.7.62/conf/nginx.conf
cp ../nginx.conf /opt/install/nginx-0.7.62/conf/nginx.conf
cp ../fcgi.conf /opt/install/nginx-0.7.62/conf/fcgi.conf
#sysctl 参数只是用来回报目前的系统状况,例如回报目前已开机时间、所使用的操作系统版本、核心名称等等;而有的可以让我们修改参数以调整系统运作的行为,例如网络暂存内存的大小、最大的上线人数等等
rm -rf /etc/sysctl.conf
cp ../sysctl.conf /etc/sysctl.conf
#从/etc/sysctl.conf加载配置
/sbin/sysctl -p
#设置进程打开可以的最大文件数
#-S soft
#-H hard
ulimit -SHn 65535
#启动nginx
/opt/install/nginx-0.7.62/sbin/nginx