{"id":1684,"date":"2018-09-30T08:34:26","date_gmt":"2018-09-30T00:34:26","guid":{"rendered":"https:\/\/damogame.cn:15443\/wordpress\/?p=1684"},"modified":"2018-09-30T08:34:26","modified_gmt":"2018-09-30T00:34:26","slug":"%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%ae%89%e8%a3%85%e6%a1%8c%e9%9d%a2-%e6%9c%ac%e5%9c%b0%e9%80%9a%e8%bf%87vnc%e8%bf%9c%e7%a8%8b%e7%ae%a1%e7%90%86-%e5%9f%ba%e4%ba%8ecentos-7","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/1684","title":{"rendered":"\u670d\u52a1\u5668\u5b89\u88c5\u684c\u9762 \u672c\u5730\u901a\u8fc7vnc\u8fdc\u7a0b\u7ba1\u7406 \u57fa\u4e8eCentOS 7"},"content":{"rendered":"<h1 class=\"c_titile\">\u670d\u52a1\u5668\u5b89\u88c5\u684c\u9762 \u672c\u5730\u901a\u8fc7vnc\u8fdc\u7a0b\u7ba1\u7406 \u57fa\u4e8eCentOS 7<\/h1>\n<p class=\"box\">\u53d1\u5e03\u65f6\u95f4\uff1a2017-6-7 19:14 Wednesday\u00a0\u4f5c\u8005\uff1a<a title=\" admin@138vps.com\" href=\"http:\/\/www.138vps.com\/author\/1\" target=\"_blank\" rel=\"noopener\">\u82cf\u82cf<\/a>\u00a0\u9605\u8bfb\uff082966\uff09<\/p>\n<p>\u672c\u6587\u662fCentOS 7 \u7684\u57fa\u7840\u4e0a\u5b89\u88c5window\u73af\u5883\uff0c\u7136\u540e\u901a\u8fc7vnc\u6765\u7ba1\u7406\u6211\u4eec\u7684VPS\uff0c\u5df2\u7ecf\u5728vultr \u7684 CentOS 7 \u6a21\u677f\u4e0a\u901a\u8fc7\u3002\u540c\u65f6\uff0c\u5982\u65e0\u7279\u522b\u8bf4\u660e\uff0c\u5747\u4e3a root \u7528\u6237\u7684\u64cd\u4f5c\u3002<\/p>\n<p>\u53c2\u8003\u81ea\uff1alinoxide.com\/linux-how-to\/install-configure-vnc-server-centos-7-0\/<\/p>\n<p><strong>\u672c\u6559\u7a0b\u52065\u4e2a\u90e8\u5206<\/strong><\/p>\n<p>1\u3001\u51c6\u5907\u5de5\u4f5c<\/p>\n<p>2\u3001\u5b89\u88c5X-window<\/p>\n<p>3\u3001\u5b89\u88c5VNC<\/p>\n<p>4\u3001\u914d\u7f6eVNC<\/p>\n<p>5\u3001\u672c\u5730\u8fde\u63a5\u53ca\u5176\u4ed6\u6ce8\u610f\u4e8b\u9879<\/p>\n<p><strong>\u4e00\u3001\u51c6\u5907\u5de5\u4f5c<\/strong><\/p>\n<p>\u8bf7\u53c2\u8003\u8be5\u6587\u7ae0\u7684\u51c6\u5907\u5de5\u4f5c\uff1a<a href=\"http:\/\/www.138vps.com\/jzjc\/987.html\" target=\"_blank\" rel=\"noopener\">http:\/\/www.138vps.com\/jzjc\/987.html<\/a><\/p>\n<p>\u672c\u6587\u9700\u8981\u6253\u5f00\u7684\u7aef\u53e3\u4e3a5901\u3002\u5982\u679c\u9632\u706b\u5899\u662ffirewall\uff0c\u53ef\u4ee5\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u4e00\u52b3\u6c38\u9038\u5730\u6253\u5f00\uff0c\u5982\u679c\u662fiptables\uff0c\u5c31\u53c2\u8003\u4e0a\u9762\u90a3\u6587\u7ae0\u7684\u5427<\/p>\n<p>firewall-cmd &#8211;permanent &#8211;add-service vnc-server<\/p>\n<p>systemctl restart firewalld.service<\/p>\n<p>\u8bb0\u5f97\uff0c\u6709\u4e8b\u6ca1\u4e8b\u8981<\/p>\n<p>yum update<\/p>\n<p><strong>\u4e8c\u3001\u5b89\u88c5 X-Window<\/strong><\/p>\n<p>1\u3001\u8fd0\u884c\u4e0b\u9762\u547d\u4ee4\uff0c\u5148\u5b89\u88c5X-Window\uff0c\u5982\u679c\u4f60\u786e\u8ba4\u6ca1\u5b89\u88c5X-Window\u7684\u8bdd\u3002\u8fd9\u4f1a\u6d88\u8017\u8f83\u591a\u7684\u65f6\u95f4<\/p>\n<p>yum groupinstall &#8220;X Window System&#8221;<\/p>\n<p>yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts<\/p>\n<p>unlink \/etc\/systemd\/system\/default.target<\/p>\n<p>ln -sf \/lib\/systemd\/system\/graphical.target \/etc\/systemd\/system\/default.target<\/p>\n<p>\u597d\u4e86\uff0c\u53bb\u7ba1\u7406\u540e\u53f0\u91cd\u542f\u4f60\u7684vps\u5427\uff0c\u6216\u8005\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u91cd\u542f<\/p>\n<p>sync<\/p>\n<p>reboot<\/p>\n<p><strong>\u4e09\u3001\u5b89\u88c5VNC<\/strong><\/p>\n<p>\u8fd0\u884c\u4e0b\u9762\u8fd9\u4e2a\u547d\u4ee4<\/p>\n<p>yum install tigervnc-server<\/p>\n<p><strong>\u56db\u3001\u914d\u7f6eVNC<\/strong><\/p>\n<p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4<\/p>\n<p>cp \/lib\/systemd\/system\/vncserver@.service\u00a0\/etc\/systemd\/system\/vncserver@:1.service<\/p>\n<p>\u7136\u540e\u7528\u4f60\u7684WinSCP \u7f16\u8f91\u8be5\u6587\u4ef6 \u3010\/etc\/systemd\/system\/vncserver@:1.service\u3011 \u627e\u5230\u6700\u4e0b\u9762\u7684\u7c7b\u4f3c\u51e0\u884c\uff0c\u66ff\u6362\u6210<\/p>\n<p>[Unit]<\/p>\n<p>Description=Remote desktop service (VNC)<\/p>\n<p>After=syslog.target network.target<\/p>\n<p>[Service]<\/p>\n<p>Type=simple<\/p>\n<p># Clean any existing files in \/tmp\/.X11-unix environment<\/p>\n<p>ExecStartPre=\/bin\/sh -c &#8216;\/usr\/bin\/vncserver -kill :1 &gt; \/dev\/null 2&gt;&amp;1 || :&#8217;<\/p>\n<p>ExecStart=\/sbin\/runuser -l root -c &#8220;\/usr\/bin\/vncserver :1 -geometry 1280&#215;720 -depth 24&#8221;<\/p>\n<p>PIDFile=\/root\/.vnc\/%H%i.pid<\/p>\n<p>ExecStop=\/bin\/sh -c &#8216;\/usr\/bin\/vncserver -kill :1 &gt; \/dev\/null 2&gt;&amp;1 || :&#8217;<\/p>\n<p>[Install]<\/p>\n<p>WantedBy=multi-user.target<\/p>\n<p>\u597d\u4e86\uff0c\u4e0b\u9762\u91cd\u542f systemd \u3002<\/p>\n<p>systemctl daemon-reload<\/p>\n<p>\u8bbe\u7f6e\u4e00\u4e0bvnc\u7684\u5bc6\u7801\uff0c\u8fd0\u884c\u4e0b\u9762\u7684\u547d\u4ee4\uff0c\u7136\u540e\u8f93\u5165\u5bc6\u7801\uff08\u8bdd\u8bf4\u521a\u5f00\u59cb\u6f0f\u4e86\u8fd9\u6b65\uff0c\u6392\u9519\u6392\u4e86\u4e24\u4e2a\u5c0f\u65f6\uff09<\/p>\n<p>vncpasswd<\/p>\n<p><strong>\u4e94\u3001\u672c\u5730\u8fde\u63a5\u53ca\u5176\u4ed6\u6ce8\u610f\u4e8b\u9879<\/strong><\/p>\n<p>\u4e0b\u9762\u7684\u4e00\u4e9b\u547d\u4ee4\uff0c\u4f60\u8981\u8bb0\u5f97<\/p>\n<p>#\u5f00\u673a\u542f\u52a8VNC<\/p>\n<p>systemctl enable\u00a0vncserver@:1.service<\/p>\n<p>#\u542f\u52a8\u670d\u52a1<\/p>\n<p>systemctl start\u00a0vncserver@:1.service<\/p>\n<p>#\u5173\u95ed VNC \u670d\u52a1<\/p>\n<p>systemctl stop\u00a0vncserver@:1.service<\/p>\n<p>\u7981\u6b62VNC\u5f00\u673a\u542f\u52a8<\/p>\n<p>systemctl disable\u00a0vncserver@:1.service<\/p>\n<p>\u8fd9\u91cc\uff0c\u6211\u4eec\u53c2\u8003\u4e0a\u9762\u7684\u547d\u4ee4\uff0c\u542f\u52a8VNC\u3002<\/p>\n<p>\u7136\u540e\u5c31\u53ef\u4ee5\u6253\u5f00\u4f60\u5fc3\u7231\u7684vncviewer\uff0c\u901a\u8fc7\u3010\u00a0IP:5901\u00a0\u3011\u6765\u8bbf\u95ee\u4f60\u7684vps\u4e86\uff0c\u8fd9\u4e2a\u65f6\u5019VPS\u8fd8\u662f\u5f88\u7b80\u964b\u7684\uff0c\u8fd8\u9700\u8981\u6211\u4eec\u5b89\u88c5\u4e00\u4e9b\u5176\u4ed6\u5e38\u7528\u7684\u8f6f\u4ef6\uff0c\u6bd4\u5982firefox\uff1a<\/p>\n<p>yum -y install firefox<\/p>\n<p>\u5b89\u88c5\u5b8c\u540e\uff0c\u4f60\u53ef\u4ee5\u770b\u5230\uff0c\u5df2\u7ecf\u6709\u6d4f\u89c8\u5668\u4e86\uff0c\u4f46\u662f\u8fd9\u4e2a\u65f6\u5019\u7684\u6d4f\u89c8\u5668\u662f\u4e0d\u652f\u6301\u4e2d\u6587\u7684\uff0c\u56e0\u4e3a\u6211\u4eec\u7684\u7cfb\u7edf\u6ca1\u6709\u5b89\u88c5\u4e2d\u6587\u7684\u7f18\u6545\uff0c\u81ea\u5df1\u767e\u5ea6\u5982\u4f55\u5b89\u88c5\u4e2d\u6587\u5427\u3002<\/p>\n<p><a id=\"ematt:1607\" href=\"http:\/\/www.138vps.com\/content\/uploadfile\/201706\/6dfe1496834376.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" title=\"\u70b9\u51fb\u67e5\u770b\u539f\u56fe\" src=\"http:\/\/www.138vps.com\/content\/uploadfile\/201706\/6dfe1496834376.jpg\" alt=\"a2.jpg\" width=\"636\" height=\"359\" border=\"0\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u670d\u52a1\u5668\u5b89\u88c5\u684c\u9762 \u672c\u5730\u901a\u8fc7vnc\u8fdc\u7a0b\u7ba1\u7406 <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[24],"tags":[121],"class_list":["post-1684","post","type-post","status-publish","format-standard","hentry","category-value_docs","tag-05-"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/1684","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=1684"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/1684\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=1684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=1684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=1684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}