2014年5月31日星期六

CentOS6 快速搭建轻量级远程桌面 Xfce & VNC &&Firefox

1、为了避免在安装过程中出现Yum源下载的问题,请先执行一下升级:

yum -y update

2、执行命令:cat /etc/redhat-release 和 getconf LONG_BIT,查看一下你的Linux版本和系统位数。

3、如果你的CentOS是32位的,请依次执行以下命令:

wget http://iwanc.googlecode.com/svn/trunk/CentOS32_xfce_vnc.sh

sh CentOS32_xfce_vnc.sh

4、如果你的CentOS是64位的,请依次执行下列命令:

wget http://iwanc.googlecode.com/svn/trunk/CentOS64_xfce_vnc.sh

sh CentOS64_xfce_vnc.sh

5、脚本安装过程,仅需要输入两次VNC密码。

6、该脚本会自动帮我们安装好VNC 服务、xfce桌面、中文字体、Firefox火狐浏览器和Flash player插件,安装完成之后会自动重启一下系统。

7、启动你本机电脑上的 VNCviewer,这里是VNCviewer下载地址。输入VPS主机的IP后面再加上“:1”。

8、连接过程要输入密码,连接成功后你就能看到Linux的远程桌面了。

原文地址:http://www.iwanc.com/?p=432

centos 6 32bit 安装firefox28:

cd /usr/local
wget http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/linux-i686/en-US/firefox-28.0.tar.bz2
tar xvjf firefox-28.0.tar.bz2
sudo mv /usr/bin/firefox /usr/bin/firefox-old
ln -s /usr/local/firefox/firefox /usr/bin/firefox


卸载无用服务

yum -y remove portmap* httpd* bind9* samba* nscd* sendmail*
(卸载sendmail会把crond卸载掉,所以这步要在Centos安装和运行crond服务之前)

禁止VNC config开机启动
 
vim /root/.vnc/xstartup
注释掉下面一行:
#vncconfig -iconic &
  
Centos安装和运行crond服务

yum -y install vixie-cron
yum -y install crontabs
service crond start 
chkconfig  crond on

Firefox优化
点击查看

CentOS32_xfce_vnc.sh

#!/bin/bash

yum -y install tigervnc-server
vncserver

wget http://iwanc.googlecode.com/svn/trunk/i386/epel-release-6-8.noarch.rpm &&
rpm -ivh epel-release-6-8.noarch.rpm
yum search xfce
yum groupinfo xfce
yum -y groupinstall xfce

yum -y groupinstall chinese-support
yum -y install firefox
wget http://iwanc.googlecode.com/svn/trunk/i386/libflashplayer.so
mkdir -p ~/.mozilla/plugins/
cp libflashplayer.so ~/.mozilla/plugins/

echo 'VNCSERVERS="1:root"' >> /etc/sysconfig/vncservers
echo 'VNCSERVERARGS[1]="-geometry 1024x768"' >> /etc/sysconfig/vncservers

cat >/root/.vnc/xstartup <<EOF
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
startxfce4 &
EOF

chmod +x ~/.vnc/xstartup
chkconfig NetworkManager off
service NetworkManager stop
chkconfig vncserver on
reboot

没有评论:

发表评论