标签:security open csdn init amp shell tde nop cee
最近玩承载式云管平台和虚拟化平台做软路由较多,自己打磨的虚拟机模板也比较多,尽管某些早起的模板不如最近打磨的完善,但作为个人知识经验的结晶,也不想丢弃,因此想要通过某种方式把他们集中管控起来,以便在未来的工作环境中按需使用。【注意:51CTO对技术实验贴会以广告为由进行删除,若本文遭遇删除,敬请访问本人的 CSDN 博客,地址为:
https://blog.csdn.net/UsamaBinLaden6976498/article/details/106754225
】
脚本名称:initDebian9OSaliYUM.sh
apt-get install -y sudo
DescriptionUser=$(who | grep jamesbond007 | sed -n ‘1p‘ | cut -d‘ ‘ -f 1 | sort | uniq)
cp /etc/sudoers /etc/sudoers.original
echo "$DescriptionUser ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers
mv /etc/apt/sources.list /etc/apt/sources.list.original
echo "deb?http://mirrors.aliyun.com/debian/?stretch main non-free contrib" >> /etc/apt/sources.list
echo "deb-src?http://mirrors.aliyun.com/debian/?stretch main non-free contrib" >> /etc/apt/sources.list
echo "deb?http://mirrors.aliyun.com/debian-security?stretch/updates main" >> /etc/apt/sources.list
echo "deb-src?http://mirrors.aliyun.com/debian-security?stretch/updates main" >> /etc/apt/sources.list
echo "deb?http://mirrors.aliyun.com/debian/?stretch-updates main non-free contrib" >> /etc/apt/sources.list
echo "deb-src?http://mirrors.aliyun.com/debian/?stretch-updates main non-free contrib" >> /etc/apt/sources.list
echo "deb?http://mirrors.aliyun.com/debian/?stretch-backports main non-free contrib" >> /etc/apt/sources.list
echo "deb-src?http://mirrors.aliyun.com/debian/?stretch-backports main non-free contrib" >> /etc/apt/sources.list
apt-get clean all
apt-get update
apt-get install -y vim
apt-get install -y net-tools
ip addr
echo "AllowRoot = true" >> /etc/gdm3/daemon.conf
sed -i ‘s/^.pam_succeed_if.so./# &/‘ /etc/pam.d/gdm-password
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
wget?https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt-get install -y ./google-chrome-stable_current.deb
apt-get install -y ntpdate
ntpdate cn.ntp.org.cn
apt-get install -y tree
init 6
标签:security open csdn init amp shell tde nop cee
原文地址:https://blog.51cto.com/6286393/2504806