1. Apply for a lightweight application server on Alibaba Cloud
Aliyun: https://www.aliyun.com/
The configuration is selected, the system selects Ubuntu, and the order is paid. Then go to the admin console.
I chose CentOS at first, but I thought about changing the system back to Ubuntu, so the name here is CentOS, but in fact it is Ubuntu
Enter the management interface, first pay attention to the system of this server, I am here Ubuntu16.04
Then write down the server's public IP.
The connection may be wrong, turn it off and click again.
2. Server GUI installation
Enter the following command to become root user to gain permission.
sudo su root
Then enter the following commands one by one to update the system. This process may require entering a few carriage returns.
apt-get update
apt-get upgrade
Then there is the choice of a graphical user interface.
There are many kinds of graphical user interface, how to choose? https://www.v2ex.com/t/339475
Here I choose to install xfce
So enter on the server command line to install xfce.
apt-get install xfce4
3. Server VNC configuration
Enter the following command on the server command line to install VNC.
apt-get install vnc4server
Then enter the following command to start VNC and have it generate a configuration file.
vncserver :1
Then enter the following command to close the process with VNC. Prevent errors from being reported when the configuration file is modified because the file is occupied.
vncserver -kill :1Then enter the following command to open the VNC startup configuration file.
vi ~ / .vnc / xstartup
Add a "#" in front of "x-window-manager &" to comment out configurations that are no longer needed.
Then add a piece of configuration information at the end of the file
sesion-manager & xfdesktop & xfce4-panel & xfce4-menu-plugin & xfsettingsd & xfconfd & xfwm4 &
Then hit the Esc key twice to exit editing. At this time, the command line has not changed. Don't be nervous.
Then enter ' : ' from the keyboard. My keyboard is to hold down the Shift key and then press the ' ; ' key.
At this point, the cursor will move to the bottom, and then enter wq at the bottom, and press Enter. to save changes and exit vi.
4. Configure the server firewall
Then open the server console firewall and add a rule.
Write first-hand port 5901 and press OK.
Then go back to the console home page and restart the server.
then connect remotely again
Enter the command to become the root user again and gain permissions.
sudo su root
Then enter the following command to start VNC again.
vncserver :1
Okay, the server side is over.
5. Installation and connection of VNC in PC
Download VNC first.
Two downloads are available:
1. Official website: https://www.realvnc.com/en/connect/download/viewer/
Select the version to download and install.
2. Provide first-hand window x64 dial download
Link: https://pan.baidu.com/s/1-oZeVDYceXEAcUj56PD67Q Password: 1rot
VNC installed, VNC turned on.
Enter the server's public IP and ":1" here
Note the difference between ':' and ':', the English one is used here:
The public IP is the one on the console above, the one I asked you to pay attention to.
This will ask you to enter your password. If not set, it is the password of the root user.
Then it is connected to the graphical interface.
complete! ! !