zoukankan      html  css  js  c++  java
  • 2、为三块硬盘分区
    [root@localhost ~]# fdisk /dev/sdf
    欢迎使用 fdisk (util-linux 2.23.2)。

    更改将停留在内存中,直到您决定将更改写入磁盘。
    使用写入命令前请三思。

    Device does not contain a recognized partition table
    使用磁盘标识符 0xcf3610b6 创建新的 DOS 磁盘标签。

    命令(输入 m 获取帮助):n
    Partition type:
    p primary (0 primary, 0 extended, 4 free)
    e extended
    Select (default p):
    Using default response p
    分区号 (1-4,默认 1):
    起始 扇区 (2048-41943039,默认为 2048):
    将使用默认值 2048
    Last 扇区, +扇区 or +size{K,M,G} (2048-41943039,默认为 41943039):
    将使用默认值 41943039
    分区 1 已设置为 Linux 类型,大小设为 20 GiB

    命令(输入 m 获取帮助):w
    The partition table has been altered!

    Calling ioctl() to re-read partition table.
    正在同步磁盘。
    [root@localhost ~]# fdisk /dev/sde
    欢迎使用 fdisk (util-linux 2.23.2)。

    更改将停留在内存中,直到您决定将更改写入磁盘。
    使用写入命令前请三思。

    Device does not contain a recognized partition table
    使用磁盘标识符 0xfae43c11 创建新的 DOS 磁盘标签。

    命令(输入 m 获取帮助):n
    Partition type:
    p primary (0 primary, 0 extended, 4 free)
    e extended
    Select (default p):
    Using default response p
    分区号 (1-4,默认 1):
    起始 扇区 (2048-41943039,默认为 2048):
    将使用默认值 2048
    Last 扇区, +扇区 or +size{K,M,G} (2048-41943039,默认为 41943039):
    将使用默认值 41943039
    分区 1 已设置为 Linux 类型,大小设为 20 GiB

    命令(输入 m 获取帮助):w
    The partition table has been altered!

    Calling ioctl() to re-read partition table.
    正在同步磁盘。
    [root@localhost ~]# fdisk /dev/sdg
    欢迎使用 fdisk (util-linux 2.23.2)。

    更改将停留在内存中,直到您决定将更改写入磁盘。
    使用写入命令前请三思。

    Device does not contain a recognized partition table
    使用磁盘标识符 0x0e0afac9 创建新的 DOS 磁盘标签。

    命令(输入 m 获取帮助):
    命令(输入 m 获取帮助):n
    Partition type:
    p primary (0 primary, 0 extended, 4 free)
    e extended
    Select (default p):
    Using default response p
    分区号 (1-4,默认 1):
    起始 扇区 (2048-41943039,默认为 2048):
    将使用默认值 2048
    Last 扇区, +扇区 or +size{K,M,G} (2048-41943039,默认为 41943039):
    将使用默认值 41943039
    分区 1 已设置为 Linux 类型,大小设为 20 GiB

    命令(输入 m 获取帮助):w
    The partition table has been altered!

    Calling ioctl() to re-read partition table.
    正在同步磁盘。


    3、创建RAID 5

    [root@localhost ~]# mdadm -C /dev/md55 -l 5 -n 3 /dev/sd[efg]


    4、创建物理卷

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

    5、创建卷组

    [root@localhost ~]# vgcreate vg /dev/md5

    6、创建逻辑卷

    [root@localhost ~]# lvcreate -L +30G -n lv vg

    7、格式化逻辑卷

    [root@localhost ~]# mkfs.xfs /dev/vg/lv

    8、安装apache

    yum -y install gcc gcc-c++

    tar xf httpd-2.2.17.tar.gz -C /usr/src

    cd /usr/src/httpd*

    ./configure --prefix=/usr/local/apache && make && make install

    cd /usr/local/apache/conf/
    ServerName www.example.com:80
    /usr/local/apache/bin/apachectl start

    yum -y install lynx
    lynx 127.0.0.1

    9、挂载
    [root@localhost ~]# mount -0 usrquota,grpquota /dev/vg/lv /usr/local/apache/htdocs

    10、磁盘配额
    [root@localhost ~]# quotacheck -auvg
    [root@localhost ~]# quotaon -avug

    11、创建index.html
    [root@localhost ~]# cd /usr/local/apache/htdocs
    [root@localhost htdocs]# vim index.html

  • 相关阅读:
    Oracle trunc()函数的用法
    Python获取指定目录下文件名,及创建目录
    python复制文件并重命名
    python自动创建Excel,且文件名和内容从另一个Excel中自动获取
    pip命令提示unknow or unsupported command install解决方法及查看包方法
    今日份学习性能测试工具、瀑布图
    Oracle的NVL函数用法
    创建虚拟机过程
    Linux中使用 alias 来简化测试部分工作
    排序-冒泡-java
  • 原文地址:https://www.cnblogs.com/chenyingdong/p/11342229.html
Copyright © 2011-2022 走看看