在CentOS上安装TigerVNC,可以按照以下步骤进行:
更新系统包
sudo yum update -y
安装EPEL仓库(如果尚未安装)
sudo yum install epel-release -y
安装TigerVNC服务器
sudo yum install tigervnc-server tigervnc-common -y
配置TigerVNC服务器
vncpasswd
启动VNC服务器
sudo systemctl start vncserver@1.service
sudo systemctl enable vncserver@1.service
@1
表示VNC会话的显示编号,你可以根据需要更改(例如@2
、@3
等)。配置防火墙
sudo firewall-cmd --permanent --add-port=5901/tcp
sudo firewall-cmd --reload
连接到VNC服务器
192.168.1.100:5901
)。如果你需要最新版本的TigerVNC或者对安装过程有特殊需求,可以选择从源码编译安装:
安装依赖包
sudo yum groupinstall "Development Tools" -y
sudo yum install mesa-libGL-devel mesa-libGLU-devel libX11-devel libXext-devel libXrender-devel libXtst-devel libXinerama-devel libXrandr-devel libXcursor-devel libXi-devel -y
下载TigerVNC源码
wget https://github.com/CanaryWorks/tigervnc/releases/download/v1.18.2/tigervnc-1.18.2.tar.gz
tar xvf tigervnc-1.18.2.tar.gz
cd tigervnc-1.18.2
编译并安装
./configure --prefix=/usr/local
make
sudo make install
配置VNC服务器
/usr/local/bin/vncpasswd
/usr/local/bin/vncserver :1
echo "/usr/local/bin/vncserver :1" | sudo tee -a /etc/rc.local
配置防火墙
通过以上步骤,你应该能够在CentOS上成功安装并运行TigerVNC。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:centos tigervnc如何安装