mac vpc to centos 7.4

2022-05-12 10:38:36 浏览数 (1)

安装gnome

代码语言:javascript复制
yum check-update
yum upgrade
yum groupinstall "X Window System" "GNOME Desktop" -yyum groupinstall -y "GNOME Desktop"
systemctl set-default graphical.target
reboot

不需要:

代码语言:javascript复制
unlink /etc/systemd/system/default.target
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

安装vnc

代码语言:javascript复制
# 不需要了,直接用root
useradd mingjie sudo -g
usermod -aG wheel mingjie

yum install -y tigervnc-server
cat << EOF >  /lib/systemd/system/vncserver@:1.service
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i"
PIDFile=/root/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
EOF

systemctl daemon-reload

配置

代码语言:javascript复制
# 清理现存的vnc
vncserver -kill :1
ps -ef | grep vnc | awk '{print $2}' | xargs kill

vncpasswd
systemctl start vncserver@:1.service
systemctl enable vncserver@:1.service



ss -tulpn|grep vnc
service iptables stop
firewall-cmd --permanent --add-service vnc-server
systemctl stop firewalld.service

安装chrome

代码语言:javascript复制
cat << EOF > /etc/yum.repos.d/google-chrome.repo
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl.google.com/linux/linux_signing_key.pub
EOF

yum -y install google-chrome-stable --nogpgcheck

安装debug工具

https://www.cnblogs.com/simoncook/p/9662060.html

0 人点赞