设为首页 收藏本站
查看: 632|回复: 0

[经验分享] RHEL6.2详细安装greenplum-db-4.3.5.4(part one)

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2015-9-29 08:45:32 | 显示全部楼层 |阅读模式
因公司原有的Oracle数据库已经无法满足当前的实际应用,现需要跟换数据库系统,综合考虑选择greenplum分布式数据库。在安装部署中遇到各种问题,都一一解决,如有错误的地方,请指正,谢谢!
物理环境硬件环境:
3台台式机
1台6G内存的作为master,操作系统为RHEL6.2,最小化安装
2台4G联想电脑安装虚拟机vmwareworkstation11,其上各安装两台RHEL6.2,最小化安装
分别的IP是
master:168.168.168.16
台式机的windows的IP为
segment1:168.168.168.17
segment2:168.168.168.18

虚拟机:
segment1-1:168.168.168.20
segment1-2:168.168.168.22

segment2-1:168.168.168.19
segment2-2:168.168.168.21

基础配置首先需要关闭防火墙,selinux
[iyunv@master ~]#service iptables stop
[iyunv@master ~]# chkconfig iptables off
[iyunv@master ~]# vi /etc/sysconfig/selinux   修改SELINUX参数为disabled
# This file controls the state of SELinuxon the system.
# SELINUX= can take one of these threevalues:
#    enforcing - SELinux security policy is enforced.
#    permissive - SELinux prints warnings instead of enforcing.
#    disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these twovalues:
#    targeted - Targeted processes are protected,
#    mls - Multi Level Security protection.
SELINUXTYPE=targeted
编辑hosts文件
[iyunv@master ~]# vi /etc/hosts
127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4
168.168.168.16  master
168.168.168.20  segment1-1
168.168.168.22  segment1-2
168.168.168.19  segment2-1
168.168.168.21  segment2-2

分别拷贝到其他服务器
[iyunv@master ~]# scp /etc/hostsroot@168.168.168.20:/etc/
The authenticity of host '168.168.168.20(168.168.168.20)' can't be established.
RSA key fingerprint isd9:ae:87:98:5f:c7:7e:50:0b:74:ce:b5:81:94:5e:66.
Are you sure you want to continueconnecting (yes/no)? yes
Warning: Permanently added '168.168.168.20'(RSA) to the list of known hosts.
root@168.168.168.20's password:
hosts                                                                                                        100%  205     0.2KB/s  00:00  
[iyunv@master ~]# scp /etc/hostsroot@168.168.168.19:/etc/
The authenticity of host '168.168.168.19(168.168.168.19)' can't be established.
RSA key fingerprint is0c:d0:33:c8:bf:c2:47:7c:eb:dd:ca:59:08:b7:25:ae.
Are you sure you want to continueconnecting (yes/no)? yes
Warning: Permanently added '168.168.168.19'(RSA) to the list of known hosts.
root@168.168.168.19's password:
hosts                                                                                                        100%  205    0.2KB/s   00:00  
[iyunv@master ~]# scp /etc/hostsroot@168.168.168.21:/etc/
The authenticity of host '168.168.168.21(168.168.168.21)' can't be established.
RSA key fingerprint is0c:d0:33:c8:bf:c2:47:7c:eb:dd:ca:59:08:b7:25:ae.
Are you sure you want to continueconnecting (yes/no)? yes
Warning: Permanently added '168.168.168.21'(RSA) to the list of known hosts.
root@168.168.168.21's password:
hosts                                                                                                        100%  205    0.2KB/s   00:00  
[iyunv@master ~]# scp /etc/hostsroot@168.168.168.22:/etc/
The authenticity of host '168.168.168.22(168.168.168.22)' can't be established.
RSA key fingerprint isd9:ae:87:98:5f:c7:7e:50:0b:74:ce:b5:81:94:5e:66.
Are you sure you want to continueconnecting (yes/no)? yes
Warning: Permanently added '168.168.168.22'(RSA) to the list of known hosts.
root@168.168.168.22's password:
hosts                                                                                                        100%  205    0.2KB/s   00:00  
测试各个主机名是否配置成功
[iyunv@master ~]# ping segment1-2
PING segment1-2 (168.168.168.22) 56(84)bytes of data.
64 bytes from segment1-2 (168.168.168.22):icmp_seq=1 ttl=64 time=0.531 ms
64 bytes from segment1-2 (168.168.168.22):icmp_seq=2 ttl=64 time=0.512 ms
^C
--- segment1-2 ping statistics ---
2 packets transmitted, 2 received, 0%packet loss, time 1301ms
rtt min/avg/max/mdev =0.512/0.521/0.531/0.024 ms
[iyunv@master ~]# ping segment1-1
PING segment1-1 (168.168.168.20) 56(84)bytes of data.
64 bytes from segment1-1 (168.168.168.20):icmp_seq=1 ttl=64 time=0.523 ms
64 bytes from segment1-1 (168.168.168.20):icmp_seq=2 ttl=64 time=0.526 ms
^C
--- segment1-1 ping statistics ---
2 packets transmitted, 2 received, 0%packet loss, time 1987ms
rtt min/avg/max/mdev =0.523/0.524/0.526/0.022 ms
[iyunv@master ~]# ping segment2-1
PING segment2-1 (168.168.168.19) 56(84)bytes of data.
64 bytes from segment2-1 (168.168.168.19):icmp_seq=1 ttl=64 time=0.589 ms
64 bytes from segment2-1 (168.168.168.19):icmp_seq=2 ttl=64 time=0.513 ms
64 bytes from segment2-1 (168.168.168.19):icmp_seq=3 ttl=64 time=0.525 ms
^C
--- segment2-1 ping statistics ---
3 packets transmitted, 3 received, 0%packet loss, time 2970ms
rtt min/avg/max/mdev = 0.513/0.542/0.589/0.038ms
[iyunv@master ~]# ping segment2-2
PING segment2-2 (168.168.168.21) 56(84)bytes of data.
64 bytes from segment2-2 (168.168.168.21):icmp_seq=1 ttl=64 time=0.505 ms
64 bytes from segment2-2 (168.168.168.21):icmp_seq=2 ttl=64 time=0.517 ms
64 bytes from segment2-2 (168.168.168.21):icmp_seq=3 ttl=64 time=0.652 ms
^C
--- segment2-2 ping statistics ---
3 packets transmitted, 3 received, 0%packet loss, time 2396ms
rtt min/avg/max/mdev =0.505/0.558/0.652/0.066 ms
分区挂载data
[iyunv@segment1-1 ~]# fdisk /dev/sdb
Device contains neither a valid DOSpartition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with diskidentifier 0xcc19fbe2.
Changes will remain in memory only, untilyou decide to write them.
After that, of course, the previous contentwon't be recoverable.

Warning: invalid flag 0x0000 of partitiontable 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated.It's strongly recommended to
        switch off the mode (command 'c') and change display units to
        sectors (command 'u').

Command (m for help): m
Command action
  a   toggle a bootable flag
  b   edit bsd disklabel
  c   toggle the dos compatibilityflag
  d   delete a partition
   l   list known partition types
  m   print this menu
  n   add a new partition
  o   create a new empty DOSpartition table
  p   print the partition table
  q   quit without saving changes
  s   create a new empty Sundisklabel
  t   change a partition's system id
  u   change display/entry units
  v   verify the partition table
  w   write table to disk and exit
  x   extra functionality (expertsonly)

Command (m for help): n
Command action
  e   extended
  p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-10443, default 1): (直接回车)
Using default value 1
Last cylinder, +cylinders or +size{K,M,G}(1-10443, default 10443): (直接回车)
Using default value 10443

Command (m for help): p

Disk /dev/sdb: 85.9 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443cylinders
Units = cylinders of 16065 * 512 = 8225280bytes
Sector size (logical/physical): 512 bytes /512 bytes
I/O size (minimum/optimal): 512 bytes / 512bytes
Disk identifier: 0xcc19fbe2

  Device Boot      Start         End     Blocks   Id  System
/dev/sdb1               1       10443   83883366   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[iyunv@segment1-1 ~]#
创建物理卷
[iyunv@segment1-1 ~]# pvcreate /dev/sdb1
Writing physical volume data to disk "/dev/sdb1"
Physical volume "/dev/sdb1" successfully created
[iyunv@segment1-1 ~]# pvdisplay
  ---Physical volume ---
  PVName               /dev/sda2
  VGName               vg_segment11
  PV Size               99.51 GiB / not usable 3.00 MiB
Allocatable           yes (butfull)
  PESize               4.00 MiB
Total PE              25474
Free PE               0
Allocated PE          25474
  PVUUID               JwEYLt-EFX2-GMmL-LJpZ-mxSQ-B5Hl-BaiAb3

"/dev/sdb1" is a new physical volume of "80.00 GiB"
  ---NEW Physical volume ---
  PVName               /dev/sdb1
  VGName            
  PVSize               80.00 GiB
Allocatable           NO
  PESize               0
  TotalPE              0
Free PE               0
Allocated PE          0
  PVUUID              GPUe1K-H6SN-t6z8-v0nA-rOPv-rP0y-W8j46d
创建虚拟卷组
[iyunv@segment1-1 ~]# vgcreate segment/dev/sdb1
Volume group "segment" successfully created
创建逻辑卷
[iyunv@segment1-1 ~]# lvcreate -L 78G -nlv_segment segment
Logical volume "lv_segment" created
[iyunv@segment1-1 ~]# lvs
LV         VG           Attr   LSize Origin Snap%  Move Log Copy%  Convert
lv_segment segment      -wi-a-78.00g                                    
lv_home    vg_segment11 -wi-ao45.60g                                    
lv_root    vg_segment11 -wi-ao50.00g                                    
lv_swap    vg_segment11-wi-ao  3.91g                                    
[iyunv@segment1-1 ~]# vgs
VG           #PV #LV #SN Attr   VSize VFree
segment        1   1   0wz--n- 80.00g 2.00g
vg_segment11   1   3   0wz--n- 99.51g    0
[iyunv@segment1-1 ~]#
挂载光盘安装xfs文件系统格式化工具
[iyunv@segment1-1 ~]# mount /dev/cdrom/media/iso
mount: block device /dev/sr0 iswrite-protected, mounting read-only
[iyunv@segment1-1 ~]# vi/etc/yum.repos.d/rhel-source.repo
[iyunv@segment1-1 ~]# df -h
文件系统           容量  已用  可用 已用%% 挂载点
/dev/mapper/vg_segment11-lv_root
                       50G  1.3G  46G   3% /
tmpfs                996M     0 996M   0% /dev/shm
/dev/sda1             485M   31M 429M   7% /boot
/dev/mapper/vg_segment11-lv_home
                       45G  180M  43G   1% /home
/dev/sr0              3.4G  3.4G    0 100% /media/iso
[iyunv@segment1-1 ~]# vi /etc/yum.repos.d/rhel-source.repo
[iyunv@segment1-1 ~]# yum clean all
Loaded plugins: product-id,subscription-manager
Updating certificate-based repositories.
Cleaning repos: local
Cleaning up Everything
[iyunv@segment1-1 ~]# yum update
Loaded plugins: product-id,subscription-manager
Updating certificate-based repositories.
local                                                                                                                   | 4.0 kB     00:00 ...
local/primary_db                                                                                                         |3.1 MB     00:00 ...
Setting up Update Process
No Packages marked for Update   
[iyunv@segment1-1 ~]# cd/media/iso/Packages/
[iyunv@segment1-1 Packages]# yum install xf
xferstats-2.16-21.el6.x86_64.rpm          xfsdump-3.0.4-2.el6.x86_64.rpm           xfsprogs-devel-3.1.1-6.el6.x86_64.rpm
xfig-3.2.5-22.a.1.el6.x86_64.rpm          xfsprogs-3.1.1-6.el6.i686.rpm            xfsprogs-qa-devel-3.1.1-6.el6.i686.rpm
xfig-common-3.2.5-22.a.1.el6.x86_64.rpm   xfsprogs-3.1.1-6.el6.x86_64.rpm          xfsprogs-qa-devel-3.1.1-6.el6.x86_64.rpm
xfig-plain-3.2.5-22.a.1.el6.x86_64.rpm    xfsprogs-devel-3.1.1-6.el6.i686.rpm     
[iyunv@segment1-1 Packages]# yum installxfsprogs-*
Loaded plugins: product-id,subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Examining xfsprogs-3.1.1-6.el6.i686.rpm:xfsprogs-3.1.1-6.el6.i686
Marking xfsprogs-3.1.1-6.el6.i686.rpm to beinstalled
Examining xfsprogs-3.1.1-6.el6.x86_64.rpm:xfsprogs-3.1.1-6.el6.x86_64
xfsprogs-3.1.1-6.el6.x86_64.rpm: does notupdate installed package.
Examiningxfsprogs-devel-3.1.1-6.el6.i686.rpm: xfsprogs-devel-3.1.1-6.el6.i686
Marking xfsprogs-devel-3.1.1-6.el6.i686.rpmto be installed
Examining xfsprogs-devel-3.1.1-6.el6.x86_64.rpm:xfsprogs-devel-3.1.1-6.el6.x86_64
Markingxfsprogs-devel-3.1.1-6.el6.x86_64.rpm to be installed
Examiningxfsprogs-qa-devel-3.1.1-6.el6.i686.rpm: xfsprogs-qa-devel-3.1.1-6.el6.i686
Marking xfsprogs-qa-devel-3.1.1-6.el6.i686.rpmto be installed
Examiningxfsprogs-qa-devel-3.1.1-6.el6.x86_64.rpm: xfsprogs-qa-devel-3.1.1-6.el6.x86_64
Markingxfsprogs-qa-devel-3.1.1-6.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package xfsprogs.i686 0:3.1.1-6.el6will be installed
--> Processing Dependency: libblkid.so.1for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libblkid.so.1(BLKID_2.15) for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libblkid.so.1(BLKID_2.17) for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency: libc.so.6 forpackage: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libc.so.6(GLIBC_2.0) for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libc.so.6(GLIBC_2.1) for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libc.so.6(GLIBC_2.1.3) for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libc.so.6(GLIBC_2.11) for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libc.so.6(GLIBC_2.2) for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libc.so.6(GLIBC_2.3) for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libc.so.6(GLIBC_2.3.3) for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency: libc.so.6(GLIBC_2.3.4)for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libc.so.6(GLIBC_2.4) for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libpthread.so.0 for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency: libpthread.so.0(GLIBC_2.0)for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libpthread.so.0(GLIBC_2.1) for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libpthread.so.0(GLIBC_2.2) for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libpthread.so.0(GLIBC_2.3.2) for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libreadline.so.6 for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency: librt.so.1for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:librt.so.1(GLIBC_2.2) for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency: libuuid.so.1for package: xfsprogs-3.1.1-6.el6.i686
--> Processing Dependency:libuuid.so.1(UUID_1.0) for package: xfsprogs-3.1.1-6.el6.i686
---> Package xfsprogs-devel.i6860:3.1.1-6.el6 will be installed
---> Package xfsprogs-devel.x86_640:3.1.1-6.el6 will be installed
---> Package xfsprogs-qa-devel.i6860:3.1.1-6.el6 will be installed
---> Package xfsprogs-qa-devel.x86_640:3.1.1-6.el6 will be installed
--> Running transaction check
---> Package glibc.i686 0:2.12-1.47.el6will be installed
--> Processing Dependency:libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.12-1.47.el6.i686
--> Processing Dependency: libfreebl3.sofor package: glibc-2.12-1.47.el6.i686
---> Package libblkid.i6860:2.17.2-12.4.el6 will be installed
---> Package libuuid.i6860:2.17.2-12.4.el6 will be installed
---> Package readline.i686 0:6.0-3.el6will be installed
--> Processing Dependency: libtinfo.so.5for package: readline-6.0-3.el6.i686
--> Running transaction check
---> Package ncurses-libs.i6860:5.7-3.20090208.el6 will be installed
---> Package nss-softokn-freebl.i6860:3.12.9-11.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================
Package                         Arch                Version                           Repository                                          Size
================================================================================================================================================
Installing:
xfsprogs                        i686                3.1.1-6.el6                       /xfsprogs-3.1.1-6.el6.i686                         3.4 M
xfsprogs-devel                  i686                3.1.1-6.el6                      /xfsprogs-devel-3.1.1-6.el6.i686                    55 k
xfsprogs-devel                  x86_64              3.1.1-6.el6                      /xfsprogs-devel-3.1.1-6.el6.x86_64                  58 k
xfsprogs-qa-devel               i686                3.1.1-6.el6                      /xfsprogs-qa-devel-3.1.1-6.el6.i686                355 k
xfsprogs-qa-devel               x86_64              3.1.1-6.el6                      /xfsprogs-qa-devel-3.1.1-6.el6.x86_64             355 k
Installing for dependencies:
glibc                           i686                2.12-1.47.el6                     local                                              4.3 M
libblkid                        i686                2.17.2-12.4.el6                   local                                             116 k
libuuid                         i686                2.17.2-12.4.el6                   local                                              65 k
ncurses-libs                    i686                5.7-3.20090208.el6                local                                             251 k
nss-softokn-freebl              i686                3.12.9-11.el6                     local                                             116 k
readline                        i686                6.0-3.el6                         local                                             176 k

Transaction Summary
================================================================================================================================================
Install     11 Package(s)

Total size: 9.2 M
Total download size: 5.0 M
Installed size: 19 M
Is this ok [y/N]: y
Downloading Packages:
------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                           33 MB/s |5.0 MB     00:00   
warning: rpmts_HdrFromFdno: Header V3RSA/SHA256 Signature, key ID fd431d51: NOKEY
Retrieving key fromfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Importing GPG key 0xFD431D51:
Userid : Red Hat, Inc. (release key 2)<security@redhat.com>
Package:redhat-release-server-6Server-6.2.0.3.el6.x86_64(@anaconda-RedHatEnterpriseLinux-201111171049.x86_64/6.2)
From  : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y
Importing GPG key 0x2FA658E0:
Userid : Red Hat, Inc. (auxiliary key)<security@redhat.com>
Package:redhat-release-server-6Server-6.2.0.3.el6.x86_64(@anaconda-RedHatEnterpriseLinux-201111171049.x86_64/6.2)
From  : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : glibc-2.12-1.47.el6.i686                                                                                                   1/11
  Installing :nss-softokn-freebl-3.12.9-11.el6.i686                                                                                      2/11
Installing : libuuid-2.17.2-12.4.el6.i686                                                                                               3/11
Installing : libblkid-2.17.2-12.4.el6.i686                                                                                              4/11
Installing : ncurses-libs-5.7-3.20090208.el6.i686                                                                                        5/11
Installing : readline-6.0-3.el6.i686                                                                                                    6/11
Installing : xfsprogs-3.1.1-6.el6.i686                                                                                                   7/11
Installing : xfsprogs-devel-3.1.1-6.el6.x86_64                                                                                          8/11
Installing : xfsprogs-qa-devel-3.1.1-6.el6.x86_64                                                                                       9/11
Installing : xfsprogs-qa-devel-3.1.1-6.el6.i686                                                                                        10/11
Installing : xfsprogs-devel-3.1.1-6.el6.i686                                                                                           11/11
local/productid                                                                                                         | 1.7kB     00:00 ...
Installed products updated.

Installed:
xfsprogs.i686 0:3.1.1-6.el6                    xfsprogs-devel.i6860:3.1.1-6.el6               xfsprogs-devel.x86_64 0:3.1.1-6.el6        
xfsprogs-qa-devel.i686 0:3.1.1-6.el6           xfsprogs-qa-devel.x86_640:3.1.1-6.el6        

Dependency Installed:
glibc.i686 0:2.12-1.47.el6             libblkid.i686 0:2.17.2-12.4.el6 libuuid.i686 0:2.17.2-12.4.el6ncurses-libs.i686 0:5.7-3.20090208.el6
nss-softokn-freebl.i686 0:3.12.9-11.el6 readline.i686 0:6.0-3.el6   

Complete!
[iyunv@segment1-1 Packages]#
格式化逻辑卷
[iyunv@segment1-1 ~]# mkfs.xfs -f/dev/segment/lv_segment
meta-data=/dev/segment/lv_segmentisize=256    agcount=4, agsize=5111808blks
        =                       sectsz=512   attr=2
data    =                      bsize=4096   blocks=20447232,imaxpct=25
        =                      sunit=0      swidth=0 blks
naming  =version 2             bsize=4096   ascii-ci=0
log     =internal log           bsize=4096  blocks=9984, version=2
        =                      sectsz=512   sunit=0 blks,lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
查看文件系统的挂载情况
[iyunv@segment1-1 ~]# df -hT
文件系统    类型      容量  已用  可用 已用%% 挂载点
/dev/mapper/vg_segment11-lv_root
              ext4     50G 1.4G   46G   3% /
tmpfs       tmpfs    996M     0 996M   0% /dev/shm
/dev/sda1     ext4   485M   31M  429M  7% /boot
/dev/mapper/vg_segment11-lv_home
              ext4     45G 180M   43G   1% /home
/dev/sr0  iso9660    3.4G  3.4G    0 100% /media/iso
创建挂载路径
[iyunv@segment1-1 ~]# mkdir /data
挂载
[iyunv@segment1-1 ~]# mount/dev/segment/lv_segment /data
[iyunv@segment1-1 ~]# df -h
文件系统           容量  已用  可用 已用%% 挂载点
/dev/mapper/vg_segment11-lv_root
                       50G  1.4G  46G   3% /
tmpfs                 996M     0 996M   0% /dev/shm
/dev/sda1             485M   31M 429M   7% /boot
/dev/mapper/vg_segment11-lv_home
                      45G  180M  43G   1% /home
/dev/sr0              3.4G  3.4G    0 100% /media/iso
/dev/mapper/segment-lv_segment
                       78G   33M  78G   1% /data
查看挂载以及挂载的文件系统
[iyunv@segment1-1 ~]# df -hT
文件系统    类型      容量  已用  可用 已用%% 挂载点
/dev/mapper/vg_segment11-lv_root
              ext4     50G 1.4G   46G   3% /
tmpfs       tmpfs    996M     0 996M   0% /dev/shm
/dev/sda1     ext4   485M   31M  429M  7% /boot
/dev/mapper/vg_segment11-lv_home
              ext4     45G 180M   43G   1% /home
/dev/sr0  iso9660    3.4G  3.4G    0 100% /media/iso
/dev/mapper/segment-lv_segment
               xfs     78G  33M   78G   1% /data
[iyunv@segment1-1 ~]#

系统优化修改磁盘参数[iyunv@segment1-1 ~]# vi /boot/grub/menu.lst

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grubafter making changes to this file
# NOTICE: You have a /boot partition.  Thismeans that
#         all kernel and initrd paths are relative to /boot/, eg.
#         root (hd0,0)
#         kernel /vmlinuz-version ro root=/dev/mapper/vg_segment11-lv_root
#         initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux(2.6.32-220.el6.x86_64)
       root (hd0,0)
       kernel /vmlinuz-2.6.32-220.el6.x86_64 roroot=/dev/mapper/vg_segment11-lv_root nomodeset rd_NO_LUKSrd_LVM_LV=vg_segment11/lv_swap rd_LVM_LV=vg_segment11/lv_root rd_NO_MD quietrhgb crashkernel=auto.UTF-8 KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM elevator=deadline
       initrd /initramfs-2.6.32-220.el6.x86_64.img

查看块大小
[iyunv@master tmp]# /sbin/blockdev --getra/dev/sda
256
修改sysctl.conf[iyunv@master ~]# vim /etc/sysctl.conf

kernel.shmmni = 4096
kernel.sem = 250 5120000 100 20480
#SEMMSL SEMMNS SEMOPM SEMMNI
kernel.msgmni = 2048
net.ipv4.tcp_syncookies = 1
net.ipv4.ip_forward = 0
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.conf.default.arp_filter = 1
net.ipv4.conf.all.arp_filter = 1
net.ipv4.ip_local_port_range = 1025 65535
net.core.netdev_max_backlog = 10000
vm.overcommit_memory = 2

[iyunv@master ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route =0
kernel.sysrq = 1
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
error:"net.bridge.bridge-nf-call-ip6tables" is an unknown key
error:"net.bridge.bridge-nf-call-iptables" is an unknown key
error:"net.bridge.bridge-nf-call-arptables" is an unknown key
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 42949672960
kernel.shmmni = 4096
kernel.sem = 250 5120000 100 20480
kernel.msgmni = 2048
net.ipv4.tcp_syncookies = 1
net.ipv4.ip_forward = 0
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.conf.default.arp_filter = 1
net.ipv4.conf.all.arp_filter = 1
net.ipv4.ip_local_port_range = 1025 65535
net.core.netdev_max_backlog = 10000
vm.overcommit_memory = 2
[iyunv@master ~]#

拷贝到4个segment服务器
[iyunv@master ~]# scp /etc/sysctl.conf root@168.168.168.19:/etc/
root@168.168.168.19's password:
sysctl.conf                                                                                                  100% 1548     1.5KB/s  00:00   
[iyunv@master ~]# scp /etc/sysctl.conf root@168.168.168.20:/etc/
root@168.168.168.20's password:
sysctl.conf                                                                                                  100% 1548     1.5KB/s  00:00   
[iyunv@master ~]# scp /etc/sysctl.conf root@168.168.168.21:/etc/
root@168.168.168.21's password:
sysctl.conf                                                                                                  100% 1548     1.5KB/s   00:00   
[iyunv@master ~]# scp /etc/sysctl.conf root@168.168.168.22:/etc/
root@168.168.168.22's password:
sysctl.conf
修改limits.conf

[iyunv@master ~]# vi/etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
* soft core unlimited

拷贝到4个segment节点
[iyunv@master ~]# scp/etc/security/limits.conf root@168.168.168.19:/etc/security/
root@168.168.168.19's password:
limits.conf                                                                                                  100%1929     1.9KB/s   00:00   
[iyunv@master ~]# scp/etc/security/limits.conf root@168.168.168.20:/etc/security/
root@168.168.168.20's password:
limits.conf                                                                                                  100%1929     1.9KB/s   00:00   
[iyunv@master ~]# scp/etc/security/limits.conf root@168.168.168.21:/etc/security/
root@168.168.168.21's password:
limits.conf                                                                                                  100%1929     1.9KB/s   00:00   
[iyunv@master ~]# scp/etc/security/limits.conf root@168.168.168.22:/etc/security/
root@168.168.168.22's password:
limits.conf
修改90-nproc.conf注意:对于RedHat6.x系统,还需要将/etc/security/limits.d/90-nproc.conf文件中的1024修改为131072。
[iyunv@master ~]# vi/etc/security/limits.d/90-nproc.conf
*         soft    nproc     131072

[iyunv@master ~]# scp/etc/security/limits.d/90-nproc.confroot@168.168.168.22:/etc/security/limits.d/
root@168.168.168.22's password:
90-nproc.conf                                                                                                100%  154     0.2KB/s  00:00   
[iyunv@master ~]# scp/etc/security/limits.d/90-nproc.confroot@168.168.168.21:/etc/security/limits.d/
root@168.168.168.21's password:
90-nproc.conf                                                                                                100%  154     0.2KB/s  00:00   
[iyunv@master ~]# scp/etc/security/limits.d/90-nproc.conf root@168.168.168.20:/etc/security/limits.d/
root@168.168.168.20's password:
90-nproc.conf                                                                                                100%  154     0.2KB/s  00:00   
[iyunv@master ~]# scp/etc/security/limits.d/90-nproc.conf root@168.168.168.19:/etc/security/limits.d/
root@168.168.168.19's password:
90-nproc.conf                                                                                                100%  154     0.2KB/s  00:00   
[iyunv@master ~]#
安装ntp服务器[iyunv@master ~]# yum install ntp*
Loaded plugins: product-id,subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ntp.x86_64 0:4.2.4p8-2.el6will be installed
---> Package ntpdate.x86_640:4.2.4p8-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
Package                          Arch                            Version                          
====================================================================================================
Installing:
ntp                              x86_64                          4.2.4p8-2.el6                    
ntpdate                          x86_64                          4.2.4p8-2.el6                    

Transaction Summary
====================================================================================================
Install       2 Package(s)

Total download size: 503 k
Installed size: 1.2 M
Is this ok [y/N]: y
Downloading Packages:
----------------------------------------------------------------------------------------------------
Total                                                                                               
warning: rpmts_HdrFromFdno: Header V3RSA/SHA256 Signature, key ID fd431d51: NOKEY
Retrieving key fromfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Importing GPG key 0xFD431D51:
Userid : Red Hat, Inc. (release key 2)<security@redhat.com>
Package:redhat-release-server-6Server-6.2.0.3.el6.x86_64(@anaconda-RedHatEnterpriseLinux-20111117
From   :/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y
Importing GPG key 0x2FA658E0:
Userid : Red Hat, Inc. (auxiliary key)<security@redhat.com>
Package:redhat-release-server-6Server-6.2.0.3.el6.x86_64(@anaconda-RedHatEnterpriseLinux-20111117
From   :/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : ntpdate-4.2.4p8-2.el6.x86_64                                                        
Installing : ntp-4.2.4p8-2.el6.x86_64                                                            
local/productid                                                                                    
Installed products updated.

Installed:
ntp.x86_64 0:4.2.4p8-2.el6                                          ntpdate.x86_64 0:4.2.4p8-2.el

Complete!

[iyunv@master ~]# chkconfig ntpd on
[iyunv@master ~]# clock
2015年09月18日 星期五 01时29分05秒  -0.062791 seconds
[iyunv@master ~]# date -s 09/17/2015
2015年 09月 17日 星期四 00:00:00 CST
[iyunv@master ~]# date -s 17:27:30
2015年 09月 17日 星期四 17:27:30 CST
[iyunv@master ~]# clock -w
[iyunv@master ~]# clock
2015年09月17日 星期四 17时27分38秒  -0.906502 seconds
[iyunv@master ~]# vim /etc/ntp.conf
-bash: vim: command not found
[iyunv@master ~]# vi /etc/ntp.conf
修改配置文件使所有的segment与master主机时间同步

配置用户以及用户组[iyunv@master ~]# groupadd gpadmin
[iyunv@master ~]# passwd gpadmin
重启服务器


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-120228-1-1.html 上篇帖子: Linux加密和解密、openssl的基本应用及CA的实现过程 下篇帖子: DNS服务器之bind
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表