Linux users are certainly no stranger to the CentOS server, but how to initialize the CentOS server before using the CentOS server? Since the CentOS server is also subdivided into Alibaba Cloud servers and other servers, some users are concerned about whether their initial settings are different. But don't worry, it's almost the same. Now Xiaobian teaches you how to initialize the CentOS server.
Setting method:
mount the hard drive
1, disk partition
fdisk -l # viewing device, the device name can be seen in general For /dev/xvdb
fdisk /dev/xvdb #Partition the disk
Enter n#Create a new partition
Enter p#Create a primary partition
Enter 1 #Create the first primary partition
Enter w#Save and execute the above command to create the partition
After the above command is executed, use fdisk -l to view it. Similar
Partition of /dev/xvdb1
Indicates that the partition was successful.
2, disk formatting
mkfs.ext4 /dev/xvdb1 #Format the partition
Description: ext4 is the default partition format of CentOS6.x, CentOS5. xPlease use ext3
After the format is completed (depending on the partition size, the time required for formatting is different, please be patient), mount the partition
3. Mount the disk
For example: mount /dev/xvdb1 to the /data directory
mkdir -p /data #create directory
mount /dev/xvdb1 /data #mount
df -h #View Mount Results
vi /etc/fstab #Set boot automount, enter the following code on the last line
/dev/xvdb1 /data ext4 defaults 0 0
:wq! #SaveExit
mount -a # Make partition settings take effect immediately
The above is the method of initializing the CentOS server. It is not clear how to initialize the CentOS server. Just follow the steps above to set it up.
for Linux RRDtool is a way to store data, is a powerful drawing engine, so how to use RRDtool on Li
Many Linux users dont know that the shell can not only edit the script, but also ca
The vim text editor was developed from vi and has extensive editing features. The vim text editor is
In order to test the read and write speed of Linux disk, you can use the dd command, the dd command
How to solve the problem that the WeChat public platform webpage cannot play audio under Linux?
What should I do if Linux vi is stuck?
How to copy files between two Linux computers
How does Ubuntu automatically switch between the mouse and the shared clipboard under VirtualBox?
How to install LibreOffice on Ubuntu
Linux how to use ControlPersist to speed up SSH connection speed
How to close the website on the Linux server?
How does CentOS set the DVD as the default yum source
Linux/Ubuntu 11.10 How to build Android4.0.3 development environment
The specific steps of hard disk partitioning under Linux
How to solve the omitting directory error when copying files in Linux?
View the virtual memory consumed by the software directly in Windows 7
How to retrieve the MSI installation package Win7/Win8 administrator identity function
Win10 new is missing, how to do Win10 can not create a new file solution
Win10 9860 how to adjust the receiving test version speed
Prohibit the automatic arrangement of win7 windows
Win8 system startup file ghost can not find how to do
Win7 system delete resource manager search record tips
Is the computer resolution not adjusted correctly? Try to see the graphics card driver