Linux installation and deployment nginx notes

1. Before installing nginx, first install four dependent packages--the following command installs four dependent packages with one click

yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel

2. Download and unzip the installation package

wget http://nginx.org/download/nginx-1.13.7.tar.gz
tar -zxvf nginx-1.13.7.tar.gz        ---解压nginx安装包

3. Enter the directory just decompressed:
cd nginx-1.13.7
4. Configure nginx

./configure --prefix=/usr/local/nginx --with-http_ssl_module #配置ssl

5. Compile and install
make
make install
6. Find the installation path
whereis nginx
7. Start nginx under sbin under the installation path./nginx
start./nginx
-s reload restart./nginx
-s stop close
8. Under the installation path Edit nginx.conf under conf
vim nginx.conf Start editing
After editing, esc to exit, then: wq to save and exit 
9. Check whether the startup is successful
ps -ef | grep nginx
10. If 403 is applied, check the starting user through ps aux | grep nginx Whether it is consistent or not, modify the user under nginx.conf

おすすめ

転載: blog.csdn.net/weixin_46653941/article/details/128458067