{"id":345,"date":"2017-08-09T09:21:29","date_gmt":"2017-08-09T01:21:29","guid":{"rendered":"https:\/\/blog.jsjs.org\/?p=345"},"modified":"2017-08-09T09:21:29","modified_gmt":"2017-08-09T01:21:29","slug":"centos-7-2-%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%aesamba%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/blog.jsjs.org\/?p=345","title":{"rendered":"CentOS 7.2 \u5b89\u88c5\u914d\u7f6eSamba\u670d\u52a1\u5668"},"content":{"rendered":"<h2>1\u80cc\u666f<\/h2>\n<p>\u8f6c\u5230Linux\u6709\u6bb5\u65f6\u95f4\u4e86\uff0cvim\u64cd\u4f5c\u8fd8\u4e0d\u80fd\u5e94\u5bf9\u5de5\u7a0b\u4ee3\u7801\uff0c\u4e4b\u524d\u4e00\u76f4\u90fd\u662fGnome\u684c\u9762 + Clion \u4f5c\u5f00\u53d1\u73af\u5883\uff0c\u65e0\u5948\u5728\u670d\u52a1\u5668\u4e0a\u6ca1\u6709\u8fd9\u6837\u7684\u73af\u5883\uff0c<\/p>\n<p>\u770b\u540c\u4e8b\u662f\uff08Windows\uff09Source Insight + WinSCP + Linux \u5f00\u53d1\uff0c\u6765\u56de\u540c\u6b65\u6587\u4ef6\u6709\u70b9\u9ebb\u70e6\uff0c\u6240\u4ee5\u60f3\u5c1d\u8bd5\u642d\u4e2aSamba\u670d\u52a1\u5668\u505a\u5171\u4eab\u6587\u4ef6\u3002<\/p>\n<p>\u4e0d\u8fc7\u5e0c\u671b\u4ee5\u540e\u8fd8\u662f\u8981\u8f6c\u5230vim\u4e0a\u6765\u3002<\/p>\n<h2>2\u73af\u5883<\/h2>\n<p><a title=\"CentOS\" href=\"http:\/\/www.linuxidc.com\/topicnews.aspx?tid=14\" target=\"_blank\" rel=\"noopener\">CentOS<\/a>\u7cfb\u7edf<\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@linuxidc.com ~]# cat \/etc\/<a title=\"RedHat\" href=\"http:\/\/www.linuxidc.com\/topicnews.aspx?tid=10\" target=\"_blank\" rel=\"noopener\">RedHat<\/a>-release\nCentOS Linux release 7.2.1511 (Core)<\/pre>\n<\/div>\n<p>Samba\u670d\u52a1\u5668<\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@linuxidc.com ~]# rpm -qi samba\nName        : samba\nEpoch       : 0\nVersion     : 4.4.4\nRelease     : 9.el7\nArchitecture: x86_64\nInstall Date: Sun 18 Dec 2016 11:59:56 PM CST\nGroup       : System Environment\/Daemons\nSize        : 1869290\nLicense     : GPLv3+ and LGPLv3+\nSignature   : RSA\/SHA256, Mon 21 Nov 2016 04:38:30 AM CST, Key ID 24c6a8a7f4a80eb5\nSource RPM  : samba-4.4.4-9.el7.src.rpm\nBuild Date  : Mon 07 Nov 2016 06:31:03 PM CST\nBuild Host  : worker1.bsys.centos.org\nRelocations : (not relocatable)\nPackager    : CentOS BuildSystem &lt;http:\/\/bugs.centos.org&gt;\nVendor      : CentOS\nURL         : http:\/\/www.samba.org\/\nSummary     : Server and Client software to interoperate with Windows machines\nDescription :\nSamba is the standard Windows interoperability suite of programs for Linux and\nUnix.<\/pre>\n<\/div>\n<h2>3\u5b89\u88c5<\/h2>\n<div class=\"linuxidc_code\">\n<pre>[root@base ~]# yum -y install samba samba-client<\/pre>\n<\/div>\n<h2>4\u914d\u7f6e<\/h2>\n<p><strong>\u8fdb\u5165samba\u914d\u7f6e\u76ee\u5f55<\/strong><\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@base ~]# cd \/etc\/samba\/<\/pre>\n<\/div>\n<p><strong>\u5907\u4efdsmb.conf<\/strong><\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@base samba]# mv smb.conf smb.conf.origin<\/pre>\n<\/div>\n<p><strong>\u65b0\u5efasmb.conf<\/strong><\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@base samba]# vim smb.conf<\/pre>\n<\/div>\n<p>\u5185\u5bb9\u5982\u4e0b\uff0c\u4fdd\u5b58\u5e76\u9000\u51fa<\/p>\n<div class=\"linuxidc_code\">\n<pre>[global]\n        workgroup = WORKGROUP\n        server string = Ted Samba Server %v\n        netbios name = TedSamba\n        security = user\n        map to guest = Bad User\n        passdb backend = tdbsam\n\n[FileShare]\n        comment = share some files\n        path = \/smb\/fileshare\n        public = yes\n        writeable = yes\n        create mask = 0644\n        directory mask = 0755\n\n[WebDev]\n        comment = project development directory\n        path = \/smb\/webdev\n        valid users = ted\n        write list = ted\n        printable = no\n        create mask = 0644\n        directory mask = 0755<\/pre>\n<\/div>\n<p><strong>\u6ce8\u91ca\uff1a<\/strong><\/p>\n<p>workgroup \u9879\u5e94\u4e0e Windows \u4e3b\u673a\u4fdd\u6301\u4e00\u81f4\uff0c\u8fd9\u91cc\u662fWORKGROUP<\/p>\n<p>security\u3001map to guest\u9879\u8bbe\u7f6e\u4e3a\u5141\u8bb8\u533f\u540d\u7528\u6237\u8bbf\u95ee<\/p>\n<p>\u518d\u4e0b\u9762\u6709\u4e24\u4e2asection\uff0c\u5b9e\u9645\u4e3a\u4e24\u4e2a\u76ee\u5f55\uff0csection\u540d\u5c31\u662f\u76ee\u5f55\u540d\uff08\u6620\u5c04\u5230Windows\u4e0a\u53ef\u4ee5\u770b\u89c1\uff09\u3002<\/p>\n<p>\u7b2c\u4e00\u4e2a\u76ee\u5f55\u540d\u662fFileShare\uff0c\u533f\u540d\u3001\u516c\u5f00\u3001\u53ef\u5199<\/p>\n<p>\u7b2c\u4e8c\u4e2a\u76ee\u5f55\u5417\u662fWebDev\uff0c\u9650\u5b9ated\u7528\u6237\u8bbf\u95ee<\/p>\n<p>\u9ed8\u8ba4\u6587\u4ef6\u5c5e\u6027644\/755\uff08\u4e0d\u7136\u7684\u8bdd\uff0cWindows\u4e0a\u5728\u8fd9\u4e2a\u76ee\u5f55\u4e0b\u65b0\u5efa\u7684\u6587\u4ef6\u4f1a\u6709\u201c\u53ef\u6267\u884c\u201d\u5c5e\u6027\uff09<\/p>\n<p><strong>\u521b\u5efa\u7528\u6237<\/strong><\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@base samba]# groupadd co3\n[root@base samba]# useradd ted -g co3 -s \/sbin\/nologin\n[root@base samba]# smbpasswd -a ted\nNew SMB password:\nRetype new SMB password:\nAdded user ted.\n[root@base samba]#<\/pre>\n<\/div>\n<p>\u6ce8\u610f\u8fd9\u91ccsmbpasswd\u5c06\u4f7f\u7528\u7cfb\u7edf\u7528\u6237\u3002\u8bbe\u7f6e\u5bc6\u7801\u4e3a1<\/p>\n<p><strong>\u521b\u5efa\u5171\u4eab\u76ee\u5f55<\/strong><\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@base samba]# mkdir -p \/smb\/{fileshare,webdev}\n[root@base samba]# chown nobody:nobody \/smb\/fileshare\/\n[root@base samba]# chown ted:co3 \/smb\/webdev\/<\/pre>\n<\/div>\n<p>\u6ce8\u610f\u8bbe\u7f6e\u5c5e\u6027\uff0c\u4e0d\u7136\u8bbf\u95ee\u4e0d\u4e86\u3002<\/p>\n<p><strong>\u542f\u52a8Samba\u670d\u52a1\uff0c\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<\/strong><\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@base samba]# systemctl start smb\n[root@base samba]# systemctl enable smb\nCreated symlink from \/etc\/systemd\/system\/multi-user.target.wants\/smb.service to \/usr\/lib\/systemd\/system\/smb.service.\n[root@base samba]#<\/pre>\n<\/div>\n<p><strong>\u5f00\u653e\u7aef\u53e3<\/strong><\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@base samba]# firewall-cmd --permanent --add-port=139\/tcp\nsuccess\n[root@base samba]# firewall-cmd --permanent --add-port=445\/tcp\nsuccess<\/pre>\n<pre>[root@base samba]# systemctl restart firewalld<\/pre>\n<pre>[root@base samba]#<\/pre>\n<\/div>\n<p>\u6216\u8005\u76f4\u63a5\u628a\u9632\u706b\u5899\u5173\u4e86\u4e5f\u884c\u3002<\/p>\n<h2>5\u4f7f\u7528<\/h2>\n<h3>\u672c\u673a\u6d4b\u8bd5<\/h3>\n<p>\u53ef\u4ee5\u4f7f\u7528testparm\u6d4b\u8bd5samba\u914d\u7f6e\u662f\u5426\u6b63\u786e<\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@base samba]# testparm\nLoad smb config files from \/etc\/samba\/smb.conf\nrlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)\nProcessing section \"[FileShare]\"\nProcessing section \"[WebDev]\"\nLoaded services file OK.\nServer role: ROLE_STANDALONE\n\nPress enter to see a dump of your service definitions\n\n# Global parameters\n[global]\n    netbios name = TEDSAMBA\n    server string = Ted Samba Server %v\n    map to guest = Bad User\n    security = USER\n    idmap config * : backend = tdb\n\n\n[FileShare]\n    comment = share some files\n    path = \/smb\/fileshare\n    guest ok = Yes\n    read only = No\n\n\n[WebDev]\n    comment = project development directory\n    path = \/smb\/webdev\n    create mask = 0644\n\n    valid users = ted\n    write list = ted\n[root@base samba]#<\/pre>\n<\/div>\n<p>root\u7528\u6237\u7684\u8bdd\uff0c\u4e0d\u7528\u5bc6\u7801\u53ef\u76f4\u63a5\u67e5\u770bsamba\u670d\u52a1\u5668\u60c5\u51b5<\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@base samba]# smbclient -L localhost\nEnter root's password:\nDomain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.4.4]\n\n    Sharename       Type      Comment\n    ---------       ----      -------\n    FileShare       Disk      share some files\n    WebDev          Disk      project development directory\n    IPC$            IPC       IPC Service (Ted Samba Server 4.4.4)\nDomain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.4.4]\n\n    Server               Comment\n    ---------            -------\n\n    Workgroup            Master\n    ---------            -------\n[root@base samba]#<\/pre>\n<\/div>\n<h3><strong>Linux\u8bbf\u95ee<\/strong><\/h3>\n<p><strong>Samba\u670d\u52a1\u7aef\u914d\u7f6e<\/strong><\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@linuxidc.com webdev]# vim \/etc\/samba\/smb.conf<\/pre>\n<\/div>\n<p>\u5185\u5bb9\u5982\u4e0b<\/p>\n<div class=\"linuxidc_code\">\n<pre>[global]\n        workgroup = WORKGROUP\n        server string = Samba Server Version %v\n        netbios name = MYSERVER\n        security = user\n        passdb backend = tdbsam\n\n[tvms]\n        path = \/root\/tvms-test\n        public = yes\n        valid user = root\n        writeable = yes\n        printable = no\n        create mask = 0644\n        directory mask = 0755<\/pre>\n<\/div>\n<p>\u5728\u5c40\u57df\u7f51\u5185\u53e6\u5916\u4e00\u53f0\u673a\u5668\u4e0a\uff0c<\/p>\n<p><strong>\u6302\u8f7d\u76ee\u5f55<\/strong><\/p>\n<p>\u5b89\u88c5cifs<\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@linuxidc.com ~]# yum -y install cifs-utils<\/pre>\n<\/div>\n<p>\u6302\u8f7dsmb\u76ee\u5f55<\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@linuxidc.com ~]# mkdir \/mnt\/tvms\n[root@linuxidc.com ~]# mount \/\/192.168.118.133\/tvms \/mnt\/tvms\nPassword for root@\/\/192.168.118.133\/tvms:  *\n[root@linuxidc.com ~]# df -Th\nFilesystem              Type      Size  Used Avail Use% Mounted on\n\/dev\/mapper\/centos-root xfs        18G  988M   17G   6% \/\ndevtmpfs                devtmpfs  479M     0  479M   0% \/dev\ntmpfs                   tmpfs     489M     0  489M   0% \/dev\/shm\ntmpfs                   tmpfs     489M  6.7M  483M   2% \/run\ntmpfs                   tmpfs     489M     0  489M   0% \/sys\/fs\/cgroup\n\/dev\/sda1               xfs       497M  117M  381M  24% \/boot\ntmpfs                   tmpfs      98M     0   98M   0% \/run\/user\/0\n\/\/192.168.118.133\/tvms  cifs       18G  8.5G  9.1G  49% \/mnt\/tvms\n[root@linuxidc.com ~]# ll \/mnt\/tvms\/\ntotal 3952\ndrwxr-xr-x. 10 root root       0 Dec 21 03:40 suricata-3.1.2\n-rw-r--r--.  1 root root 4042824 Dec 21 03:22 suricata-3.1.2.zip\n[root@linuxidc.com ~]#<\/pre>\n<\/div>\n<p>\u8f93\u5165\u5bc6\u7801\uff1a1<\/p>\n<p><strong>\u5378\u8f7d\u76ee\u5f55<\/strong><\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@linuxidc.com mnt]# umount \/mnt\/tvms\/<\/pre>\n<\/div>\n<p>\u5982\u679c\u51fa\u73b0<\/p>\n<div class=\"linuxidc_code\">\n<pre>umount: \/mnt\/tvms: target is busy.\n        (In some cases useful info about processes that use\n         the device is found by lsof(8) or fuser(1))<\/pre>\n<\/div>\n<p>\u53ef\u4ee5\u4f7f\u7528fuser\u5378\u8f7d<\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@linuxidc.com ~]# yum -y install psmisc\n[root@linuxidc.com ~]# fuser -m -v -i -k \/mnt\/tvms\n                          USER        PID ACCESS COMMAND\n\/mnt\/tvms:                root     kernel mount \/mnt\/tvms\n                          root       2760 ..c.. bash\nKill process 2760 ? (y\/N) y\n\nConnection closed by foreign host.\n\nDisconnected from remote host(192.168.118.132) at 19:46:12.\n\nType `help' to learn how to use Xshell prompt.\n[c:\\~]$\n\nConnecting to 192.168.118.132:22...\nConnection established.\nTo escape to local shell, press 'Ctrl+Alt+]'.\n\nWARNING! The remote SSH server rejected X11 forwarding request.\nLast login: Wed Dec 21 03:27:53 2016 from 192.168.118.1\n[root@linuxidc.com ~]# umount \/mnt\n[root@linuxidc.com ~]# df\nFilesystem              1K-blocks    Used Available Use% Mounted on\n\/dev\/mapper\/centos-root  18307072 1011444  17295628   6% \/\ndevtmpfs                   490236       0    490236   0% \/dev\ntmpfs                      500680       0    500680   0% \/dev\/shm\ntmpfs                      500680    6836    493844   2% \/run\ntmpfs                      500680       0    500680   0% \/sys\/fs\/cgroup\n\/dev\/sda1                  508588  118860    389728  24% \/boot\ntmpfs                      100136       0    100136   0% \/run\/user\/0<\/pre>\n<\/div>\n<p><strong>\u81ea\u52a8\u6302\u8f7d\u76ee\u5f55<\/strong><\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@linuxidc.com ~]# vi \/etc\/fstab<\/pre>\n<\/div>\n<p>\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9<\/p>\n<div class=\"linuxidc_code\">\n<pre>\/\/192.168.118.133\/tvms  \/mnt\/tvms               cifs    defaults,username=root,password=1       0 0<\/pre>\n<\/div>\n<p>\u91cd\u65b0\u6302\u8f7d<\/p>\n<div class=\"linuxidc_code\">\n<pre>[root@linuxidc.com ~]# mount -a\n[root@linuxidc.com ~]# df\nFilesystem              1K-blocks    Used Available Use% Mounted on\n\/dev\/mapper\/centos-root  18307072 1012316  17294756   6% \/\ndevtmpfs                   490236       0    490236   0% \/dev\ntmpfs                      500680       0    500680   0% \/dev\/shm\ntmpfs                      500680    6836    493844   2% \/run\ntmpfs                      500680       0    500680   0% \/sys\/fs\/cgroup\n\/dev\/sda1                  508588  118860    389728  24% \/boot\ntmpfs                      100136       0    100136   0% \/run\/user\/0\n\/\/192.168.118.133\/tvms   18307072 8819380   9487692  49% \/mnt\/tvms\n[root@linuxidc.com ~]#<\/pre>\n<\/div>\n<h3><strong>Windows\u8bbf\u95ee<\/strong><\/h3>\n<h4>1\uff09\u5728Windwos\u8d44\u6e90\u7ba1\u7406\u5668\u8bbf\u95ee<\/h4>\n<p>\u8bbf\u95ee\u8def\u5f84\u91cc\u586b\u4e0a: \\\\${Samba\u670d\u52a1\u5668\u7684IP} \uff0c\u7136\u540e\u56de\u8f66\uff0c\u53ef\u4ee5\u770b\u89c1\u5171\u4eab\u7684\u76ee\u5f55\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.linuxidc.com\/upload\/2017_03\/170305102937181.png\" alt=\"\" width=\"705\" vspace=\"5\" \/><\/p>\n<p>FileShare\u662f\u53ef\u4ee5\u533f\u540d\u8bbf\u95ee\u7684\uff0c\u53ef\u4ee5\u8bbf\u95ee\u3001\u65b0\u5efa\u3001\u5220\u9664\u6587\u4ef6\u3002<\/p>\n<p>\u8fd9\u91cc\u62d6\u8fdb\u53bb\u4e00\u4e2atxt\u6587\u4ef6\uff0c\u53ef\u4ee5\u5728Linux\u4e0a\u770b\u89c1\u8be5\u6587\u4ef6\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.linuxidc.com\/upload\/2017_03\/170305102937182.png\" alt=\"\" \/><\/p>\n<h4>2\uff09\u6620\u5c04\u7f51\u7edc\u9a71\u52a8\u5668<\/h4>\n<p>\u53f3\u8fb9\u7684WebDev\u76ee\u5f55\u662f\u9700\u8981\u5bc6\u7801\u8bbf\u95ee\u7684<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.linuxidc.com\/upload\/2017_03\/170305102937183.png\" alt=\"\" width=\"705\" vspace=\"5\" \/><\/p>\n<p>\u8fd9\u91cc\u6f14\u793a\u4e00\u4e0b\u6620\u5c04\u8be5\u76ee\u5f55\u4e3a\u7f51\u7edc\u9a71\u52a8\u5668\u3002<\/p>\n<p>\u201c\u684c\u9762\u201d \u53f3\u952e\u5355\u51fb\u201c\u6b64\u7535\u8111\u201d\uff0c\u9009\u62e9\u201c\u6620\u5c04\u7f51\u7edc\u9a71\u52a8\u5668\u201d<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.linuxidc.com\/upload\/2017_03\/170305102937184.png\" alt=\"\" \/><\/p>\n<p>\u5728\u6587\u4ef6\u5939\u4f4d\u7f6e\u586b\u5199\u8be5\u5171\u4eab\u6587\u4ef6\u7684\u7f51\u7edc\u8def\u5f84\uff0c\u8fd9\u91cc\u662f\\\\192.168.118.132\\WebDev<\/p>\n<p>\u52fe\u9009\u201c\u4f7f\u7528\u5176\u4ed6\u51ed\u636e\u8fde\u63a5\u201d\uff0c\u70b9\u201c\u5b8c\u6210\u201d\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.linuxidc.com\/upload\/2017_03\/170305102937185.png\" alt=\"\" width=\"705\" vspace=\"5\" \/><\/p>\n<p>\u586b\u5199\u7528\u6237\u5bc6\u7801<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.linuxidc.com\/upload\/2017_03\/170305102937186.png\" alt=\"\" \/><\/p>\n<p>\u5728\u6211\u7684\u7535\u8111\u53ef\u4ee5\u770b\u89c1\u8be5\u7f51\u7edc\u9a71\u52a8\u5668\uff08Y\uff09<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.linuxidc.com\/upload\/2017_03\/170305102937187.png\" alt=\"\" width=\"705\" vspace=\"5\" \/><\/p>\n<p>\u8fd9\u91cc\u53ef\u4ee5\u653e\u6e90\u7801\u5de5\u7a0b\uff0c\u7136\u540e\u7528Windows\u4e0b\u7684IDE\u6253\u5f00\u3001\u7f16\u8f91\uff0c\u518d\u5728Linux\u7f16\u8bd1\u3001\u8fd0\u884c\u3002<\/p>\n<p>enjoy it~<\/p>\n<p>\u4ee5\u540e\u6709\u9700\u6c42\u518d\u8865\u5145Linux\u6302\u8f7dsamba\u5171\u4eab\u76ee\u5f55\u3001\u6743\u9650\u914d\u7f6e\u7b49\u7b49\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u80cc\u666f \u8f6c\u5230Linux\u6709\u6bb5\u65f6\u95f4\u4e86\uff0cvim\u64cd\u4f5c\u8fd8\u4e0d\u80fd\u5e94\u5bf9\u5de5\u7a0b\u4ee3\u7801\uff0c\u4e4b\u524d\u4e00\u76f4\u90fd\u662fGnome\u684c\u9762 + Clion \u4f5c\u5f00\u53d1\u73af\u5883\uff0c\u65e0\u5948\u5728\u670d\u52a1\u5668\u4e0a\u6ca1\u6709\u8fd9\u6837\u7684\u73af\u5883\uff0c \u770b\u540c\u4e8b\u662f\uff08Windows\uff09Source Insight + WinSCP + Linux \u5f00\u53d1\uff0c\u6765\u56de\u540c\u6b65\u6587\u4ef6\u6709\u70b9\u9ebb\u70e6\uff0c\u6240\u4ee5\u60f3\u5c1d\u8bd5\u642d\u4e2aSamba\u670d\u52a1\u5668\u505a\u5171\u4eab\u6587\u4ef6\u3002 \u4e0d\u8fc7\u5e0c\u671b\u4ee5\u540e\u8fd8\u662f\u8981\u8f6c\u5230vim\u4e0a\u6765\u3002 2\u73af\u5883 CentOS\u7cfb\u7edf [root@linuxidc.com ~]# cat \/etc\/RedHat-release CentOS [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-345","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=345"}],"version-history":[{"count":0,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/345\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}