Part I Hadoop
- Click one of the following:. 安装一个最近的吧
- Install the package. Do one of the following: Choose Open with in the download window to use the package manager, or Choose Save File, save the package to a directory to which you have write access (it can be your home directory) and install it from the command line, for example:
sudo dpkg -i Downloads/cdh3-repository_1.0_all.deb
3. 查看/etc/apt/sources.list.d$ ls
cloudera-cdh3.list 已经有了,就不需要再设置了4. (Optionally) add a repository key. Add the Cloudera Public GPG Key to your repository by executing the following command:
$ curl -s http://archive.cloudera.com/debian/archive.key | sudo apt-key add - |
This key enables you to verify that you are downloading genuine packages.
5.
sudo apt-get updatesudo apt-get dist-upgrade
6. apt-cache search hadoop
通过这个可以查看所能安装的源
7. 安装pseudo
sudo apt-get install hadoop-0.20-conf-pseudo
8. View how the hadoop-0.20-conf-pseudo packages changes your system.
To view the files on Ubuntu systems:
$ dpkg -L hadoop-0.20-conf-pseudo |
9. 启动一个node上的所有deamon(datanode,namenode, secondnamenode, jobtracker, tasktracker):
$forx in /etc/init.d/hadoop-*;dosudo$x start; done
10. Verify the installation
hadoop jar /usr/lib/hadoop/hadoop-*-examples.jar pi 2 100000
以上步骤都在 user1的权限下进行的,你可以改成你自己的。
Part II , Zookeeper
There are two ZooKeeper server packages:
- The hadoop-zookeeper base package provides the basic libraries and scripts that are necessary to run ZooKeeper servers and clients. The documentation is also included in this package.
- The hadoop-zookeeper-server package contains the init.d scripts necessary to run ZooKeeper as a daemon process. Because hadoop-zookeeper-server depends on hadoop-zookeeper, installing the server package automatically installs the base package.
1. sudo apt-get install hadoop-zookeeper-server
2. To check that zookeeper is started, ps -ef|grep zookeeper
3. if not, please start zookeeper
To start ZooKeeper
Note ZooKeeper may start automatically on installation on Ubuntu and other Debian systems. |
Use the following command to start ZooKeeper:
- $ sudo /etc/init.d/hadoop-zookeeper-server start
1. sudo apt-get install hadoop-hbase
2. To list the installed files on Ubuntu and other Debian systems:
$ dpkg -L hadoop-hbase |
3. 参考
未完待续......
参考文档:
Part I Hadoop
分布式安装可以参考:
or