Installation of Linux server by a fool (illustration)

Source: Internet
Author: User
Tags gz file

In practical applications, some users are tired of Windows operating systems and want to learn about Linux, but are afraid of Linux re-partitioning. Some users have installed multiple operating systems, however, you can only restart the operating system when you need to switch the operating system ......

Just like the little penguin, Linux has attracted the attention of tens of thousands of computer enthusiasts around the world since its birth. Today, from desktops to servers, from operating systems to embedded systems, from scattered applications to the initial prototype of the entire industry, Linux is booming. As a result, many major companies in the industry are eager for Linux professionals! A group of influential big companies, such as IBM, HP, Dell, Lenovo, and inspur, have a tendency to expand Linux talents dramatically. At the same time, in practical applications, some users are tired of Windows operating systems and want to learn about Linux, but are afraid of Linux re-partitioning. Some users have installed multiple operating systems, however, you can only restart the instance when switching the operating system ...... It has become a hot and sensitive topic to learn how to quickly turn to the Linux operating system.

What should I do? Practical is the truth. This topic uses the Virtual Machine network experiment environment to describe the server configuration with the practical network management software Webmin. Don't come up with a new idea, so that users can complete the installation of Linux servers in Windows!

1. install Linux on Windows

How does one install Linux on Windows? Many users may wonder: Can my computer do the same? The answer is yes! Compared with the "Multi-Boot" system, VMware can use several operating systems on the same computer without restarting the system. VMware can combine some hard disks and memory on the computer. Each machine has its own independent CMOS, hard disk, and operating system, we can partition, format, install systems, and apply software to common machines, and link these operating systems into a network. In this way, a computer can easily Virtualize several machines.

TIPS:

A Virtual Machine virtualizes a computer on a real computer and runs two or more operating systems at the same time. It uses the original operating system as the basis to create a virtual computer with additional hard disk space. A "Virtual Machine" is just a program. Because all operations are performed in virtual mode, you can try some dangerous operations on the Virtual Machine. Of course, all these operations are safe.

The following uses VMware 5.0 + Redhat 9.0 as an example to create a perfect Linux server platform for Security Technology enthusiasts.

1. Basic knowledge of the Virtual Operating Platform

During the testing of the virtual platform, VMware needs an operating system as the most basic platform, namely, HOSTOS (main system ), other systems running on HOSTOS are called guest OS (subsystems or customer systems ). The following are the most frequently used and useful devices.

1. nic. The virtual network interface card is used for communication between HOSTOS and GUESTOS. It can establish a standard TCP/IP or NETBEUI bridge. In virtual machines, Nic brands are popular, and Windows9X, NT, 2000, and Linux can be identified and driven by themselves.

2. Hard Disk. The IDE device supports VirtualDISK and ExistingPARTITION. When using the first method, create a large file on the real hard disk as the entire hard disk of the virtual machine. Any operations on the virtual machine are carried out in this large file, without affecting the real system data. The advantage of this method is security, so you don't have to worry about data issues. If the second method is used, the real partition is opened to virtual machines. The advantage is that the existing system can run directly, and the disadvantage is that the useful data on the hard disk may be affected if you are not careful.

3. Drive. The virtualization of the drive and drive is relatively simple. It is basically shared with the master system, and can be read by putting the disc in it. For example, you can directly install the LinuxISO file downloaded from the Internet without burning it into a CD.

4. Video Card. VMware simulates a video card into a model called "VMwareSVGA (FIFO)" and comes with a driver for this type of video card. By installing it, it can increase the resolution and color of the virtual system.

5. Sound Card. Sound cards are simulated as compatible devices in virtual machines, and almost all operating systems can identify and drive them by themselves. VMware is responsible for the conversion of voice commands in virtual machines through real sound cards and speakers.

Therefore, the devices in the virtual machine are completely different from the actual devices. To ensure system compatibility and stability, VMware virtualizes existing devices into standard and compatible devices. Because the program of the actual driver device is still running on the local system, the actual efficiency is not much reduced.

# P #

2. Install the Redhat Linux operating system

Step 2: Install VMware software. This process is very simple. After the download is complete, you can directly "Next" to complete the installation. After the installation is complete, we will find two more virtual NICs. in VMware, users can use the virtual Nic for networking settings and testing.


Step 2: Create a VM. Click the "Create Virtual Machine" icon and select an operating system to be installed as prompted. Generally, select the typical settings and click "Next. 1.

Step 2: Start the VM. This process is no different from the PC startup process. It is self-check at the beginning. Then press F2 to enter BIOS settings. Each virtual machine has its own BIOS. The virtual machine uses PHOENIXBIOS. First, click the Virtual Machine window and receive the input information from the mouse and keyboard. Then, you can set the BIOS. This interface includes "Main (Main menu)", "Advanced", "Security", "Power", "Boot) "and" Exit (Exit) ". You can use the up and down arrows to switch between options and use the left and right arrows to switch between the six main options. After the modification is completed, use the left and right arrows to go to the "Exit" main option and return to the startup interface. 2.

Step 2: Install the virtual operating system. After setting the ISO file of the optical drive image or placing the optical drive into the optical drive, go to the operating system installation process. Otherwise, the virtual machine will prompt that the operating system is not found. If the disc is not started, set the boot sequence in BIOS. After the installation is complete, click the "power on" button in the toolbar on the top of the virtual machine operation interface, as if you have pressed the switch of a computer. Other buttons are shutdown, suspended, and restarted. The pending method allows the VM to record the current status. You can use Resume to Resume the running status when you choose to suspend the VM for subsequent work.

Step 2: switch to the virtual machine. After entering the virtual platform, it will shield all mouse or keyboard operations on the host computer, but we can press Ctrl + Alt to return to the host system. The restart and shutdown of virtual machines are virtual for the host computer, but they are true for the operating system installed in the virtual machine. Therefore, to install a virtual machine on the operating system, you must first shut down it through the "Start" menu. You cannot force the power off of the VM. Otherwise, the VM will detect the disk like a real computer at the next startup. Page 3 is displayed during Linux installation.


# P #

3. Install additional tools

RedhatLinux9 provides Gnome, a powerful graphical desktop environment. You can use this environment to manage the system's applications, files, and system resources. After completing the above installation, we found that there was a prompt in the lower left corner of the VMware software: "You have not installed VMwareTools ". So how to install VMwareTools?

Step 2: Start the Linux System in the Virtual Computer and log on to Linux as the root user. Press CTRL + ALT to switch to the real computer system. Note: Here is an installation tips. If you are using an ISO file to install the operating system, you 'd better re-load the installation file and restart the system, in this way, the system will automatically find the VMwareTools Installation File.

Step 2: click the "Install VMware Tools" option in the "virtual machine" menu to install VMware Tools. Taking RedHatLinux as an example, the system automatically jumps out of the Installation File. Now we see two installation files, respectively, rpmformat and tar.gz. 4.

Step 2: select the “vmwarw.ls-5.0.0-13124.tar.gz file, right-click the file, and select "FileRoller" under the "open mode" option in the pop-up menu. This is a file similar to WinRar. 5.



Step 2: select the file to be decompressed, click "decompress", and select "/root/VMTools" for the target folder ". 6.



Step 2: After decompression, open the terminal under system tools in the startup bar and enter the cd/root/VMTools command to enter the/root/VMTools directory, now you can see the extracted Installation File. You can find that the installation files are all in the "VMware-tools-distrib" directory.

Step 2: Use the "cdVMware-tools-distrib" command to go To the VMware-tools-distrib directory and find a VMware-install.pl Installation File. Enter the./VMware-install.pl command to start installing VMTools. 7.

After this step, the system will prompt whether to back up the existing files and links. We recommend that you use the default option to directly press the Enter key. Install the default parameter settings. After installation, restart the system. (The above file name is for reference. You can name the installation folder by yourself)

Step 2: After installing VMwareTools, log on to the RedHatLinux system again, and now you will feel a great improvement in Image Color and sound quality. At the same time, you can move and switch between virtual machines and host machines at will. You can copy and paste between the host and the client or from one virtual machine to another. At this time, the user has a pleasant feeling.

# P #

4. Redhat Linux Device and file configuration

After creating a new virtual machine, in addition to the default value, you can also modify parameters through the configuration file. This configuration file is actually equivalent to the "hardware configuration" of the new computer. In the configuration file, you can determine the hard disk, memory size, serial port and network size of the virtual machine. Click the "Settings" button under the "virtual machine" menu to view the relevant parameters. 8.

 

1. Memory settings. It refers to the amount of memory allocated to the virtual machine from the real memory. This is relatively simple. Just select a number.

TIPS:

The so-called virtual memory is to use a part of the space on the hard disk to simulate the memory to run a large program in a relatively small memory. Configure the memory of the virtual computer. If the memory used by the computer is 512 MB, the memory size configured here is 200 MB. When a virtual computer is started, it will take up part of the physical memory to run the Linux to be installed. At this time, the operating system you are running will only have MB of available memory, therefore, the physical memory must be large enough for the Virtual Machine to run well.

2. Hard Disk settings. A dedicated 2 GB ~ 3G or even larger space is used as its entire hard disk. This file is located in the VMS directory of the VMware installation directory, and the size will increase as the actual data increases. Real hard disks need to be sorted out regularly, as are hard disks on virtual machines. Select "Hard Disk" and click the "disk fragment" button on the right side, and the software will quickly tidy up the fragments on the Virtual Machine hard disk.

TIPS:

The so-called virtual hard disk is to use software technology to virtualize a part of the memory into a hard disk partition. In addition, advanced dynamic management technology can be used to automatically adjust the user's size based on the actual situation.

3, CD-ROM (IDE1-0 ). This is the configuration of the optical drive. IDE0-1 and IDE1-1 are not connected to the device, then, if you feel that 2g space is not enough, you can create another VIRTUALDISK connected to the IDE0-1, for the virtual machine, it is like adding a hard disk to a computer and connecting it to the slave device location of the primary IDE.

TIPS:

The so-called virtual optical drive is to use software technology to virtualize one or more disc drives on the hard disk, and then use the software to read a single disc into a file and store it on the hard disk. You only need to use the software to load the required files. The current standard hard drive configuration has reached 80 GB, and the speed has reached 7200 RPM. Therefore, the virtual optical drive will not be limited to the capacity of the memory MB and the speed limit of 52. In addition, the image file can be made from viruses.

4. Soft drive. This is relatively simple, and can be used by virtual machines to provide real software drives. Another method is the IMAGE format, that is, using A prepared IMAGE file as disk A for virtual machines.

TIPS:

The so-called virtual floppy disk is to "Virtualize" a folder on the hard disk into a floppy disk. This floppy disk has all functions of a real floppy disk and can also be formatted.

5. Ethernet. This part is very important. If the HOST and GUEST cannot communicate, the role of VMware will be greatly reduced. In addition to allowing the HOSTOS to communicate with GUESTOS, the guest OS must be able to share the INTERNET connection of the host OS to access the INTERNET.

TIPS:

The so-called virtual network card is to simulate the way the ethernet card works, or even simulate the HUB function, using the Internet features, to achieve the VPN function. In this way, the system can completely identify the software as a network card. With this, you can stop buying VPN routers and access your LAN from the Internet.

6. USB controller. Select the "USB controller" option and select "automatically connect to a VM when a new USB device is connected" on the right. After the hard disk is inserted to the USB interface of the host computer, the host computer and virtual machine will automatically load the driver and recognize the mobile hard disk.

7. file sharing. To share files with the real host, you can add a folder to the virtual machine. Click "Settings" under the "virtual" menu of VMware, and click "shared folder" in the "options" tab of the Configuration window ", click Add on the right side to add the folder to be shared.

What we need to do now is to use VMware to build a LAN with multiple nodes on a single-host platform for network security testing.

# P #

5. Configure the Redhat Linux Network Environment

There are four options in the network type interface: "bridging", "NAT", "only host", and "Custom ". 9.

1st: bridging. A virtual machine is like a new computer with the same physical status as a real host. In the bridging mode, you can enjoy all available services, including file services and printing services. For example, if the host's real Nic IP address is 192.168.10.123, you can set GUESTOS as any unused IP address in the same subnet, such as 192.168.10.128. In this way, all machines in the same subnet of the LAN can communicate with them directly.

2nd: NAT. The full name of NAT is networkaddresstranslation, which can be understood as facilitating the connection of virtual machines to the public network. The cost is that other functions in the bridge mode cannot be used. All virtual machines that use the NAT structure are provided by VMnet8 with IP addresses, gateways, and DNS. The main advantage of using the NAT mode in VMware is that it is extremely convenient to hide the Virtual Machine topology and access the internet. In NAT mode, it is very easy to access the Internet. You do not need to configure it. You only need to connect the real host to the internet and then the virtual machine can access the Internet.

3rd types: only host mode. Only the host mode is used to establish an isolated virtual machine environment. In this mode, the virtual machine and the real host are connected through the virtual private network. Only private IP addresses can be used for the host mode. If you want to access the network only for the host mode, you can only use ICS and proxy, because only these two methods can access the Internet with DHCP. Relatively speaking, the host-only method is not practical on machines with real NICs, and it is much more convenient and flexible to use bridging methods.

Using the highly scalable network model of VM, you can build a very complex LAN. Since the virtual machine can communicate with the host computer, it can share the Internet connection of the host computer just like the real computer in the LAN.

Step 2: In a LAN connected to the Internet through ADSL, click the "Settings" option under the VMware "virtual" menu, then click "Ethernet" and set its properties, select one of "bridge", "NAT", and "only host. In this example, select the "bridge" method.

Step 2: Set the network connection IP address of the HOSTOS, for example, the IP address is 192.168.10.123. At the same time, ensure that the host computer can access the Internet normally. When setting the IP address range, remember the IP address range and select an unused IP address as the Linux operating system, such as 192.168.10.128.

Step 2: Set the IP address and gateway of the VM. Open "Network Device Control" under "System Tools" in the main menu, click "Configure", set the Virtual Machine IP address to 192.168.10.128, and enter the sub-network mask 255.255.255.255.20. Enter the gateway address after "default gateway address", for example, 192.168.10.1. 10.

Step 2: Set the DNS address. On the network configuration page, switch to the DNS tab. For example, enter "202.103.0.117" after "primary DNS", and enter "202.103.24.68" after "second DNS. 11.

Step 2: Test the connection. Now, run the ping command on the Linux terminal to test the network, or open a browser to check whether the network is connected. The correct page is shown in Figure 12.

With the above intelligent installation, we can't help but sigh that the installation process is so simple! In fact, VMware has many practical features. For example, you can click capture screen under the "virtual machine" menu to capture ready-made installation images. Click capture movie under the "virtual machine" menu to get recorded videos. It is worth mentioning that VMware also provides the restoration function. You can click the "snapshot" button on the toolbar to save the current system status at any time. Once a problem occurs on the virtual machine, you can click the "Restore" button to restore the system to the status before the problem occurs. In this way, we can save a lot of time in the debugging process, thus greatly improving the work efficiency.

In addition, the installation of Linux servers has many similarities. After learning to install RedhatLinux, it is easy to install other similar Linux/Unix servers. To reflect the diversity of installation, I also installed a RedhatEnterpriseLinux 4AS, which is the latest enterprise version of Redhat Linux. The software interface is almost identical to the RedhatLinux9.0 installed above, the purpose is to give readers better inspiration, so as to achieve the opposite goal.

# P #

2. Easy operation: Webmin similar to Windows Control Panel

After installing the Linux operating system, many users may start to think about how to configure a Linux server for a good job in the future! Good. In the past, the server management work on Linux had to be done through the input of long strings of commands by Professional staff. It felt very cumbersome and lacking in affinity. As a result, we began to wonder: if we could have a Windows "Control Panel" interface tool to complete the configuration work, it would be much better. In fact, the graphic interface management tool Webmin can solve this problem. It can easily configure Linux servers, or even remotely configure all services running on Linux. In addition, by adding modules, their functions can be constantly extended so that users can develop their own functions based on their own needs.

On the homepage, there is a "DownloadingandInstalling" Download icon. After downloading, We will notice that Webmin is listed as the "noarch" software package.

TIPS: Since RPM is a binary file, they are usually compiled for a specific architecture, such as i386 or ppc. Installing a software package on the wrong architecture may result in incorrect results. Because Webmin is written in Perl, and Perl is unrelated to the architecture, Webmin is identified as "noarch ". Practical Extraction andReportingLanguage (Perl Language) is a multi-platform interpreted programming language that emerged in 1987. It can be used on a variety of platforms, including Windows, with sophisticated script functions.

1. easily install Webmin

If you use Redhat Linux, the simplest is to use the RPM installation method. We assume that the installation is based on RPM. First, check whether Webmin is installed in the system. In the text terminal, enter:

Rpm-q Webmin

If Webmin is not installed, the system prompts: package Webmin isnotinstalled. Then enter a command like the following in the installation file directory: rpm-ivhwebmin-1.260-1.noarch.rpm. After you press enter, the system will complete the installation.

TIPS:

After Webmin is installed, SSL is enabled by default. SSL requires installing a Perl module called Net: SSLeay. If this module is not installed, Webmin is only secure when running from the local console. After the installation is complete, you can open a specific port on the local or remote browser to enter Webmin. This is usually 10000, which is the default http server port provided by the program during installation. You can set it as needed during installation. However, do not use ports smaller than 1024.

Next, let's test whether Webmin is successfully installed. First open the browser and enter http: // localhost: 10000/in the browser of the local system. A management logon interface is displayed. A window is displayed, asking the user to enter the Administrator name and password. This indicates that Webmin installed in Linux can work normally. Enter the user name and password correctly (by default, only the root account can log on) to manage the system. 13.

Webmin's default Interface is full English. for domestic users, you only need to modify it a little bit to change it to full Chinese. Click the "ChangeLanguageand Theme" icon. Many configuration items are displayed. After "Web min UILanguage", change the language to "SimplifiedChinese (zh cn)", and then change it to the Chinese version.

# P #

2. Webmin configuration: More powerful than Windows Control Panel

Webmin is a front-end tool based on the console. It can perform management tasks reliably, from simple file management to complex work. Webmin management is implemented through web pages, which can be divided into five functional parts: webmin configuration, system configuration management, service configuration management, network configuration, hardware configuration, cluster configuration, and other configurations. All operations are simple and intuitive, and are suitable for beginners. Next, let's take a look at its infinite power.

(1) Webmin interface

After logging in, you can see help and configure Webmin, including the service port number, service module management, logs, user interface, and access control. All modules are configurable. You can reorganize them as needed.

(2) System Interface

System Configuration is mainly used to manage system files, system logs, users and groups, processes, software packages, and cron. Here, you can configure the boot behaviors of file systems, users, groups, and systems. You can control the services running in the system and decide whether to enable them automatically by selecting the Bootup and Shutdown icons. However, the specific configuration of those services is completed on the "server" interface. Pay special attention to the "SoftwarePackage (Software Package)" tool. It is similar to the "add or delete programs" tool in the Windows Control Panel, which allows you to conveniently view installed software packages in the system, and to the release version upgrade library and rpmfind.net interface, rpmfind.net is a public RPM library on the Internet. When I see this interface, do I think it is similar to the "control panel? 14.

A typical management instance is as follows. Webmin provides graphical configuration for timed process management. After logging on to Webmin, go to the "System" configuration module and select "Process Manager" to view all processes, they are displayed in the order of the PID of the Process number. There are several links at the top: the user, memory, and CPU are used to display processes in different attribute order. The "Search" link is used to search for a specific process. Click the link to display the page. You can search for a process by specifying the process owner, the working directory of the process, the file opened by the process, the percentage of CPU used, and the opened port.

# P #

(3) server interface

When talking about the server interface, you can understand the reasons for strongly recommending Webmin. Almost all typical Linux server configurations can be completed on this interface. Server Configuration management includes the Apache service, FTP service, Domain Name Service, proxy service, mail and mail list service (including Sendmail, Postfix, and other mail server management), and Samba file server. In the following section, we will explain in detail the typical server configurations. As shown in Figure 15.

(4) Network Interface

The Networking network interface provides tools to configure network hardware and perform complex network control, such as ADSL settings, firewalls, and network configurations. All tools need to modify the standard configuration file. Therefore, any work you do in Webmin can be done through the console tool. In a word: "It is more convenient than Windows Operations !" 16.

(5) hardware interface

Hardware configuration management includes disk partitioning, RAID configuration, DHCP, and printer configuration. It is mainly used to configure physical devices. It is particularly worth noting that the logical volume Management (LVM) tool can manage dynamic volumes on Linux systems.

(6) Cluster page

The tool in the cluster interface is used to manage the cluster system. A cluster is an advanced topic. You also need to install some software packages that are not included in the Linux release.

(7) Other interfaces

Various tools are available on other interfaces. Among them, the "SSH/Telnet Login" and "FileManager (File Management)" tools require t Support and can be run only after JRE is installed on the browser. The Perl module tool keeps you up with the development of the Perl module. The "FileManager" tool provides a browser-like view for the file system of the server. If you work remotely, you can move and copy files without using the workstation memory. The "SSH/TelnetLogin" tool is a remote shell console that allows you to access the console through a browser.

Here, some users may ask: Is Webmin a Web-based management tool used for server configuration security? You can rest assured about this. The security of Webmin is embodied in the following three aspects. First, it is SSL support. SSL not only authenticates your Webmin server, but also encrypts network communication during management. By setting Webmin to support SSL, you can access Webmin through https. Second, user access control. User Access Control allows the Administrator to control which users can access each module, and which operations can be performed by users accessing a module. Again, it is IP address access control. IP address access control specifies which IP addresses can access the Webmin server. Access from IP addresses not in the access list will be disabled. With these security enhancements, we can safely use Webmin as a system management tool. In short, Webmin, a Linux and Unix system management tool, provides great convenience for us to correctly and efficiently complete various key system configurations.

As shown in the above function demonstration, many users are already eager to try. Of course, there are more convenient things. For example, if the administrator is on a business trip outside China, you only need to open the browser and use Webmin to easily manage your servers.

  1. Development of Linux systems on embedded devices
  2. Challenge the new Linux version OpenSolaris experience
  3. Linux operation guide (inside Huawei)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.