阿里云web网站服务器安装配置(Lamp环境搭建图文教程)

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

阿里云web网站服务器安装配置(Lamp环境搭建图文教程) 说明:本教程是DrMeng本人在搭建阿里云web网站服务器安装配置时,一步一步记录下来的图文教程,教程几乎合适所有的linux版本的服务器的PHP环境搭建:

Linux+apache+mysql+php,最所有lamp环境搭建,最稳定最好的一个版本。不论是你新手还是老手都能通过本教程搭100%搭建好你的阿里云web网站服务器的PHP运行环境。教程按四大部分详细讲解Lamp环境的搭建过程(配合图文)

第一部分:分区格式化及挂载数据盘

第二部分:上传LAMP安装源码包及解压

第三部分:LAMP环境必备编译工具和相关包安装

第四部分:LAMP环境安装(详细安装lamp环境带图文)

第一部分:分区格式化及挂载数据盘

[root@iZ940zra0cvZ ~]# cd /lamp/

[root@iZ940zra0cvZ lamp]# fdisk -l

1、查看数据盘

在没有分区和格式化数据盘之前,使用“df –h”命令,是无法看到数据盘的,可以使用“fdisk -l”命令查看。如下图:

[root@iZ940zra0cvZ lamp]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/xvda1 20G 1.3G 18G 7% /

tmpfs 947M 0 947M 0% /dev/shm

[root@iZ940zra0cvZ lamp]# du -h

4.0K .

2、对数据盘进行分区

执行“fdisk /dev/xvdb”命令,对数据盘进行分区;

根据提示,依次输入“n”,“p”“1”,两次回车,“wq”,分区就开始了,很快就会完成。

[root@iZ940zra0cvZ lamp]# 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 0x4d77a78a.

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): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-26108, default 1):

Using default value 1

Last cylinder, +cylinders or +size{K,M,G} (1-26108, default 26108):

Using default value 26108

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

3、对分区进行格式化

执行“mkfs -t ext3 /dev/xvdb1”命令,对分区进行格式化;

mkfs.ext3 /dev/xvdb1

分别对磁盘进行格式化处理,格式化为ext3文件类型

[root@iZ940zra0cvZ lamp]# mkfs -t ext3 /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

13107200 inodes, 52428119 blocks

2621405 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=0

1600 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, 20480000, 23887872

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 36 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

[root@iZ940zra0cvZ lamp]# 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: 0x00081844

Device Boot Start End Blocks Id System

/dev/xvda1 * 1 2611 20970496 83 Linux

Disk /dev/xvdb: 214.7 GB, 214748364800 bytes

255 heads, 63 sectors/track, 26108 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: 0x4d77a78a

Device Boot Start End Blocks Id System

相关文档
最新文档