1、 士兰集成(Linux GFS 安装配置手册)拟 制: 日 期:审 核: 日 期:审 核: 日 期:批 准: 日 期:创业软件股份有限公司版权所有 侵权必究资料编码 产品名称 Linux使用对象 创业软件工程师 产品版本 5.11编写部门 系统集成部 资料版本 V1.0创业软件机密,未经许可不得扩散 第 1 页, 共 25 页修订记录日期 修订版本 描述 作者2016-12 V1.0 初稿创业软件机密,未经许可不得扩散 第 2 页, 共 25 页目录第 1 章 安装环境确认 .31.1 硬件环境 31.2 软件环境 31.3 安装平台信息 .31.4 外接磁盘规划 .31.5 用户信息 3第
2、2 章 环境准备 42.1 exsi 安装 42.2 创建 vm 虚拟机 82.3 操作系统安装 .122.4 安装 oracle client.12第 3 章 Linux 安装 gfs 143.1 配置 yum 安装 .143.2 安装 gfs .163.3 启动服务 203.4 设置服务自动启动 .223.5 格式化磁盘并 mount 到目录 24创业软件机密,未经许可不得扩散 第 3 页, 共 25 页第 1 章 安装环境确认1.1 硬件环境HP BL460G9EMC 存储1.2 软件环境操作系统平台: Redhat 5.111.3 安装平台信息主机名 IP 地址 子网掩码 备注F8PL
3、ODAP1 172.18.13.42 255.255.255.0 节点 1 的公用 IPF8PLODAP2 172.18.13.43 255.255.255.0 节点 2 的公用 IPVIP 172.18.13.41 255.255.255.0 VIP1.4 外接磁盘规划LUN 号( ASM 挂载方式) 大小 用途 备注Lun1(normal) 1024G /data011.5 用户信息用户信息 用途 备注root 操用系统 root 角色(两节点密码必须相同)oracle 安装 Oracle 客户端创业软件机密,未经许可不得扩散 第 4 页, 共 25 页第 2 章 环境准备2.1 exsi
4、 安装开机做好阵列,选择从安装介质启动按 F11 继续创业软件机密,未经许可不得扩散 第 5 页, 共 25 页输入密码:Pssw0rd ,密码最少要 8 位数字或字母,用 vsphere client 登录 ESXi 服务器时,账户名为 root,密码为上面所设创业软件机密,未经许可不得扩散 第 6 页, 共 25 页按 F2 进入配置界面这里只用配置管理网络无论服务器连接了多少根网线,这里只用配置一个管理 IP,至于服务器上跑的虚拟机流量,管理流量的分配,则要在 vcenter 里指定到对应物理网卡上创业软件机密,未经许可不得扩散 第 7 页, 共 25 页配置 IPv4 地址这里选择配置
5、静态 IP 地址IP:172.18.19.81 创业软件机密,未经许可不得扩散 第 8 页, 共 25 页子网掩码:255.255.255.0网关:172.18.19.254这里网关按现有网络环境的网关来配置,否则将无法远程连接管理网卡选择配置完成后,退出保存,至此需要在服务器上的配置全部完成,后面可以全程远程操作2.2 创建 vm 虚拟机创业软件机密,未经许可不得扩散 第 9 页, 共 25 页登录 vmware 管理机,点击创建虚拟机选择创建类型,点击下一步创业软件机密,未经许可不得扩散 第 10 页, 共 25 页输入虚拟机主机名,操作系统类型选择存储创业软件机密,未经许可不得扩散 第
6、11 页, 共 25 页分配虚拟机使用的硬件资源。点击完成。网卡的配置创业软件机密,未经许可不得扩散 第 12 页, 共 25 页2.3 操作系统安装具体操作系统安装可以参考文件安装http:/ 安装 oracle client 1、 新建 oracle 帐户创业软件机密,未经许可不得扩散 第 13 页, 共 25 页groupadd -g 1001 oinstallgroupadd -g 1002 dba useradd -g oinstall -G dba -u 1001 oracle -p Oracle123mkdir -p /oracle/app/oracle/product/11.2
7、.0/client_1chown -R oracle:oinstall /oracle/app/oraclemkdir -p /oracle/app/oraInventorychmod -R 775 /oracle/unzip p13390677_112040_Linux-x86-64_4of7.zip# rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm Preparing # 100% 1:oracle-instantclient11.# 100% # rpm -ivh oracle-instantclient11
8、.2-devel-11.2.0.4.0-1.x86_64.rpm Preparing # 100% 1:oracle-instantclient11.# 100% # rpm -ivh oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm Preparing # 100% 1:oracle-instantclient11.# 100% $ vim /home/oracle/.bash_profile ORACLE_HOME=“/usr/lib/oracle/11.2/client64“ PATH=$PATH:$ORACLE_HOME/
9、bin export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib export LD_LIBRARY_PATH创业软件机密,未经许可不得扩散 第 14 页, 共 25 页第 3 章 Linux 安装 gfs3.1 配置 yum 安装cat /etc/yum.repos.d/rhel-media.repo rhel-medianame= Software Oracle Linux 5.11baseurl=file:/mnt/cdrom/Server/gpgcheck=0enabled=1rhel-clusternam
10、e= Software Oracle Linux 5.11baseurl=file:/mnt/cdrom/Cluster/gpgcheck=0enabled=1rhel-clusterstoragename= Software Oracle Linux 5.11baseurl=file:/mnt/cdrom/ClusterStorage/gpgcheck=0enabled=1# mkdir /mnt/cdrom# mount /dev/cdrom /mnt/cdrommount: block device /dev/cdrom is write-protected, mounting read
11、-only# yum makecache创业软件机密,未经许可不得扩散 第 15 页, 共 25 页Loaded plugins: product-id, security, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.rhel-cluster | 1.5 kB 00:00 rhel-cluster/filelists | 117 kB 00:00 rhel-cluster/ot
12、her | 44 kB 00:00 rhel-cluster/group | 104 kB 00:00 rhel-cluster/primary | 6.4 kB 00:00 rhel-clusterstorage | 1.5 kB 00:00 rhel-clusterstorage/filelists | 13 kB 00:00 rhel-clusterstorage/other | 48 kB 00:00 rhel-clusterstorage/group | 108 kB 00:00 rhel-clusterstorage/primary | 8.7 kB 00:00 rhel-medi
13、a | 1.5 kB 00:00 rhel-media/filelists | 3.0 MB 00:03 rhel-media/other | 9.4 MB 00:00 rhel-media/group | 1.0 MB 00:00 rhel-media/primary | 945 kB 00:00 rhel-cluster 32/32rhel-clusterstorage 39/39rhel-media 3363/3363rhel-cluster 32/32rhel-clusterstorage 39/39rhel-media 3363/3363rhel-cluster 32/32rhel-
14、clusterstorage 39/39rhel-media 3363/3363Metadata Cache Created 创业软件机密,未经许可不得扩散 第 16 页, 共 25 页3.2 安装 gfs# yum install rgmanager, lvm2-cluster, gfs2-utils, ccs -yLoaded plugins: product-id, security, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subs
15、cription-manager to register.rhel-cluster | 1.5 kB 00:00 rhel-clusterstorage | 1.5 kB 00:00 rhel-media | 1.5 kB 00:00 Setting up Install ProcessPackage cman-2.0.115-124.el5.x86_64 already installed and latest versionPackage rgmanager-2.0.52-54.el5.x86_64 already installed and latest versionPackage l
16、vm2-cluster-2.02.88-10.el5.x86_64 already installed and latest versionPackage system-config-cluster-1.0.57-17.noarch already installed and latest versionResolving Dependencies Running transaction check- Package cluster-cim.x86_64 0:0.12.1-11.el5 set to be updated Processing Dependency: tog-pegasus f
17、or package: cluster-cim- Package luci.x86_64 0:0.12.2-81.el5 set to be updated Processing Dependency: python-imaging for package: luci- Package ricci.x86_64 0:0.12.2-81.el5 set to be updated Running transaction check- Package python-imaging.x86_64 0:1.1.5-7.el5 set to be updated Processing Dependenc
18、y: tkinter for package: python-imaging- Package tog-pegasus.x86_64 2:2.11.0-3.el5 set to be updated Processing Dependency: libNamespaceProvider.so.1()(64bit) for package: tog-pegasus创业软件机密,未经许可不得扩散 第 17 页, 共 25 页 Processing Dependency: libpegserver.so.1()(64bit) for package: tog-pegasus Processing D
19、ependency: libpegcliutils.so.1()(64bit) for package: tog-pegasus Processing Dependency: libCertificateProvider.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpeggeneral.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpegclient.so.1()(64bit) for package: tog-pegasus
20、 Processing Dependency: libProviderRegistrationProvider.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpegauthentication.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpegservice.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpeggetoopt.so.1()(64
21、bit) for package: tog-pegasus Processing Dependency: libDefaultProviderManager.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpegexportserver.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpegprovidermanager.so.1()(64bit) for package: tog-pegasus Processing Depend
22、ency: libpegpmservice.so.1()(64bit) for package: tog-pegasus Processing Dependency: libUserAuthProvider.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpegprovider.so.1()(64bit) for package: tog-pegasus Processing Dependency: libInteropProvider.so.1()(64bit) for package: tog-pegasus
23、 Processing Dependency: libpegqueryexpression.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpegwql.so.1()(64bit) for package: tog-pegasus Processing Dependency: libConfigSettingProvider.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpegconfig.so.1()(64bit) for pa
24、ckage: tog-pegasus Processing Dependency: libpegcompiler.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpegrepository.so.1()(64bit) for package: tog-pegasus Processing Dependency: libCIMQueryCapabilitiesProvider.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpegha
25、ndlerservice.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpegquerycommon.so.1()(64bit) for package: tog-pegasus创业软件机密,未经许可不得扩散 第 18 页, 共 25 页 Processing Dependency: libpeguser.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpegindicationservice.so.1()(64bit) for
26、package: tog-pegasus Processing Dependency: libpegslp.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpegcql.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpegcommon.so.1()(64bit) for package: tog-pegasus Processing Dependency: libpegpmrouter.so.1()(64bit) for pack
27、age: tog-pegasus Processing Dependency: libpegprm.so.1()(64bit) for package: tog-pegasus Running transaction check- Package tkinter.x86_64 0:2.4.3-56.el5 set to be updated Processing Dependency: libTix8.4.so()(64bit) for package: tkinter- Package tog-pegasus-libs.x86_64 2:2.11.0-3.el5 set to be upda
28、ted Running transaction check- Package tix.x86_64 1:8.4.0-11.fc6 set to be updated Finished Dependency ResolutionDependencies Resolved=Package Arch Version Repository Size=Installing:cluster-cim x86_64 0.12.1-11.el5 rhel-cluster 168 kluci x86_64 0.12.2-81.el5 rhel-cluster 26 M创业软件机密,未经许可不得扩散 第 19 页,
29、 共 25 页ricci x86_64 0.12.2-81.el5 rhel-cluster 1.2 MInstalling for dependencies:python-imaging x86_64 1.1.5-7.el5 rhel-media 406 ktix x86_64 1:8.4.0-11.fc6 rhel-media 333 ktkinter x86_64 2.4.3-56.el5 rhel-media 282 ktog-pegasus x86_64 2:2.11.0-3.el5 rhel-media 2.0 Mtog-pegasus-libs x86_64 2:2.11.0-3
30、.el5 rhel-media 2.7 MTransaction Summary=Install 8 Package(s)Upgrade 0 Package(s)Total download size: 33 MDownloading Packages:-Total 1.9 GB/s | 33 MB 00:00 Running rpm_check_debugRunning Transaction TestFinished Transaction TestTransaction Test SucceededRunning Transaction创业软件机密,未经许可不得扩散 第 20 页, 共
31、25 页Installing : tog-pegasus-libs 1/8 Installing : tog-pegasus 2/8 Installing : tix 3/8 Installing : tkinter 4/8 Installing : python-imaging 5/8 Installing : cluster-cim 6/8 Installing : ricci 7/8 Installing : luci 8/8 Installed:cluster-cim.x86_64 0:0.12.1-11.el5 luci.x86_64 0:0.12.2-81.el5 ricci.x8
32、6_64 0:0.12.2-81.el5 Dependency Installed:python-imaging.x86_64 0:1.1.5-7.el5 tix.x86_64 1:8.4.0-11.fc6 tkinter.x86_64 0:2.4.3-56.el5 tog-pegasus.x86_64 2:2.11.0-3.el5 tog-pegasus-libs.x86_64 2:2.11.0-3.el5 Complete!3.3 启动服务# service ricci startStarting oddjobd: OK generating SSL certificates. done创
33、业软件机密,未经许可不得扩散 第 21 页, 共 25 页Starting ricci: OK # service cman startStarting cluster: Loading modules. doneMounting configfs. doneStarting ccsd. doneStarting cman. failed/usr/sbin/cman_tool: ccsd is not runningFAILED# service rgmanager start# service qdiskd startStarting the Quorum Disk Daemon: OK #
34、 luci_admin initInitializing the luci serverCreating the admin userEnter password: admin123Confirm password: admin123Please wait.The admin password has been successfully set.Generating SSL certificates. The luci server has been successfully initializedYou must restart the luci server for changes to
35、take effect.创业软件机密,未经许可不得扩散 第 22 页, 共 25 页Run “service luci restart“ to do so# service luci restartShutting down luci: OK Starting luci: Generating https SSL certificates. done OK Point your web browser to https:/nodea:8084 to access luci3.4 设置服务自动启动# chkconfig ricci on# chkconfig cman on# chkconfig
36、 rgmanager on# chkconfig qdiskd on# chkconfig luci on# mkqdisk -l cluster8_qdisk -c /dev/sdcmkqdisk v0.6.0Writing new quorum disk label cluster8_qdisk to /dev/sdc.WARNING: About to destroy all data on /dev/sdc; proceed N/y ? yInitializing status block for node 1.Initializing status block for node 2.
37、Initializing status block for node 3.Initializing status block for node 4.Initializing status block for node 5.Initializing status block for node 6.Initializing status block for node 7.创业软件机密,未经许可不得扩散 第 23 页, 共 25 页Initializing status block for node 8.Initializing status block for node 9.Initializin
38、g status block for node 10.Initializing status block for node 11.Initializing status block for node 12.Initializing status block for node 13.Initializing status block for node 14.Initializing status block for node 15.Initializing status block for node 16.# mkqdisk -Lmkqdisk v0.6.0/dev/disk/by-id/scs
39、i-SATA_VBOX_HARDDISK_VB05db5f4e-213f4599:/dev/disk/by-path/pci-0000:00:0d.0-scsi-2:0:0:0:/dev/sdc:Magic: eb7a62c2Label: cluster8_qdiskCreated: Mon Nov 28 16:42:39 2016Host: nodeaKernel Sector Size: 512Recorded Sector Size: 512修改每台机器的/etc/lvm /lvm.conf,将 locking_type 值由默认的 1 改为 3。修改 fallback_to_local_locking=0,以禁止回写,避免导致裂脑。# vi /etc/lvm/lvm.conf # grep “locking_type“ /etc/lvm/lvm.conflocking_type = 1创业软件机密,未经许可不得扩散 第 24 页, 共 25 页# grep “fallback_to_local_locking“ /etc/lvm/lvm.conffallback_to_local_locking