Centos 6.8 virtual machine environment configuration

1. Download VMware+Centos 6.8 and install it, which will not be repeated here.

2. Install vmware tools

1. Click Install vmware tools in the virtual machine options of vmware

2. Enter /media/VMware\ Tools/ in the terminal, copy the compressed file in the red box in the figure below to the /tmp directory

3. Unzip the file (tar -xzvf), and run the command (./vmware-install.pl) to install, all the way to the default

3. Replace the yum source

1. Switch to the /etc/yum.repo.d directory and back up the original image file

2. Download the Alibaba Cloud image file

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

3. Clear the cache (yum clean all) and create a new cache (yum makecache)

Fourth, modify the hostname

1. Check the hostname in the /etc/sysconfig/network file

 

2.vi command to open the file and modify the hostname

Five, configure static IP

1. View the network card configuration file

2. Modify the network card configuration file

6. SSH password-free login

1. Turn off selinux

vi /etc/sysconfig/selinux

2. Turn off the firewall

3. Modify the hosts file and add the following content

 

4. Launch the root user login (logout), switch to the target user, confirm that the ~/.ssh directory exists, and generate a key (ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa)

5. Append the public key id_dsa.pub to the authorized key: cat ~/.ssh/id_dsa.pub>>~/.ssh/authorized_keys

6. Upload the authentication file to other nodes:

scp ~/.ssh/authorized_keys bigdata@slave1:~/.ssh/

scp ~/.ssh/authorized_keys bigdata@slave2:~/.ssh/

7. Modify file directory permissions

chmod 700 ~/.ssh

chmod 600 ~/.ssh/authorized_keys

8. After the configuration is complete, all nodes restart

Guess you like

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