在咸鱼上购买了一个云服务器 是 香港 cn2 比 阿里云便宜不少,2核2G

相关服务:香港服务器租用

购买后 使用Xshall连接 

店家让

Linux系统挂载硬盘必看

Centos系统请使用以下命令:

yum install wget -y && wget -O auto_disk_centos.sh http://jc.zanyun.hk/auto_disk_centos.sh && bash auto_disk_centos.sh

这段命令是在Linux系统中使用的,用于安装wget工具并下载一个名为auto_disk_centos.sh的脚本,然后执行这个脚本。下面是命令的逐行分析:

  1. yum install wget -y:

    • yum 是Linux系统中用于安装、更新和删除软件包的命令。
    • install 是yum命令的一个子命令,用于安装软件包。
    • wget 是一个软件包名,这里用于下载文件。
    • -y 参数表示自动回答所有提示为“yes”,即在安装过程中不需要用户手动确认。
  2. wget -O auto_disk_centos.sh http://jc.zanyun.hk/auto_disk_centos.sh:

    • wget 是一个命令行工具,用于从网络上下载文件。
    • -O 参数后面跟文件名,指定下载文件的输出名称。
    • http://jc.zanyun.hk/auto_disk_centos.sh 是要下载的文件的URL。
  3. && bash auto_disk_centos.sh:

    • && 是一个逻辑运算符,表示如果前一个命令执行成功,那么执行后面的命令。
    • bash 是Linux系统中的shell程序,用于执行脚本文件。
    • auto_disk_centos.sh 是下载下来的脚本文件名,这里使用bash来执行它。

整体来看,这段命令的作用是:

  • 首先检查系统中是否安装了wget,如果没有安装,则安装它。
  • 使用wget下载一个名为auto_disk_centos.sh的脚本文件。
  • 下载完成后,使用bash执行这个脚本。

请注意,执行脚本之前应该先检查脚本的来源是否可信,以及脚本的内容是否安全,因为执行未知来源的脚本可能会对系统安全造成风险。

Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository epel is listed more than once in the configuration
Determining fastest mirrors
base                                                                                                                                      | 3.6 kB  00:00:00     
https://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article 

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

extras                                                                                                                                    | 2.9 kB  00:00:00     
updates                                                                                                                                   | 2.9 kB  00:00:00     
Package wget-1.14-18.el7_6.1.x86_64 already installed and latest version
Nothing to do
--2024-10-02 16:12:14--  http://jc.zanyun.hk/auto_disk_centos.sh
Resolving jc.zanyun.hk (jc.zanyun.hk)... 104.21.14.212, 172.67.160.148, 2606:4700:3031::6815:ed4, ...
Connecting to jc.zanyun.hk (jc.zanyun.hk)|104.21.14.212|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8238 (8.0K) [application/x-sh]
Saving to: ‘auto_disk_centos.sh’

100%[=======================================================================================================================>] 8,238       --.-K/s   in 0.001s  

2024-10-02 16:12:14 (8.69 MB/s) - ‘auto_disk_centos.sh’ saved [8238/8238]


+----------------------------------------------------------------------
| Bt-WebPanel Automatic disk partitioning tool
+----------------------------------------------------------------------
| Copyright © 2015-2017 BT-SOFT(http://www.bt.cn) All rights reserved.
+----------------------------------------------------------------------
| Auto mount partition disk to /www
+----------------------------------------------------------------------

Do you want to try to mount the data disk to the /www directory?(y/n): y
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x2c06c0c8.

The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.

Command (m for help): Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): Partition number (1-4, default 1): First sector (2048-104857599, default 2048): Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-104857599, default 104857599): Using default value 104857599
Partition 1 of type Linux and of size 50 GiB is set

Command (m for help): The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
mke2fs 1.42.9 (28-Dec-2013)
Discarding device blocks: done                            
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
3276800 inodes, 13106944 blocks
655347 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2162163712
400 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done   

Filesystem               Size  Used Avail Use% Mounted on
devtmpfs                 867M     0  867M   0% /dev
tmpfs                    878M     0  878M   0% /dev/shm
tmpfs                    878M  9.0M  869M   2% /run
tmpfs                    878M     0  878M   0% /sys/fs/cgroup
/dev/mapper/centos-root   17G  2.3G   15G  14% /
/dev/sda1               1014M  259M  756M  26% /boot
tmpfs                    176M     0  176M   0% /run/user/0
/dev/sdb1                 50G   53M   47G   1% /www
Error: The /www directory has been mounted.

Done
挂载成功

mirror 镜子

购买云服务器