安装nginx并搭建nginx图片服务器

本文详细介绍如何在Linux环境下安装Nginx,并提供了一系列必要的软件包清单。通过这些步骤,您可以顺利地完成Nginx的安装及基本配置,包括如何启动服务、验证端口以及配置文件的具体位置。

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:http://nginx.org/en/download.html

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.youkuaiyun.com/csdn_lqr/article/details/53334583


      本文转自flayber  51CTO博客,原文链接:http://blog.51cto.com/406647516/1791708,如需转载请自行联系原作者




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值