标签:inux 其他 dir lib into protobuf ncurses adduser https
以后的工作中需要用到hadoob分布式系统,所以博主预先学习了一下hadoob的安装与环境配置,特此记录。
[root@centos ~]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) [root@centos ~]#
[root@centos ~]# ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. 以下部分省略
[root@centos ~]# ssh-copy-id xxx.xx.xxx.xx /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub" /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys root@xxx.xx.xxx.xx‘s password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh ‘xxx.xx.xxx.xx‘" and check to make sure that only the key(s) you wanted were added.
%建立三个文件夹存放环境 cd /home mkdir tools mkdir softwares mkdir data
这里需要安装一个文件上传下载插件
yum install -y lrzsz
上传已经下载的jdk文件,这里你也可以选择其他的安装jdk方法。
解压jdk文件
[root@centos tools]# tar -zxvf jdk-8u151-linux-x64.tar.gz -C ../softwares/
配置环境变量:在配置文件中加入环境变量
[root@centos jdk1.8.0_151]# vim /etc/profile
export JAVA_HOME=/home/softwares/jdk1.8.0_151 export PATH=$PATH:$JAVA_HOME/bin
添加用户
adduser user1 passwd user1
wget https://mirrors.tuna.tsinghua.edu.cn/apache/hadoop/common/hadoop-2.9.0/hadoop-2.9.0-src.tar.gz
解压
maven 然后配置环境变量
findbugs 然后配置环境变量
cd ../protobuf-2.5.0
./configure
安装其他依赖 yum -y install autoconf automake libtool cmake ncurses-devel openssl-devel lzo-devel zlib-devel gcc gcc-c++
make install
cd ../hadoop-2.9.0
mvn package -Pdist,native,docs -DskipTests -Dtar %docs 可去除
标签:inux 其他 dir lib into protobuf ncurses adduser https
原文地址:http://www.cnblogs.com/wangshujing/p/8012891.html