1. 程式人生 > >Centos6和7的區別

Centos6和7的區別

all systemctl ini png led 守護進程 iad gnome2 active

技術分享圖片

1、init系統

Linux 操作系統的啟動首先從 BIOS 開始,接下來進入 boot loader,由 bootloader 載入內核,進行內核初始化。內核初始化的最後一步就是啟動 pid 為 1 的 init 進程。這個進程是系統的第一個進程。它負責產生其他所有用戶進程。init 以守護進程方式存在,是所有其他進程的祖先。init 進程非常獨特,能夠完成其他進程無法完成的任務。

Sysvinit就是 system V 風格的 init 系統,Sysvinit 用術語 runlevel 來定義"預訂的運行模式"。Sysvinit 檢查 ‘/etc/inittab‘ 文件中是否含有 ‘initdefault‘ 項。 這告訴 init 系統是否有一個默認運行模式。Sysvinit 使用腳本,文件命名規則和軟鏈接來實現不同的 runlevel,串行啟動各個進程及服務。

Systemd 是 Linux 系統中最新的初始化系統(init),它主要的設計目標是克服 sysvinit 固有的缺點,提高系統的啟動速度。systemd 和 ubuntu 的 upstart 是競爭對手,預計會取代 UpStart。Systemd的目標就是盡可能啟動更少的進程,盡可能將更多進程並行啟動。

2、桌面系統升級,從gnome2.x----->gnome3.x

3、文件系統由原來的ext4升級到xfs格式

EXT4是第四代文件系統,是Linux下的日誌文件系統。

xfs是一個64位文件系統,對於一個32位Linuix系統,文件和文件系統的大小被限制在16TB。

4、內核版本升級,由2.6.x--------->3.10.x

5、防火墻iptables---->firewalld

[root@centos7 ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)  已經關閉
   Active: inactive (dead)  開機不啟動
     Docs: man:firewalld(1)
[root@centos7 ~]# systemctl stop firewalld    #關閉firewalld
[root@centos7 ~]# systemctl disable firewalld.service  #關閉開機啟動

安裝iptables服務並配置

[root@centos7 ~]# yum install iptables-services -y
[root@centos7 ~]# systemctl status iptables
● iptables.service - IPv4 firewall with iptables
   Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
[root@centos7 ~]# systemctl start iptables
[root@centos7 ~]# systemctl enable iptables.service
Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.
[root@centos7 ~]# systemctl status iptables.service
● iptables.service - IPv4 firewall with iptables
   Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled; vendor preset: disabled)
   Active: active (exited) since Sun 2018-03-25 14:07:03 CST; 44s ago
 Main PID: 9727 (code=exited, status=0/SUCCESS)

Mar 25 14:07:03 centos7 systemd[1]: Starting IPv4 firewall with iptables...
Mar 25 14:07:03 centos7 iptables.init[9727]: iptables: Applying firewall rules: [  OK  ]
Mar 25 14:07:03 centos7 systemd[1]: Started IPv4 firewall with iptables.
[root@centos7 ~]# systemctl restart iptables.service
[root@centos7 ~]# iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            state RELATED,ESTABLISHED
ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            state NEW tcp dpt:22
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination          
[root@centos7 ~]# cat /etc/sysconfig/iptables  #iptables配置文件
# sample configuration for iptables service
# you can edit this manually or use system-config-firewall
# please do not ask us to add additional ports/services to this default configuration
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

6、6---->7 默認數據庫Mysql---->MariaDB 

Centos6和7的區別