Home > Operation and Maintenance > Nginx > Nginx installation example analysis

Nginx installation example analysis

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2023-05-15 10:52:06
forward
1169 people have browsed it

1. Install gcc (it usually comes with centos 7 and later, you can install it after step 6 fails)

yum install gcc gcc-c

2. Install pcre

yum install -y pcre pcre-devel

3. Install zlib

yum install -y zlib zlib-devel

4. Install openssl

yum install -y openssl openssl-devel

5. Download and unzip nginx (then enter the nginx directory)

wget

6. Compile nginx (load common modules such as ssl)

./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_gzip_static_module --with-http_ssl_module

7 . Install nginx

make && make install

8. Start

/usr/local/nginx/sbin/nginx

9. Stop

/usr/local/nginx/sbin/nginx -s stop (reload means restart)

10. Use the browser to access the IP address of the machine where nginx is located and verify that nginx is started successfully

http://yourhost/

Note: nginx configuration file location

/usr/local/nginx/conf/nginx.conf

The above is the detailed content of Nginx installation example analysis. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
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