shell脚本安装部署:
ping -c 1 192.168.15.130 >/dev/null && echo 0000 setenforce 0 >/dev/null && echo 0000 systemctl stop firewalld >/dev/null && echo 8888 rpm -aq nfs-utils >/dev/null if [ $? -eq 0 ];then echo "rpcbind" else yum install nfs-utils -y >/dev/null && echo "ok..." fi echo ***this is ok*** read -p "please you in:" dir mkdir $dir -p >/dev/null chmod 1777 $dir read -p "please interent:" wd read -p "please you way: " qx cat >> /etc/exports << end $dir $wd($qx) end systemctl restart nfs echo "nfs is ok"
python安装部署: