nginx installation dependency package

王林
Release: 2020-07-01 17:09:37
forward
6427 people have browsed it

nginx installation dependency package

nginx installation dependency package

(Recommended learning: nginx tutorial)

  • nginx installation dependency GCC, openssl-devel, pcre-devel and zlib-devel software libraries.

  • Pcre full name (Perl Compatible Regular Expressions), Chinese perl compatible regular expressions, pcre official website.

yum install  pcre pcre-devel -y 
yum install openssl openssl-devel -y
Copy after login

Compile command

tar -zxf nginx-1.10.1.tar.gz 
cd nginx-1.10.1/
./configure --prefix=/data/nginx-1.10.1 --user=nginx --group=nginx  --with-http_ssl_module  --with-http_stub_status_module

useradd nginx -M -s /sbin/nologin 
make && make install 
ln -s /data/nginx-1.10.1 /data/nginx
Copy after login

Test whether the nginx configuration file is normal

/data/nginx/sbin/nginx -t 
nginx: the configuration file /data/nginx-1.10.1/conf/nginx.conf syntax is ok
nginx: configuration file /data/nginx-1.10.1/conf/nginx.conf test is successful
Copy after login

Start the nginx server

/data/nginx/sbin/nginx  -t  ##检查配置文件
/data/nginx/sbin/nginx      ##确定nginx服务
netstat -lntup |grep nginx      ## 检查进程是否正常
curl http://localhost           ## 确认结果
Copy after login

The above is the detailed content of nginx installation dependency package. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template