文檔編寫目的
每次安裝CDH集群時都需要做很多前置條件準備潮瓶,以確保安裝成功以及運行主機檢查時能順利通過。本篇文章主要講述安裝Cloudera Manager和CDH前的準備工作。
內容概述
- 環(huán)境前置確認
- CDH安裝前配置
環(huán)境前置確認
1.節(jié)點數(shù)量
7臺服務器配置: 核數(shù)8 哼鬓,內存32G, 硬盤:2T边灭。 其中3臺管理節(jié)點包括1個Cloudera Manager异希,2個NameNode啟用高可用,其余用作工作節(jié)點绒瘦。常見的較小規(guī)模的生產(chǎn)系統(tǒng)一般為10-20臺称簿。
2.操作系統(tǒng)選擇
CDH支持在主流的64位Linux操作系統(tǒng)上部署運行,包括但不限于:
Red Hat Enterprise Linux:5.7惰帽、5.10憨降、6.4、6.5该酗、6.6授药、6.7、7.1呜魄、7.2
CentOS:5.7悔叽、5.10、6.4爵嗅、6.5娇澎、6.6、6.7操骡、7.1九火、7.2
SUSE Linux Enterprise Server(SLES):11(SP2赚窃、SP3、SP4)
Oracle Linux:5.7岔激、5.10勒极、6.4、6.5虑鼎、6.6辱匿、6.7、7.1炫彩、7.2
Ubuntu:12.04匾七、14.04
Debian:7.0、7.1江兢、7.8
目前常見部署選擇Redhat6.5或7.2昨忆,為安裝CDSW安裝考慮推薦7.2。參考:
https://www.cloudera.com/documentation/enterprise/release-notes/topics/rn_consolidated_pcm.html#concept_bhn_wwg_lbb
3.安裝用戶
可以使用root用戶安裝杉允,或者具有sudu權限的其他用戶邑贴。
4. OS目錄要求
一般OS磁盤建議raid1或者raid10,對于目錄大小叔磷,簡單點拢驾,如果只有一個根目錄/建議最少100GB,無論是Cloudera Manger改基,NameNode還是DataNode節(jié)點繁疤,因為Cloudera Manager節(jié)點往往還存放著MySQL,以及一些監(jiān)控數(shù)據(jù)秕狰,可以選擇200GB稠腊。
或者:
/ 可以默認比如10GB
/opt 大于50GB
/usr 大于50GB
/var 大于20GB
/var/log大于50GB
/var/lib大于50GB
/tmp 大于20GB
或者:
/ 可以默認比如10GB
/opt 大于50GB
/usr 大于50GB
/var 大于50GB
/tmp 大于20GB
5. 硬件要求
以下Cloudera Manager,NameNode和DataNode相同:
CPU:最少4 cores鸣哀,推薦2路8核麻养,2路10核,2路12核
內存:最小16GB诺舔,推薦128GB-256GB
網(wǎng)絡:最小千兆,推薦兩張萬兆綁定
磁盤:OS參考2.3章節(jié)备畦,DataNode數(shù)據(jù)盤推薦12塊1TB-4TB的SATA/SAS盤
6. 磁盤要求
1.DataNode/NodeManager:OS盤可以使用raid1或者raid10低飒,數(shù)據(jù)盤不要使用raid,應該為JBOD懂盐。
管理節(jié)點(NameNode褥赊,Zookeeper,JournalNode)莉恼,可以使用raid或者JBOD拌喉,因為管理節(jié)點對I/O延遲比較敏感速那,建議將NN,ZK尿背,JN存放數(shù)據(jù)的目錄配置為不同的目錄端仰,并且對應到不同的磁盤。
[root@ip-172-31-6-148~]# df –h
[root@ip-172-31-6-148 ~]# lsblk
2.DataNode數(shù)據(jù)盤建議選擇ext4或xfs田藐,并配置noatime荔烧,比如:
[root@ip-172-31-6-148~]# cat /etc/fstab
/dev/sda1 /data/1 xfs defaults,noatime 1 2
/dev/sdb1 /data/2 xfs defaults,noatime 1 2
/dev/sdc1 /data/3 xfs defaults,noatime 1 2
/dev/sdd1 /data/4 xfs defaults,noatime 1 2
/dev/sde1 /data/5 xfs defaults,noatime 1 2
/dev/sdf1 /data/6 xfs defaults,noatime 1 2
...
/dev/sdx1 /data/x xfs defaults,noatime 1 2
[root@ip-172-31-6-148 ~]# fdisk -l
注意:noatime隱含了nodiratime
3.DataNode數(shù)據(jù)盤確保沒有配置分區(qū)卷LogicalVolume Manager (LVM)
[root@ip-172-31-6-148~]# df –h
[root@ip-172-31-6-148 ~]# lsblk
[root@ip-172-31-6-148 ~]# lvdisplay
Additionally, look for/dev/mapper or /dev/XX (where XX isnot sd).
4.確保BIOS配置正確,比如你如果使用的是SATA汽久,請確保沒有開啟IDE emulation鹤竭。
5.確保controller firmware是最新的,校驗磁盤是否有一些潛在的問題景醇。
[root@ip-172-31-6-148~]# dmesg | egrep -i 'sense error'
[root@ip-172-31-6-148~]# dmesg | egrep -i 'ata bus error'
6.目前常見的SATA讀寫速度大概在150MB/S-180MB/S臀稚,SAS或者SSD會更快,如果磁盤讀寫速度小于70MB/S三痰,肯定是有問題的吧寺,需要檢查硬件。以下為測試讀寫的命令酒觅,這里我們將/data/01掛載到/dev/sda1:
[root@ip-172-31-6-148~]# hdparm –t /dev/sda1
[root@ip-172-31-6-148 ~]# ddbs=1M count=1024 if=/dev/zero of=/data/01 oflag=direct conv=fdatasync
[root@ip-172-31-6-148~]# dd bs=1M count=1024 of=/dev/null if=/data/01 iflag=direct conv=fdatasync
7.確保磁盤沒有壞的扇區(qū):
[root@ip-172-31-6-148~]# badblocks -v /dev/sda1
[root@ip-172-31-6-148~]# badblocks -v /dev/sdb1
...
[root@ip-172-31-6-148 ~]#badblocks -v /dev/sdx1
7. 網(wǎng)絡要求
1.確保沒有啟用IPv6
[root@ip-172-31-6-148~]# lsmod | grep ipv6
(todisable add the following to /etc/sysctl.conf)
# disable ipv6
net.ipv6.conf.all.disable_ipv6= 1
net.ipv6.conf.default.disable_ipv6= 1
net.ipv6.conf.lo.disable_ipv6= 1
如果是RHEL/CentOS撮执,可以把以下內容補充到/etc/sysconfig/network:
NETWORKING_IPV6=no
IPV6INIT=no
2.靜態(tài)IP
確保所有服務器已配置靜態(tài)IP,如下:
[root@ip-172-31-6-148~]# cat/etc/sysconfig/network-scripts/ifcfg-eth* (RHEL)
以上文件需包含以下內容:
- BOOTPROTO=static(RHEL/SLES);
- iface <iface> inet static (Ubuntu);
- IPADDR or address should match the output of ifconfig;
8.主機名
確保所有服務器的hostname已經(jīng)配置舷丹,比如cdh1, cdh2, cdh3…
[root@ip-172-31-6-148~]# grep HOSTNAME /etc/sysconfig/network (RHEL)
9.網(wǎng)卡- Network Interface Cards (NICs)
確保網(wǎng)卡的雙工(duplex)模式已開啟抒钱,并保證速度正常:
[root@ip-172-31-6-148~]# ifconfig
[root@ip-172-31-6-148 ~]# ethtool <interface>| grep Speed
[root@ip-172-31-6-148 ~]# ethtool -S <interface> | grep collision
[root@ip-172-31-6-148 ~]# ethtool -S <interface> | grep drop
[root@ip-172-31-6-148 ~]# netperf
可以使用iperf測試服務器兩兩之間的速度。
10. JDK
CDH支持JDK包括JDK7以及JDK8颜凯。Cloudera提供相應JDK包谋币,并可有CM自動在集群中部署安裝。CDH的版本都能提供對Oracle JDK7的支持症概,而JDK8的支持則需要CDH5.3之后的版本蕾额。目前在CDH發(fā)行版中自帶的JDK版本為1.7.0_67版本。
11. 外部數(shù)據(jù)庫選擇
CM底層自動部署安裝數(shù)據(jù)庫進行系統(tǒng)配置彼城、schema等并進行相應管理诅蝶。同時CM也支持使用外部數(shù)據(jù)庫作為系統(tǒng)配置、數(shù)據(jù)表結構等的底層存儲募壕,具體支持的數(shù)據(jù)庫包括:
MySQL: 5.1调炬、5.5、5.6 舱馅、 5.7
PostgreSQL: 8.1 缰泡、8.3、8.4 代嗤、9.1棘钞、9.2缠借、9.3、9.4
Oracle:11gR2宜猜、12c
一般來說外部元數(shù)據(jù)庫都會采用系統(tǒng)自帶的MySQL服務泼返。確保以下配置:
增加數(shù)據(jù)庫的最大連接數(shù)
確保數(shù)據(jù)庫支持 UTF-8 編碼
配置為主備模式,參考如何實現(xiàn)CDH元數(shù)據(jù)庫MySQL的主備
12. 端口開放需求
我們在很多情況下操作的Windows客戶端機器都是跳板機膀藐,沒法完全直接訪問CDH的服務器屠阻,但如果有些服務我們如果不能查看Web UI,沒法進行安裝或者后期監(jiān)控集群额各,比如CM的7180用于安裝和運維集群国觉,NN的50070用于監(jiān)控HDFS等。那么可以聯(lián)系您的網(wǎng)絡管理員開通以下端口:
更多端口參考:
https://www.cloudera.com/documentation/enterprise/latest/topics/cm_ig_ports.html
CDH安裝前配置
以下以Redhat6.5為例進行操作虾啦。
1. 安裝HTTP服務
安裝apache的httpd服務主要用于搭建OS麻诀、Cloudera Manager、CDH的yum源傲醉。在集群服務器中選擇一臺服務器來安裝httpd服務蝇闭,命令如下:
安裝httpd服務
[root@ip-172-31-6-148~]# yum -y install httpd
將httpd服務加入自啟動服務并啟動
[root@ip-172-31-6-148~]# chkconfig --add httpd
[root@ip-172-31-6-148~]# chkconfig httpd on
[root@ip-172-31-6-148~]# service httpd start
Starting httpd:
[root@ip-172-31-6-148~]#
檢查服務是否啟動成功
在瀏覽器輸入http://hostname看到如上截圖則說明啟動成功。
2. 配置操作系統(tǒng)yum源
2.1 首先將操作系統(tǒng)的ISO文件掛載在httpd所在服務器:
[root@ip-172-31-6-148~]# mkdir /iso
[root@ip-172-31-6-148~]# mount -o loop CentOS-6.5-x86_64-minimal.iso /iso/
[root@ip-172-31-6-148~]# df -h
Filesystem Size UsedAvail Use% Mounted on
/dev/xvde 99G 30G 64G 32% /
tmpfs 7.4G 0 7.4G 0%/dev/shm
cm_processes 7.4G 9.7M 7.4G 1% /var/run/cloudera-scm-agent/process
/root/CentOS-6.5-x86_64-minimal.iso 398M 398M 0 100% /iso
[root@ip-172-31-6-148~]#
2.2 在/var/www/html目錄下創(chuàng)建centos6.5目錄硬毕,并將/iso目錄下所有文件拷貝至/var/www/html/centos6.5目錄
[root@ip-172-31-6-148~]# mkdir -p /var/www/html/centos6.5
[root@ip-172-31-6-148 ~]# scp -r /iso/* /var/www/html/centos6.5/
[root@ip-172-31-6-148~]# cd /var/www/html/centos6.5/
[root@ip-172-31-6-148 centos6.5]# ls
2.3 在瀏覽器訪問http://hostname/centos6.5
2.4 在/etc/yum.repo.d/目錄下增加os.repo文件呻引,內容如下
[root@ip-172-31-6-148yum.repos.d]# pwd
/etc/yum.repos.d
[root@ip-172-31-6-148 yum.repos.d]#vim os.repo
[localrepo]
name=CentOS6.5
baseurl=http://ip-172-31-6-148.fayson.com/centos6.5
gpgcheck=false
enabled=true
2.5 執(zhí)行命令查看yum源是否配置成功
[root@ip-172-31-6-148yum.repos.d]# yum clean all
[root@ip-172-31-6-148yum.repos.d]# yum repolist
repo id reponame status
base CentOS-6 - Base 6,706
extras CentOS-6- Extras 46
localrepo CentOS6.5 248
updates CentOS-6 - Updates 722
repolist: 7,736
[root@ip-172-31-6-148yum.repos.d]#
注:需要將os.repo文件同步至集群所有服務器的/etc/yum.repo.d目錄。
3. HOSTS配置
1. hostname修改
修改配置文件/etc/sysconfig/network
[root@ip-172-31-6-148~]# vim /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=主機名
修改完成后需要重啟服務器使其生效吐咳。修改集群所有節(jié)點的hostname為統(tǒng)一格式方便集群管理逻悠。
2. 配置/etc/hosts文件
[root@ip-172-31-6-148~]# vim /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
172.31.6.148 ip-172-31-6-148.fayson.com
172.31.5.190 ip-172-31-5-190.fayson.com
172.31.10.118 ip-172-31-10-118.fayson.com
172.31.9.33 ip-172-31-9-33.fayson.com
將集群所有服務器的IP和HOSTNAME配置到hosts文件,并同步至集群的所有服務器韭脊。如果企業(yè)有自己的DNS服務則可以使用DNS服務統(tǒng)一管理集群IP和域名巩剖,也可以自己搭建私有DNS服務管理CDH集群服務器的IP和域名灵嫌,可以參考如何利用Dnsmasq構建小型集群的本地DNS服務器和如何在Windows Server2008搭建DNS服務并配置泛域名解析誓军。
注意:如果使用hosts文件管理集群的IP和HOSTNAME則需要確保將hosts文件同步至集群所有節(jié)點草添。
4. 禁用SELinux
1.在集群所有節(jié)點執(zhí)行如下命令
[root@ip-172-31-6-148~]# setenforce 0
2.修改集群所有節(jié)點配置文件/etc/selinux/config
[root@ip-172-31-6-148~]# vim /etc/selinux/config
# This file controls the state ofSELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policyis enforced.
# permissive - SELinux printswarnings instead of enforcing.
# disabled - No SELinux policy isloaded.
SELINUX=disabled
# SELINUXTYPE= can take one of thesetwo values:
# targeted - Targeted processes areprotected,
# mls - Multi Level Securityprotection.
SELINUXTYPE=targeted
3.驗證是否禁用成功
[root@ip-172-31-6-148~]# sestatus -v
SELinux status: disabled
[root@ip-172-31-6-148~]#
5. 關閉防火墻
1.關閉集群所有服務器的防火墻
[root@ip-172-31-6-148~]# chkconfig iptables off
[root@ip-172-31-6-148~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[root@ip-172-31-6-148 ~]#
2.檢查集群所有服務器防火墻是否關閉
[root@ip-172-31-6-148~]# service iptables status
iptables: Firewall is not running.
[root@ip-172-31-6-148~]#
6. 設置SWAP
1.在集群所有節(jié)點修改/etc/sysctl.conf配置文件崖飘,增加如下配置
[root@ip-172-31-6-148~]# vim /etc/sysctl.conf
# Kernel sysctl configuration filefor Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
…
# Controls the maximum number ofshared memory segments, in pages
kernel.shmall = 4294967296
vm.swappiness = 10
- 檢查設置是否生效
[root@ip-172-31-6-148~]# sysctl -p
…
kernel.msgmnb= 65536
kernel.msgmax= 65536
kernel.shmmax= 68719476736
kernel.shmall= 4294967296
vm.swappiness= 10
[root@ip-172-31-6-148~]#
7. 關閉透明大頁面
1.在集群所有節(jié)點執(zhí)行如下命令,使其立即生效
[root@ip-172-31-6-148~]# echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag
[root@ip-172-31-6-148~]# echo never >/sys/kernel/mm/redhat_transparent_hugepage/enabled
2.在集群所有節(jié)點/etc/rc.d/rc.local腳本中增加如下代碼赞哗,使其永久生效
if test -f/sys/kernel/mm/redhat_transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
fi
if test -f /sys/kernel/mm/redhat_transparent_hugepage/defrag; then
echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag
fi
3.賦予rc.local腳本可執(zhí)行權限
[root@ip-172-31-6-148rc.d]# chmod +x /etc/rc.d/rc.local
8. 配置時鐘同步
如果企業(yè)有自己的NTP Server則可以集群中所有節(jié)點可配置企業(yè)NTP Server牌里,如果沒有自己的NTP服務器則在集群中選用一臺服務器作為NTP Server,其它服務器與其保持同步死嗦,配置如下:
1.在集群所有節(jié)點安裝NTP服務
[root@ip-172-31-6-148~]# yum -y install ntp
2.選擇集群一臺服務器作為NTP Server趋距,配置如下
[root@ip-172-31-6-148~]# vim /etc/ntp.conf
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server 127.127.1.0 #local clock
fudge 127.127.1.0 stratum 10
3.集群其它節(jié)點與其同步,配置如下:
[ip-172-31-5-190 ~]# vim /etc/ntp.conf
# Use public servers from thepool.ntp.org project.
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server 172.31.6.148
4.完成以上配置后越除,在集群所有節(jié)點執(zhí)行如下命令
[root@ip-172-31-6-148~]# chkconfig --add ntpd
[root@ip-172-31-6-148~]# chkconfig ntpd on
[root@ip-172-31-6-148~]# service ntpd restart
Shutting down ntpd: [ OK ]
Starting ntpd: [ OK ]
[root@ip-172-31-6-148~]#
5.驗證所有節(jié)點NTP是否同步
[root@ip-172-31-5-190~]# ntpq -p
remote refid st t when pollreach delay offset jitter
==============================================================================
*ip-172-31-6-148210.23.25.77 2 u 448 1024 377 0.255 3.245 7.859
[root@ip-172-31-5-190~]#
9. 安裝MySQL數(shù)據(jù)庫
1.在集群中CM節(jié)點安裝MySQL服務
[root@ip-172-31-6-148yum.repos.d]# yum -y install mysql mysql-server
2.啟動MySQL服務并將mysqld加入開機自啟動服務
[root@ip-172-31-6-148~]# chkconfig --add mysqld
[root@ip-172-31-6-148 ~]# chkconfig mysqld on
[root@ip-172-31-6-148 ~]# service mysqld start
Starting mysqld: [ OK ]
[root@ip-172-31-6-148 ~]#
3.執(zhí)行如下腳本初始化MySQL
[root@ip-172-31-9-33~]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FORALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READEACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll needthe current
password for the root user. If you'vejust installed MySQL, and
you haven't set the root password yet, the passwordwill be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing,and to make the installation
go a bit smoother. You should removethem before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] n
... skipping.
By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only fortesting, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on testdatabase...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MySQL
installationshould now be secure.
Thanks for usingMySQL!
[root@ip-172-31-9-33~]#
4.登錄MySQL驗證是否安裝成功
[root@ip-172-31-9-33~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013,Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporationand/or its
affiliates.Other names may be trademarks of theirrespective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current inputstatement.
mysql>
5.創(chuàng)建CDH所需要的數(shù)據(jù)庫
create database metastore default character set utf8;
CREATE USER 'hive'@'%'IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON metastore.* TO 'hive'@'%';
FLUSH PRIVILEGES;
create database cm default character set utf8;
CREATE USER 'cm'@'%'IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON cm. * TO 'cm'@'%';
FLUSH PRIVILEGES;
create database am default character set utf8;
CREATE USER 'am'@'%'IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON am. * TO 'am'@'%';
FLUSH PRIVILEGES;
create database rm default character set utf8;
CREATE USER 'rm'@'%'IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON rm. * TO 'rm'@'%';
FLUSH PRIVILEGES;
create database hue default character set utf8;
CREATE USER 'hue'@'%'IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON hue. * TO 'hue'@'%';
FLUSH PRIVILEGES;
create database oozie default character set utf8;
CREATE USER 'oozie'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON oozie. * TO 'oozie'@'%';
FLUSH PRIVILEGES;
create database sentry default character set utf8;
CREATE USER 'sentry'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON sentry.* TO 'sentry'@'%';
FLUSH PRIVILEGES;
10. 配置CM的yum源
- 下載資源包:
CDH: https://archive.cloudera.com/cdh5/repo-as-tarball/5.13.1/
CM:http://archive.cloudera.com/cm5/repo-as-tarball/5.13.1/
對應的CentOS的資源包為
cm5.13.1-centos6.tar.gz | 2017-12-06 23:39 | 928M
2.在/var/www/html下新增cm5.13目錄
[root@ip-172-31-6-148html]# mkdir -p /var/www/html
- cm5.13.1-centos6.tar.gz文件到/var/www/html/ 目錄下节腐,因為這個目錄是Apache服務器的目錄:
[ehp@hadoop-cdh01 softwares]$ sudo tar -zxvf cm5.13.1-centos6.tar.gz -C /var/www/html/
- 為了與Apache官網(wǎng)資源包路徑保持一致,創(chuàng)建一下目錄:
[ehp@hadoop-cdh01 html]$ sudo mkdir -p cm5/redhat/6/x86_64/
- 移動cm資源包到該路徑下:
[ehp@hadoop-cdh01 html]$ sudo cd cm/ cm5/redhat/6/x86_64/
-
驗證是否部署成功
訪問:http://主機名/cm5/redhat/6/x86_64/cm/5/ 測試文件索引是否正常摘盆,如果頁面空白或為You don't have permission to access ,請檢查防火墻和SELinux是否關閉翼雀。
12. 安裝MySQL驅動
在集群中需要安裝CM服務的節(jié)點上安裝MySQL的驅動
1.創(chuàng)建目錄/usr/share/java,有則不用創(chuàng)建孩擂。
[root@ip-172-31-6-148java]# mkdir -p /usr/share/java/
2.將mysql-connector-java-5.1.34.jar拷貝至/usr/share/java目錄狼渊,并創(chuàng)建軟鏈接
[root@ip-172-31-6-148java]# pwd
/usr/share/java
[root@ip-172-31-6-148 java]#ll
total 940
-rwxr-xr-x.1 root root 960372 Aug 3015:16 mysql-connector-java-5.1.34.jar
[root@ip-172-31-6-148java]# ln -s mysql-connector-java-5.1.34.jar mysql-connector-java.jar
[root@ip-172-31-6-148java]# ll
total 940
-rwxr-xr-x.1 root root 960372 Aug 3015:16 mysql-connector-java-5.1.34.jar
lrwxrwxrwx 1root root 31 Oct 15 18:00 mysql-connector-java.jar ->mysql-connector-java-5.1.34.jar
[root@ip-172-31-6-148java]#