[root@localhost ~]# fdisk -l

磁盘 /dev/sdb:21.5 GB, 21474836480 字节,41943040 个扇区

磁盘 /dev/sdc:21.5 GB, 21474836480 字节,41943040 个扇区

磁盘 /dev/sdd:21.5 GB, 21474836480 字节,41943040 个扇区

[root@localhost ~]# fdisk /dev/sdb

  设备 Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048    41943039    20970496   fd  Linux raid autodetect

[root@localhost ~]# fdisk /dev/sdc

 设备 Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048    41943039    20970496   fd  Linux raid autodetect

[root@localhost ~]# fdisk /dev/sdd

设备 Boot      Start         End      Blocks   Id  System
/dev/sdd1            2048    41943039    20970496   fd  Linux raid autodetect

[root@localhost ~]# mdadm -C /dev/md5 -l 5 -n 3  /dev/sd[bcd]1
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md5 started.

[root@localhost ~]# mdadm -D -s >/etc/mdadm.conf
[root@localhost ~]# vi /etc/mdadm.conf

DEVICE /dev/mdb1 /dev/mdc1 /dev/mdd1  ARRAY /dev/md5 metadata=1.2 spares=1 name=localhost.localdomain:5 UUID=cd5a4c44:f3ff919d:48f40c04:3251b32c  auto=yes

[root@localhost ~]# mkfs.xfs /dev/md5
meta-data=/dev/md5               isize=512    agcount=16, agsize=654720 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=10475520, imaxpct=25
         =                       sunit=128    swidth=256 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=5120, version=2
         =                       sectsz=512   sunit=8 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

 [root@localhost ~]# mkdir /data

[root@localhost ~]# blkid /dev/md5 >>/etc/fstab

[root@localhost ~]# vi /etc/fstab

UUID=cc978607-fca9-4a43-8a17-fa728445b322  /data  ext4  defaults    0 0

[root@localhost ~]# fdisk /dev/md5

设备 Boot      Start         End      Blocks   Id  System
/dev/md5p1            2048    83816447    41907200   8e  Linux LVM

[root@localhost ~]# partprobe /dev/md5p1

[[root@localhost ~]# pvcreate /dev/md5p1
  Physical volume "/dev/md5p1" successfully created.
[root@localhost ~]# vgcreate myvg /dev/md5p1
  Volume group "myvg" successfully created

[root@localhost ~]# lvcreate -L 35G  -n mylv myvg
  Logical volume "mylv" created.

[root@localhost ~]# mkfs -t ext4 /dev/myvg/mylv

创建yum,和源代码安装

[root@localhost ~]# umount /dev/sr0
[root@localhost ~]# mount /dev/sr0  /media
mount: /dev/sr0 写保护,将以只读方式挂载
[root@localhost ~]# cd /etc/yum.r*
[root@localhost yum.repos.d]# mkdir a

[root@localhost yum.repos.d]# mv c* a

[root@localhost yum.repos.d]# ls
a

[root@localhost yum.repos.d]# vi ./local.repo

[wangrui]
name=wangrui
baseurl=file:///media/
enabled=1
gpgcheck=0

[root@localhost ~]# yum -y clean all

[root@localhost ~]# yum makecache

[root@localhost ~]# tar xf httpd-2.2.17.tar.gz  -C /usr/src
[root@localhost ~]# cd  /usr/src/httpd-2.2.17/
[root@localhost httpd-2.2.17]# ./configure --prefix=/usr/local/apache

[root@localhost httpd-2.2.17]# yum -y install gcc

[root@localhost httpd-2.2.17]# make

[root@localhost httpd-2.2.17]# make install

[root@localhost httpd-2.2.17]# vi /usr/local/apache/conf/httpd.conf

[root@localhost httpd-2.2.17]# /usr/local/apache/bin/apachectl start