Install and configure DebianLinux in a virtual machine

Source: Internet
Author: User
I was so angry last week that I had to reinstall Windows XP because of its recent frequent faults and near-crashes. Reinstalling XP is already easy to use. using the hard drive installation tool of the system home, it will be done in less than half an hour, which is very convenient. :) But I did not think of a serious consequence of the reinstallation before, that is, with the help of Jack Ma, a lab student.

I was so angry last week that I had to reinstall Windows XP because of its recent frequent faults and near-crashes. Reinstalling XP is already easy to use. using the hard drive installation tool of the system home, it will be done in less than half an hour, which is very convenient. :)
However, I did not think of a serious consequence of the reinstallation, that is, with the help of the lab student Jack Ma, the experiment environment for installing the configured virtual machine + DebianLinux will perish with the birth of the new system. :(
With the firm belief that "repetition is to emphasize, repetition is also a learning method", I started to install configuration a little hard and a little long. As the work has gone through hard work, the joy of success and the sense of achievement have come to life a little bit. I am deeply aware of the need to record it, so I will write this article and talk about it as a blog post. : P


I. installation of virtual machine environments
Use VMwareWorkstation ACE Edition (Version 6.0.1build-55017) to download the installation program from the official website of VMware. After downloading and running the installation program, use the default settings to complete the installation.


2. install Debian Linux on a virtual machine
1. create a virtual client.

Start VMware Workstation and click "New VirtualMachine" on the start page. in The Wizard interface that appears later, perform the following steps:
Select "Typical" for "Virtual machineconfiguration.
Select "Linux" for "Guest operatingsystem" and "Version" for "Other Linux 2.6.x kernel ".
"Virtual machinename" can be set to the default one or just enter one. "Location" is not recommended, instead, it is better to create a hard disk partition with a relatively large free space (recommended for free space> = 8 GB ).
"Network Connection" uses the default "Use bridgednetworking", so that the Linux system can access the Internet independently, provide services or access other Network services, just like an independent system, however, there should be independent IP addresses. You can also use NAT, but I think that will bring more additional load to the host.
"Disk capacity" can use the default options.
Click the "finish" button to complete the creation of the client system. then you can install the Debian system on it.
2. install the Debian Linux operating system on the virtual client.
The installation method is the network installation started by the virtual disc. you must first download an image file mini. iso that minimizes the installation of the disc.
Open the newly created virtual client in VMwareWorkstation, double-click its CD-ROM icon, in the displayed dialog box, select Connect at poweron ", select "Use ISOimage" for "Connection" below, click "Browse" to create the path of the ISO file, and click "OK" to close the "CD-ROM" dialog box.
Click "Start this virtualmachine". the virtual machine will automatically Start Debian installation through the virtual optical drive. you can use the default options to install Debian installation. Note the following parameters, such as system service selection, network parameter settings, installation source settings, user name and password settings.
The entire installation process can generally be completed within a few hours. The main time consumed is to download files from the installation source. during this period, you can go out for dinner without any delay.
After the installation process is complete and the virtual machine restarts automatically, you can see the Debian user logon interface.
3. install necessary development tools in Debian.
During Debian installation, only the basic system and graphical user interface are selected. no services are installed, and development tools such as the C compiler are not included. Therefore, after the Debian system is installed, some necessary development tools need to be installed.
The software installation adopts the apt method and mainly uses two commands: apt-cache search and apt-getinstall. The usage is as follows:
1) open a terminal and su it as the root user;
2) use the "apt-cache searchsoft" command to search for available installation sources. Note that "soft" in the command is the name or related information of the software you plan to install, such as gcc and libc.
3) If 2) finds and lists the exact software version soft. version, run the apt-getinstallsoft.version command to install the software. Note that the name and version of the software are entered correctly during installation, such as the gcc-4.1, libc-6.2, etc.
Apt-get install automatically downloads and installs the software. Generally, you can use the default configuration.
The development tools to be installed mainly include the C language library libc and the C language compiler gcc.
4. install VMware tools.
VMware Tools can improve the friendliness of VMwareWorkstation's graphical user interface and avoid clicking and releasing the mouse when entering and exiting the Debian system. But how is the installation process compared ?? Close? Why did Cai Qiao use shun Wei Cang? Are you sure you want to downgrade and run out? Select? Br/> First, start the Linux system on the virtual client, and then click "InstallVMware Tools..." in the main menu of the VMware system VM. then, the Linux system will automatically mount two files in the optical drive.
Double-click the CD-ROM icon on the Debian desktop to open the CD image and copy the VMwareTools installation package file (long name, suffix. tgz) inside to the main folder of the current user.
Open a terminal and decompress the installation package file using the tar command in the main folder of the current user by default:
Tar -xzfVMwareTools-6.0.0-45732.tar.gz
After decompression, the installation file is decompressed to the vmware-tools-distrib folder, where the installation program vmware-install.pl written in Perl script language is run in the terminal window:
Cdvmware-tools-distrib
/Vmware-install.pl
Start the installation of VMwareTools by default. After the installation is complete, the Debian system will automatically restart and log on to the Debian system again. you will find that VMware can automatically switch the mouse between other Windows applications and virtual client systems, you no longer need to deliberately click the mouse in the virtual client window to enter the system, or press Ctrl + Alt to release the mouse.
Since I didn't install gcc and libc first, the installation of VMwareTools was a little complicated. it took some effort to complete the installation.
5. test the C language development environment.
Use "application"-"attachment"-"text editor" to edit a Helloworld program as follows:
# Include
Int main (void)
{
Printf ("Hello, world! /N ");
Return (0 );
}
Saved in the main folder of the current user. the file name is hello. c.
Open a terminal and compile and run hello. c:
Gcc hello. c-o hello
./Hello
If no error is reported during the execution of the preceding two commands, you can see "Hello, world! Appears on the screen. Congratulations! the test is successful!
Next, you can use this virtual machine system to conduct your study and research on the Linux system. I wish you more and more benefits on the Linux system!

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.