代码拉取完成,页面将自动刷新
#!/bin/bash
# for openeuler init os
# disable NetworkManager change resolve.conf
setenforce 0
# change NetworkManager resolve.conf
sh change-NetworkManager-conf.sh
for connection in $(nmcli connection show | grep -E '^[a-z]' | awk '{print $1}'); do nmcli connection up $connection; done
# sure network ok
read -p "please connect network (y/n) : " answer
if [ ! ${answer} == y ];then
exit
fi
# disable services
sh disable-services.sh
# disable selinux
sh disable-selinux.sh
# deploy chrony
sh deploy-chronyc.sh
# enable rc.local
sh add-Execution-authority.sh
# change limits.conf
sh change-limits.sh
# change sshd to make root login
sh change-sshd-config.sh
# user my alias
if [ -f /etc/profile.d/alias.sh ];then
/usr/bin/cp /etc/profile.d/alias.sh /opt
/usr/bin/cp alias.sh /etc/profile.d/
fi
# set HIST
/usr/bin/cp HIST.sh /etc/profile.d/
/usr/bin/cp read-history /usr/bin/
mkdir -p /var/log/history
chmod +x /usr/bin/read-history
# remove system-info.sh
mv /etc/profile.d/system-info.sh /opt
# update grub
/usr/bin/cp update-grub /usr/bin/
chmod +x /usr/bin/update-grub
# set ps1
echo "os_version=$(grep -o 'openEuler-[0-9]\{2\}\.[0-9]\{2\}-LTS-SP[0-9]' /etc/openEuler-latest) " >> /etc/bashrc
echo 'export PS1="\[\e[31m\][$os_version]\[\e[0m\] \T \[\e[32m\]\u\[\e[m\]\[\e[32m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\] \[\e[36m\]\w\[\e[m\] " '>> /etc/bashrc
# remove motd
sh remove-motd.sh
# install software
sh yum-install-softwares.sh
reboot
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。