Last update at :2024-06-23,Edit by888u
There is no additional data disk in the Tencent Cloud server that is owned by default. The default Linux system disk is only 8GB, which is enough for general websites. If you purchase an additional data disk and install the system, it will depend on the path of different panels and systems. It may not be automatically loaded into the specified data disk directory, and we need to manually load the data disk, which is what we often call mounting. Coincidentally, netizen @天亚 gifted me a Tencent cloud server yesterday, and it also comes with a 250GB data disk. I can write a tutorial when installing the website environment.
Articles related to mounting that have been introduced before:
Linux VPS host mounts unused data disks and specifies the WDCP panel installation data disk directory
Complete Linux VPS mounting tutorial method without using a hard disk
In order to meet the needs of most users for using the panel, here I will mount the data disk for users who are about to install the AMH panel, because the WDCP panel has also been introduced in previous articles. Even though AMH panels are currently charged, the free version 4.2 is still relatively complete. Relatively speaking, after the security of WDCP panels was previously exposed, many users are looking for other similar panels to use, at least they will not put all their eggs in one basket. Without further ado, Snail will continue organizing this article.
First, check whether the hard disk device has a data disk
Of course, when writing this article, I knew that there was a data disk, but sometimes the VPS we purchased has a default value of 30GB, and there may be 20GB that are not mounted, so we need to do something like this to check first. Again.
fdisk -l
Check Tencent Cloud Server Data Hard Drive
We can see that the 268GB data disk is not mounted, so be optimistic about the previous path /dev/vdb
Second, data hard disk partition
fdisk /dev/vdb
Enter n, p, 1, Enter, Enter, wq in sequence
The VDB here is the name of the data hard disk we saw above. If this is not the case for you, you need to replace it with your real disk name. If it is the same as me, just copy it directly.
Third, ext3 formatted partition
mkfs.ext3 /dev/vdb1
Fourth, mount new partition
A – Create a new directory
mkdir /home
Because the AMH panel is installed in the HOME directory, we need to create a new directory. If it is a WDCP panel, we should know that it is the WWW directory.
B – Mount partition
mount /dev/vdb1 /home
Fifth, write to fstab to set automatic mounting at boot
echo \\’/dev/vdb1 /home ext3 defaults 0 0\\’ >> /etc/fstab
Sixth, check whether the mounting is successful (df -h)
Here we can see that 247GB (250GB) has been mounted and is in the HOME directory. At this time we can install the AMH panel (AMH panel installation).
Finally, the AMH panel database is mounted
If we are using AMH version 4.2, the default system database is also in the system disk. We can also mount it to the data disk together and make a soft connection.
mv /usr/local/mysql/data /home/mysql/datacd /usr/local/mysql/ln -s /home/mysql/data
After completion, we can restart the AMH panel MYSQL database. The command is amh mysql restart. So far, we have completed the data disk mounting of all Tencent Cloud servers and the installation of the AMH panel.
Finally, if our VPS data disk is relatively large and our website cannot be used up, there is no need to mount it, so it can be used like this. If our data will be very large in the future, or we don’t want to waste the data disk, then mount it and use it.
Recommended site search: registered domain name query, overseas server, registered domain name query, US PHP host, personal domain name registration, domain name registration service, foreign server, domain name registration official website, registration number, anti-complaint server,
发表评论