下载后可任意编辑LAMP 环境搭建注意:先安装 MySQL 和 Apache,后安装 PHP,因为 PHP 配置编译的时候需要指定 mysql 路径和 apache 路径
需要用到软件:http-2
gzmysql-5
22-linux-glibc2
5-x86_64
gzphp-5
gz安装 Apache2
4解压先查看 Linux 是 64 位,就上传 64 的源码包
下载后可任意编辑配置编译[root@darker src]# cd httpd-2
4[root@darker httpd-2
/configure \--prefix=/usr/local/apache2 \--with-included-apr \--enable-so \--enable-deflate=shared \--enable-expires=shared \--enable-rewrite=shared \--with-pcre下载后可任意编辑使用 echo $
假如返回 0 代表没有问题 假如返回 1 代表安装错误编译安装常见问题分析错误:error: mod_deflate has been requested but can not be built due to prerequisite failures解决:yum -y install zlib-devel下载后可任意编辑安装 MySQL解包初始化mv mysql-5
22-linux-glibc2
5-x86_64 /usr/local/mysqluseradd -s /sbin/nologin -M mysqlcd /usr/local/mysql/mkdir -p /data/mysqlchown -R mysql
mysql /data/mysql