echo "QD-44-WEB" > /etc/hostname
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache
systemctl set-default multi-user.target
echo "alias rm='rm -i'" >> ~/.bashrc
echo "alias cp='cp -i'" >> ~/.bashrc
echo "alias mv='mv -i'" >> ~/.bashrc
echo "alias vi=vim" >> ~/.bashrc
echo "alias dk='docker'" >> ~/.bashrc
echo "alias work='cd /schoolface'" >> ~/.bashrc
echo "export PS1='\[\e[0;31m\]\u\[\e[0;37m\]@\[\e[0;33m\]\h\[\e[0;36m\][\w]\[\e[0;0m\n>>'" >> ~/.bashrc
echo "GLOG_logtostderr=1" >> ~/.bashrc
echo "export GLOG_logtostderr" >> ~/.bashrc
source ~/.bashrc
echo "set nu" >> ~/.vimrc
echo "set ts=4" >> ~/.vimrc
echo "set shiftwidth=4" >> ~/.vimrc
echo "hi comment ctermfg=6" >> ~/.vimrc
systemctl stop rpcbind.socket
systemctl stop rpcbind
systemctl disable rpcbind.socket
systemctl disable rpcbind
yum -y remove postfix
yum -y remove firewalld
yum -y remove dnsmasq
yum -y remove cups
yum -y update
本文主要介绍了 CentOS 7 系统初始化的相关操作,包括设置主机名、更换 yum 源、清理和更新缓存、设置系统默认运行级别、添加命令别名、配置 vim 编辑器、停止并禁用部分服务、卸载部分软件以及更新系统等内容。
3872

被折叠的 条评论
为什么被折叠?



