reset74.sh

Posted gymumanalvin

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了reset74.sh相关的知识,希望对你有一定的参考价值。

################################
# reset74.sh
################################
# Step1. configure temporary yum repo
mount /dev/sr0 /mnt
rm -f /etc/yum.repos.d/*.repo
cat > /etc/yum.repos.d/base.repo << EOF
[development]
name=CentOS7.4 DVD
baseurl=file:///mnt/
gpgkey=file:///mnt/RPM-GPG-KEY-CentOS-7
EOF
yum clean all
yum repolist

# Step2. install packages
yum install -y vim lrzsz autofs ntp tree

# Step3. configure autofs service (available on startup)
systemctl enable autofs
systemctl start autofs
umount /mnt

# Step4. configure ntpd service (available on startup)
ntpdate 172.20.0.1
cat >> /etc/ntp.conf << EOF
server 172.20.0.1
EOF
systemctl enable ntpd
systemctl start ntpd

# Step5. modefy local yum repo
cat > /etc/yum.repos.d/base.repo << EOF
[development]
name=CentOS7.4 DVD
baseurl=file:///misc/cd/
gpgkey=file:///misc/cd/RPM-GPG-KEY-CentOS-7
EOF
yum clean all
yum repolist

# Step6. configure prompt format
echo "PS1=‘\[\e[1;36m\][\[email protected]\h \W]\\$\[\e[0m\]‘" > /etc/profile.d/env.sh
source /etc/profile.d/env.sh

# Step7. configure localhost name
hname=CentOS74.magedu.com
cat > /etc/hostname<<EOF
`echo ${hname}`
EOF
cat >> /etc/hosts << EOF
`echo -e "127.0.0.1\t${hname}"`
EOF

# Step8. configure alias
cat >> ~/.bashrc << EOF
alias cdnet="cd /etc/sysconfig/network-scripts/;pwd"
alias vie0="vim /etc/sysconfig/network-scripts/ifcfg-ens32"
alias rn="systemctl restart network;ifconfig ens32|head -n2"
EOF
source ~/.bashrc

# Step9. configure sshd access arguments
sed -r -i ‘s/(GSSAPIAuthentication )yes/\1no/‘ /etc/ssh/sshd_config
sed -i ‘s/#UseDNS yes/UseDNS no/‘ /etc/ssh/sshd_config
systemctl restart sshd

以上是关于reset74.sh的主要内容,如果未能解决你的问题,请参考以下文章

JQuery中如何重置(reset)表单

git之reset

mac环境下往码云提交代码出现ex_exchange_identification: read: Connection reset by peer Connection reset by 180.97

mac环境下往码云提交代码出现ex_exchange_identification: read: Connection reset by peer Connection reset by 180.97

mac环境下往码云提交代码出现ex_exchange_identification: read: Connection reset by peer Connection reset by 180.97

keil C51调试时,Reset CPU再次运行就是汇编代码,这是怎么回事