差異處
這裏顯示兩個版本的差異處。
| 兩邊的前次修訂版 前次修改 下次修改 | 前次修改 | ||
| tech:vncserver [2016/10/29 13:09] – jonathan | tech:vncserver [2016/10/29 22:04] (目前版本) – [CentOS 6] jonathan | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| + | ====== CentOS 內設定 VNCServer 方式 ====== | ||
| + | 之前的困擾是 | ||
| + | * vncserver 無法開機自動啟動 | ||
| + | * 登進去所看到的畫面只有標準 X Window , 並沒有 Window Manager(GNOME) | ||
| + | ===== - 安裝相關 RPM ===== | ||
| + | ==== CentOS 5 ==== | ||
| + | * VNC Viewer & Server <code sh> | ||
| + | yum install vnc vnc-server | ||
| + | </ | ||
| + | ==== CentOS 6 ==== | ||
| + | * VNC Viewer & Server <code sh> | ||
| + | yum install tigervnc tigervnc-server | ||
| + | </ | ||
| + | * 如果 CentOS 6 是以 Basic Server 安裝, 要增加 Basic Desktop 相關套件< | ||
| + | yum groupinstall " | ||
| + | </ | ||
| + | |||
| + | ===== - 先手動執行一次 ===== | ||
| + | 假設我要 vncserver 啟動給 root 透過 5909 方式遠端登入, | ||
| + | vncserver :09 | ||
| + | </ | ||
| + | < | ||
| + | * 如果需要更改密碼, | ||
| + | * 如果需要刪除密碼, | ||
| + | </ | ||
| + | |||
| + | ===== - 更改 ~/ | ||
| + | 將以下兩行前面的 # 取消掉 < | ||
| + | : | ||
| + | unset SESSION_MANAGER | ||
| + | exec / | ||
| + | : | ||
| + | </ | ||
| + | |||
| + | ===== - 更改 / | ||
| + | 找到 VNCSERVERS="" | ||
| + | : | ||
| + | VNCSERVERS=" | ||
| + | </ | ||
| + | < | ||
| + | * Centos 6 要更改 / | ||
| + | : | ||
| + | VNCSERVERS=" | ||
| + | VNCSERVERARGS[1]=" | ||
| + | VNCSERVERARGS[9]=" | ||
| + | </ | ||
| + | </ | ||
| + | ===== - 設定開機自動啟動 vncserver ===== | ||
| + | <code sh> | ||
| + | chkconfig vncserver on | ||
| + | </ | ||
| + | |||
| + | ===== - 測試手動啟動與關閉 ===== | ||
| + | <code sh> | ||
| + | service vncserver start | ||
| + | </ | ||
| + | < | ||
| + | [root@pdc-e2160 .vnc]# service vncserver start | ||
| + | 正在啟動 VNC 伺服器: 1:jonathan | ||
| + | New ' | ||
| + | |||
| + | Starting applications specified in / | ||
| + | Log file is / | ||
| + | |||
| + | 9:root | ||
| + | New ' | ||
| + | |||
| + | Starting applications specified in / | ||
| + | Log file is / | ||
| + | |||
| + | | ||
| + | </ | ||
| + | <code sh> | ||
| + | service vncserver stop | ||
| + | </ | ||
| + | < | ||
| + | [root@pdc-e2160 .vnc]# service vncserver stop | ||
| + | 正在關閉 VNC 伺服器: 1:jonathan 9: | ||
| + | </ | ||
| + | |||
| + | ===== 參考網址 ===== | ||
| + | * http:// | ||
| + | * https:// | ||
| + | * http:// | ||
| + | |||
| + | {{tag> | ||