Steps to install CentOS6.8 under VMware 15.5

1. Installation

1. Open the virtual machine VMware, you will see the following page.
Insert picture description here
2. Click "New Virtual Machine" in the figure above to enter the following page, select "Typical (Recommended)", and click Next.
Insert picture description here
3. Select "Install the operating system later" and click Next.
Insert picture description here
4. Select "Linux(L)" and select the version of Linux to be installed at the version.
Insert picture description here
5. Set your own virtual machine name and choose the location where the Linux system will be installed.
Insert picture description here
6. Set the size of the largest disk, select "Split the virtual machine into multiple files", and then click "Next".
Insert picture description here
7. Enter the following page. Start to set the device status of the installed virtual machine.
Insert picture description here
8. Click "Edit Virtual Machine Settings" to set the device status of the installed Linux system.
Insert picture description here
9. Set the memory size of the virtual machine, generally set to 2G.
Insert picture description here
10. Set the processor. It is better to set it according to your own computer. My computer has 4 cores, so the processor is set to 2, and the number of cores of each processor is set to 2, which is a total of 4 cores.
Insert picture description here
11. Set the network adapter, commonly used NAT mode, this mode solves the problem of IP address conflicts.
Insert picture description here
12. After the previous environment is set up, start the formal installation of CentOS6.8. Click "Virtual Machine", click "Settings"
Insert picture description here
13. Select "CD/DVD (IDE)", select "Use ISO image file", click "Browse", select the location of the CentOS6.8 image, and click "OK".
Insert picture description here
14. Click "Turn on this virtual machine".
Insert picture description here
15. After waiting for a period of time, you will enter the following page. Press the "tab" key to switch the cursor to Linux, select the "Skip" button
Insert picture description here
16. Then, click "Next"
Insert picture description here
17. Here, set the commonly used language. I chose Chinese (Simplified), then click "Next"
Insert picture description here
18. Then select "American English"
Insert picture description here19. Select "Basic storage device" and click "Next".
Insert picture description here
20. On this page, select "Apply my selection to all devices with undetected partitions or file systems", and click "Yes, ignore all data".
Insert picture description here
21. Set the host name and click "Next"
Insert picture description here
22. Click "Next"
Insert picture description here
23. Set the root account and root password, click "Next"
Insert picture description here
24. Select "Create a custom layout" and click "Next"
Insert picture description here

25. Start to create a disk drive, as shown in the following page. Three partitions: swap partition swap partition; /boot partition boot partition; / partition boot partition
Insert picture description here
26. Click "Create", select "Approve Partition", and then click "Create" to enter the specific page of the disk to be created.
Insert picture description here

  1. Create /boot partition
    Insert picture description here
  2. Create swap partition
    Insert picture description here
  3. Create root partition
    Insert picture description here
  4. The situation of the created partition is as follows. Then, click "Next",
    Insert picture description here
  5. The following interface pops up, click "Format"
    Insert picture description here
  6. Click "write changes to disk"
    Insert picture description here

27. Click "Next"
Insert picture description here
28. Select the form of CentOS you want to create. I chose the "Desktop" form; select "Custom" and click "Next"
Insert picture description here
29. Select the program to be installed. According to your actual situation. My choices are as follows:

  1. Web service:
    Insert picture description here
  2. Scalable file system support:
    Insert picture description here
  3. Basic system:
    Insert picture description here
  4. application:
    Insert picture description here
  5. Development:
    Insert picture description here
  6. Elastic storage:
    Insert picture description here
  7. database:
    Insert picture description here
  8. Server:
    Insert picture description here
    9. Desktop:
    Insert picture description here

Two, network configuration

1. Check the network IP and gateway

1.1 View the virtual network editor

Insert picture description here

1.2 Modify ip address

Insert picture description here

1.3 View gateway

Insert picture description here

1.4 View the VMnet8 network configuration in the windows environment (Control Panel-Network and Internet-Change Adapter Options)

Insert picture description here

2. Configure the network IP and gateway of the Linux system

2.1 View current network IP

[whx@hadoop101 ~]$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:7D:B7:BC  
          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe7d:b7bc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3066 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1172 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:240100 (234.4 KiB)  TX bytes:133232 (130.1 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:123 errors:0 dropped:0 overruns:0 frame:0
          TX packets:123 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:18048 (17.6 KiB)  TX bytes:18048 (17.6 KiB)

[whx@hadoop101 ~]$ 

2.2 Modify the IP address of the current Linux system to a fixed address

[whx@hadoop101 ~]$ vim /etc/sysconfig/network-scripts/ifcfg-eth0

Insert picture description here
The following items marked in red must be modified, those with values ​​should be modified according to the following values, and those without items should be added.
Insert picture description here

DEVICE=eth0
HWADDR=00:0c:29:7d:b7:bc
TYPE=Ethernet
UUID=d902e817-ae32-4272-bc86-66ebca38f2b6
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.1.101
GATEWAY=192.168.1.2
DNS1=114.114.114.114
DNS2=8.8.8.8

2.3 Restart network

carried out

service network restart

If an error is reported, reboot, restart the virtual machine
Insert picture description here

Three, configure the host name

1. View the host name of the current Linux system

[whx@hadoop101 ~]$ hostname
hadoop101
[whx@hadoop101 ~]$ 

2. Modify the host name of the current Linux system

If it feels that the hostname is inappropriate, we can modify it. Modify the HOSTNAME by editing the /etc/sysconfig/network file.
Note: Do not have "_" underscore in the host name

[whx@hadoop101 ~]$ vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=hadoop101
NTPSERVERARGS=iburst

3. Turn off the firewall

3.1 Temporarily turn off the firewall

[whx@hadoop101 ~]$ sudo service iptables stop

3.1 Turn off the automatic startup of the iptables service: turn off the firewall at startup

[whx@hadoop101 ~]$ sudo chkconfig iptables off

4. Add a new user and configure the new user to have root privileges

4.1 Add new user

[root@hadoop101 ~]# useradd whx
[whx@hadoop101 ~]$ ll /home/
total 4
drwx------. 27 whx whx 4096 Jan 26 17:05 whx
[whx@hadoop101 ~]$ 

4.2 Set user password

[root@hadoop101 ~]# passwd whx

4.3 Grant ordinary users with root privileges

Modify the configuration file

[root@hadoop101 ~]# vi /etc/sudoers

Modify the /etc/sudoers file, find the following line (line 91), add a line under root, as shown below:

## Allow root to run any commands anywhere
root    ALL=(ALL)     ALL
whx   ALL=(ALL)     ALL

Or when configured to use the sudo command, no password is required

## Allow root to run any commands anywhere
root      ALL=(ALL)     ALL
whx   ALL=(ALL)     NOPASSWD:ALL

After the modification is completed, you can now log in with the whx account, and then use the command sudo to obtain root privileges for operation.




Reference:
Steps to install CentOS6.8 under VMware 15.5

Guess you like

Origin blog.csdn.net/u013250861/article/details/114296967