很多人需要有一个远程的带桌面的系统来实现某些功能,比如挂机或者运行某些windows上的程序,如果本身是windows,这种很容易实现,而linux VPS中,KVM VPS有些可以直接安装win,而openvz的vps则是相对比较难以运行。
这里介绍的方法,可以让普通的OpenVZ也能实现桌面环境,另外可以用firefox来挂机。
第一、安装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 https://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 1000×700″‘ >> /etc/vncserver/vncservers.conf; cd /etc/init.d/; wget https://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 https://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 1000×700″‘ >> /etc/vncserver/vncservers.conf; cd /etc/init.d/; wget https://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 1000×700″‘ >> /etc/sysconfig/vncservers; vncpasswd; chkconfig vncserver on –level 345; reboot;
以上3个方法针对Ubuntu, Debian, CentOS发行版本。老蒋都测试过可以使用的,我们只需要将VPS安装成上面的发行版本之一,然后执行。
记住,在完成安装之前需要我们输入两次VNC密码,然后会自动重启服务器。
第二、登录VNC远程桌面
下载VNC工具 点击下载
alt=”XFCE-8″ width=”436″ height=”187″ data-tag=”bdshare” />
这里通过VNC工具登陆,输入我们的IP:1,密码是我们设置的密码。
第三、VNC远程界面操作
我们登录后可以看到桌面的界面,这个一键包包括火狐浏览器都安装了,对于一些需要浏览器挂机的,方便很多了。
第四、安装wine运行windows程序
以centos为例
yum install epel-release $ yum install wine
评论前必须登录!
注册