Linux init初始化
更新安装包
1 | yum update |
挂载硬盘
1 | fdisk -l |
Disk /dev/vda: 42.9 GB, 42949672960 bytes, 83886080 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000a9cf3
Device Boot Start End Blocks Id System
/dev/vda1 2048 8390655 4194304 82 Linux swap / Solaris
/dev/vda2 * 8390656 83886079 37747712 83 Linux
Disk /dev/vdb: 536.9 GB, 536870912000 bytes, 1048576000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
2个硬盘
/dev/vda: 42.9G
/dev/vdb: 536.9 GB
有一个没有挂载的硬盘 /dev/vdb
格式化分区
mkfs.ext4 /dev/vdb
挂载配置
vim /etc/fstab
1 | # |
创建对应的文件夹
mkdir /gzpykj
重新挂载所有分区
mount -a
检查是否挂载成功
df -h
1 | [root@whngkzcsmxvephex /]# df -h |
换yum源
1 | mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak |
安装 nginx
vim /etc/yum.repos.d/nginx.repo
1 | [nginx] |
本文作者 : zhouinfo
原文链接 : http://blog.zhouinfo.site/2023/01/03/Linux-init%E5%88%9D%E5%A7%8B%E5%8C%96/
版权声明 : 本博客所有文章除特别声明外,均采用 CC Apache License 2.0 许可协议。转载请注明出处!