自动安装http服务,并且修改其端口为脚本后边的第一串字符
#!/bin/bash
yum install httpd.x86_64 -y &>/dev/null; 把安装过程中的结果导入垃圾箱
sed -i "/^Listen/cListen $1" /etc/httpd/conf/httpd.conf
echo the LIsten is changed
sed -ne '42p' /etc/httpd/conf/httpd.conf
systemctl restart httpd
自动安装http服务,并且修改其端口为脚本后边的第一串字符
#!/bin/bash
yum install httpd.x86_64 -y &>/dev/null; 把安装过程中的结果导入垃圾箱
sed -i "/^Listen/cListen $1" /etc/httpd/conf/httpd.conf
echo the LIsten is changed
sed -ne '42p' /etc/httpd/conf/httpd.conf
systemctl restart httpd