客户端传送到centos:
1 2 3 4 5 6 7 8 |
scp /mnt/E/4_开发软件/Hadoop/安装包/bak/apache-maven-3.3.9-bin.tar.gz root@192.168.0.61:/home/hadoop/src scp /mnt/E/4_开发软件/Hadoop/安装包/bak/apache-ant-1.9.7-bin.tar.gz root@192.168.0.61:/home/hadoop/src scp /mnt/E/4_开发软件/Hadoop/安装包/bak/protobuf-2.5.0.tar.gz root@192.168.0.61:/home/hadoop/src scp /mnt/E/4_开发软件/Hadoop/安装包/bak/apache-tomcat-6.0.41.tar.gz root@192.168.0.61:/home/hadoop/src scp /mnt/E/4_开发软件/Hadoop/安装包/bak/hadoop-2.6.0-src.tar.gz root@192.168.0.61:/home/hadoop/src scp /mnt/E/4_开发软件/Hadoop/安装包/bak/hadoop-2.6.5-src.tar.gz root@192.168.0.61:/home/hadoop/src scp /mnt/E/4_开发软件/Hadoop/安装包/bak/hadoop-2.7.3-src.tar.gz root@192.168.0.61:/home/hadoop/src |
去centos授权:
1 2 |
su root chown -R hadoop:hadoop /home/hadoop/src && cd /home/hadoop/src |
centos编译:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
[hadoop@h1 src]$ java -version java version "1.7.0_67" Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) su root //安装gcc yum -y install gcc gcc-c++ cmake openssl-devel ncurses-devel make //安装maven, ant tar -zxvf apache-maven-3.3.9-bin.tar.gz && mv apache-maven-3.3.9 maven tar -zxvf apache-ant-1.9.7-bin.tar.gz && mv apache-ant-1.9.7 ant vim /etc/profile export MAVEN_HOME=/home/hadoop/src/maven export ANT_HOME=/home/hadoop/src/ant export PATH=.:PATH:$MAVEN_HOME/bin:$ANT_HOME/bin source /etc/profile tar -zxvf protobuf-2.5.0.tar.gz cd protobuf-2.5.0 ./configure make && make install protoc --version // 输出, 表示成功 cd /home/hadoop/src/maven/conf cp settings.xml settings.xml.bak vim settings.xml //使用阿里云服务器 <mirror> <id>nexus-aliyun</id> <mirrorOf>*</mirrorOf> <name>Nexus aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> </mirror> //设定内存防止溢出 export MAVEN_OPTS="-Xms256m -Xmx512m" //可能下载很慢, 所有手动复制过去 // mkdir -p /home/hadoop/src/hadoop-2.6.0-src/hadoop-hdfs-project/hadoop-hdfs-httpfs/downloads // cp /home/hadoop/src/apache-tomcat-6.0.41.tar.gz /home/hadoop/src/hadoop-2.6.0-src/hadoop-hdfs-project/hadoop-hdfs-httpfs/downloads //编译2.6.0 cd /home/hadoop/src && rm -rf hadoop-2.6.0-src && tar -zxvf hadoop-2.6.0-src.tar.gz && cd hadoop-2.6.0-src mvn package -DskipTests -Pdist,native cd /home/hadoop/src && rm -rf hadoop-2.6.5-src && tar -zxvf hadoop-2.6.5-src.tar.gz && cd hadoop-2.6.5-src mvn package -DskipTests -Pdist,native cd /home/hadoop/src && rm -rf hadoop-2.7.3-src && tar -zxvf hadoop-2.7.3-src.tar.gz && cd hadoop-2.7.3-src mvn package -DskipTests -Pdist,native //==========把centos编译之后备份到本地 scp -r root@192.168.0.61:/home/hadoop/src/hadoop-2.6.0-src/hadoop-dist/target/hadoop-2.6.0 /mnt/E/4_开发软件/Hadoop/安装包/native/ scp -r root@192.168.0.61:/home/hadoop/src/hadoop-2.6.5-src/hadoop-dist/target/hadoop-2.6.5 /mnt/E/4_开发软件/Hadoop/安装包/native/ scp -r root@192.168.0.61:/home/hadoop/src/hadoop-2.7.3-src/hadoop-dist/target/hadoop-2.7.3 /mnt/E/4_开发软件/Hadoop/安装包/native/ |