美文网首页
centos7安装nginx

centos7安装nginx

作者: yuff | 来源:发表于2017-01-12 13:41 被阅读0次

1.下载相关组件

yum install -y gcc gcc-c++                                   #安装C/C++编译器

yum -y install gd-devel geoip-devel perl-ExtUtils-Embed

选定目录:

wget http://sourceforge.net/projects/pcre/files/pcre/8.37/pcre-8.37.tar.gz

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz //安装PCRE库

tar -zxvf pcre-8.37.tar.gz

cd pcre-8.37

./configure

make

make install

其它工具库:

yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel

编译:

tar zxvf nginx-1.8.0.tar.gz

cd nginx-1.8.0

./configure && make && make install

启动 sbin/.nginx

报nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

sudo fuser -k 80/tcp

相关文章

网友评论

      本文标题:centos7安装nginx

      本文链接:https://www.haomeiwen.com/subject/tbmdbttx.html