Centos7- basic settings

# Set the hostname
hostnamectl the SET-ABC hostname
# View Network Connections
netstat -lntcp
# Find Software
RPM Python -ql
the Find / tmp / "Py * *"
# vim install
yum install vim
# turn off SELinux
vim / etc / sysconfig / SELinux status changed Disabled
# configure the chrony (NTP compatible, can be used as an NTP server)
Vim /etc/chrony.conf
server side: server ntp.aliyun.com iBurst the allow *
chronyc Tracking
Client end: IP-server server iBurst
the ntpdate -u the IP (-u parameter can cross the firewall and host synchronization)
to check chrony situation: chronyc - Sources sourcestas Client
# yUM relevant
cd /etc/yum.repo
yum Search / List / Update / the Remove / makecache / repolist
# close the network card
ifup eth0 / ifdown eth0
# configure Ali cloud mirror

install wget yum
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base. http://mirrors.aliyun.com/repo/Centos-7.repo the repo
Sed -e -i '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' / etc / yum.repos.d / Base.repo the CentOS-
yum makecache
# configure the DNS
Vim /etc/resolv.conf nameserver IP
# closed IPv6
Vim /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6. 1 =
net.ipv6. =. 1 conf.default.disable_ipv6
sysctl -p
If the system is running
echo. 1> / proc / SYS / NET / IPv6 / the conf / All / disable_ipv6
echo. 1> / proc / SYS / NET / IPv6 / the conf / default / disable_ipv6
or
sysctl -w net.ipv6.conf.all.disable_ipv6 = 1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
重启生效
reboot
netstat -lnpt
#netstat command can not fing
yum install net-tools

Guess you like

Origin www.cnblogs.com/kylingx/p/11616878.html