阿里云 云服务器试用小记

 

申请了阿里云的云服务器,可以免费的试用五天,昨天申请通过后就开始尝试,按照官方的视频教程,做的真不错,讲的很详细,今天周六在家没事,继续鼓捣。。。

 我试用的是:CentOS 6.3 64位


前提是连接上阿里云的linux服务器,可以参考下面的连接:
然后:
1.linux服务器挂载数据盘 :   http://help.aliyun.com/manual?spm=0.0.0.0.ezC74u&helpId=1668

购买阿里云服务器后,服务器的数据盘默认是没有进行挂载的,用户如果想在服务器上安装相应的软件的话,就必须进行挂载操作,将数据文件和程序安装在数据盘中保证数据安全。本视频教程适用范围:阿里云Linux服务器,包括:redhat、centos、ubuntu等操作系统。
Tips:一般来说服务器的数据盘需要和系统盘分开,当系统出故障后能够保证数据安全

操作步骤:
1.登录服务器
工具: secureCRT
2.检查磁盘信息
命令:fdisk -l
[root@AY130222035303b928493 ~]# fdisk -l

Disk /dev/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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: 0x00073f45

    Device Boot      Start         End      Blocks   Id  System
/dev/xvda1   *           1        2611    20970496   83  Linux

Disk /dev/xvdb: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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: 0x00000000

[root@AY130222035303b928493 ~]# 

[root@AY130222035303b928493 ~]# fdisk /dev/xvdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x5d3f6f33.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

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): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition 我们是添加一个分区,所以选这个命令
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): 
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2610, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610):
Using default value 2610

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@AY130222035303b928493 ~]# fdisk -l 

Disk /dev/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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: 0x00073f45

    Device Boot      Start         End      Blocks   Id  System
/dev/xvda1   *           1        2611    20970496   83  Linux

Disk /dev/xvdb: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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: 0xb1a675c7

    Device Boot      Start         End      Blocks   Id  System
/dev/xvdb1               1        2610    20964793+  83  Linux
 
[root@AY130222035303b928493 ~]# mkfs.ext3 /dev/xvdb1
mke2fs 1.41.12 (17-May-2010)
文件系统标签=
操作系统:Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1310720 inodes, 5241198 blocks
262059 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=4294967296
160 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

正在写入inode表: 完成
Creating journal (32768 blocks): 完成
Writing superblocks and filesystem accounting information: 完成

This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@AY130222035303b928493 ~]#

然后开始挂载工作,根据阿里云一键安装的路径的话,是挂载在根目录下的alidata这个目录下,

3.磁盘分区
命令:fdisk
4.磁盘格式化
mkfs
5.挂载数据盘
命令:mount

2.安装web环境(linux服务器安装Apache/nginx+mysql+php):http://help.aliyun.com/manual?spm=0.0.0.0.v238Ps&helpId=1666
3.



扩展:
下面的文档可以让你图形化访问,还是比较好的

2. windows一键安装web环境全攻略(http://help.aliyun.com/origin?spm=0.0.0.0.u4SRgL&helpId=131)




















 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值