标签:restart check sqli mirror 组件 def cst emctl fence
操作系统版本:CentOS 7.4
检查是否安装了createrepo:
[root@node2 ~]# rpm -qa|grep createrepo
createrepo-0.9.9-28.el7.noarch
如果没有安装需要使用yum安装:
[root@node2 ~]# yum install createrepo
......
Installed:
createrepo.noarch 0:0.9.9-28.el7
?
Dependency Installed:
deltarpm.x86_64 0:3.6-3.el7 libxml2-python.x86_64 0:2.9.1-6.el7_2.3
python-deltarpm.x86_64 0:3.6-3.el7
?
Complete!
检查是否安装了httpd:
[root@node2 ~]# rpm -qa|grep httpd
httpd-tools-2.4.6-67.el7.centos.x86_64
httpd-2.4.6-67.el7.centos.x86_64
如果没有安装需要使用同样的方法安装httpd组件。
该目录下存放其他节点安装需要的rpm包,目录创建在文件夹/var/www/html下:
[root@node2 www]# mkdir -p /var/www/html/cm5
[root@node2 html]# ll
total 0
drwxr-xr-x 2 root root 6 Jan 30 21:44 cm5
[root@node2 html]# createrepo cm5
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@node2 html]# ll
total 0
drwxr-xr-x 3 root root 22 Jan 30 21:46 cm5
[root@node2 html]# cd cm5/
[root@node2 cm5]# ll
total 4
drwxr-xr-x 2 root root 4096 Jan 30 21:46 repodata
cm5下面会新增一个repodata目录,说明repo源制作成功。
[root@node2 cm5]# systemctl restart httpd
[root@node2 cm5]#
[root@node2 cm5]#
[root@node2 cm5]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2019-01-30 21:51:15 CST; 7s ago
验证repo源是否能够正常访问:http://192.168.246.161/cm5/,如果能够正常访问则httpd服务启动正常。
进入目录/etc/yum.repos.d/,创建repo文件。
[root@node2 yum.repos.d]# cat > cm5epo.repo
[cmrepo]
name=cmrepo
baseurl=http://node2/cm5
enabled=1
gpgcheck=0
^C
[root@node2 yum.repos.d]# cat cm5epo.repo
[cmrepo]
name=cmrepo
baseurl=http://node2/cm5
enabled=1
gpgcheck=0
首先清空yum缓存,然后重建yum缓存,通过yum list命令查看已经上传的rpm文件,说明repo源搭建成功。只要将cm5epo.repo文件复制到其他节点上就可以正常通过yum安装rpm文件了。
[root@node2 yum.repos.d]# yum clean
Loaded plugins: fastestmirror
Error: clean requires an option: headers, packages, metadata, dbcache, plugins, expire-cache, rpmdb, all
[root@node2 yum.repos.d]#
[root@node2 yum.repos.d]#
[root@node2 yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
c7-media | 3.6 kB 00:00
cloudera-manager | 951 B 00:00
cmrepo | 2.9 kB 00:00
(1/3): cmrepo/filelists_db | 586 B 00:00
(2/3): cmrepo/other_db | 575 B 00:00
(3/3): cmrepo/primary_db | 1.1 kB 00:00
Loading mirror speeds from cached hostfile
Metadata Cache Created
[root@node2 yum.repos.d]#
[root@node2 yum.repos.d]#
[root@node2 yum.repos.d]# yum list |grep clouder
cloudera-manager-agent.x86_64 5.15.2-1.cm5152.p0.2.el7 installed
cloudera-manager-daemons.x86_64 5.15.2-1.cm5152.p0.2.el7 installed
cloudera-manager-server.x86_64 5.15.2-1.cm5152.p0.2.el7 cloudera-manager
cloudera-manager-server-db-2.x86_64 5.15.2-1.cm5152.p0.2.el7 cloudera-manager
标签:restart check sqli mirror 组件 def cst emctl fence
原文地址:https://www.cnblogs.com/kakuma/p/10398522.html