安装:yum -y install nginx
1创建目录,引用目录关系
mkdir -p /etc/nginx/stream.d/;
echo "include /etc/nginx/stream.d/*.conf;" >> /etc/nginx/nginx.conf
2编写conf配置文件
cat > /etc/nginx/stream.d/stream.conf <<EOF
3启动nginx,检查状态
systemctl start nginx;
systemctl status nginx;