新建文件/etc/apt/sources.list.d/cloudera.list,内容如下
deb http://archive.cloudera.com/debian <RELEASE>-cdh3 contrib
deb-src http://archive.cloudera.com/debian <RELEASE>-cdh3 contrib
其中<RELEASE>部分要用lsb_release -c命令的结过替换。如我的电脑的执行结果如下所示
那么替换的结果如下所示
执行下面的命令:
(1) 安装pseudo
sudo apt-get install hadoop-0.20-conf-pseudo
(2)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
|
(1)core-site.xml :
<configuration> |
<property> |
<name>fs.default.name</name> |
<value>hdfs://localhost:9000</value> |
</property> |
</configuration> |
(2)hdfs-site.xml :
<configuration> |
<property> |
<name>dfs.replication</name> |
<value>1</value> |
</property> |
</configuration> |
(3)mapred-site.xml :
<configuration> |
<property> |
<name>mapred.job.tracker</name> |
<value>localhost:9001</value> |
</property> |
</configuration> |
(4)hadoop-env.sh文件,指定一下JAVA_HOME的值。
export JAVA_HOME=/home/liuyus/jdk1.8
export HADOOP_NAMENODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_NAMENODE_OPTS"
export HADOOP_SECONDARYNAMENODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_SECONDARYNAMENODE_OPTS"
export HADOOP_DATANODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_DATANODE_OPTS"
export HADOOP_BALANCER_OPTS="-Dcom.sun.management.jmxremote $HADOOP_BALANCER_OPTS"
export HADOOP_JOBTRACKER_OPTS="-Dcom.sun.management.jmxremote $HADOOP_JOBTRACKER_OPTS"
因为遇到了权限不够的问题,还在其中加了下面的语句,不过好像也没起到什么作用
export HADOOP_NAMENODE_USER="liuyus"
export HADOOP_SECONDARYNAMENODE_USER="liuyus"
export HADOOP_JOBTRACKER_USER="liuyus"export HADOOP_TASKTRACKER_USER="liuyus"
路径/usr/lib/hadoop-0.20/bin下,启动hadoop ./start-dfs.sh
又遇到了权限不够,localhost无法登录的问题,最后stop在start试了很多次之后,终于出来了这个界面
感觉还有哪里没弄对,继续学习吧…………
参考博客:http://zzw0309452.iteye.com/blog/1484559
https://blog.csdn.net/linhx/article/details/7582416?utm_source=tuicool
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。