代码拉取完成,页面将自动刷新
#/bin/bash
grep -qw 'server1' /etc/hosts || echo '172.25.0.254 server1.net0.example.com server1.lab0.example.com server1' >> /etc/hosts
sed -i 's/^enabled=1/enabled=0/g' /etc/dnf/plugins/subscription-manager.conf
yum -y install httpd 2> /dev/null
tar -xPf kvm-patch-v2021*.tgz
ln -s /var/ftp/rhel /var/www/html/rhel8 &> /dev/null
ln -s /var/ftp/rhel /var/www/html/rhel8.2 &> /dev/null
echo '<html>
<title>Exam</title>
<body>
<h1>exam</h1>
<p>
<a href="/exam/EX200.pdf">EX200</a>
</p>
<p>
<a href="/exam/EX294.pdf">EX294</a>
</p>
</body>
</html>' > /var/www/html/index.html
systemctl enable httpd ; systemctl restart httpd
systemctl disable firewalld ; systemctl stop firewalld
yum -y install chrony 2> /dev/null
grep -q '172.25' /etc/chrony.conf || echo 'allow 172.25.254.0/24
allow 172.25.0.0/24' >> /etc/chrony.conf
systemctl enable chronyd ; systemctl restart chronyd
groupadd -g 1040 ldapuser0 &> /dev/null
mkdir -p /rhome
useradd -u 1040 -g 1040 -d /rhome/ldapuser0 ldapuser0 &> /dev/null
echo password | passwd --stdin ldapuser0
echo '/rhome *(rw)' > /etc/exports
systemctl enable nfs-server ; systemctl restart nfs-server
virsh list --all | grep -qw utilitya || rht-vmctl reset utility
sleep 3 && virsh destroy utility &> /dev/null
echo '
######################
## kvm-patched OK. ##
######################
'
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。