centos6和7对比

之前一直玩6,7出来后一直没接触过,趁着淡季多学点东西。从最简单的安装开始,到RHCE常用实验搭建。

关于6和7的对比。做了一些名字改动。转自微博:https://www.cnblogs.com/bethal/p/5945026.html

                                                            系统改动

名称

CentOS6

Centos7

桌面系统 GNOME 2.x GNOME 3.x(GNOME Shell)
文件系统 ext4 xfs
内核版本 2.6.x-x 3.10.x-x
启动加载器 GRUB Legacy (+efibootmgr) GRUB2
防火墙 iptables firewalld
默认数据库 MySQL MariaDB
系统目录  /bin, /sbin, /lib, and /lib64在/下 /bin, /sbin, /lib, and /lib64移到/usr下
修改主机名 /etc/sysconfig/network /etc/hostname
时间同步 ntp & ntpq -p chrony & chronyc sources
修改时区 vim /etc/sysconfig/clock
   ZONE="Asia/Tokyo"
   UTC=fales
$ sudo ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
$ timedatectl set-timezone Asia/Tokyo
$ timedatectl status
修改默认语言 vim /etc/sysconfig/i18n
   LANG="ja_JP.utf8"
$ /etc/sysconfig/i18n
$ locale
$ localectl set-locale LANG=ja_JP.utf8
$ localectl status

                                                               常用命令改动

名称 Centos6 Centos7
启动停止 $ service service_name start
$ service service_name stop
$ systemctl start service_name
$ systemctl stop service_name
$ systemctl restart/status/reload sshd
自启动 $chkconfig service_name on/off $ systemctl enable service_name
$ systemctl disable service_name
服务一览 chkconfig --list

systemctl list-unit-files

systemctl --type service

杀进程 $ kill -9 <PID> $ systemctl kill --signal=9 sshd
网络 $ netstat
$ netstat -I
$ netstat -n
$ ip n
$ ip -s l
$ ss
查看IP $ ifconfig -a  ip address show
路由 $ route -n
$ route -A inet6 -n
$ ip route show
$ ip -6 route show
关闭 shutdown -h now  $ poweroff
$ systemctl poweroff
重启 $ reboot
$ shutdown -r now
$ reboot
$ systemctl reboot
用户模式 init 3  $ systemctl rescue
启动模式 $ vim /etc/inittab
  id:3:initdefault:
[CUIGUI]
$ startx
[GUICUI]
$ systemctl isolate multi-user.target
[CUIGUI]
$systemctl isolate graphical.target
默认
$ systemctl set-default graphical.target
$ systemctl set-default multi-user.target
当前
$ systemctl get-default

猜你喜欢

转载自blog.csdn.net/hzcm1984/article/details/93203257