7、安装pcre-7.9.tar.gz
[root@localhost lamp]# tar xf pcre-7.9.tar.gz -C /usr/src/lamp/
[root@localhost pcre-7.9]# ./configure --enable-utf8 --enable-rebuild-chartables --enable-newline-is-any --enable-pcregrep-libz --enable-pcregrep-libbz2
make && make install
8、安装httpd--2.2.23.tar.gz
[root@localhost softs]# tar xf httpd--2.2.23.tar.gz -C /usr/src/
[root@localhost softs]# cd /usr/src/httpd-2.2.23/
[root@localhost httpd-2.2.23]# ./configure --enable-modules=all --enable-mods-shared=all --enable-cache --enable-disk-cache --enable-dumpio --enable-echo --enable-example --enable-logio --enable-mime-magic --enable-expires --enable-headers --enable-unique-id --enable-proxy --enable-proxy-balancer --enable-proxy-http --enable-proxy-ajp --enable-proxy-connect --enable-ssl --enable-static-ab --enable-http --enable-info --enable-cgi --enable-vhost-alias --enable-so --enable-rewrite --with-apr=/usr/local/apr-httpd/bin/apr-1-config --with-apr-util=/usr/local/apr-httpd/bin/apu-1-config --with-pcre=/usr/local --with-ssl=/usr --with-mpm=prefork
9、修改apache配置文件
[root@localhost ~]# vi /usr/local/apache2/conf/httpd.conf 指定DocumentRoot和允许访问

将 第195行的目录路径也改为 /var/www <Directory "/var/www">
[root@localhost ~]# mkdir /var/www /var/log/httpd
[root@localhost ~]# chown -R daemon.daemon /var/www /var/log/httpd
[root@localhost ~]# cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/apache
[root@localhost ~]# /etc/init.d/apache start
[root@localhost htdocs]# mv /usr/local/apache2/htdocs/index.html /var/www/ ------将apache默认路径下的index.html移动到指定的DocumentRoot下面
浏览器访问http://127.0.0.1/
It works!
[root@localhost extra]# vi httpd-vhosts.conf ##增加一台虚拟主机
ServerAdmin owncloud@localhost
DocumentRoot "/var/www/owncloud"
ServerName test.owncloud.com
ErrorLog "/var/log/httpd/owncloud.error.log"
CustomLog "/var/log/httpd/owncloud-access_log" common
</VirtualHost>
useradd mysql
mkdir /var/log/mysqld
mkdir /var/run/mysqld
mkdir /database
chown mysql.mysql -R /var/log/mysqld /var/run/mysqld /database
2、下载软件并解压编译安装
下载地址http://yun.baidu.com/share/link?shareid=933310467&uk=2819702030&third=0
[root@localhost softs]# tar xf mysql-5.6.10.tar.gz -C /usr/src/
[root@localhost softs]# cd /usr/src/mysql-5.6.10/

3、这里需要cmake安装
[root@localhost mysql-5.6.10]# cmake -DCMAKE_ISTALL_PREFIX=/usr/local/mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DENABLED_LOCAL_INFILE=ON -DMYSQL_DATADIR=/datadir -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql5.sock -DWITH_DEBUG=ON -DEXTRA_CHARSETS=ALL -DMYSQL_USER=mysql -DMYSQL_TCP_PORT=3306 -DSYSCONFDIR=/usr/local/mysql/etc -DWITH_READLINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1


4、通过对比可以看出,在cmake前后的差异还是蛮大的,接下来make
[root@localhost mysql-5.6.10]# make

5、make这一步比较慢,需要多等一下,下一步就是make install

make install 完成后,接下来就是对mysql进行配置
