CentOS6.5 64位 nginx安装与配置
1、需要安装软件:GCC,PCRE,zlib,OpenSSL。 Nginx是C写的,需要用GCC编译;Nginx的Rewrite和HTTP模块会用到PCRE;Nginx中的Gzip用到zlib;

2、用命令“# gcc”,查看gcc是否安装;如果出现“gcc: no input files”信息,说明已经安装好了。命令:[root@localhost soft]# gccgcc: fatal error: no input files否则,执行命令:[root@localhost soft]# yum install gcc”,一直按y确认即可.
3、gc罕铞泱殳c测试:[root@localhost soft]# gcc -vUsing built-in specs.COLLECT_GCC=gccCOLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapperTarget: x86_64-redhat-linuxConfigured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info--with-bugurl=http://bugzilla.redhat.com/bugzilla--enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions--enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array--disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/isl-install--with-cloog=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/cloog-install--enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linuxThread model: posixgcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC)
4、同样方法,用如下命令安装PCRE,zlib,OpenSSL;注:安装包下安装,即执行命令如下tar -zxvf zlib-1.2.8.tar.gzcd zlib-1.2.8./configuremakemake installtar -zxvf openssl-1.0.1c.tar.gzcd openssl-1.0.1c./configuremakemake install