本文共 1099 字,大约阅读时间需要 3 分钟。
1.安装所需的包:yum install -y apr* autoconf automake bison bzip2 bzip2* cloog-ppl compat* cpp curl curl-develfontconfig fontconfig-devel freetype freetype* freetype-devel gcc gcc-c++gtk+-devel gd gettext gettext-devel glibc kernel kernel-headers keyutilskeyutils-libs-devel krb5-devel libcom_err-devel libpng libpng-devel libjpeg*libsepol-devel libselinux-devel libstdc++-devel libtool* libgomp libxml2libxml2-devel libXpm* libtiff libtiff* make mpfr ncurses* ntp opensslopenssl-devel patch pcre-devel perl php-common php-gd policycoreutils telnett1lib t1lib* nasm nasm* wget zlib-devel gcc gcc-c++autoconf automake zlib zlib-devel openssl openssl-devel pcre-devel
2.下载Nginx:
3.解压与安装:
tar -zxvfnginx-1.9.2.tar.gz
cd nginx-1.9.2/
./configure
make && make install
缺什么包就yum补什么包,然后重新./configure
4.启动nginx:/usr/local/nginx/sbin/nginx -c /usr/local/src/nginx-1.9.2/conf/nginx.conf
查看端口有没有起来:netstat-anput|grep 80
设置端口在/usr/local/src/nginx-1.9.2/conf/nginx.conf文件里面
搭建nginx图片服务器:
http://blog.csdn.net/csdn_lqr/article/details/53334583
本文转自flayber 51CTO博客,原文链接:http://blog.51cto.com/406647516/1791708,如需转载请自行联系原作者