This is the second day of my participation in Gwen Challenge
Generally, after we buy a cloud server, there is no graphical interface by default. If you want to install a graphical interface for your server, follow this article to install it!
Before you start, check whether your Centos version is 8.0 and whether you have the root account permission.
1. Install the Centos GRAPHICAL interface and restart it
1. Download and install the GUI
- Execute the command
yum groupinstall "Server with GUI" -y
Copy the code
- The installation takes a long time. If the following figure is displayed, the installation is complete.
2. Switch the graphics mode to the default startup mode
- Execute the command
systemctl set-default graphical
Copy the code
- The following figure shows that the switchover is successful
3. Restart the system
- Execute the command
reboot
Copy the code
2. VNC connection to the server
1. Download and install VNC
- Execute the command
yum install tigervnc-server tigervnc-server-module -y
Copy the code
- The following figure shows the success
2. Configure the VNC password
- Execute the command
vncpasswd
Copy the code
- The following figure shows the situation after execution. Generally, select N
Password: enter the Password for the first time Verify: confirm the Password Would you like to enter a view-onlypassword (y/n)? : Indicates whether to create a read-only userCopy the code
3. Start the VNC server
- Execute the command
vncserver
Copy the code
4. View the VNC service port
- Execute the command
ps -aux | grep vnc
Copy the code
In the following figure, 5901 is the port Note: The cloud server needs to add port 5901 to the security group. Please search for details.
5. The COMPUTER uses VNC client to connect to the server
- Download the VNC client first
Click here to download the official website
- Once installed, click on the image below
- Configure the host name and port based on the following figure
–
Connect (the first time to connect the visual interface, you need to select something like language next step)
If you see the picture above, congratulations, the installation is successful. 🎈