Example is better than percept
[root@localhost ~]# cd "/media/RHEL_6.3 x86_64 Disc 1/Packages"
[root@localhost Packages]# pwd
/media/RHEL_6.3 x86_64 Disc 1/Packages
rpm -ivh xorg-x11-fonts-misc-7.2-9.1.el6.noarch.rpm \
tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64.rpm
[root@localhost Packages]# rpm -ivh xorg-x11-fonts-misc-7.2-9.1.el6.noarch.rpm \
> tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64.rpm
warning: xorg-x11-fonts-misc-7.2-9.1.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:xorg-x11-fonts-misc ########################################### [ 50%]
2:tigervnc-server ########################################### [100%]
Before we can start our VNC server, we need to edit the configuration file. The file is located in /etc/sysconfig/vncservers.VNCSERVERS="1:oracle"
VNCSERVERARGS[1]="-geometry 800x600"
VNCSERVERS="1:oracle 2:gruffdba"
VNCSERVERARGS[1]="-geometry 800x600"
VNCSERVERARGS[2]="-geometry 800x600"
[root@localhost Packages]# su - oracle
[oracle@localhost ~]$ vncpasswd
Password:
Verify:
[oracle@localhost ~]$
[root@localhost ~]# chkconfig vncserver on
[root@localhost ~]# service vncserver start
Starting VNC server: 1:oracle
New 'localhost.localdomain:1 (oracle)' desktop is localhost.localdomain:1
Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/localhost.localdomain:1.log
[ OK ]
iptables -I INPUT -m state --state NEW -p tcp --destination-port 5901 -j ACCEPT
[root@localhost ~]# /sbin/service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables: [ OK ]
You can check what firewall rules you have as follows:[root@localhost ~]# iptables-save
# Generated by iptables-save v1.4.7 on Tue Mar 26 17:51:12 2013
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [4:608]
-A INPUT -p tcp -m state --state NEW -m tcp --dport 5901 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 1158 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Tue Mar 26 17:51:12 2013
2009 ·Coding Life by TNB
0 Comments:
Post a Comment