{"id":2756,"date":"2017-09-28T11:28:35","date_gmt":"2017-09-28T03:28:35","guid":{"rendered":"http:\/\/cn.hostease.com\/xueyuan\/?p=2756"},"modified":"2017-09-28T11:28:35","modified_gmt":"2017-09-28T03:28:35","slug":"centos7-vs-centos-6%e7%9a%84%e4%b8%8d%e5%90%8c%e4%b9%8b%e5%a4%84","status":"publish","type":"post","link":"https:\/\/cn.hostease.com\/xueyuan\/jishu\/centos7-vs-centos-6%e7%9a%84%e4%b8%8d%e5%90%8c%e4%b9%8b%e5%a4%84\/","title":{"rendered":"CentOS7 vs CentOS 6\u7684\u4e0d\u540c\u4e4b\u5904"},"content":{"rendered":"<p>CentOS 7 vs CentOS 6\u7684\u4e0d\u540c<br \/>\n<strong>(1)\u684c\u9762\u7cfb\u7edf<\/strong><br \/>\n[CentOS6] GNOME 2.x<br \/>\n[CentOS7] GNOME 3.x\uff08GNOME Shell\uff09<\/p>\n<p><strong>(2)\u6587\u4ef6\u7cfb\u7edf<\/strong><br \/>\n[CentOS6] ext4<br \/>\n[CentOS7] xfs<\/p>\n<p><strong>(3)\u5185\u6838\u7248\u672c<\/strong><br \/>\n[CentOS6] 2.6.x-x<br \/>\n[CentOS7] 3.10.x-x<\/p>\n<p><strong>(4)\u542f\u52a8\u52a0\u8f7d\u5668<\/strong><br \/>\n[CentOS6] GRUB Legacy (+efibootmgr)<br \/>\n[CentOS7] GRUB2<\/p>\n<p><strong>(5)\u9632\u706b\u5899<\/strong><br \/>\n[CentOS6] iptables<br \/>\n[CentOS7] firewalld<\/p>\n<p><strong>(6)\u9ed8\u8ba4\u6570\u636e\u5e93<\/strong><br \/>\n[CentOS6] MySQL<br \/>\n[CentOS7] MariaDB<\/p>\n<p><strong>(7)\u6587\u4ef6\u7ed3\u6784<\/strong><br \/>\n[CentOS6] \/bin, \/sbin, \/lib, and \/lib64\u5728\/\u4e0b<br \/>\n[CentOS7] \/bin, \/sbin, \/lib, and \/lib64\u79fb\u5230\/usr\u4e0b<\/p>\n<p><strong>(8)\u4e3b\u673a\u540d<\/strong><br \/>\n[CentOS6] \/etc\/sysconfig\/network<br \/>\n[CentOS7] \/etc\/hostname<\/p>\n<p><strong>(9)\u65f6\u95f4\u540c\u6b65<\/strong><br \/>\n[CentOS6]<br \/>\n$ ntp<br \/>\n$ ntpq -p<\/p>\n<p>[CentOS7]<br \/>\n$ chrony<br \/>\n$ chronyc sources<\/p>\n<p><strong>(10)\u4fee\u6539\u65f6\u95f4<\/strong><br \/>\n[CentOS6]<br \/>\n$ vim \/etc\/sysconfig\/clock<br \/>\nZONE=&#8221;Asia\/Tokyo&#8221;<br \/>\nUTC=fales<br \/>\n$ sudo ln -s \/usr\/share\/zoneinfo\/Asia\/Tokyo \/etc\/localtime<\/p>\n<p>[CentOS7]<br \/>\n$ timedatectl set-timezone Asia\/Tokyo<br \/>\n$ timedatectl status<\/p>\n<p><strong>(11)\u4fee\u6539\u5730\u533a<\/strong><br \/>\n[CentOS6]<br \/>\n$ vim \/etc\/sysconfig\/i18n<br \/>\nLANG=&#8221;ja_JP.utf8&#8243;<br \/>\n$ \/etc\/sysconfig\/i18n<br \/>\n$ locale<\/p>\n<p>[CentOS7]<br \/>\n$ localectl set-locale LANG=ja_JP.utf8<br \/>\n$ localectl status<\/p>\n<p><strong>(12)\u670d\u52a1\u76f8\u5173<\/strong><\/p>\n<p>1\uff09\u542f\u52a8\u505c\u6b62<br \/>\n[CentOS6]<br \/>\n$ service service_name start<br \/>\n$ service service_name stop<br \/>\n$ service sshd restart\/status\/reload<\/p>\n<p>[CentOS7]<br \/>\n$ systemctl start service_name<br \/>\n$ systemctl stop service_name<br \/>\n$ systemctl restart\/status\/reload sshd<\/p>\n<p>\u81ea\u542f\u52a8<br \/>\n[CentOS6]<br \/>\n$ chkconfig service_name on\/off<\/p>\n<p>[CentOS7]<br \/>\n$ systemctl enable service_name<br \/>\n$ systemctl disable service_name<\/p>\n<p>\u670d\u52a1\u4e00\u89c8<br \/>\n[CentOS6]<br \/>\n$ chkconfig &#8211;list<\/p>\n<p>[CentOS7]<br \/>\n$ systemctl list-unit-files<br \/>\n$ systemctl &#8211;type service<\/p>\n<p>\u5f3a\u5236\u505c\u6b62<br \/>\n[CentOS6]<br \/>\n$ kill -9 &lt;PID&gt;<\/p>\n<p>[CentOS7]<br \/>\n$ systemctl kill &#8211;signal=9 sshd<\/p>\n<p><strong>(13)\u7f51\u7edc<\/strong><\/p>\n<p>1\uff09\u7f51\u7edc\u4fe1\u606f<br \/>\n[CentOS6]<br \/>\n$ netstat<br \/>\n$ netstat -I<br \/>\n$ netstat -n<\/p>\n<p>[CentOS7]<br \/>\n$ ip n<br \/>\n$ ip -s l<br \/>\n$ ss<\/p>\n<p>2\uff09IP\u5730\u5740MAC\u5730\u5740<br \/>\n[CentOS6]<br \/>\n$ ifconfig -a<\/p>\n<p>[CentOS7]<br \/>\n$ ip address show<\/p>\n<p>3\uff09\u8def\u7531<br \/>\n[CentOS6]<br \/>\n$ route -n<br \/>\n$ route -A inet6 -n<\/p>\n<p>[CentOS7]<br \/>\n$ ip route show<br \/>\n$ ip -6 route show<\/p>\n<p><strong>(14)\u91cd\u542f\u5173\u95ed<\/strong><\/p>\n<p>1\uff09\u5173\u95ed<br \/>\n[CentOS6]<br \/>\n$ shutdown -h now<\/p>\n<p>[CentOS7]<br \/>\n$ poweroff<br \/>\n$ systemctl poweroff<\/p>\n<p>2\uff09\u91cd\u542f<br \/>\n[CentOS6]<br \/>\n$ reboot<br \/>\n$ shutdown -r now<\/p>\n<p>[CentOS7]<br \/>\n$ reboot<br \/>\n$ systemctl reboot<\/p>\n<p>3\uff09\u5355\u7528\u6237\u6a21\u5f0f<br \/>\n[CentOS6]<br \/>\n$ init S<\/p>\n<p>[CentOS7]<br \/>\n$ systemctl rescue<\/p>\n<p>4\uff09\u542f\u52a8\u6a21\u5f0f<br \/>\n[CentOS6]<br \/>\n[GUICUI]<br \/>\n$ vim \/etc\/inittab<br \/>\nid:3:initdefault:<br \/>\n[CUIGUI]<br \/>\n$ startx<\/p>\n<p>[CentOS7]<br \/>\n[GUICUI]<br \/>\n$ systemctl isolate multi-user.target<br \/>\n[CUIGUI]<br \/>\n$systemctl isolate graphical.target<br \/>\n\u9ed8\u8ba4<br \/>\n$ systemctl set-default graphical.target<br \/>\n$ systemctl set-default multi-user.target<br \/>\n\u5f53\u524d<br \/>\n$ systemctl get-default<\/p>\n<p>\u53c2\u8003\uff1a<br \/>\nhttps:\/\/urashita.com\/archives\/1538<br \/>\nhttps:\/\/qiita.com\/sion_cojp\/items\/115e1671fcbc8f214aee<br \/>\nhttps:\/\/www.upken.jp\/kb\/cent6-cent7.html<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"0rSIYshMYd\"><p><a href=\"https:\/\/inaba-serverdesign.jp\/blog\/20141110\/centos7.html\">CentOS 7\u306eWeb\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u306b\u95a2\u308f\u308b\u5909\u66f4\u70b9<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;CentOS 7\u306eWeb\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u306b\u95a2\u308f\u308b\u5909\u66f4\u70b9&#8221; &#8212; \u7a32\u8449\u30b5\u30fc\u30d0\u30fc\u30c7\u30b6\u30a4\u30f3\" src=\"https:\/\/inaba-serverdesign.jp\/blog\/20141110\/centos7.html\/embed#?secret=5jaTUuC9iD#?secret=0rSIYshMYd\" data-secret=\"0rSIYshMYd\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS 7 vs CentOS 6\u7684\u4e0d\u540c (1)\u684c\u9762\u7cfb\u7edf [CentOS6] GNOME 2.x [Ce &#8230; <a title=\"CentOS7 vs CentOS 6\u7684\u4e0d\u540c\u4e4b\u5904\" class=\"read-more\" href=\"https:\/\/cn.hostease.com\/xueyuan\/jishu\/centos7-vs-centos-6%e7%9a%84%e4%b8%8d%e5%90%8c%e4%b9%8b%e5%a4%84\/\" aria-label=\"\u9605\u8bfb CentOS7 vs CentOS 6\u7684\u4e0d\u540c\u4e4b\u5904\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[49,5],"tags":[785,676],"class_list":["post-2756","post","type-post","status-publish","format-standard","hentry","category-linux","category-jishu","tag-centos6","tag-centos7"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/2756","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/comments?post=2756"}],"version-history":[{"count":1,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/2756\/revisions"}],"predecessor-version":[{"id":2757,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/2756\/revisions\/2757"}],"wp:attachment":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/media?parent=2756"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/categories?post=2756"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/tags?post=2756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}