《智慧燃气项目部署运维手册.docx》由会员分享,可在线阅读,更多相关《智慧燃气项目部署运维手册.docx(18页珍藏版)》请在优知文库上搜索。
1、智慧燃气项目部署运维手册XX科技股份有限公司编制目录一、文章编写目的5二、前置准备52.1 配置网络ip52.2 编写相关操作脚本91. 批量执行命令脚本92. 批量重命名脚本113. 批量拷贝脚本134. cm_migrate,sh155. format2.sh166. mountDisk.sh167. network,sh178. node,1.ist189. node,txt182.3hostname及hosts配置181.配置每台节点的hostname182.配置节点ip、hostname映射192.4 禁用SE1.inux192.5 关闭防火墙212.6 设置Swappiness21
2、2.7 关闭透明大页面222.8 配置操作系统本地yum源232.9 安装http服务25NAME=eno1.6777736#随机idUUID=6d21f413-619d-4283-9ba2-e1.a724c1.c593DEVICE=eno1.6777736*系统启动的时候网络接口是否有效(ycsno)ONBOOT=yesPEERDNS=yes”PEERROUTES=yes*IPV6_PEERDNS=yesIPV6一PEERRo1.TES=yesIPV6_PRIVACY=no需要修改的地方有:BOOTPROTO=StaticWhcp改为static(修改)0NB00T=yes#开机启用本配置,
3、一般在最后一行(修改)IPADDR=192.168.139.101#静态IP(增加)GATEWAY=I92.168.139.2#默认网关,虚拟机安装的话,通常是2,也就是VMnet8的网关设置(增加)NETMSK=255.255.255.0#子网掩码(增加)DNS1=192.168.139.2ffDNS配置,虚拟机安装的话,DNS就网关就行,多个DNS网址的话再增加(增加)CREATEUSERcm,%,IDENTIFIEDBYpassword;GRANTA1.1.PRIVI1.EGESONera.*TOcmg%,:F1.USHPRIVI1.EGES;createdatabaseamdefau1
4、.tcharactersetutf8;CREATEUSER,amQ,%,IDENTIFIEDBYpassword;GRANTA1.1.PRIVI1.EGESONam.*TOam,0%,;F1.USHPRIVI1.EGES;createdatabasermdefau1.tcharactersetutf8;CREATEUSERrmQ,%,IDENTIFIEDBYpassword:GRANTA1.1.PRIVI1.EGESONrm.*TOrm,%,;F1.USHPRIVI1.EGES;createdatabasehuedefau1.tcharactersetutf8;CREATEUSERhue1%I
5、DENTIFIEDBYpassword;GRANTA1.1.PRIVI1.EGESONhue.*TOhueQ%;F1.USHPRIVI1.EGES;createdatabaseooziedefau1.tcharactersetutf8;CREATEUSER,oozie,%,IDENTIFIEDBYpassword;GRANTA1.1.PRIVI1.EGESONoozie.*TOoozie%;F1.USHPRIVI1.EGES;tota1.940rwxrwxr-x.1rootroot960372Feb108:31mysq1.-connector-java-5.1.34.jarInvxrwxrwx
6、1rootroot31Feb200:52mysq1.-conncctor-java.jar-mysq!-connector-java-5.1.34.jar三、C1.ouderaManager安装3.1配置本地CM源下载CM516.1的安装包,地址为:http:/archive,http:/archive,http:/archive,http:/archive,http:/archive,rpmhttp:/archive,cm5rec1.hat7x8664cm5.16.1/RPMS/x86_64/jdk-6u31-1inux-amd64.rpnhttp:/archive,下载CDH5.16.1的
7、安装包,地址为:http:/archive.c1.oudera.eom/cdh5/parce1.s/5.16.1/CDH-5.16.1-1.cdh5.16.1.p.3-e1.7.parce1.http:/archivc.c1.oudera.eom/cdh5/parcc1.s/5.16.1.CI)H-5.16.1-1.cdh5.16.1.p.3-e1.7.parce1.,sha1.http:/archive,cdh5parce1.s5.16.1/manifest,json将CIOUderaManagCr安装需要的7个rpm包下载到本地,放在同-目录,执行CreaIerePO命令生成rpm元数据。
8、rootQnode1.cm5.16.1#11tota1.1019160-rw-rr-1rootroot9864584Nov2714:40CIOUdera-manager-agcnt-5.16.1-I.cm5161.p.1.c1.7.x8664.rpm-rw-rr1rootroot789872988Nov2714:40C1.OUdera-Inanager-daenons-5.16.1-5161.p.1.e1.7.x86_64.rpm-rw-r-r1rootroot8704Nov2714:40c1.oudcra-managc1.SerVer-5.16.IT.cm5161.p.1.e1.7.x866
9、4.rpm-rw-r-r1rootroot10612Nov2714:40C1.oUdera-manager-server-db-2-5.16.1-1.cm5161.p.1.e1.7.x86_64.rpm-rw-rr-1rootroot30604172Nov2714:40enterprise-debuginfo_5.16.11.cm5161.p.1.e1.7.x86_64.rpmrw-r-r-1rootroot71204325Nov2714:40jdk-6u31-1.inu-amd64.rpm-rw-rr1rootroot142039186Nov2714:40orac1.e-j2sdk1.7-1
10、.7.0+updatc67-1.x8664.rpmErootQnode1.cm5.16.1#CreaterePO.Spawningworker0WiIh2pkgsSpawningworker1with2pkgsSpawningworker2with2pkgsSpawningworker3withIPkgSWorkersFiniShCdSavingPrimarymetadataSavingfi1.e1.istsmetadataSavingothermetadataGeneratingsq1iteDBsSq1.iteDBscomp1.ete如果createrepo命令没有,使用yum下载配置IWb
11、服务器将上述cdh5.16cm5.16目录移动到varwwwhtm1.目录下,使得用户可以通过HTTP访问这些rpm包。rootSnode1.11vcm5.16/cdh5.16/varwwhtm1.验证浏览器能否正常访问制作C1.ouderaManager的repo源rootode1.vietcyum.repos,dcm.repocnreponame=cm_repobaseur1.=http192.168.139.101cm5.16.2enab1.e=truegpgcheck=fa1.serootnode1.yu11.repos,dj#yu11repo1.ist1.oadedp1.ugins:
12、amazon-id.rhui-Jb,scarch-disab1cd-rcposrepoidreponamestatuscmrepocmrepoRedHat1.pdarhui-REGION-c1.ient-config-server-7x86.64teInfrastructure2.0C1.ientCrhui-REGION-rhe1.-server-re1.eases/7Server/x86_64RedHatEnterprise1.inuxServer7(RPMs)20,668rhui-REGION-rhe1.-server-rh-common/7Server/x86_64RedHatEnterprise1.inuxServer7R1.1.Commo233repo1.ist:20,909验证安装JDKyum-yinsta1.1.orac1.e-j2sdk1.71.7.0+update6713.2安装C1.ouderaManagerServer通过yum安装C1.ouderaManagerServeryum-yinsta1.1.c1.oudera-managei-server初始化数据库root0node1.yum.repos,d#/usrsharecmf/schema/scm_prepare_data