First, check whether the hard disk device has a data disk
Of course, in writing this article, I know that there is a data disk, but sometimes we buy VPS, default such as 30GB, there may be 20GB did not mount, so you need to check the operation like this first.
The code is as follows |
Copy Code |
Fdisk-l
|
Check Tencent Cloud Server data hard drive
We can see that there is no mount on the 268GB data disk, look at the front path/dev/vdb
Second, data hard disk partition
The code is as follows |
Copy Code |
Fdisk/dev/vdb
|
Enter N, p, 1, carriage return, carriage return, Wq
The VDB here is the name of the data hard disk that we see above, if you don't need to replace it with your real disk name, if it's the same as me, copy it directly.
Third, ext3 format partition
The code is as follows |
Copy Code |
Mkfs.ext3/dev/vdb1
|
Four, mount a new partition
The code is as follows |
Copy Code |
Mkdir/home
|
Because the AMH panel is installed in the home directory, so we need to create a new directory, if the WDCP panel, we should know is the WWW directory.
The code is as follows |
Copy Code |
Mount/dev/vdb1/home
|
V, write to fstab set to boot automatically mount
The code is as follows |
Copy Code |
Echo '/dev/vdb1/home ext3 defaults 0 0 ' >>/etc/fstab
|
(vi) Check whether the mount succeeds (df-h)
Here we can see that 247GB (250GB) has been mounted and completed in the home directory. This time we can install the AMH panel (AMH panel installation).
Finally, the AMH panel database is mounted
If we are using the AMH 4.2 version, the database of the default system is also on the system disk, we can also mount the data disk together to make a soft connection.
The code is as follows |
Copy Code |
Mv/usr/local/mysql/data/home/mysql/data
cd/usr/local/mysql/
Ln-s/home/mysql/data
|
After we reboot the AMH panel MySQL database, the command is AMH MySQL restart, so far we have completed all the Tencent Cloud server's data disk mount and AMH panel installation.
Finally, if our VPS data disk is relatively large, and our site is not used up, there is no need to mount, so use can also. If we're going to have a lot of data in the future, or we don't want to waste a data disk, mount it.