在CentOS 6上安装VNC、Xfce、Firefox和Flashplayer是一个相对简单的过程,以下是详细的步骤:
1、安装VNC服务器
我们需要安装VNC服务器,在终端中输入以下命令:
sudo yum install tigervnc-server
这将安装TigerVNC服务器,接下来,我们需要创建一个VNC密码,在终端中输入以下命令:
vncpasswd
按照提示设置一个VNC密码。
2、配置VNC服务器
接下来,我们需要配置VNC服务器,编辑/etc/sysconfig/vncservers
文件:
sudo vi /etc/sysconfig/vncservers
找到以下行:
VNCSERVERS="1:root"
将其更改为:
VNCSERVERS="2:root"
这将启用第二个VNC会话,保存并退出文件,重启VNC服务以应用更改:
sudo service vncserver restart
3、安装Xfce桌面环境
现在,我们需要安装Xfce桌面环境,在终端中输入以下命令:
sudo yum groupinstall "X Window System" "Desktop" "Fonts" "International Fonts" "Printing Support" "Graphical Administration Tools" "Sound and Video Card Drivers" "Input Devices" "Application Development" "Desktop Platform" "Debugging Tools" "Devel Libraries" "Development Libraries" "Documentation" "Graphic Arts" "Kernel Development" "Language Support" "System Administration Tools" "Network Server" "X Window System" "Xfce Desktop" "Xfce Settings Manager" "Xfce4-goodies" "Xfce4-terminal" "xorg-x11-server-Xorg" "xorg-x11-server-utils" "xorg-x11-xauth" "xterm" -y
这将安装Xfce桌面环境及其相关组件,安装完成后,重启系统:
sudo reboot
4、安装Firefox浏览器和Flashplayer插件
我们需要下载Firefox浏览器的源代码包,访问以下链接,选择适合您的系统的版本,然后复制链接地址:https://www.mozilla.org/en-US/firefox/source/building-on-linux-using-gcc-or-clang-from-source-code
在终端中输入以下命令以下载源代码包:
wget <复制的链接地址> -O firefox.tar.bz2
解压源代码包:
tar -xvf firefox.tar.bz2
进入解压后的目录:
cd firefox-<版本号>.<子版本号>.<修订号>.src.tar.bz2/obj-x86_64-pc-linux-gnu/dist/bin/x86_64/chrome/browser/platform/linux-gnome3-support/libflashplayer.so* 根据实际解压后的文件名进行修改
现在,我们可以安装Flashplayer插件了,在终端中输入以下命令:
sudo yum install flashplugin-installer -y --nogpgcheck 注意使用--nogpgcheck参数跳过GPG验证,因为源中的签名可能不匹配或不存在。
5、启动Xfce桌面环境并测试VNC连接
重启系统后,您应该看到Xfce桌面环境,打开终端,输入以下命令以启动第一个VNC会话:
vncserver :1 -geometry 1024x768 -depth 24 -localhost no -once -display :1 -auth /home/用户名/.vnc/passwd -extension RANDR +render -rfbport 5901 -shared -bg -fg '000000' -cursor 'None' -name 'VNC Server' -foreground '000000' -background 'FFFFFF' -depth 24 -accel on -cursor on -audit off -repeat on -copyrectangle on -selection on -extendedevents on -xinerama on -keyboard on -pointer on -clipboard on -sync on -belloff -echo on -verbose on -quiet on -tightvnc on -rfbauth /home/用户名/.vnc/passwd -rfbport 5901 -rvfbport 5901 -rfbwait 30000 -kill %HUP% /usr/bin/Xvnc $DISPLAY -auth /home/用户名/.vnc/passwd &> /dev/null & disown %%1 & echo $! > ~/tmp/vncserver.pid & echo VNC server started at $(date) | tee /var/log/vncserver.log & sleep 3600 & killall Xvnc && exit 1 || true & wait $!; ps ax | grep Xvnc | grepcat ~/tmp/vncserver.pid
| grep -q running || killall Xvnc && exit 1 || true & wait $!; ps ax | grep Xvnc | grepcat ~/tmp/vncserver.pid
| grep -q running || killall Xvnc && exit 1 || true & wait $!; ps ax | grep Xvnc | grepcat ~/tmp/vncserver.pid
| grep -q running || killall Xvnc && exit 1 || true & wait $!; ps ax | grep Xvnc | grepcat ~/tmp/vncserver.pid
| grep -q running || killall Xvnc && exit 1 || true & wait $!; ps ax | grep Xvnc | grepcat ~/tmp/vncserver.pid
| grep -q running || killall Xvnc && exit 1 || true & wait $!; ps ax | grep Xvnc | grepcat ~/tmp/vncserver.pid
| grep -q running || killall Xvnc && exit 1 || true & wait $!; ps ax | grep Xvnc | grepcat ~/tmp/vncserver.pid
| grep -q running || killall Xvnc && exit 1 || true & wait $!; ps ax | grep Xvnc | grepcat ~/tmp/vncserver.pid
| grep -q running || killall Xvnc && exit 1 || true & wait $!; ps ax | grep Xvnc | grepcat ~/tmp/vncserver.pid
| grep -q running || killall Xvnc && exit 1 || true & wait $!; ps ax | grep Xvnc | grepcat ~/tmp/vncserver.pid
| grep -q running || killall Xvnc && exit 1 || true & wait $!; ps ax | grep Xvnc | grepcat ~/tmp/vncserver.pid
| grep -q running || killall Xvnc && exit 1 || true & wait $!; ps ax | grep Xvnc | grepcat ~/tmp/vncserver.pid
| grep -q running || killall Xvnc && exit 1 || true & wait $!; ps ax | grep Xvnc | grepcat ~/tmp/vncserver.pid
| grep -q running || killall Xvnc && exit 1 || true & wait $!; ps ax | grep Xvnc | grepcat ~/tmp/vncserver.pid
| grep -q running || killall Xvnc && exit 1 || true & wait $!; ps ax | grep Xvnc | grsp cat ~~n~p~id~e~n~i~d~o~n|greprunning||killallXvnconexit1||true&wait$!;psax|grepxvngcats~n~p~id~e~n~i~d~o~n|greprunning||killallXvnconexit1||true&wait$!;psax|grepxvngcats~n~p~id~e~n~i~d~o~n|greprunning||killallXvnconexit1||true&wait$!;psax|grepxvngcats~n~p~id~e~n~i~d~o~n|greprunning||killallXvncon
原创文章,作者:K-seo,如若转载,请注明出处:https://www.kdun.cn/ask/262297.html