Linux系統安裝VNC
一、安裝tigervnc-server VNC軟體包
[root@localhost ~]# yum install tigervnc-server ###沒有配置yum源可以使用 rpm -ivh安裝 [root@localhost ~]# rpm -qc tigervnc-server /etc/sysconfig/vncservers [root@localhost ~]# chkconfig --level 35 vncserver on
二、目的:以root使用者啟動
[root@localhost ~]# vim /etc/sysconfig/vncservers VNCSERVERS="1:root" 以vnc使用使用者登入系統,建立vnc密碼,vncpasswd [root@localhost ~]$ vncpasswd Password: 輸入密碼 Password must be at least 6 characters - try again Password: 再次輸入密碼 Verify:
啟動服務一次,生成 /home/visitor/.vnc/xstartup
[root@localhost ~]$ vncserver New 'localhost.localdomain:1 (visitor)' desktop is localhost.localdomain:1 Starting applications specified in /home/visitor/.vnc/xstartup Log file is /home/visitor/.vnc/localhost.localdomain:1.log
三,啟動服務
[root@localhost ~]# /etc/init.d/vncserver start 正在啟動 VNC 伺服器:1:root New 'localhost.localdomain:1 (visitor)' desktop is localhost.localdomain:1 Starting applications specified in /home/visitor/.vnc/xstartup Log file is /home/student/.vnc/localhost.localdomain:2.log [確定]
四.新增防火牆配置
[root@localhost ~]# vim /etc/sysconfig/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT [root@localhost ~]# service iptables restart iptables: Flushing firewall rules: [ OK ] iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Unloading modules: [ OK ] iptables: Applying firewall rules: [ OK ]
PS: 有時因為網路安全要求,不能使用常用埠,需要更改vnc服務的預設埠,按照以下步驟即可:
1。修改vnc的預設埠
[root@localhost ~]# vim /usr/bin/vncserver
註釋:修改如下兩行中預設的埠5900為你想要修改的埠 118:$vncPort = 5900 + $displayNumber;
274: if (!bind(S, pack(‘S n x12’, $AF_INET, 5900 + $n))) {
2.重啟vnc服務 [root@localhost ~]# /etc/init.d/vncserver restar
3.訪問vnc時,比如使用VNC viewer訪問,你訪問的埠比如是:
192.168.2.11:9701 而你在/etc/sysconfig/vncserver中配置的桌面埠是 1:root 那麼在第1步中配置檔案中修改的埠號就應該是 9701-1=9700
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30484956/viewspace-2675382/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- VNC,Linux系統下如何安裝和連線VNC!VNCLinux
- Linux安裝配置vncLinuxVNC
- linux上安裝VNCLinuxVNC
- vnc for linux 安裝與使用VNCLinux
- 透過vnc 安裝linuxVNCLinux
- vnc遠端安裝,在Linux中vnc遠端安裝的教程VNCLinux
- vnc安裝步驟,4個vnc安裝步驟實現vnc與Linux的連線VNCLinux
- vnc管理工具,vnc管理工具安裝使用教程,linux如何安裝vnc server?VNCLinuxServer
- vnc安裝步驟,如何在Linux(CentOS 7)下vnc安裝步驟VNCLinuxCentOS
- zt:通過vnc 安裝linuxVNCLinux
- 安裝vncVNC
- vnc安裝VNC
- vnc安裝步驟,4個在Linux下vnc的個安裝步驟VNCLinux
- Ubuntu系統安裝VNC虛擬網路控制檯UbuntuVNC
- 【VNC】Linux環境VNC服務安裝、配置與使用VNCLinux
- Linux下通過VNC安裝OracleLinuxVNCOracle
- Linux系統安裝Linux
- vnc安裝步驟,vnc安裝步驟詳解VNC
- linux遠端工具vnc啟用,linux遠端工具vnc如何啟用,Linux安裝vnc教程。LinuxVNC
- VNC安裝配置VNC
- CentOS 安裝 VNCCentOSVNC
- Linux系統安裝01-centos7系統安裝LinuxCentOS
- Linux系統安裝——Centos 7.6安裝LinuxCentOS
- LINUX下VNC服務的安裝配置LinuxVNC
- Linux VNC遠端控制安裝日記LinuxVNC
- vnc遠端安裝,10個步驟在Linux中遠端安裝VNC並連線VNCLinux
- LINUX系統的安裝Linux
- linux系統安裝yumLinux
- linux系統安裝nginxLinuxNginx
- Linux系統安裝,教你安裝一個屬於自己的Linux系統Linux
- 【VNC】Linux環境VNC服務安裝、配置與使用(精簡版)VNCLinux
- Solaris下安裝VNCVNC
- 國產Linux系統UOS安裝Linux
- Linux系統安裝redis教程。LinuxRedis
- Linux系統快速安裝JDKLinuxJDK
- Linux系統安裝詳解Linux
- VNC的安裝配置使用VNC
- 在AIX上安裝VNCAIVNC