【CentOS7】—CentOS操作系统初始化

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了【CentOS7】—CentOS操作系统初始化相关的知识,希望对你有一定的参考价值。

参考技术A 在工作中,centos7操作系统安装完成后,需要对系统做一些初始化工作,方便后期操作。
主要对操作系统的Bios设置、交换分区、防火墙、时间同步、主机名、/etc/hosts等。如果生产环境是虚拟化平台,根据需求,需要关闭CPU节能,关闭临时分区,打开虚拟化功能等。

centos 7 系统初始化

centos 7 服务器初始化

1. mini安装

2. 安装系统包

#yum -y groupinstall additional-devel base compat-libraries console-internet debugging development directory-client hardware-monitoring \

large-systems legacy-unix network-tools performance perl-runtime security-tools storage-client-fcoe storage-client-iscsi \

storage-client-multipath system-admin-tools system-management system-management-messaging-client system-management-snmp \

arabic-support armenian-support assamese-support bengali-support bhutanese-support brazilian-support chinese-support \

czech-support ethiopic-support french-support georgian-support german-support gujarati-support hebrew-support hindi-support \

inuktitut-support italian-support japanese-support


#yum -y install dejagnu expect gcc-gnat imake nasm pexpect fuse-devel gsl perl-Convert-ASN1 perl-Crypt-SSLeay perl-DateManip perl-Mozilla-LDAP \

perl-TimeDate perl-XML-Dumper perl-XML-Grove perl-XML-NamespaceSupport perl-XML-SAX perl-XML-Twig perl-libxml-perl pth python-imaging \

systemtap-sdt-devel libcmpiutil OpenIPMI-libs OpenIPMI-tools ntp dstat vim-common vim-enhanced dmidecode net-snmp net-snmp-libs \

net-snmp-utils dropwatch sysstat screen elinks xinetd lrzsz lm_sensors lsscsi mrtg net-snmp-perl net-snmp-python \

nmap openhpi openhpi-subagent perl-DBD-SQLite perl-Date-Calc perl-Date-Manip perl-Frontier-RPC perl-LDAP perl-Sys-Virt perl-suidperl \

python-dmidecode python-docs tcp_wrappers telnet tree minicom ElectricFence OpenIPMI arptables_jf arpwatch cmake dos2unix ecryptfs-utils \

freeipmi freeipmi-bmc-watchdog freeipmi-ipmidetectd ftp gcc-objc gcc-objc++ hmaccalc ipmitool iptraf lftp libcap-devel \

libguestfs-java libguestfs-mount pcre-devel


3. 服务精简

for i in abrt-ccpp.service abrt-oops.service abrt-vmcore.service abrt-xorg.service abrtd.service atd.service dbus-org.fedoraproject.FirewallD1.service dbus-org.freedesktop.NetworkManager.service dbus-org.freedesktop.nm-dispatcher.service firewalld.service kdump.service libstoragemgmt.service lvm2-monitor.service mcelog.service mdmonitor.service microcode.service NetworkManager-dispatcher.service NetworkManager.service postfix.service  smartd.service  lvm2-lvmetad.socket lvm2-lvmetad.socket lvm2-lvmpolld.socket nfs-client.target remote-fs.target; do systemctl stop $i && systemctl disable $i ; done


4. 设置主机名

hostnamectl set-hostname HK_HKGCS2_LHZQ0095


5. 设置字符集

sed -i "s#zh_CN.UTF-8#en_US.UTF-8#g" /etc/locale.conf


6. 安装zabbix

rpm -ivh zabbix-agent-2.4.6-15.tg.x86_64.rpm --nodeps


7. 网卡bond1

http://www.aichengxu.com/linux/5007864.htm


本文出自 “技术成就未来” 博客,请务必保留此出处http://jishuweiwang.blog.51cto.com/6977090/1906919

以上是关于【CentOS7】—CentOS操作系统初始化的主要内容,如果未能解决你的问题,请参考以下文章

新装系统(CentOS7.4)环境初始化配置笔记

CentOS7系统安装及初始化

CentOS7.5 系统安装与初始化配置

CentOS7系统初始化脚本

centos7.3系统的初始化脚本

CentOS7系统安装后初始化基础优化