In software development, whether the software is based on B/S architecture or C/S architecture, S, that is, Server, is an indispensable part. But as a beginner in software development who wants to set up a full B/S or C/S learning environment based on a cloud server can be a little more expensive without promotions, let alone physical servers.
So is there a relatively affordable plan? The following is my virtual machine simulation remote server program, the use of tools are free, I hope to help you.
Build tools
-
VMware Player: VMware virtualization software that is free for individual users to use in non-commercial scenarios
-
Ubuntu Server: Choose this Linux distribution because I currently only use the apt package management tool… You can choose another Linux distribution as the case may be
Set up steps
Create a VIRTUAL machine using VMware Player
-
Open VMware Player and start creating VMS
-
Note that you choose to install later to make it easier to deal with unnecessary devices later
-
Select the Linux distribution to install
-
Select a path for storing the VM
-
Select the size and policy of the virtual disk, in this case I chose 20GB and storage by single file
-
The creator will then tell you the default device configuration, but some of it will need to be manually adjusted depending on the situation
-
To emulate the entry-level cloud server, I set memory to 2G, processor to single core, and turned on virtual performance enhancements
-
On the CD/DVD device, select the downloaded system ISO file
-
You can turn off the device configuration after removing temporarily unnecessary devices
-
-
After the VM is created, click Play VM to start OS installation
-
Optional: VMware Player starts VMS in Legacy mode by default. Currently, the UEFI mode is used. To start UEFI mode, go to the VM folder, open the.vmx file with a text editor, and add firmware = “EFI” at the end of the file.
Ubuntu Server installation
After the automatic initialization is complete, the Ubuntu Server installation program is entered. In the program can be selected through the direction key, through the enter key to confirm.
-
The first step was to choose the language, and I chose to keep the default English
-
The keyboard layout is also left as default
-
The next step is to configure the network information, which is automatically obtained from the DHCP server by default. We first use the obtained dynamic IP address, and then modify it after the system is installed
-
Configure proxy. Since my VM is connected to the Internet by NAT and sharing IP address with the host, this parameter can be left blank
-
Configure the image source of the software repository. In most cases, the network is not good, and it is slow to directly access the Ubuntu software repository. Therefore, configure an image source with a better network environment. Here I use the mirror source provided by the University of Science and Technology of China
-
Configuring Disk Partitions
-
Because we are using a virtual disk, the entire disk is available to the system. In addition, I chose to turn off the advanced feature LVM, which I didn’t use for the time being
-
The next step is to partition the disk
We can see that the system default partition scheme is:
Partition number The size of the format The mount point 1 512M FAT32 /boot/efi
2 All remaining space Ext4 /
That is, all storage space except the ESP partition for UEFI startup is mounted in the root directory. I chose to keep the default configuration, so you can customize it to your own needs.
-
The installation of the system will begin and the data on the disk will be erased. If it is a real machine installation, you must make sure that no important data is on the selected disk
-
-
Creating a Login Account
-
Whether to install OpenSSH, because we will use SSH to log in remotely, choose to install the software package, but do not import the authentication key
-
Whether common server software packages need to be installed, I choose to skip this stage and do not select any software packages
-
After the installation is complete, we choose to reboot
-
Finishing touches
-
You are prompted to remove the ISO file used for installation
-
Open the VM configuration, remove the CD/DVD device, and press Enter to exit the installation
-
-
Start the virtual machine again, enter the password corresponding to the account created earlier, and we will successfully log in to the server we created!
conclusion
In this article, we walk through the installation of a Linux Server using VMware Player and Ubuntu Server.
Take a breath, don’t you think? But our journey is far from over, as we currently interact with the server more like directly manipulating server entities than in real development scenarios, where we interact with the server more through remote logins.
In the next article, we will start with configuring the network card and step by step implement remote login to the server over SSH!