安装PHP应用服务器---lamp-hhh-v3


web服务器 应用服务器 (数据库服务器单独出去)
httpd-2.2.8
   ./configure --prefix=/usr/local/httpd-2.2 --enable-so --enable-rewrite --with-mpm=prefork
   ./configure --prefix=/usr/local/httpd-2.2 --enable-so --enable-rewrite --with-mpm=worker
   bin/apachectl -l | bin/apachectl -M    ( 静态模块查看 )
   bin/apachectl -V    ( 查看编译设置;安装时的环境变量 )
   ls modules    ( 查看动态加载的模块 )
mysql-5.1.72
   ./configure --without-server --with-extra-charset=gbk,gb2312,utf8 --enable-thread-safe-client
freetype-2.3.10
   ./configure --prefix=/usr/local/gd2
libpng-1.2.41
   ./configure --prefix=/usr/local/gd2
jpegsrc.v7
   ./configure --prefix=/usr/local/gd2
gd-2.0.35
   ./configure --prefix=/usr/local/gd2 \
       --with-freetype=/usr/local/gd2 \
       --with-png=/usr/local/gd2 \
       --with-jpeg=/usr/local/gd2
php-5.3.3
   ./configure --prefix=/usr/local/php5 \
       --with-gd=/usr/local/gd2 \
       --with-apxs2=/usr/local/httpd-2.2/bin/apxs \
       --enable-mbregex \
       --with-mysql \
       --with-zlib-dir \
       --enable-mbstring=all \        ( 可以不要这行,默认有这项编译选项 )
       --with-pdo-mysql \
       --with-freetype-dir=/usr/local/freetype \

ls /usr/local/httpd-2.2/modules

添加一行解释 php 文件时调用模块。添加行如下 找到 AddType 相同行...
   AddType application/x-httpd-php .php .html
   AddType application/x-httpd-php-source .phps
   注意将这两行添加在其它 AddType 后面

确保文件中有下面一段如果没有的话就添加在所有 LoadModule 之后
   LoadModule php*_module modules/libphp*.so
   * 代表版本信息。

-----------------------------
./configure --help        ( 部分节选 )
 --with-jpeg-dir[=DIR]     GD: Set the path to libjpeg install prefix
 --with-png-dir[=DIR]      GD: Set the path to libpng install prefix
 --with-zlib-dir[=DIR]     GD: Set the path to libz install prefix
 --with-xpm-dir[=DIR]      GD: Set the path to libXpm install prefix
 --with-freetype-dir[=DIR] GD: Set the path to FreeType 2 install prefix
 --with-t1lib[=DIR]        GD: Include T1lib support. T1lib version >= 5.0.0 required
 --enable-gd-native-ttf    GD: Enable TrueType string function
 --enable-gd-jis-conv      GD: Enable JIS-mapped Japanese font support

 --with-mysql[=DIR]      Include MySQL support.  DIR is the MySQL base
                         directory.  If mysqlnd is passed as DIR,
                         the MySQL native driver will be used [/usr/local]
 --with-mysql-sock[=DIR]   MySQL/MySQLi/PDO_MYSQL: Location of the MySQL unix socket pointer.
                           If unspecified, the default locations are searched
 --with-mysqli[=FILE]    Include MySQLi support.  FILE is the path
                         to mysql_config.  If mysqlnd is passed as FILE,
                         the MySQL native driver will be used [mysql_config]
 --enable-embedded-mysqli  MYSQLi: Enable embedded support
                           Note: Does not work with MySQL native driver!
 --with-pdo-mysql[=DIR]    PDO: MySQL support. DIR is the MySQL base directory
                                If mysqlnd is passed as DIR, the MySQL native
                                native driver will be used [/usr/local]
--disable-mysqlnd-compression-support
                           Enable support for the MySQL compressed protocol in mysqlnd
 --with-phttpd=DIR       Build PHP as phttpd module
 --with-thttpd=SRCDIR    Build PHP as thttpd module


====================

测试http服务

# lynx localhost

# lynx http://172.16.180.220/libr





本文出自 “小崔的实验笔记” 博客,谢绝转载!

你可能感兴趣的:(lamp单机架构拆分)