mysql+apache+php
浅谈mysql+apache+php今天我们来看看在Linux下如何来安装mysql+apache+php。
在这有个安装的先后顺序,我们先安装mysql数据库;再安装apache;其次就是php。问什么呢?在这是因为后两者需要有数据库的支持,php需要apache的支持!
我们分为三个大的步骤;
一;安装mysql
二;apache的安装
三;php的安装
现在我们就先来安装mysql:
首先我们把mysql开源包下载下来:在这我是用的USB!
如图所示首先先挂载usb;
http://blog.51cto.com/attachment/200903/200903291238295045475.jpg
再次就是下载所需的文件如图:
http://blog.51cto.com/attachment/200903/200903291238295359865.jpg
一;安装mysql
1;解压mysql文件
http://blog.51cto.com/attachment/200903/200903291238295905781.jpg
2;添加到组
http://blog.51cto.com/attachment/200903/200903291238296151120.jpg
3;指定到组
http://blog.51cto.com/attachment/200903/200903291238296373470.jpg
4;进入mysql源码包目录
http://blog.51cto.com/attachment/200903/200903291238296728932.jpg
5;指定安装路径
http://blog.51cto.com/attachment/200904/200904031238723820671.bmp
6;键入安装目录
http://blog.51cto.com/attachment/200903/200903291238297462052.jpg
7;编译
http://blog.51cto.com/attachment/200903/200903291238297688295.jpg
8;进行安装
http://blog.51cto.com/attachment/200904/200904031238724804078.jpg
9;复制当前的文件
http://blog.51cto.com/attachment/200903/200903291238327380375.jpg
10;退回到安装目录
http://blog.51cto.com/attachment/200904/200904031238724990460.jpg
11;进行mysql的初始化
http://blog.51cto.com/attachment/200904/200904031238725352830.jpg
12;更改属性;把安装目录下的所有用户属主更改
http://blog.51cto.com/attachment/200904/200904031238725526570.jpg
13;把当前目录下的var目录属主更改为mysql
http://blog.51cto.com/attachment/200904/200904031238725656881.jpg
14;把当前用户下的所有属组变成mysql
http://blog.51cto.com/attachment/200904/200904031238725782602.jpg
15;启动mysql数据库
http://blog.51cto.com/attachment/200904/200904031238726396013.jpg
http://blog.51cto.com/attachment/200904/200904031238726410945.jpg
二;安装apache
1;解开apache的安装包
http://blog.51cto.com/attachment/200904/200904031238732486042.jpg
2;进入到apache的解压目录
http://blog.51cto.com/attachment/200904/200904031238732621087.jpg
3;使用模块动态安装
http://blog.51cto.com/attachment/200904/200904031238732847000.jpg
4;进行编译
http://blog.51cto.com/attachment/200904/200904031238732922888.jpg
5;编译安装
http://blog.51cto.com/attachment/200904/200904031238733123339.jpg
6;启动apache
http://blog.51cto.com/attachment/200904/200904031238733313257.jpg
三;安装php
1;将php包解压出来
http://blog.51cto.com/attachment/200904/200904031238733462345.jpg
2;cd到解压的目录
http://blog.51cto.com/attachment/200904/200904031238733567726.jpg
3;把php写入apache
http://blog.51cto.com/attachment/200904/200904031238734077315.jpg
4;进行编译
http://blog.51cto.com/attachment/200904/200904031238734147441.jpg
5;进行编译安装
http://blog.51cto.com/attachment/200904/200904031238734339549.jpg
6;进行文件的复制
http://blog.51cto.com/attachment/200904/200904031238734541267.jpg
7;进行文件的编辑,最后一行加入(AddType apptlcation/x-httpd-php .php)
http://blog.51cto.com/attachment/200904/200904031238735131451.jpg
http://blog.51cto.com/attachment/200904/200904031238735147214.jpg
8;下一步
http://blog.51cto.com/attachment/200904/200904031238735468826.jpg
9;下一步
http://blog.51cto.com/attachment/200904/200904031238741347660.jpg
10;下一步启动apache
http://blog.51cto.com/attachment/200904/200904031238741489949.jpg
11;下一步进入apache目录
http://blog.51cto.com/attachment/200904/200904031238741598379.jpg
12;查看和编辑
http://blog.51cto.com/attachment/200904/200904031238741680993.jpg
http://blog.51cto.com/attachment/200904/200904031238741755883.jpg
http://blog.51cto.com/attachment/200904/200904031238741863277.jpg
好的这样大致安装完成!!!!
页:
[1]