This article is a reference to the depth of the HDFS distributed file system.
1. Now let's take a look at the CentOS5.6 (32) setting process.
1. First, set the NIC of the VM to host-only.
Set the IP address of VMnet1 to 192.168.1.1 for the virtual network card of the physical machine.
2. Start the system and enter the root user.
3. After CentOS is installed, initialize the settings so that some basic commands can be used directly without entering the absolute path,
For example:
[User @ localhost ~] $ Ifconfig
Bash: ifconfig: command not found
3.1 configure the/etc/profile file,
Add the following statement at the end of the file:
PATH = $ PATH:/sbin # append the/sbin directory after the PATH variable
Export PATH = $ PATH:/sbin # Set the variable to global
3.2 configure the/home/user/. bash_profile file,
Add the/sbin:/usr/local/sbin:/usr/kerberos/sbin paths after the PATH.
4. Edit the/etc/sudoers file so that common users can execute the command with the root permission, that is, they can use "sudo" before the command"
4.1 Add the write permission for the file. Chmod u + w/etc/sudoers.
4.2 edit the/etc/sudoers file. Add "user ALL = (ALL) ALL" under "root ALL = (ALL) ALL" (here the user is the user name) and exit.
4.3 comment out: Defaults requiretty's row. That is: # Defaults requiretty
4.4 revoke the write permission of a file. Chmod u-w/etc/sudoers.
5. edit/etc/sysconfig/network-scripts/ifcfg-eth0, set Nic to get IP address statically, and set IP Address
DEVICE = eth0
BOOTPROTO = static
HWADDR = 00: 0C: 29: 67: 87: 79
IPADDR = 192.168.1.11
NETMASK = 255.255.255.0
GATEWAY = 192.168.1.1
ONBOOT = yes
6. edit/etc/sysconfig/network and/etc/hosts to set the machine name.
Change network:
NETWORKING = yes
NETWORKING_IPV6 = no
HOSTNAME = namenode0
Modify hosts:
127.0.0.1 localhost
192.168.1.11 namenode0
127.0.0.1 namenode0 (optional)
7. Restart the VM.
8. We can see that sudo can be used, ifconfig can be used directly, and the host name has been changed.
Note:
After centos5.6 is installed in VMWare, the following is an example:
The content of the ifcfg-eth0 in NAT/Birdged mode is as follows:
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE = eth0
BOOTPROTO = dhcp
DHCPCLASS =
HWADDR = 00: 0C: 29: 0E: 20: 58
ONBOOT = yes
The modification is as follows:
Set the NIC of the VM to host-only, and the IP address of VMnet1 of the VM to 192.168.1.1.
Edit/etc/sysconfig/network-scripts/ifcfg-eth0, set Nic to static get IP, and set IP Address
DEVICE = eth0
BOOTPROTO = static
HWADDR = 00: 0C: 29: 67: 87: 79
IPADDR = 192.168.1.11
NETMASK = 255.255.255.0
GATEWAY = 192.168.1.1
ONBOOT = yes
Ii. Install JDK
Go to root and install jdk.
Enter user/123456 user edit ~ /. Bashrc file (or/etc/profile), add the following lines
Export JAVA_HOME =/home/user/jdk1.6.0 _ 24
Export JRE_HOME =/home/user/jdk1.6.0 _ 24/jre
Export CLASSPATH =.: $ JAVA_HOME/lib: $ JRE_HOME/lib: $ CLASSPATH
Export PATH = $ JAVA_HOME/bin: $ JRE_HOME/bin: $ PATH
Source/etc/profile
Java-version
The java version information is displayed. The installation is successful.