全新阿里云centos服务器完整安装配置(一) 挂载云盘 设置安全组策略

#挂载云盘

###df

###fdisk -l

###fdisk /dev/vdb
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 0x58478707.

###Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p #输入p
Partition number (1-4, default 1): 1 #输入1
First sector (2048-209715199, default 2048): 1 #输入1
Value out of range.
First sector (2048-209715199, default 2048): #直接回车
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199): #直接回车
Using default value 209715199
Partition 1 of type Linux and of size 100 GiB is set
Command (m for help): wq #输入wq
The partition table has been altered!

###mkfs.ext3 /dev/vdb1
手动挂载
###mount /dev/vdb1 /mnt
开机启动自动挂载
###cp /etc/fstab /etc/fstab.bak
###echo /dev/vdb1 /mnt ext3 defaults 0 0 >> /etc/fstab

mkdir /mnt/www
mkdir /www
ln -s /mnt/www / #/mnt/www 目录链接到 / 下
#阿里云设置安全组策略

在默认组里添加规则
一般需要的端口 22 80 3690 443
###注意: 阿里安全组就是服务器的另一道防火墙.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值