|
|
|
@ -334,10 +334,14 @@ function init:nginx() { |
|
|
|
command::exec "${host}" " |
|
|
|
yum -y install nginx |
|
|
|
nginx -v |
|
|
|
# sudo systemctl enable nginx |
|
|
|
" |
|
|
|
check::exit_code "$?" "nginx" "$host 安装nginx" "exit" |
|
|
|
log::info "[nginx]" "nginx安装成功!" |
|
|
|
log::info "[nginx]" "配置文件路径: /etc/nginx" |
|
|
|
log::info "[nginx]" "设置开机启动: sudo systemctl enable nginx" |
|
|
|
log::info "[nginx]" "启动/停止/重启: sudo service nginx start/stop/restart" |
|
|
|
log::info "[nginx]" "检查nginx配置: sudo nginx -t" |
|
|
|
log::info "[nginx]" "加载nginx配置: sudo nginx -s reload" |
|
|
|
} |
|
|
|
|
|
|
|
# 安装nodejs环境 |
|
|
|
|