有不少的朋友在閱讀上面文章也是可以安裝使用的,但是還有一些使用者提到比較複雜,畢竟對於初次接觸Linux的使用者來說,輸入命令都是一鍵難事。於是老蔣整理到OpenVZ VPS主機基於Ubuntu, Debian, CentOS這3個發行版本安裝VNC遠端桌面的教程。
第一、安裝VNC一鍵包
A、Ubuntu(12.04 32或者64位)
代碼如下 |
複製代碼 |
apt-get update -y;apt-get upgrade -y;apt-get install nano -y;apt-get install gnome-core firefox flashplugin-installer -y;apt-get install vnc4server -y; vncserver; vncserver -kill :1; cd ~; wget http://soft.itbulu.com/vnc/vnc-ubuntu-12.txt -O .vnc/xstartup; mkdir -p /etc/vncserver; echo 'VNCSERVERS="1:root"' >> /etc/vncserver/vncservers.conf; echo 'VNCSERVERARGS[1]="-geometry 1000x700"' >> /etc/vncserver/vncservers.conf; cd /etc/init.d/; wget http://soft.itbulu.com/vnc/vnc-init-ubuntu-12.txt -O vncserver; chmod 755 vncserver; update-rc.d vncserver defaults 99; reboot;
|
B、Debian(7 32或者64位)
代碼如下 |
複製代碼 |
apt-get update -y;apt-get upgrade -y;apt-get install nano -y;apt-get install gnome-core flashplugin-nonfree -y;apt-get install vnc4server -y; vncserver; vncserver -kill :1; cd ~; wget http://soft.itbulu.com/vnc/vnc-debian-7.txt -O .vnc/xstartup; mkdir -p /etc/vncserver; echo 'VNCSERVERS="1:root"' >> /etc/vncserver/vncservers.conf; echo 'VNCSERVERARGS[1]="-geometry 1000x700"' >> /etc/vncserver/vncservers.conf; cd /etc/init.d/; wget http://soft.itbulu.com/vnc/vnc-init-ubuntu-12.txt -O vncserver; chmod 755 vncserver; update-rc.d vncserver defaults 99; reboot;
|
C、CentOS(6 64位)
代碼如下 |
複製代碼 |
yum install nano -y; yum update -y; yum upgrade -y; yum install tigervnc-server -y; yum groupinstall "Desktop" -y; yum install firefox -y; rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm; rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux; yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl -y; echo 'echo "nameserver 8.8.8.8" >> /etc/resolv.conf; ' >> /etc/rc.local; echo 'VNCSERVERS="1:root"' >> /etc/sysconfig/vncservers; echo 'VNCSERVERARGS[1]="-geometry 1000x700"' >> /etc/sysconfig/vncservers; vncpasswd; chkconfig vncserver on --level 345; reboot;
|
以上3個方法針對Ubuntu, Debian, CentOS發行版本。老蔣都測試過可以使用的,我們只需要將VPS安裝成上面的發行版本之一,然後執行。在完成安裝之前需要我們輸入兩次VNC密碼,然後會自動重啟伺服器。
第二、登入VNC遠端桌面
代碼如下 |
複製代碼 |
下載地址:http://soft.itbulu.com/tools/vnc.zip
|
這裡通過VNC工具登陸,輸入我們的IP:1,密碼是我們設定的密碼。
第三、VNC遠程介面操作
我們登入後可以看到介面,老蔣是基於CENTOS6安裝的。這裡連帶Firefox瀏覽器都一併安裝,對於我們操作項目的時候基本上都是基於瀏覽器執行的,是不是很方便的安裝?
總結,這個一鍵安裝VNC案頭的方法比之前步驟安裝簡單很多吧?我們需要注意的是基於對應的版本,因為對應的版本是成功測試過的。如果我們有朋友還是不會安裝,那可以找老蔣協助安裝。