基础环境配置
服务器IP地
址设置
/etc/sysconfig/network-script/ifcf-ens34
shell
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
NAME=ens34
DEVICE=ens34
ONBOOT=yes
IPADDR=192.168.10.134
PREFIX=24
GATEWAY=192.168.10.11
DNS1=223.5.5.5主机名设置
shell
]# hostnamectl set-hostname fsl.host.com磁盘分区
shell
]# pvcreate /dev/sdb{b..c}
]# vgcreate vg1 /dev/sd{b..c}
]# lvcreate -L 39g -n lv01 vg1文件系统挂载
shell
]# mkfs.xfs /dev/vg1/lv01
]# mkdir /opt
]# mount /dev/vg1/lv01 /opt设置开机自动挂载
修改内容:
mount /dev/vg1/lv01 /opt
shell
]# cat /etc/rc.local
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.
touch /var/lock/subsys/local
mount /dev/vg1/lv01 /opt