方式一:
直接利用yum安装;
sudo yum install -y epel-release
sudo yum -y update
sudo yum install -y nginx
安装成功后,默认的网站目录为: /usr/share/nginx/html
默认的配置文件为:/etc/nginx/nginx.conf
自定义配置文件目录为: /etc/nginx/conf.d/
方式二:
下载安装包之后安装;
wget http://nginx.org/download/nginx-1.20.1.tar.gz
参考链接:
1.https://blog.csdn.net/weixin_44318831/article/details/122959785
2.https://blog.csdn.net/qq_43964958/article/details/119810661