Centos6.4中Apache,MySQL,PHP 的安装
[root@Arvin02 ~]# cd /home/oldboy/tools/[root@Arvin02 tools]# rpm -qa httpd
[root@Arvin02 tools]# wget -q http://mirror.bit.edu.cn/apache/httpd/httpd-2.2.27.tar.gz[root@Arvin02 tools]# tar xf httpd-2.2.27.tar.gz[root@Arvin02 tools]# cd httpd-2.2.27
[root@Arvin02 tools]# ./configure \--prefix=/application/apache2.2.27 \--enable-deflate \--enable-expires \--enable-headers \--enable-modules=most \--enable--so \--with-mpm=worker \--enable-rewrite[root@Arvin02 tools]# make[root@Arvin02 tools]# make install[root@Arvin02 httpd-2.2.27]# /application/apache/bin/apachectl start
[root@Arvin02 httpd-2.2.27]# lsof -i :80[root@Arvin02 httpd-2.2.27]# ps -ef|grep httpd
1)、提前加大虚拟内存,编译会更快,1-2G。2)、准备好mysql软件包。3)、重视操作过程的报错输出。4)、进入虚拟机界面去make,make install。
[root@oldboy ~]# groupadd mysql -----添加组和用户[root@oldboy ~]# useradd mysql -g mysql -M -s /sbin/nologin[root@oldboy ~]# id mysqluid=500(mysql) gid=500(mysql) groups=500(mysql)
[root@oldboy mysql-5.1.72]# cat o.log --mysql编译脚本./configure \--prefix=/application/mysql5.1.72 \--with-unix-socket-path=/application/mysql5.1.72/tmp/mysql.sock \--localstatedir=/application/mysql5.1.72/data \--enable-assembler \--enable-thread-safe-client \--with-mysqld-user=mysql \--with-big-tables \--without-debug \--with-pthread \--with-extra-charsets=complex \--with-readline \--with-ssl \--with-embedded-server \--enable-local-infile \--with-plugins=partition,innobase \--with-mysqld-ldflags=-all-static \--with-client-ldflags=-all-static[root@oldboy mysql-5.1.72]# cat o.log |bash --bash执行o.log脚本,编译mysql[root@oldboy mysql-5.1.72]# yum -y install ncurses-devel
[root@oldboy mysql-5.1.72]#make &&make install[root@oldboy mysql-5.1.72]#ln -s /application/mysql5.1.72 /application/mysql[root@oldboy mysql-5.1.72]#ll /application/mysql
rpm -qa zlib libxml libjpeg freetype libpng gd curl libiconv zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel
tar zxf libiconv-1.14.tar.gzcd libiconv-1.14./cinfigure --prefix=/usr/local/libiconvmakemake installcd ../
cd /home/oldboy/tools
tar zxf php-5.3.10.tar.gzcd php-5.3.10yum install openssl-devel libxslt-devel -y
./configure \--prefix=/application/php5.3.27 \--with-apxs2=/application/apache/bin/apxs \--with-mysql=/application/mysql \--with-xmlrpc \--with-openssl \--with-zlib \--with-freetype-dir \--with-gd \--with-jpeg-dir \--with-png-dir \--with-iconv=/usr/local/libiconv \--enable-short-tags \--enable-sockets \--enable-zend-multibyte \--enable-soap \--enable-mbstring \--enable-static \--enable-gd-native-ttf \--with-curl \--with-xsl \--enable-ftp \--with-libxml-dir 如果出现Thank you for using PHP.则安装成功。make && make installln -s /application/php5.3.27/ /application/phpll /application/php/安装完毕!
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。