First, the environment
Ubuntu16.04, Hadoop2.7.3, Java8
It is recommended to update the APT source after the system installation is complete.
1, copy the original file backup
sudo cp/etc/apt/source.list/etc/apt/source.list.bak
2. Edit the source list file
sudo vim/etc/apt/source.list
3, the original list is deleted, add the following (replace the image of Ali, you can also change the other)
Deb Http://mirrors.aliyun.com/ubuntu/vivid main restricted universe multiverse
Deb Http://mirrors.aliyun.com/ubuntu/vivid-security main restricted universe multiverse
Deb Http://mirrors.aliyun.com/ubuntu/vivid-updates main restricted universe multiverse
Deb http://mirrors.aliyun.com/ubuntu/vivid-proposed main restricted universe multiverse
Deb Http://mirrors.aliyun.com/ubuntu/vivid-backports main restricted universe multiverse
DEB-SRC Http://mirrors.aliyun.com/ubuntu/vivid main restricted universe multiverse
DEB-SRC http://mirrors.aliyun.com/ubuntu/vivid-security main restricted universe multiverse
DEB-SRC http://mirrors.aliyun.com/ubuntu/vivid-updates main restricted universe multiverse
DEB-SRC http://mirrors.aliyun.com/ubuntu/vivid-proposed main restricted universe multiverse
DEB-SRC http://mirrors.aliyun.com/ubuntu/vivid-backports main restricted universe multiverse
4. Run sudo apt-get update
5. Run sudo apt-get upgrade
Second, install SSH, configure SSH login without password
- sudo apt-get install openssh-server
- SSH localhost
- Enter Yes to enter the password for the current account
Exit # quit the ssh localhost just now
CD ~/.ssh/# If you do not have this directory, first execute SSH localhost once
SSH-KEYGEN-T RSA # will be prompted, press ENTER to
Cat./id_rsa.pub >>./authorized_keys # Join License
This will allow you to login without a password.
Third, install the Java environment
Just a little bit of a search, attention. Install Java8
Iv. installation of Hadoop
Hadoop 2 can be downloaded via http://mirror.bit.edu.cn/apache/hadoop/common/or http://mirrors.cnnic.cn/apache/hadoop/common/, Generally choose to download the latest stable version, that is, download "stable" under the hadoop-2. X This format of the file, which is compiled well, another containing src is the Hadoop source code, need to compile to use.
Choose to install Hadoop into/usr/local/:
sudo tar-zxf ~/downloads/hadoop-2.7.3.tar.gz-c/usr/local # Extract to/usr/local
cd/usr/local/
sudo chown-r Hadoop./hadoop-2.7.3 # Modify File permissions
Hadoop can be used after decompression. Enter the following command to check if Hadoop is available, and success will display the Hadoop version information:
Cd/usr/local/hadoop
./bin/hadoop version
Hadoop built on the Ubuntu16.04