zoukankan      html  css  js  c++  java
  • 阿里云初体验

    其实云计算的学习和研究也有一段时间了,虽然是非正式的。使用云服务器的话,机会其实不多。九月的时候曾经在AWS的Win2003上工作了一小段时间,感觉是非常不稳定,老是连不上。


    今天看到园子里提供代金券,就领取了。想着试用一个月,可最低配置的价格需要89,刚好差一块钱,可恶啊。


    看下广告,答题晒weibo可以再领代金券,那就瞎答试试,结果得了70分,这下够了,买了130的配置。

    配置:1核处理器 1G 1Mbps 容量60GB CentOS 6.2 64位

    开始不知道怎么登陆,查了一下才知道用 root。修改密码,重启,登陆,OK。

    [root@AY1210300338513bb3855 ~]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/xvda1             20G  529M   20G   3% /
    tmpfs                 498M     0  498M   0% /dev/shm

    怎么只有20G,难道坑爹。用 fdisk 看看,数据盘还没格式化和挂载。

    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: 0x00000000
    
        Device Boot      Start         End      Blocks   Id  System
    /dev/xvda1   *           1        2550    20480000   83  Linux
    /dev/xvda2            2550        2611      490496   82  Linux swap / Solaris
    
    Disk /dev/xvdb: 42.9 GB, 42949672960 bytes
    255 heads, 63 sectors/track, 5221 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
    
    Disk /dev/xvdb doesn't contain a valid partition table

    操作还是熟悉的吧,用 cfdisk 分区,fdisk太难用了,然后格式化。

    [root@AY1210300338513bb3855 mnt]# mkfs.ext4 /dev/xvd
    xvda   xvda1  xvda2  xvdb   xvdb1  
    [root@AY1210300338513bb3855 mnt]# mkfs.ext4 /dev/xvdb1 
    mke2fs 1.41.12 (17-May-2010)
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    Stride=0 blocks, Stripe width=0 blocks
    2621440 inodes, 10485752 blocks
    524287 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=4294967296
    320 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
    
    Writing inode tables: done                            
    Creating journal (32768 blocks): done
    Writing superblocks and filesystem accounting information: done
    
    This filesystem will be automatically checked every 26 mounts or
    180 days, whichever comes first.  Use tune2fs -c or -i to override.
    [root@AY1210300338513bb3855 /]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/xvda1             20G  529M   20G   3% /
    tmpfs                 498M     0  498M   0% /dev/shm
    /dev/xvdb1             40G  176M   38G   1% /mnt

    这下容量看起来正常了。

    尝试安装编译工具,可惜失败了,无法满足依赖,出问题的包是 kernel-header。后来才知道需要修改yum.conf,注释掉kernel这行。

    [main]
    cachedir=/var/cache/yum/$basearch/$releasever
    keepcache=0
    debuglevel=2
    logfile=/var/log/yum.log
    exactarch=1
    obsoletes=1
    gpgcheck=1
    plugins=1
    #exclude=kernel*

    重新安装试试看,没有问题。

    yum -y install gcc gcc-c++
    Installed:
      gcc.x86_64 0:4.4.6-4.el6                              gcc-c++.x86_64 0:4.4.6-4
    
    Dependency Installed:
      cloog-ppl.x86_64 0:0.15.7-1.2.el6                         cpp.x86_64 0:4.4.6-4
      glibc-devel.x86_64 0:2.12-1.80.el6_3.5                    glibc-headers.x86_64
      kernel-headers.x86_64 0:2.6.32-279.11.1.el6               libgomp.x86_64 0:4.4
      libstdc++-devel.x86_64 0:4.4.6-4.el6                      mpfr.x86_64 0:2.4.1-
      ppl.x86_64 0:0.10.2-11.el6
    
    Dependency Updated:
      glibc.x86_64 0:2.12-1.80.el6_3.5     glibc-common.x86_64 0:2.12-1.80.el6_3.5
      libstdc++.x86_64 0:4.4.6-4.el6
    
    Complete!
  • 相关阅读:
    HTML基础-第一讲
    DIV中display和visibility属性差别
    1.html+css页面设计
    Log4j中为什么设计isDebugEnabled()方法
    CI中写原生SQL(封装查询)
    codeigniter 对数据库的常用操作
    CI中PHP写法规范(不断更新)
    CI中自定义SQL查询,LIKE模糊查询的处理
    CI中REST URL含有中文怎么处理(报错:The URI you submitted has disallowed characters)
    MyISAM InnoDB 区别
  • 原文地址:https://www.cnblogs.com/huys03/p/2746577.html
Copyright © 2011-2022 走看看