centos图形化桌面的文件在哪_Windows 远程连接 CentOS 7 图形化桌面
1.安裝VNC
yum install tigervnc-server
解決方法:
rm -f /var/run/yum.pid
刪除文件后再運行yum即可
2.從VNC備份庫中,復制service文件,到系統service服務管理目錄下
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
3.修改vncserver@:1.service文件
cd ?/etc/systemd/system
vi ?vncserver@:1.service
找到:
ExecStart=/usr/sbin/runuser -l -c "/usr/bin/vncserver %i"
PIDFile=/home//.vnc/%H%i.pid
改為:(改為root用戶)
ExecStart=/usr/sbin/runuser -l root -c "/usr/bin/vncserver %i"
PIDFile=/root/.vnc/%H%i.pid
4.重新加載 systemd
由于在systemd中添了東西,得讓系統重新加載。
systemctl daemon-reload
5.為vncserver@:1.service 設置密碼
vncpasswd
6.關閉防火墻
firewall-cmd --permanent --add-service vnc-server #添加訪問權限
systemctl restart firewalld.service #重啟firewalld
CentOS7 默認采用新防火墻firewall,不再用iptables(service iptables status?查看防火墻狀態 ,chkconfig iptables off 關閉防火墻)。
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall開機啟動
firewall-cmd --state ??#查看默認防火墻狀態(關閉后顯示notrunning,開啟后顯示running)
7.啟動vnc服務
systemctl enable vncserver@:1.service #設置開機啟動
systemctl start vncserver@:1.service ? #啟動vnc會話服務
systemctl status vncserver@:1.service #查看vnc會話服務狀態
systemctl stop vncserver@:1.service #關閉vnc會話服務
8.在windows上下載VNC Viewer
9.連接
在ip后加上:1即可
總結
以上是生活随笔為你收集整理的centos图形化桌面的文件在哪_Windows 远程连接 CentOS 7 图形化桌面的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 360发布年度手机安全报告:90后成被骗
- 下一篇: LOFTER被指将用户作品用于AI训练