Linux下源码实现LAMP环境的搭建(2)

 

 

首页服务器应用

背景:

阅读新闻

Linux下源码实现LAMP环境的搭建

[日期:2012-05-05]   来源:Linux社区  作者:haoxiaoyang   [字体:]  

四.安装apache的源代码并进行编译安装和调试

1:tar -jxvf httpd-2.2.19.tar.bz2 -C /usr/local/src 对该源码进行解压缩

httpd-2.2.19/server/request.c

httpd-2.2.19/server/config.c

httpd-2.2.19/server/error_bucket.c

httpd-2.2.19/server/gen_test_char.c

httpd-2.2.19/server/mpm_common.c

httpd-2.2.19/server/.indent.pro

cd /usr/local/src

cd httpd-2.2.19

2.[root@ ]#./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd --enable-ssl --enable-so --with-z

3:[root@ ]#make     对源码进行编译

/mpm/prefork/libprefork.la os/unix/libos.la -lm /usr/local/src/httpd-2.2.19/srclib/pcre/libpcre.la /usr/local/src/httpd-2.2.19/srclib/apr-util/libaprutil-1.la -lexpat /usr/local/src/httpd-2.2.19/srclib/apr/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl

make[1]: Leaving directory `/usr/local/src/httpd-2.2.19'

4:[root@ ]# make install  对源码进行安装

Installing header files

Installing build system files

Installing man pages and online manual

mkdir /usr/loacl/apache/man

mkdir /usr/loacl/apache/man/man1

mkdir /usr/loacl/apache/man/man8

mkdir /usr/loacl/apache/manual

make[1]: Leaving directory `/usr/local/src/httpd-2.2.19'

5: [root@ ~]# cd /etc/httpd/

[root@ httpd]# ll

total 96

drwxr-xr-x 2 root root 4096 Mar 18 21:35 extra

-rw-r--r-- 1 root root 13422 Mar 18 21:35 httpd.conf

-rw-r--r-- 1 root root 12958 Mar 18 21:35 magic

-rw-r--r-- 1 root root 49815 Mar 18 21:35 mime.types

drwxr-xr-x 3 root root 4096 Mar 18 21:35 original

[root@ httpd]# vim httpd.conf  改写主配置文档

6:测试

cd /usr/local/apache/htdocs

vim index.html

Linux下源码实现LAMP环境的搭建

7:修改系统的环境变量

Vim /etc/profile

.  /etc/profile  重新读取系统的环境变量的配置文件

[root@ htdocs]# echo $PATH

/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/MySQL/bin:/root/bin:/usr/local/mysql/bin:/usr/local/apache/bin

对库文件进行连接

cd /etc/ld.so.conf/

vim httpd.conf

/usr/local/apache/lib

apachectl stop

apachectl start

[root@ ld.so.conf.d]# netstat -tupln |grep httpd

五:安装php的源码并进行配置和调试

1:tar –jxvf php-5.3.7.tar –C /usr/local/src  对源码进行解压缩

2: cd /usr/local/src/php-5.3.7    切换到php的目录下

3:[root@ ]#./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring=all

creating main/php_config.h 

creating main/internal_functions.c

creating main/internal_functions_cli.c 

+--------------------------------------------------------------------+

| License: |

| This software is subject to the PHP License, available in this |

| distribution in the file LICENSE. By continuing this installation |

| process, you are bound by the terms of this license agreement. |

| If you do not agree with the terms of this license, you must abort |

| the installation process at this point. |

+--------------------------------------------------------------------+

Thank you for using PHP.

4:make  进行编译

5:make install  进行安装

6:vim /etc/httpd/httpd.conf  修改主配置文件

 

在 CentOS 6.2 的 Apache Web server 上安装 mod_spdy

Linux服务器LAMP环境搭建全过程

相关资讯       lamp 

   

本文评论   查看全部评论 (0)


评论声明

尊重网上道德,遵守中华人民共和国的各项有关法律法规

承担一切因您的行为而直接或间接导致的民事或刑事法律责任

本站管理人员有权保留或删除其管辖留言中的任意内容

本站有权在网站内转载或引用您的评论

参与本评论即表明您已经阅读并接受上述条款

 

 

 

最新资讯

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/6d3f942a79040741e22975dc7f754a25.html