1) using the yum install http service (primary node)
yum -y install httpd
2) The httpd service added to the system since the launch of the service and set the boot
systemctl start httpd # start apache server
systemctl stop httpd # shut down apache server
systemctl enable httpd # Set boot automatically start
systemctl status httpd.service # service httpd status check
3) Download CM5.12.1rpm package (Note: This path contains the CentOS7 version of the rpm package )
(https://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5.12.1/RPMS/x86_64/)
The file is downloaded more than 7 directory under /var/www/html/cm5.12.1
mkdir -p /var/www/html/cm5.12.1
cd /var/www/html/cm5.12.1/
4) Create a local source cm
[root@hadoop101 cm5.12.1]# cd /var/www/html/cm5.12.1/
[root@hadoop101 cm5.12.1]# createrepo .
Spawning worker 0 with 7 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
5) access http://hadoop101.com/cm5.12.1/ local sources confirm whether the normal access
6) local source configuration cm increase in /etc/yum.repo.d/ cm.repo directory file, is written as follows
[root@hadoop101 cm5.12.1]# vim /etc/yum.repos.d/cm.repo
[cmrepo]
name=CM5.12.1
baseurl=http://hadoop101.com/cm5.12.1
gpgcheck=false
enabled=true
7) verify whether the CM source configured successfully
[root@hadoop101 cm5.12.1]# yum repolist
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.nju.edu.cn
* extras: mirrors.njupt.edu.cn
* updates: mirrors.njupt.edu.cn
cmrepo | 2.9 kB 00:00:00
cmrepo/primary_db | 1.1 kB 00:00:00 repo id repo name status base/7/x86_64 CentOS-7 - Base 10,019 cmrepo CM5.12.1 0 extras/7/x86_64 CentOS-7 - Extras 435 updates/7/x86_64 CentOS-7 - Updates 2,500 repolist: 12,954
8) will be distributed to the rest of the nodes cm.repo
[root@hadoop101 cm5.12.1]# xsync /etc/yum.repos.d/cm.repo
fname=cm.repo
pdir=/etc/yum.repos.d
------------------- hadoop102 --------------
sending incremental file list
cm.repo
sent 181 bytes received 35 bytes 144.00 bytes/sec total size is 89 speedup is 0.41 ------------------- hadoop103 -------------- sending incremental file list cm.repo sent 181 bytes received 35 bytes 432.00 bytes/sec total size is 89 speedup is 0.41
3.4 start the CM Service