Job 3 (lower)

1, the host SCSI two new 30GB hard drive
off the virtual machine to add two hard disks 30G into individual
2, divided into three primary partitions, each 5GB, the remaining space as the extended partition
fdisk / dev / sdb np + 5G np + 5G NE. 5G + NP
. 3, to establish two logical partitions in the extended partition, capacities of 2GB, 10GB
n-n-2G + + 1OG
. 4, the type of the first logical partition to the swap
T L 2. 5
. 5, a first primary partitions formatted as ext4
the mkfs -t ext4 / dev / sdb1
. 6, the second primary partition as XFS
the mkfs XFS -t / dev / sdb2
. 7, the third primary partition as the FAT32
the mkfs -t -F 32 vfat / dev / sdb3
. 8, create / DATAl / DATA2 / DATA3
mkdir /data{1..3}

9, the first primary partition to mount / data1, create a file in the directory test, and implement / etc / fstab
[ root@localhost /]# mount /dev/sdb1 /data1
[root@localhost /]# vim /etc/fstab
末行添加 /dev/sdb1 /data1 ext4 defaults 1 2
10, the second primary partition to mount / data2, create a file in the directory test, and implement / etc / fstab
[root@localhost /]# mount /dev/sdb2 /data2
[root@localhost /]# vim /etc/fstab
末行添加 /dev/sdb2 /data2 xfs defaults 1 2
11, the second primary partition to mount / data3, create a test file in the directory, and based on the UUID implement / etc / fstab
[root@localhost /]# mount /dev/sdb2 /data3
   
12, the first logical partition formatting a format swap, the swap partition extend, test to see
[root @ localhost ~] # mkswap / dev / sdb5
are disposed swap version 1, size = 2097148 KiB
no label, the UUID = b629e9f1 d7e4-4fac--876a-48a5cc2df1f9
[the root @ localhost ~] # CAT / proc / meminfo | -i grep "SwapTotal"
SwapTotal: 2097148 kB
[root @ localhost ~] # swapon / dev / sdb5
[root @ localhost ~] # CAT / proc / meminfo | grep -i "SwapTotal"
SwapTotal: 4,194,296 kB
13, by xftp other tools linux.iso reached linux virtual machine, and mount view the content
[root @ localhost /] # Mount -o Loop /root/linux.iso / DATA4
Mount: / dev / loop0 write protection, will be mounted read-only
[root @ localhost /] # LS / DATA4
manifest.txt run_upgrader. sh VMwareTools-10.3.10-12406962.tar.gz vmware-tools- upgrader-32 vmware-tools-upgrader-64
14, based on papers will expand 500M SWAP
[the root @ localhost ~] # CAT / proc / meminfo | grep -i "SwapTotal"
SwapTotal: 4194296 kB
[the root @ localhost ~] # dd IF = / dev / ZERO of = / BS 123 = 500 = 1M COUNT
record 500 +0 read into the
record to write a 0 + 500
524 288 000 bytes (524 MB) have been copied, 0.80542 seconds, 651 MB / sec
[root @ localhost ~] # mkswap / 123
is disposed swap version 1, size = 511996 KiB
no label, the UUID = 096883e8-fb39-447e-96d9-8016026e2eaf
[the root @ localhost ~] # the swapon / 123
the swapon: / 123: unsafe authority 0644, 0600 recommended.
[root @ localhost ~] # CAT / proc / meminfo | grep -i "SwapTotal"
SwapTotal: 4706292 kB
15, the optical disc contents using a command dd made into iso image
16, view disk usage
17, by using the above commands parted partitioning process over again for another hard
18, try to use a shell script to configure yum warehouse
19, try to use a shell script to configure the httpd service
20, try to use a shell script to achieve 2 to 12 questions
Note: 181 920 As an extension, you can choose to make
 
 

Guess you like

Origin www.cnblogs.com/smmm123/p/11280298.html