Centos安装后基本的配置:
1、关闭selinux
临时关闭selinux
#setenforce 0
永久关闭selinux
#vi /etc/selinux/config
找到SELINUX=enforce 行,并修改为SELINUX=disabled
2、关闭防火墙
#systemctl stop firewalld
#systemctl disable firewalld
3、开启网卡
先查看网卡名称:
#ip a
马上打开网卡
#ifup ens33
查看ens33网卡是否已经获取IP
#ip a
设置下次开机默认打开网卡
#vi /etc/sysconfig/network-scripts/ifcfg-ens33
找到ONBOOT=no 改为ONBOOT=yes
4、更改yum源
#vi /etc/yum.repos.d/CentOS-qingmei.repo
[c7-localftp]
name=guimei-repo
baseurl=ftp://192.168.2.234/%C8%ED%BC%FE/linux_soft/
gpgcheck=0
enabled=1
5、调整时区及配置时间同步
查看时区列表
#timedatectl list-timezones
调整时区
#timedatectl set-timezone Asia/Shanghai
验证时区
#timedatectl
Leave a Reply