Last update at :2023-12-12,Edit by888u
Generally speaking, most newly purchased vps will have a data disk, but some do not! For those who don’t have a data disk, just follow the official tutorial to install it, and don’t worry! However, for those who have a data disk, it is recommended to install it on the data disk, which will also facilitate disk expansion and loading in the future! In fact, the method is basically the same as what was introduced before, which is Datong Xiaoyi! For those who are willing to put in the effort, you can give it a try. The method has been tested and there are basically no problems! This site is based on the CENTOS environment, uses Hyper-V virtualization, and has also been used in the XEN framework. Basically, there are no major problems!
The first step is to check the system hard disk allocation, pay attention to the ones marked in red
[root@localhost ~]# fdisk -l Disk /dev/sda: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00063b6a Device Boot Start End Blocks Id System /dev/sda1 * 1 64 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 64 1306 9972736 8e Linux LVM Disk /dev/sdb: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x6678e37d
The red marked part is the capacity of the data disk. The one used by this site is relatively small, only 10G, and the system disk is only 10G, but it is enough for an average small site!
Second, repartition
Use the fdisk /dev/xvdb command, and then follow the figure below.
[root@localhost ~]# fdisk /dev/sdb WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): d Selected partition 1
The reason for the above warning prompt is that this site has been used before and already exists. Pay attention to the red prompt Command (m for help): d, which means to delete the original partition! Then enter the interface below and follow the prompts step by step!
Command (m for help): n Command action eextended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-1305, default 1): Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-1305, default 1305): Using default value 1305 Command (m for help): wq The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
Execute n p 1 and press enter wq twice to save and exit.
Third, check the new partition command: fdisk -l and then format the operation mkfs.ext3 /dev/sdb1
Fourth, create a new WDCP directory and write the settings
A – Create a new WWW directory mkdir /www
B – Write partition information echo ‘/dev/sdb1 /www ext3 defaults 0 0’ >> /etc/fstab
C – View partition status cat /etc/fstab
D – Execute mount -a to complete the mounting.
In this way, the preliminary configuration work has been completed, and then you can install WDCP. You can check the installation method on the official website, or you can refer to: Installation of linux vps management panel wdcp
Recommended site searches: domain name purchase, host space, the cheapest dual-line space, website server US host purchase, free cloud host, registration inquiry, virtual host rental, dynamic dial-up vps host, Shandong website registration,
发表评论