运维开发网

taiger VNC 搭建

运维开发网 https://www.qedev.com 2020-08-30 12:06 出处:51CTO 作者:lijun2008x
一,优化centos71,修改主机名:hostnamectlset-hostnamevnc-server2,更改源镜像为阿里http://mirrors.aliyun.com/yuminstall-yepel-releasewget-O/etc/yum.repos.d/epel-7.repohttp://mirrors.aliyun.com/repo/epel-7.repowget-O/etc/y

一,优化centos7

1,修改主机名:hostnamectl set-hostname vnc-server

2,更改源镜像为阿里 http://mirrors.aliyun.com/

yum install -y epel-release

wget -O /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

yum clean all

yum makecache

3,关闭防火墙和selinxu

systemctl stop firewalld systemctl disable firewalld

setenforce 0 sed -i 's/SELinux=enforcing/SELinux=disabled/' /etc/seLinux/config

4,安装图形化mate桌面

yum groups install "MATE Desktop"

yum groups install "X Window System" -y

systemctl set-default graphical.target

reboot

5,安装tigevnc

yum -y install tigervnc-server tigervnc

添加用户useradd innosilicon2 passwd innosilicon2

设置 VNC密码 su innosilicon2 vmcpasswd

设置用户桌面session 登录到图形化innosilicon2的桌面

vim /home/innosilicon2/.vnc/xstartup

mate-session &

6,设置启动项

cp /lib/systemd/system/[email protected]/lib/systemd/system/[email protected]

vim /etc/systemd/system/[email protected]

[Unit]

Description=Remote desktop service (VNC)

After=syslog.target network.target

[Service]

Type=forking

User=innosilicon1

PrivateTmp=true

Clean any existing files in /tmp/.X11-unix e

ExecStart=/usr/bin/vncserver -depth 24 -geometry 1600x900 :1

ExecStop=/usr/bin/vncserver -kill :1

[Install]

WantedBy=multi-user.target

启动启动项systemctl start [email protected]

7,利用realvnc或者tige vnc 登录到vnc server中的

taiger VNC 搭建

扫码领视频副本.gif

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号