Differences between Centos 6.X and Centos 7.x

Source: Internet
Author: User
Tags centos iptables openssh server firewall


Centos 6.x

[Root @ Lnmp ~] # Whatis man
Man: nothing appropriate
[Root @ Lnmp ~] # Makewhatis
[Root @ Lnmp ~] # Man-f man
Man (1)-format and display the on-line manual pages
Man. config [man] (5)-configuration data for man
Man [manpath] (1)-format and display the on-line manual pages
Centos 7.x

[Root @ localhost ~] # Man-f man
Man: nothing appropriate.
[Root @ localhost ~] # Makewhatis
-Bash: makewhatis: command not found
[Root @ localhost ~] # Mandb
[Root @ localhost ~] # Man-f man
Man (1)-an interface to the on-line reference manuals

Service Startup:


[Root @ Shell byrd] #/etc/init. d/sshd status # query the sshd service status
Openssh-daemon (pid 1183) is running...
[Root @ Shell byrd] #/etc/init. d/sshd restart # restart the sshd service
Stopping sshd: [OK]
Starting sshd: [OK]
[Root @ Shell byrd] # service sshd restart # restart the sshd service
[Root @ Shell byrd] # chkconfig -- list | grep 3: on # start the service


[Root @ hz ~] # Systemctl status sshd. service # query the sshd service status
Sshd. service-OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd. service; enabled)
Active: active (running) since Tue 2016-01-12 16:04:22 CST; 5 min ago
Process: 2018 ExecStartPre =/usr/sbin/sshd-keygen (code = exited, status = 0/SUCCESS)
Main PID: 2019 (sshd)
CGroup:/system. slice/sshd. service
[Root @ hz ~] # Systemctl restart sshd. service # restart the sshd service
[Root @ hz ~] # Systemctl list-unit-files | grep enabled # Query all startup services


Centos6.x (iptables by default ):

[Root @ Shell byrd] # iptables-t filter-a input-p tcp -- dport 22-j ACCEPT # port 22 is allowed. The default sshd service

Centos7.x (firewalld by default ):

[Root @ hz ~] # Firewall-cmd -- permanent -- zone = public -- add-port = 22/tcp # port 22 is allowed. The sshd service is used by default.
Not finished yet !!!

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.