基于CentOS8.0 远程桌面VNC配置

设置工作站远程桌面(linux CentOS8.0)


Prerequisites


  • A system running CentOS 8 Desktop operating system.

  • A root password is configured on your server.

Getting Started


By default, SELinux is enabled in CentOS 8 operating system and the VNC server will not work properly if SELinux is enabled. So it is a good idea to disable the SELinux in your system. You can disable it by editing the following file:

                               nano /etc/sysconfig/selinux

找到如下命令

SELINUX=enforcing

更改为:

SELINUX=disabled

保存,重启,reboot

Install VNC Server


By default, TigerVNC is available in the CentOS 8 default repository. You can install it by running the following command:

dnf install tigervnc-server tigervnc-server-module -y

Once the installation has been completed, you can proceed to the next step.

Create New User and Set VNS Password


vncpasswd

 Set VNS Password


Password:
Verify:
Would you like to enter a view-only password (y/n)? n
A view-only password is not used

设置config

vim ~/.vnc/config

session=gnome
geometry=1920x1200 
localhost 
alwaysshared

设置用户桌面号

nano /etc/tigervnc/vncserver.users
:1=root
:2=abaqus
:3=ansys
systemctl daemon-reload

启动VNC

systemctl start vncserver@:1.service

设置随开机启动

systemctl enable vncserver@:1.service

sudo systemctl enable vncserver@:1 --now

设置防火墙

firewall-cmd --add-service=vnc-server --permanent

重启防火墙

sudo firewall-cmd --reload

参考文献:

https://www.linuxfordevices.com/tutorials/centos/install-vnc-server-on-centos-8

https://www.how2shout.com/linux/how-to-install-and-configure-vnc-server-on-centos-8/

https://www.howtoforge.com/how-to-install-and-configure-vnc-server-on-centos-8/

附带在linux下设置开机启动licence

定义sh文件 abq2020.sh 

/lmgrd 路径/imgrd -c  /licence路径/ABAQUSLM__lmgrd__SSQ.lic

比如

/DATA/ABAQUS2020/license/lmgrd -c /DATA/ABAQUS2020/_SolidSQUAD_/SolidSQUAD_License_Servers/Vendors/DSSimulia/Licenses/ABAQUSLM__lmgrd__SSQ.lic

接着,修改abq2020.sh属性

    sudo chmod +xrw abq2020.sh 

    chkconfig --add abq2020.sh

    chkconfig  abq2020.sh on

    reboot

通过命令行在linux下启动abaqus

   abaqus cae -mesa

登录后免费查看全文
立即登录
App下载
技术邻APP
工程师必备
  • 项目客服
  • 培训客服
  • 平台客服

TOP

9
3
2