Linux系统初始化配置:网络、换源、服务管理、软件更新

本文介绍了在CentOS系统中如何卸载virbr0虚拟网卡以解决双机软件冲突问题,禁用NetworkManager以简化系统,并列出了一系列关闭不必要的服务以提升系统性能的步骤。此外,还提到了安装常用软件包以增强系统功能。
摘要由CSDN通过智能技术生成

一、virbr0虚拟网卡的卸载方法

在使用双机软件过程中,如果系统是centos 5.x 默认系统安装完成后为xen内核,那么xen内核引导启动后就会有虚拟网卡(vethx、vif0.x、virbr0、xenbr1等)存在。

这就会直接导致双机软件的两台机器中都会有相同的IP地址存在(virbr0网卡的IP地址都为192.168.122.1)。所以会导致双机系统中的主机关机时,备机不会接管的现象。所以,需要将virbr0卸载掉:

  1. 执行命令:yum remove -y libvirt*,用ifconfig -a查看网卡virbr0是否卸载。

  2. 如果执行yum报错, 可以vi /etc/yum/plugincon.d/rhnplugin.conf然后将文件中的enable=1改成enable=0,目的是先禁用此功能,再执行yum remove libvirt进行卸载。

  3. 重启系统

二、卸载network manager

  1. yum remove NetworkManager –y

  2. 设置关闭图形化界面(安装图形化界面,是为了可以应用eclipse,一般应用服务器不会选择安装图形化)

    systemctl set-default multi-user.target

三、换源

https://www.jianshu.com/p/15001d19a9f3

四、关闭不必要的服务

chkconfig nfs off chkconfig pcmcia off chkconfig lpd off chkconfig autofs off chkconfig anacron off chkconfig portmap off chkconfig isdn off chkconfig nfslock off chkconfig sendmail off chkconfig cups off chkconfig smartd off chkconfig bluetooth off chkconfig netfs off chkconfig rpcgssd off chkconfig rpcidmapd off chkconfig rpcbind off chkconfig pcscd off chkconfig smolt off chkconfig cups off chkconfig isdn off chkconfig ip6tables off systemctl disable nfs systemctl disable pcmcia systemctl disable lpd systemctl disable autofs systemctl disable anacron systemctl disable portmap systemctl disable isdn systemctl disable nfslock systemctl disable sendmail systemctl disable cups systemctl disable smartd systemctl disable bluetooth systemctl disable netfs systemctl disable rpcgssd systemctl disable rpcidmapd systemctl disable rpcbind systemctl disable pcscd systemctl disable smolt systemctl disable cups systemctl disable isdn systemctl disable ip6tables systemctl disable firewalld

五、常用包安装

yum -y install gcc yum -y install gcc-c++ yum -y install net-snmp yum -y install ntp yum -y install unzip yum -y install vim-enhanced yum -y install wget yum -y install telnet yum -y install kernel-devel yum -y install finger yum -y install ssh yum -y install nslookup yum -y install zlib-devel yum -y install krb5-devel yum -y install sysstat yum -y install lsof yum -y install fuser yum -y install bind-utils yum -y install glances yum -y install dstat yum -y install net-tools yum -y install vim yum -y install wget

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值