1.安装X Window支持
yum groupinstall "X Window System"
2.安装gnome
yum groupinstall Desktop
3.修改启动级别使开机默认进入图形化界面
vi /etc/inittab
将最后一行id:3:initdefault:中的3改为5.
4重启
注意:重启前千万不要执行startx命令,因为此时gnome下的鼠标和键盘驱动还未加载,进入图形化界面键鼠无响应会造成假死。
安装vncserver服务端和客户端端
yum install tigervnc tigervnc-server -y b.
安装fontforge
yum install fontforge -y
安装桌面软件
yum groupinstall Desktop -y
安装KDE
yum groupinstall "KDE Desktop"。
添加vncserver服务启动参数
vi /etc/sysconfig/vncservers
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768 -localhost
设置配置文件
vi .vnc/xstartup
# twm &
gnome-session & 设置为gnome-session桌面,如果在前面安装了kde桌面,设置为:startkde。
如果想开机启动可以设置
chkconfig vncserver on
service vncserver start|stop|restart
[root@sg146 ~]# netstat -tulnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:5672 0.0.0.0:* LISTEN 1829/qpidd
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 2064/Xvnc
tcp 0 0 0.0.0.0:5902 0.0.0.0:* LISTEN 2508/Xvnc
tcp 0 0 0.0.0.0:46991 0.0.0.0:* LISTEN 1502/rpc.statd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1433/rpcbind
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 2332/X
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 2064/Xvnc
tcp 0 0 0.0.0.0:6002 0.0.0.0:* LISTEN 2508/Xvnc
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1709/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1560/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1786/master
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 2180/sshd
tcp 0 0 :::111 :::* LISTEN 1433/rpcbind
tcp 0 0 :::6000 :::* LISTEN 2332/X
tcp 0 0 :::6001 :::* LISTEN 2064/Xvnc
tcp 0 0 :::6002 :::* LISTEN 2508/Xvnc
tcp 0 0 :::22 :::* LISTEN 1709/sshd
tcp 0 0 ::1:631 :::* LISTEN 1560/cupsd
tcp 0 0 ::1:6010 :::* LISTEN 2180/sshd
tcp 0 0 :::57505 :::* LISTEN 1502/rpc.statd
udp 0 0 0.0.0.0:830 0.0.0.0:* 1502/rpc.statd
udp 0 0 0.0.0.0:42820 0.0.0.0:* 1481/avahi-daemon
udp 0 0 0.0.0.0:52455 0.0.0.0:* 1502/rpc.statd
udp 0 0 0.0.0.0:5353 0.0.0.0:* 1481/avahi-daemon
udp 0 0 0.0.0.0:111 0.0.0.0:* 1433/rpcbind
udp 0 0 0.0.0.0:631 0.0.0.0:* 1560/cupsd
udp 0 0 0.0.0.0:760 0.0.0.0:* 1433/rpcbind
udp 0 0 :::53344 :::* 1502/rpc.statd
udp 0 0 :::111 :::* 1433/rpcbind
udp 0 0 :::760 :::* 1433/rpcbind
[root@sg146 ~]#
Linux防火墙的开与关闭
1) 重启后生效
开启: chkconfig iptables on
关闭: chkconfig iptables off
2) 即时生效,重启后失效
开启: service iptables start
关闭: service iptables stop
[root@sg146 ~]# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
4 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
5 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
1 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
[root@sg146 ~]#