违法℃玩家 发表于 2019-4-17 18:07:34

centos7和centos6的区别

  CentOS 7 vs CentOS 6的不同
  (1)桌面系统
   GNOME 2.x
   GNOME 3.x(GNOME Shell)
  (2)文件系统
   ext4
   xfs
  (3)内核版本
   2.6.x-x
   3.10.x-x
  (4)启动加载器
   GRUB Legacy (+efibootmgr)
   GRUB2
  (5)防火墙
   iptables
   firewalld
  (6)默认数据库
   MySQL
   MariaDB
  (7)文件结构
   /bin, /sbin, /lib, and /lib64在/下
   /bin, /sbin, /lib, and /lib64移到/usr下
  (8)主机名
   /etc/sysconfig/network
   /etc/hostname
  (9)时间同步
  
  $ ntp
  $ ntpq -p
  
  $ chrony
  $ chronyc sources
  (10)修改时间
  
  $ 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
  (11)修改地区
  
  $ vim /etc/sysconfig/i18n
  LANG="ja_JP.utf8"
  $ /etc/sysconfig/i18n
  $ locale
  
  $ localectl set-locale LANG=ja_JP.utf8
  $ localectl status
  (12)服务相关
  1)启动停止
  
  $ service service_name start
  $ service service_name stop
  $ service sshd restart/status/reload
  
  $ 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
  
  $ systemctl kill --signal=9 sshd
  (13)网络
  1)网络信息
  
  $ netstat
  $ netstat -I
  $ netstat -n
  
  $ ip n
  $ ip -s l
  $ ss
  2)IP地址MAC地址
  
  $ ifconfig -a
  
  $ ip address show
  3)路由
  
  $ route -n
  $ route -A inet6 -n
  
  $ ip route show
  $ ip -6 route show
  (14)重启关闭
  1)关闭
  
  $ shutdown -h now
  
  $ poweroff
  $ systemctl poweroff
  2)重启
  
  $ reboot
  $ shutdown -r now
  
  $ reboot
  $ systemctl reboot
  3)单用户模式
  
  $ init S
  
  $ systemctl rescue
  4)启动模式
  
  
  $ vim /etc/inittab
  id:3:initdefault:
  
  $ startx
  
  
  $ systemctl isolate multi-user.target
  
  $systemctl isolate graphical.target
  默认
  $ systemctl set-default graphical.target
  $ systemctl set-default multi-user.target
  当前
  $ systemctl get-default
  转自 https://blog.运维网.com/fullseo/1862840

页: [1]
查看完整版本: centos7和centos6的区别