下载后可任意编辑LAMP 环境搭建注意:先安装 MySQL 和 Apache,后安装 PHP,因为 PHP 配置编译的时候需要指定 mysql 路径和 apache 路径。需要用到软件:http-2.2.4.tar.gzmysql-5.6.22-linux-glibc2.5-x86_64.tar.gzphp-5.3.27.tar.gz安装 Apache2.2.4解压先查看 Linux 是 64 位,就上传 64 的源码包。下载后可任意编辑配置编译[root@darker src]# cd httpd-2.2.4[root@darker httpd-2.2.4]#./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.6.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/./scripts/mysql_install_db --user=mysql --datadir=/data/mysql/下载后可任意编辑配置basedir = /usr/local/mysqldatadir = /data/mysqlport = 3007server_id = 1启动cp support-files/mysql.server /etc/init.d/mysqldchmod 755 /etc/init.d/mysqldbasedir=/usr/local/mysql下载后可任意编辑datadir=/data/mysqlchkconfig --add mysqldchkconfig mysqld onservice mysqld startln -s /usr/local/mysql/bin/mysql /usr/bin/常见问题分析错误:error while loading shared libraries: libaio.so.1解决:yum -y install libaio下载后可任意编辑错误:Starting MySQL.The server quit without updating PID file (/[FAILED]ql/darker.pid).InnoDB: mmap(137363456 bytes) failed; errno 12 [ERROR] InnoDB: Cannot allocate memory for the buffer pool[ERROR] Plugin 'InnoDB' init function returned error.[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.[ERROR] Unknown/unsupported storage engine: InnoDB[ERROR] Aborting解决:innodb_buffer_pool_size = 8M将...