Home>Article>Operation and Maintenance> 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
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
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
Start the nginx server
/data/nginx/sbin/nginx -t ##检查配置文件 /data/nginx/sbin/nginx ##确定nginx服务 netstat -lntup |grep nginx ## 检查进程是否正常 curl http://localhost ## 确认结果
The above is the detailed content of nginx installation dependency package. For more information, please follow other related articles on the PHP Chinese website!