基于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