centos 7 vs centos 6的不同
(1)桌面系統
[centos6] gnome 2.x
[centos7] gnome 3.x(gnome shell)
(2)檔案系統
[centos6] ext4
[centos7] xfs
(3)核心版本
[centos6] 2.6.x-x
[centos7] 3.10.x-x
(4)啟動載入器
[centos6] grub legacy (+efibootmgr)
[centos7] grub2
(5)防火牆
[centos6] iptables
[centos7] firewalld
(6)預設資料庫
[centos6] mysql
[centos7] mariadb
(7)檔案結構
[centos6] /bin, /sbin, /lib, and /lib64在/下
[centos7] /bin, /sbin, /lib, and /lib64移到/usr下
(8)主機名
[centos6] /etc/sysconfig/network
[centos7] /etc/hostname
(9)時間同步
[centos6]
$ ntp
$ ntpq -p
[centos7]
$ chrony
$ chronyc sources
(10)修改時間
[centos6]
$ vim /etc/sysconfig/clock
zone="asia/tokyo"
utc=fales
$ sudo ln -s /usr/share/zoneinfo/asia/tokyo /etc/localtime
[centos7]
$ timedatectl set-timezone asia/tokyo
$ timedatectl status
(11)修改地區
[centos6]
$ vim /etc/sysconfig/i18n
lang="ja_jp.utf8"
$ /etc/sysconfig/i18n
$ locale
[centos7]
$ localectl set-locale lang=ja_jp.utf8
$ localectl status
(12)服務相關
1)啟動停止
[centos6]
$ service service_name start
$ service service_name stop
$ service sshd restart/status/reload
[centos7]
$ systemctl start service_name
$ systemctl stop service_name
$ systemctl restart/status/reload sshd
自啟動[centos6]
$ chkconfig service_name on/off
[centos7]
$ systemctl enable service_name
$ systemctl disable service_name
服務一覽
[centos6]
$ chkconfig --list
[centos7]
$ systemctl list-unit-files
$ systemctl --type service
強制停止
[centos6]
$ kill -9
[centos7]
$ systemctl kill --signal=9 sshd
(13)網路
1)網路資訊
[centos6]
$ netstat
$ netstat -i
$ netstat -n
[centos7]
$ ip n
$ ip -s l
$ ss
2)ip位址mac位址
[centos6]
$ ifconfig -a
[centos7]
$ ip address show
3)路由
[centos6]
$ route -n
$ route -a inet6 -n
[centos7]
$ ip route show
$ ip -6 route show
(14)重啟關閉
1)關閉
[centos6]
$ shutdown -h now
[centos7]
$ poweroff
$ systemctl poweroff
2)重啟
[centos6]
$ reboot
$ shutdown -r now
[centos7]
$ reboot
$ systemctl reboot
3)單使用者模式
[centos6]
$ init s
[centos7]
$ systemctl rescue
4)啟動模式
[centos6]
[guicui]
$ vim /etc/inittab
id:3:initdefault:
[cuigui]
$ startx
[centos7]
[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
CentOS 七 vs CentOS 6的不同
centos 7 vs centos 6的不同 1 桌面系統 centos6 gnome 2.x centos7 gnome 3.x gnome shell 2 檔案系統 centos6 ext4 centos7 xfs 3 核心版本 centos6 2.6.x x centos7 3.10.x x...
CentOS 七 搭建 gitlab 伺服器
centos 7搭建gitlab伺服器超詳細 sudo yum install y curl policycoreutils pythonopenssh server將 ssh 服務設定成開機自啟動。sudo systemctl enable sshd sudo systemctl start ss...
CentOS工作內容(七)禁用IPV6
用到的快捷鍵 tab自動補齊 有不知道的嗎 ctrl a移動到當前行的開頭 a ahead ctrl e移動到當前行的開頭 e end ctrl u刪除 剪下 此處至開始所有內容 複製進來 按一下滑鼠右鍵貼上到sercurecrt 複製出去 按住滑鼠左鍵選中在sercurecrt裡要貼上的內容 vi...