Virtual machine installation CentOS6.4

1 Overview

Virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. It runs on the host and is completely independent. All operations in the virtual machine will not affect the host, even if When the virtual machine crashes, it will not affect the host, and it is generally used for testing or experimentation.

The server operating system in the project is based on the considerations of Linux's safety, reliability, high efficiency, free, good network support, and full compatibility with UNIX. It is generally implemented by Linux. One of the more commonly used versions is CentOS, which will be used in this article. VMware virtual machine software builds a CentOS operating system environment that is the same as the server locally, and records the specific installation process for the convenience of testing and learning.

2 Intended audience

New employees of Shutong Changlian

tech enthusiasts

3 Environmental information

VMware version: VMware workstation10.0

CentOS image: CentOS-6.4-x86_64-minimal.iso

4 Explanation of terms

Linux: Linux is a set of Unix-like operating systems that are free to use and spread freely. It is a multi-user, multi-tasking, multi-threading and multi-CPU operating system based on POSIX and UNIX. It can run major UNIX tools, applications and network protocols. It supports 32-bit and 64-bit hardware. Linux inherits the network-centric design idea of ​​Unix and is a multi-user network operating system with stable performance.

CentOS: (CommunityEnterprise Operating System, Chinese meaning: community enterprise operating system) is one of the Linux distributions, which is compiled from the source code released by Red Hat Enterprise Linux in accordance with open source regulations. Due to the same source code, some servers that require a high degree of stability use CentOS instead of the commercial version of Red Hat Enterprise Linux. The difference between the two is that CentOS does not contain closed source software.

VirtualMachine: Virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. Currently popular virtual machine software includes VMware (VMWare ACE), Virtual Box and Virtual PC, all of which are Multiple computers can be virtualized on the Windows system, each virtual computer can run independently, and various software and applications can be installed.

VMware: Virtual machine software, the global leader in virtualization solutions from desktops to data centers. Its products can make you run two or more Windows, DOS, LINUX systems on one machine at the same time. Compared to "multi-boot" systems, VMWare uses a completely different concept. A multi-boot system can only run one system at a time, and the machine needs to be restarted when the system is switched. VMWare really runs "simultaneously", with multiple operating systems on the main system's platform switching just like a standard Windows application. Moreover, you can perform virtual partitioning and configuration for each operating system without affecting the data of the real hard disk. You can even connect several virtual machines to a local area network through the network card, which is extremely convenient. The performance of the VMware operating system installed is much lower than that of the system installed directly on the hard disk. Therefore, it is more suitable for learning and testing.

5 Operation steps

5.1 Create a virtual machine

Open VMware and create a new virtual machine

Choose to use custom

Select Virtual Machine Hardware Compatibility

Install the guest operating system

Select Guest Operating System

Name the virtual machine

Select processor configuration

Make the virtual machine memory and allocate it according to the local memory as appropriate

Network type selection

Select I/O Controller

Select disk type

select disk

Specify the disk capacity and allocate it according to the local disk as appropriate

specify disk file

View virtual machine configuration

Click on the virtual machine name on the left, select CentOS 64-bit and click Edit virtual machine settings

Select CD/DVD and use CentOS 64-bit image file

5.2 Install CentOS6.4

Click to start the virtual machine

Select the first option to install a new OS or upgrade an existing OS

Tab key to select, select Skip, exit detection

Click Next

Select language, here is Simplified Chinese

select keyboard

Choose a storage device

If the virtual machine has been installed before, this warning will appear, select Yes, ignore all data

Enter hostname

Configure the network

Set time zone, check Use UTC time

Enter the password of the root user (root)

选择“创建自定义布局”手动给Linux指定系统分区、交换分区,鼠标单击“下一步”按钮继续。

创建交Swap分区,鼠标单击“创建”按钮,在弹出的“生成存储”对话框中,生成分区选择“标准分区”;

鼠标单击“创建”按钮,在弹出的“增加分区”对话框中文件系统类型选择“swap”,并指定其空间大小为1024MB,鼠标单击“确定”按钮继续。

swap分区已创建完成,接下来创建Linux的系统分区,把所有的系统目录都放在这个分区;鼠标单击“创建”按钮,在弹出的“生成存储”对话框中,生成分区选择“标准分区”;

鼠标单击“创建”按钮,在弹出的“增加分区”对话框中文件系统类型选择“ext4”,挂载点选择“/”,并使用全部可用空间,鼠标单击“确定”按钮继续;

可以看到swap分区和Linux系统分区都创建完成,鼠标单击“下一步”按钮继续。鼠标单击“格式化”按钮格式化创建的分区;

格式化确认选择“将修改写入磁盘”。

系统引导程式也是写在/dev/sda1(Linux系统分区)分区中,鼠标单击“下一步”按钮继续。

鼠标单击“下一步”按钮继续;可以看到Linux系统包安装的过程,软件包已安装数和总的安装数;安装完成后,鼠标单击“重新引导”按钮继续。

进入命令行,输入root账户名以及密码登录

5.3  问题及解决

如果网络忘记配置了,可以用一下方法解决网卡的配置

首先使用ifconfig命令查看ip配置

*若用ifconfig命令,只有lo,没有eth0

解决方案:

1. 进入/etc/sysconfig/network-scripts目录,发现有ifcfg-eth0,即网卡(驱动)存在但未启用。

2. 输入ifconfig -a命令,可显示eth0和lo。

3. 输入ifconfig eth0 up,启用网卡。此时用ifconfig,只能看到inet6(ipv6?)的地址,没有inet的地址(即Xshell连接输入的ip)。

4. 修改/etc/sysconfig/network-scripts/ifcfg-eth0文件, 把ONBOOT=no 改为 ONBOOT=yes,但ifconfig的结果没有任何改变。(省略该步骤不知道是否有效)

5. service network restart,重启。出现shutdowneth0 OK,bring up eth0 OK,determine ip for eth0 OK。

6. 输入ifconfig,出现eth0的inet地址。用Xshell连接成功。

6  相关链接

本文CentOS镜像下载地址:

http://www.linuxidc.com/Linux/2007-09/7399p3.htm

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326390817&siteId=291194637