Linux Program Do staff always need to use virtual machines ?! After the virtual machine is installed, it is a little difficult to configure the network. During kernel compilation today, the machine is broken down. After re-installation, let's make a summary. There will be a reference after reinstalling the system in the future. What is involved?
1. Install the operating system SuSE Linux 10.1 (involving disk partitions and selecting the installation package );
2. Install VMware Tools;
3. Configure the network address of the virtual machine operating system;
4. Use securecrt, sshd, and firewall;
1 -- install the operating system SuSE Linux 10.1
(1) Start VM ware and select "new virtual machine"
(2) Select Linux in "guest operating system" and then select SuSE Linux.
(3) Select the Virtual Machine Image Location
(4) Start the VM. The system automatically starts from the ISO disc. Then select "installation" to start SuSE installation.
(5) Go to the installation page. After selecting the system language, select "gnome" as the desktop system.
(6) Enter "Installation Summary". Here we want to partition and select the installation package, which is a crucial step!
Select "Partitioning" to go to the disk partition page and select "resize" for the default partition size"
Select "software" to go to the installation package selection page
After completing these preliminary work, you will be able to install SuSE Linux along the way "Next. 2 -- install VMware Tools
(1) Start SuSE Linux, select the VM menu in the toolbar, and select install VMware Tools;
(2) Select the removable devices option in the VM menu on the toolbar, and click Edit in the CDROM option of the sub-item to open the installation folder of VMware and select Linux. ISO as the ISO file.
Note that this directory refers to the installation directory of Virtual Machine software, for example, "C: \ Program Files \ VMware Workstation \ Linux. ISO" on my machine"
(3) load the Linux. ISO file and run the following command:
Linux-PSt: # Mount/dev/CDROM/mnt/CDROM
Linux-PSt: # cd/mnt/CDROM
(4) copy the installation file and run the following command:
Linux-PSt # cp/mnt/CDROM/VMwareTools-5.5.3-34685.tar.gz/tmp
Linux-PSt: # cd/tmp
Linux-PSt: # tar-zxvf VMwareTools-5.5.3-34685.tar.gz
(5) install VMware Tools
Linux-PSt: # cd vmware-tools-distrib
Linux-PSt: # ../vmware-install.pl
Press enter until the installation is complete. After the installation is successful, there will be a folder named HGFS under the/mnt directory.
(6) cancel the connection of CDROM
Linux-PSt: # umount/mnt/CDROM 3 -- set the shared folder
We need to access the files on the host Windows machine on the Linux system, install smaba, and use the sz/Rz command, but the most convenient is the shared folder between Linux and Windows. After the shared folder is set, the shared folder is displayed in the/mnt/HGFS directory of Linux. Operations on Linux are equivalent to operations on Windows.
Click Add and select a file on the Windows machine. After the file is complete, the folder appears in the Linux machine/mnt/HGFS directory. 4 -- configure the network address of the virtual machine operating system
(1) directly modify the network configuration file
Go to the/etc/sysconfig/network directory, which contains the file ifcfg-eth-id-00: 0C: 29: AC: F5: 2E, which is the configuration file of eth0. Open the file and edit it as follows:
Use DHCP to assign the network address bootproto = 'dhcp 'broadcast = ''ethtool _ Options = ''ipaddr = ''mtu = ''name = 'amd pcnet-fast 79c971 'netmask = ''network = ''remote _ ipaddr ='' startmode = 'auto' unique = 'rbuf. weguq9ywypf 'usercontrol = 'no' _ nm_name = 'bus-pci-0000: 00: 8080'
Configure the static network address bootproto = 'static 'broadcast = ''ethtool _ Options = ''ipaddr = '2017. 168.0.2 'mtu = ''name = 'amd pcnet-fast 79c971 'netmask = '2017. 255.255.0 'network = ''remote _ ipaddr ='' startmode = 'auto' unique = 'rbuf. weguq9ywypf 'usercontrol = 'no' _ nm_name = 'bus-pci-0000: 00: 8080'
After setting, you are advised to restart. Run the ifconfig command to view the IP address we set for the NIC.
(2) Configure YaST on the Character Interface
Enter the command "YaST" in the character interface and the following interface is displayed:
Select network devices à network card to configure the NIC, and then select "user controlled with NetworkManager". After the selected Nic is selected, there is a cross. The page is displayed as follows:
Select the "edit" option on the page, and the following page is displayed:
Select static address setup, that is, static address mode. Then, enter 192.168.149.128 in the input boxes of IP address and subnet mask. Click Next to restart the test.
(3) Configure YaST on the XWindow Interface
Run YaST: Applications/system/YaST. In the following path in XWindow. After the program is started, the main interface is as follows:
Select the network card under network devices for configuration. Then, select "user controlled with NetworkManager" under "network setup method". The interface is as follows:
Click Edit to edit the file. The page is as follows:
Select "static address setup", that is, static address mode. Then, enter 192.168.0.2 in the input boxes of IP address and subnet mask. Click Next to restart the test.
5-configure the network connection between the VM and the host
(1) first, we configure the network on Windows.
After the installation of VMware, two more "VMWare virtual Ethernet adapter for vmnet1" and "VMWare virtual Ethernet adapter for vmnet8" appear on the Windows Network Connection panel ".
Right-click "Local Connection", select "properties", and select "Home Network Connection" as "VMWare virtual Ethernet adapter for vmnet1", as shown in ".
Right-click the VMware Virtual Ethernet adapter for vmnet1 connection and press the arrow to complete the network connection settings.
(2) Virtual Machine Software settings
Open the corresponding virtual machine and follow the steps shown in the arrow to set up the network.
6 -- install sshd2
In addition, Suse is installed with sshd1 by default. When logging on to the system through securecrt, a password is required each time, which is somewhat depressing. Then upgrade it to sshd2. First, download the latest sshpackage to the website. I will download ssh-3.2.9.1.tar.gz on download.chinaunix.net. After the package is downloaded, put the package in the Set "shared folder" for Linux to access it.
(1) From/mnt/HGFS/dw.beissh-3.2.9.1.tar.gz to/tmp
Linux-PSt: # cp, MNT, HGFS, D, ssh-3.2.9.1.tar.tar, TMP
(2) decompress and install
Linux-PSt: # tar-zxvf ssh-3.2.9.1.tar.gz
Linux-PSt: # cd ssh-3.2.9.1
Linux-PSt: #./configure
Linux-PSt: # Make
Linux-PSt: # make install
The executable file sshd2 generated after successful installation is located in the/usr/local/sbin directory.
(3) set sshd2 to automatically start with the System
First, delete the old automatic start script, RM/ECT/init. d/sshd. Then we will generate an Automatic startup script for sshd2. For the generation method and startup principle, refer to my other article.ArticleGuide to automatic start setting in SuSE system.
After completing the settings, restart the machine to verify that sshd2 is automatically started with the system.
7 -- disable firewall restrictions
After all the preceding settings are complete, securecrt is used to connect to the system, but the system cannot be connected. Why? I found that port 22 of SSH is blocked by the firewall of Linux. Next, change the firewall policy to enable the restriction.
(1) Use the YaST tool for configuration. As described above, we can use the YaST on the Character interface or graphic interface for configuration. The procedure is the same. The tool on the Character interface is described below.
Enter YaST on the command line. In the YaST main interface, select the "Security and users" option, and then select "firewall ". As shown in:
(2) After the selection, select the "allowed services" option in the interface shown in, and then select "ssh" in "service to allow ", press enter on "add" on the right and select "Next" and "accept.