CentOS 7 vs. CentOS 6 different

Source: Internet
Author: User
Tags i18n locale

(1) Desktop system

[CentOS6] GNOME 2.x

[CentOS7] Gnome 3.x (Gnome Shell)

(2) file system

[CentOS6] Ext4

[CentOS7] Xfs

(3) Kernel version

[CentOS6] 2.6.x-x

[CentOS7] 3.10.x-x

(4) Boot loader

[CentOS6] GRUB Legacy (+efibootmgr)

[CentOS7] GRUB2

(5) Firewall

[CentOS6] Iptables

[CentOS7] Firewalld

(6) Default database

[CentOS6] Mysql

[CentOS7] MariaDB

(7) File structure

[CentOS6]/bin,/sbin,/lib, and/lib64 in/under

[CentOS7]/bin,/sbin,/lib, and/lib64 move to/usr

(8) Host name

[CentOS6]/etc/sysconfig/network

[CentOS7]/etc/hostname

$ hostnamectl set-hostname OraRacNode1

(9) Time synchronization

[CentOS6]

$ ntp

$ ntpq-p

[CentOS7]

$ chrony

$ CHRONYC Sources

(10) Modification time

[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) Modified Area

[CentOS6]

$ vim/etc/sysconfig/i18n

Lang= "Ja_jp.utf8"

$/etc/sysconfig/i18n

$ locale

[CentOS7]

$ localectl Set-locale Lang=ja_jp.utf8

$ LOCALECTL Status

(12) Service-related

1) Start stop

[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

2) Self-priming

[CentOS6]

$ chkconfig service_name on/off

[CentOS7]

$ systemctl Enable Service_Name

$ systemctl Disable service_name

For example:

Start a service: Systemctl start Postfix.service

Close a service: Systemctl stop Postfix.service

Restart a service: Systemctl restart Postfix.service

Displays the status of a service: Systemctl status Postfix.service

Enable a service at boot: Systemctl enable Postfix.service

Disable a service at boot: systemctl disable Postfix.service

Check to see if the service is booting: Systemctl is-enabled Postfix.service;echo $?

To view a list of services that have been started: Systemctl List-unit-files|grep enabled

Description: The Enable service is in the current "runlevel" configuration file directory/etc/systemd/system/multi-user.target.wants/, establish/usr/lib/systemd/ A soft link within the system that corresponds to the service profile; Disabling the service is removing the soft link.

(1) The SYSTEMD uses a more free target alternative than the Sysvinit run level.

The 3rd run level is replaced with Multi-user.target. The 5th run level is replaced with Graphical.target. Runlevel3.target and Runlevel5.target are symbolic links that point to Multi-user.target and Graphical.target, respectively.
You can use the following command to switch to run Level 3:
Systemctl isolate Multi-user.target or Systemctl isolate Runlevel3.target
You can use the following command to switch to run Level 5:
Systemctl isolate Graphical.target or Systemctl isolate Runlevel5.target

(2) How do I change the default runlevel?
SYSTEMD uses links to point to the default runlevel. Before creating a new link, you can delete the existing link by following the command: Rm/etc/systemd/system/default.target
Default startup Run Level 3:
Ln-sf/lib/systemd/system/multi-user.target/etc/systemd/system/default.target
Default startup Run Level 5:
Ln-sf/lib/systemd/system/graphical.target/etc/systemd/system/default.target
SYSTEMD does not use/etc/inittab files.

(3) How do I check the current runlevel?
The old RunLevel command can still be used under SYSTEMD. You can continue to use it, although SYSTEMD replaces the previous system's runlevel with the ' target ' concept (multiple ' target ' can be activated simultaneously).
The equivalent SYSTEMD command is Systemctl list-units–type=target

3) Services at a glance

[CentOS6]

$ chkconfig--list

[CentOS7]

$ systemctl List-unit-files

$ systemctl--type Service

4) Force stop

[CentOS6]

$ kill-9 <PID>

[CentOS7]

$ systemctl Kill--signal=9 sshd

(13) Network

1) Network Information

[CentOS6]

$ netstat

$ netstat-i

$ netstat-n

[CentOS7]

$ IP N

$ ip-s L

$ ss

2) IP address MAC address

[CentOS6]

$ ifconfig-a

[CentOS7]

$ IP Address Show

$ NMCLI Connection Show

3) routing

[CentOS6]

$ route-n

$ route-a Inet6-n

[CentOS7]

$ IP Route Show

$ ip-6 Route Show

(14) Restart shutdown

1) Close

[CentOS6]

$ shutdown-h Now

[CentOS7]

$ poweroff

$ systemctl Poweroff

2) Restart

[CentOS6]

$ reboot

$ shutdown-r Now

[CentOS7]

$ reboot

$ systemctl Reboot

3) Single user mode

[CentOS6]

$ init S

[CentOS7]

$ systemctl Rescue

4) Startup mode

[CentOS6]

[Guicui]

$ vim/etc/inittab

Id:3:initdefault:

[Cuigui]

$ startx

[CentOS7]

[Guicui]

$ systemctl Isolate Multi-user.target

[Cuigui]

$systemctl Isolate Graphical.target

Default

$ systemctl Set-default Graphical.target

$ systemctl Set-default Multi-user.target

Current

$ systemctl Get-default

    

SYSTEMD-CGLS lists the running processes in a tree, which can recursively display control group content

Reference:

http://urashita.com/archives/1538

Http://qiita.com/sion_cojp/items/115e1671fcbc8f214aee

Https://www.upken.jp/kb/cent6-cent7.html

Http://inaba-serverdesign.jp/blog/20141110/centos7.html

CentOS 7 vs. CentOS 6 different

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.