湖濱散記部落格的樹心幽徑[login][主頁]
239:20120814安裝Apache網頁伺服器及PHP

(1)Download httpd-2.4.2.tar.gz
[root@life webadm]# pwd
/home/webadm
[root@life webadm]# mkdir lnx
[root@life webadm]# cd lnx
[root@life lnx]# pwd
/home/webadm/lnx
[root@life lnx]# date
二  8月 14 13:17:57 CST 2012
[root@life lnx]# wget http://apache.stu.edu.tw//httpd/httpd-2.4.2.tar.gz
--2012-08-14 13:18:04--  http://apache.stu.edu.tw//httpd/httpd-2.4.2.tar.gz
正在查找主機 apache.stu.edu.tw... 120.119.118.1, 2001:e10:c41:eeee::1
正在連接 apache.stu.edu.tw|120.119.118.1|:80... 連上了。
已送出 HTTP 要求,正在等候回應... 200 OK
長度: 5616185 (5.4M) [application/x-gzip]
Saving to: `httpd-2.4.2.tar.gz'

100%[======================================>] 5,616,185    772K/s   in 5.1s   

2012-08-14 13:18:09 (1.05 MB/s) - `httpd-2.4.2.tar.gz' saved [5616185/5616185]

[root@life lnx]#

(2) check previous version
[root@life lnx]# httpd -l
Compiled in modules:
  core.c
  prefork.c
  http_core.c
  mod_so.c
[root@life lnx]# httpd -v
Server version: Apache/2.2.22 (Unix)
Server built:   Apr 30 2012 09:55:05
[root@life lnx]# whereis httpd
httpd: /sbin/httpd.worker /sbin/httpd.event /sbin/httpd /usr/sbin/httpd.worker /usr/sbin/httpd.event /usr/sbin/httpd /etc/httpd /lib/httpd /usr/lib/httpd /usr/share/man/man8/httpd.8.gz
[root@life lnx]# whereis apachectl
apachectl: /sbin/apachectl /usr/sbin/apachectl /usr/share/man/man8/apachectl.8.gz
[root@life lnx]#

(3) decompress httpd-2.4.2.tar.gz
[root@life lnx]# ls
httpd-2.4.2.tar.gz
[root@life lnx]# tar xvzf httpd-2.4.2.tar.gz
[root@life lnx]# ls
httpd-2.4.2  httpd-2.4.2.tar.gz
[root@life lnx]# cd httpd-2.4.2/
[root@life httpd-2.4.2]# ls
ABOUT_APACHE     BuildBin.dsp   httpd.dsp       Makefile.in       ROADMAP
acinclude.m4     buildconf      httpd.spec      Makefile.win      server
Apache-apr2.dsw  CHANGES        include         modules           srclib
Apache.dsw       config.layout  INSTALL         NOTICE            support
apache_probes.d  configure      InstallBin.dsp  NWGNUmakefile     test
ap.d             configure.in   LAYOUT          os                VERSIONING
build            docs           libhttpd.dsp    README
BuildAll.dsp     emacs-style    LICENSE         README.platforms
[root@life httpd-2.4.2]#

(4) configure httpd-2.4.2 failure

[root@life httpd-2.4.2]# cat README|more
:

[root@life httpd-2.4.2]# cat INSTALL |more
:


[root@life httpd-2.4.2]# ./configure --enable-so --enable-unique-id --prefix=/usr/local/apache
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu

Configuring Apache Portable Runtime library ...

checking for APR... no
configure: error: APR not found.  Please read the documentation.
[root@life httpd-2.4.2]#

(5) install libapreq2-2.13 failure
[root@life httpd-2.4.2]# cd ..
[root@life lnx]# wget http://ftp.tc.edu.tw/pub/Apache//httpd/libapreq/libapreq2-2.13.tar.gz
--2012-08-14 14:45:52--  http://ftp.tc.edu.tw/pub/Apache//httpd/libapreq/libapreq2-2.13.tar.gz
正在查找主機 ftp.tc.edu.tw... 163.17.38.18, 2001:288:5400:2::18
正在連接 ftp.tc.edu.tw|163.17.38.18|:80... 連上了。
已送出 HTTP 要求,正在等候回應... 200 OK
長度: 891320 (870K) [application/x-gzip]
Saving to: `libapreq2-2.13.tar.gz'

100%[======================================>] 891,320     1.81M/s   in 0.5s   

2012-08-14 14:45:52 (1.81 MB/s) - `libapreq2-2.13.tar.gz' saved [891320/891320]


:
[root@life lnx]# tar xvzf libapreq2-2.13.tar.gz



[root@life lnx]# ls
httpd-2.4.2  httpd-2.4.2.tar.gz  libapreq2-2.13  libapreq2-2.13.tar.gz
[root@life lnx]# cd libapreq2-2.13/
[root@life libapreq2-2.13]# ls
acinclude.m4      config.guess  FAQ.pod      library      MANIFEST       README
aclocal.m4        config.sub    glue         LICENSE      META.yml       STATUS
apreq2-config.in  configure     include      ltmain.sh    missing        win32
build             configure.ac  INSTALL      Makefile.am  module
buildconf         depcomp       install-sh   Makefile.in  NOTICE
CHANGES           docs          libapreq.rc  Makefile.PL  PREREQUISITES
[root@life libapreq2-2.13]#

[root@life libapreq2-2.13]# cat INSTALL |more
:
 ./configure --with-apache2-apxs=/path/to/apache2/bin/apxs
           % make
  (optional)% make test
            % make install
  (optional)% make docs_install
[root@life libapreq2-2.13]# ./configure --with-apache2-apxs=/usr/local/apache2/bin/apxs
:
./configure: line 20252: /usr/local/apache2/bin/apxs: No such file or directory
./configure: line 20266: /usr/local/apache2/bin/apxs: No such file or directory
./configure: line 20270: /usr/local/apache2/bin/apxs: No such file or directory
./configure: line 20274: /usr/local/apache2/bin/apxs: No such file or directory
./configure: line 20274: /usr/local/apache2/bin/apxs: No such file or directory
build/version_check.pl failed: no version_string found in '' for 'apache2'.
configure: error: Bad apache2 binary (/)
[root@life libapreq2-2.13]# whereis apxs
apxs: /usr/share/man/man1/apxs.1.gz


(6) install apr
[root@life lnx]# wget http://ftp.twaren.net/Unix/Web/apache//apr/apr-1.4.6.tar.gz
--2012-08-14 15:06:11--  http://ftp.twaren.net/Unix/Web/apache//apr/apr-1.4.6.tar.gz
正在查找主機 ftp.twaren.net... 140.110.123.9, 2001:e10:5c00:5::9
正在連接 ftp.twaren.net|140.110.123.9|:80... 連上了。
已送出 HTTP 要求,正在等候回應... 200 OK
長度: 982243 (959K) [application/x-gzip]
Saving to: `apr-1.4.6.tar.gz'

100%[===============================================================>] 982,243     3.35M/s   in 0.3s   

2012-08-14 15:06:12 (3.35 MB/s) - `apr-1.4.6.tar.gz' saved [982243/982243]

[root@life lnx]#
[root@life lnx]# tar xvzf apr-1.4.6.tar.gz

[root@life lnx]# cd apr-1.4.6/
[root@life apr-1.4.6]# ls
apr-config.in  atomic            configure     include     Makefile.in   NWGNUmakefile  support
apr.dep        build             configure.in  libapr.dep  Makefile.win  passwd         tables
apr.dsp        buildconf         docs          libapr.dsp  memory        poll           test
apr.dsw        build.conf        dso           libapr.mak  misc          random         threadproc
apr.mak        build-outputs.mk  emacs-mode    libapr.rc   mmap          README         time
apr.pc.in      CHANGES           file_io       LICENSE     network_io    shmem          user
apr.spec       config.layout     helpers       locks       NOTICE        strings
[root@life apr-1.4.6]#

[root@life apr-1.4.6]# ./configure
:
config.status: executing libtool commands
rm: cannot remove `libtoolT': No such file or directory
config.status: executing default commands
[root@life apr-1.4.6]#

[root@life apr-1.4.6]# make


[root@life apr-1.4.6]# make install

:
Libraries have been installed in:
   /usr/local/apr/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/install -c -m 644 apr.exp /usr/local/apr/lib/apr.exp
/usr/bin/install -c -m 644 apr.pc /usr/local/apr/lib/pkgconfig/apr-1.pc
for f in libtool shlibtool; do \
    if test -f ${f}; then /usr/bin/install -c -m 755 ${f} /usr/local/apr/build-1; fi; \
done
/usr/bin/install -c -m 755 /home/webadm/lnx/apr-1.4.6/build/mkdir.sh /usr/local/apr/build-1
for f in make_exports.awk make_var_export.awk; do \
    /usr/bin/install -c -m 644 /home/webadm/lnx/apr-1.4.6/build/${f} /usr/local/apr/build-1; \
done
/usr/bin/install -c -m 644 build/apr_rules.out /usr/local/apr/build-1/apr_rules.mk
/usr/bin/install -c -m 755 apr-config.out /usr/local/apr/bin/apr-1-config
[root@life apr-1.4.6]#




(7) install apr-util

[root@life lnx]# wget http://ftp.twaren.net/Unix/Web/apache//apr/apr-util-1.4.1.tar.gz
--2012-08-14 15:07:16--  http://ftp.twaren.net/Unix/Web/apache//apr/apr-util-1.4.1.tar.gz
正在查找主機 ftp.twaren.net... 140.110.123.9, 2001:e10:5c00:5::9
正在連接 ftp.twaren.net|140.110.123.9|:80... 連上了。
已送出 HTTP 要求,正在等候回應... 200 OK
長度: 774770 (757K) [application/x-gzip]
Saving to: `apr-util-1.4.1.tar.gz'

100%[===============================================================>] 774,770     2.80M/s   in 0.3s   

2012-08-14 15:07:16 (2.80 MB/s) - `apr-util-1.4.1.tar.gz' saved [774770/774770]

[root@life lnx]#


[root@life lnx]# tar xvzf apr-util-1.4.1.tar.gz
[root@life lnx]# cd apr-util-1.4.1/
[root@life apr-util-1.4.1]# ls
aprutil.dsp     build             configure     encoding           libaprutil.rc  NOTICE           uri
aprutil.dsw     buildconf         configure.in  export_vars.sh.in  LICENSE        NWGNUmakefile    xlate
apr-util.pc.in  build.conf        crypto        hooks              Makefile.in    README           xml
apr-util.spec   build-outputs.mk  dbd           include            Makefile.win   renames_pending
apu-config.in   CHANGES           dbm           ldap               memcache       strmatch
buckets         config.layout     docs          libaprutil.dsp     misc           test
[root@life apr-util-1.4.1]#

[root@life apr-util-1.4.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

[root@life apr-util-1.4.1]# make

[root@life apr-util-1.4.1]# make install
:
Libraries have been installed in:
   /usr/local/apr-util/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/install -c -m 644 aprutil.exp /usr/local/apr-util/lib
/usr/bin/install -c -m 755 apu-config.out /usr/local/apr-util/bin/apu-1-config


(8) re confiure httpd

[root@life apr-util-1.4.1]# cd ..
[root@life lnx]# cd httpd-2.4.2/
[root@life httpd-2.4.2]# ./configure --enable-so --enable-unique-id --prefix=/usr/local/apache2

:
checking for APR-util... no
configure: error: APR-util not found.  Please read the documentation.
[root@life httpd-2.4.2]#
[root@life httpd-2.4.2]# ./configure --enable-so --enable-unique-id --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
:
Configuring Apache Portable Runtime Utility library...
:
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
[root@life httpd-2.4.2]#
:
[root@life httpd-2.4.2]# ./configure --help | grep pcre
  --with-pcre=PATH        Use external PCRE library
[root@life httpd-2.4.2]#


(9) install pcre


[root@life lnx]# wget http://sourceforge.net/projects/pcre/files/pcre/8.31/pcre-8.31.tar.gz/download
:
長度: 1661535 (1.6M) [application/x-gzip]
Saving to: `download'

100%[===============================================================>] 1,661,535   1.68M/s   in 0.9s   

2012-08-14 15:25:36 (1.68 MB/s) - `download' saved [1661535/1661535]
[root@life lnx]# mv download pcre-8.31.tar.gz
[root@life lnx]# ls
apr-1.4.6         apr-util-1.4.1         httpd-2.4.2         libapreq2-2.13         pcre-8.31.tar.gz
apr-1.4.6.tar.gz  apr-util-1.4.1.tar.gz  httpd-2.4.2.tar.gz  libapreq2-2.13.tar.gz
[root@life lnx]#

[root@life lnx]# tar xvzf pcre-8.31.tar.gz
[root@life lnx]# cd pcre-8.31/
[root@life pcre-8.31]# ls
132html             Makefile.am            pcre16_valid_utf16.c    pcreposix.c
aclocal.m4          Makefile.in            pcre16_version.c        pcreposix.h
AUTHORS             makevp.bat             pcre16_xclass.c         pcre_printint.c
ChangeLog           makevp_c.txt           pcre_byte_order.c       pcre_refcount.c
CheckMan            makevp_l.txt           pcre_chartables.c.dist  pcre_scanner.cc
CleanTxt            missing                pcre_compile.c          pcre_scanner.h
cmake               NEWS                   pcre_config.c           pcre_scanner_unittest.cc
CMakeLists.txt      NON-AUTOTOOLS-BUILD    pcre-config.in          pcre_stringpiece.cc
config-cmake.h.in   NON-UNIX-USE           pcrecpparg.h.in         pcre_stringpiece.h.in
config.guess        pcre16_byte_order.c    pcrecpp.cc              pcre_stringpiece_unittest.cc
config.h.generic    pcre16_chartables.c    pcrecpp.h               pcre_string_utils.c
config.h.in         pcre16_compile.c       pcrecpp_internal.h      pcre_study.c
config.sub          pcre16_config.c        pcrecpp_unittest.cc     pcre_tables.c
configure           pcre16_dfa_exec.c      pcredemo.c              pcretest.c
configure.ac        pcre16_exec.c          pcre_dfa_exec.c         pcre_ucd.c
COPYING             pcre16_fullinfo.c      pcre_exec.c             pcre_valid_utf8.c
depcomp             pcre16_get.c           pcre_fullinfo.c         pcre_version.c
Detrail             pcre16_globals.c       pcre_get.c              pcre_xclass.c
dftables.c          pcre16_jit_compile.c   pcregexp.pas            perltest.pl
doc                 pcre16_maketables.c    pcre_globals.c          PrepareRelease
HACKING             pcre16_newline.c       pcregrep.c              README
INSTALL             pcre16_ord2utf16.c     pcre.h.generic          RunGrepTest
install-sh          pcre16_printint.c      pcre.h.in               RunTest
libpcre16.pc.in     pcre16_refcount.c      pcre_internal.h         RunTest.bat
libpcrecpp.pc.in    pcre16_string_utils.c  pcre_jit_compile.c      sljit
libpcre.pc.in       pcre16_study.c         pcre_jit_test.c         testdata
libpcreposix.pc.in  pcre16_tables.c        pcre_maketables.c       ucp.h
LICENCE             pcre16_ucd.c           pcre_newline.c
ltmain.sh           pcre16_utf16_utils.c   pcre_ord2utf8.c
[root@life pcre-8.31]#

[root@life pcre-8.31]# ./configure --prefix=/usr/local/pcre
[root@life pcre-8.31]# make
:
make[1]: Leaving directory `/home/webadm/lnx/pcre-8.31'

[root@life pcre-8.31]# make install


(10) re confiure success and build httpd
[root@life pcre-8.31]# cd ../httpd-2.4.2/
[root@life httpd-2.4.2]# ./configure --enable-so --enable-unique-id --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre

[root@life httpd-2.4.2]# make

[root@life httpd-2.4.2]# make install


:
[root@life apache2]# /usr/local/apache2/bin/httpd -v
Server version: Apache/2.4.2 (Unix)
Server built:   Aug 14 2012 16:08:56
:

(11) excute httpd success

[root@life apache2]# /usr/local/apache2/bin/apachectl start


[root@life htdocs]# ps ax|grep httpd
23034 ?        Ss     0:00 /usr/local/apache2/bin/httpd -k start
23051 ?        Sl     0:00 /usr/local/apache2/bin/httpd -k start
23052 ?        Sl     0:00 /usr/local/apache2/bin/httpd -k start
23053 ?        Sl     0:00 /usr/local/apache2/bin/httpd -k start
23167 pts/0    S+     0:00 grep --color=auto httpd
[root@life htdocs]#


http://localhost/
:
It works!


(12)
[root@life lnx]# wget http://tw.php.net/get/php-5.4.5.tar.gz/from/tw2.php.net/mirror
--2012-08-14 15:59:38--  http://tw.php.net/get/php-5.4.5.tar.gz/from/tw2.php.net/mirror
正在查找主機 tw.php.net... 122.117.47.133
正在連接 tw.php.net|122.117.47.133|:80... 連上了。
已送出 HTTP 要求,正在等候回應... 302 Found
位置: http://tw2.php.net/distributions/php-5.4.5.tar.gz [跟隨至新的 URL]
--2012-08-14 15:59:38--  http://tw2.php.net/distributions/php-5.4.5.tar.gz
正在查找主機 tw2.php.net... 123.204.228.176
正在連接 tw2.php.net|123.204.228.176|:80... 連上了。
已送出 HTTP 要求,正在等候回應... 200 OK
長度: 13952440 (13M) [application/x-gzip]
Saving to: `mirror'

100%[===============================================================>] 13,952,440  86.8K/s   in 3m 0s  

2012-08-14 16:02:38 (75.8 KB/s) - `mirror' saved [13952440/13952440]

[root@life lnx]#
[root@life lnx]# mv mirror php-5.4.5.tar.gz
[root@life lnx]# ls
apr-1.4.6         apr-util-1.4.1.tar.gz  libapreq2-2.13         pcre-8.31.tar.gz
apr-1.4.6.tar.gz  httpd-2.4.2            libapreq2-2.13.tar.gz  php-5.3.15.tar.gz
apr-util-1.4.1    httpd-2.4.2.tar.gz     pcre-8.31              php-5.4.5.tar.gz
[root@life lnx]#


(13)
[root@life lnx]# tar xvzf php-5.4.5.tar.gz
[root@life lnx]# cd php-5.4.5/
[root@life php-5.4.5]# ls
acinclude.m4      install-sh           README.EXTENSIONS                 run-tests.php
aclocal.m4        LICENSE              README.EXT_SKEL                   sapi
build             ltmain.sh            README.GIT-RULES                  scripts
buildconf         main                 README.input_filter               server-tests-config.php
buildconf.bat     makedist             README.MAILINGLIST_RULES          server-tests.php
CODING_STANDARDS  Makefile.frag        README.namespaces                 snapshot
config.guess      Makefile.gcov        README.NEW-OUTPUT-API             stamp-h.in
config.sub        Makefile.global      README.PARAMETER_PARSING_API      stub.c
configure         makerpm              README.PHP4-TO-PHP5-THIN-CHANGES  svnclean.bat
configure.in      missing              README.REDIST.BINS                tests
CREDITS           mkinstalldirs        README.RELEASE_PROCESS            TSRM
ext               netware              README.SELF-CONTAINED-EXTENSIONS  UPGRADING
EXTENSIONS        NEWS                 README.STREAMS                    UPGRADING.INTERNALS
footer            pear                 README.SUBMITTING_PATCH           vcsclean
generated_lists   php5.spec.in         README.TESTING                    win32
genfiles          php.gif              README.TESTING2                   Zend
header            php.ini-development  README.UNIX-BUILD-SYSTEM
INSTALL           php.ini-production   README.WIN32-BUILD-SYSTEM
[root@life php-5.4.5]#

[root@life php-5.4.5]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql

[root@life php-5.4.5]# make
:
Build complete.
Don't forget to run 'make test'.

[root@life php-5.4.5]# make test
WARNED TEST SUMMARY
---------------------------------------------------------------------
Bug #52062 (large timestamps with DateTime::getTimestamp and DateTime::setTimestamp) (32 bit) [ext/date/tests/bug52062.phpt] (warn: XFAIL section but test passes)
=====================================================================

You may have found a problem in PHP.
This report can be automatically sent to the PHP QA team at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "s" to save it.    You can then email it to qa-reports@lists.php.net later.
Do you want to send this report now? [Yns]:



[root@life php-5.4.5]# make install
Installing PHP SAPI module:       apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apr/build-1/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apr/build-1/libtool --mode=install install libphp5.la /usr/local/apache2/modules/
libtool: install: install .libs/libphp5.so /usr/local/apache2/modules/libphp5.so
libtool: install: install .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /home/webadm/lnx/php-5.4.5/libs'
chmod 755 /usr/local/apache2/modules/libphp5.so
[activating module `php5' in /usr/local/apache2/conf/httpd.conf]
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
Installing PHP CGI binary:        /usr/local/bin/
Installing build environment:     /usr/local/lib/php/build/
Installing header files:          /usr/local/include/php/
Installing helper programs:       /usr/local/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/lib/php/
[PEAR] Archive_Tar    - installed: 1.3.7
[PEAR] Console_Getopt - installed: 1.3.0
[PEAR] Structures_Graph- installed: 1.0.4
[PEAR] XML_Util       - installed: 1.2.1
[PEAR] PEAR           - installed: 1.9.4
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
/home/webadm/lnx/php-5.4.5/build/shtool install -c ext/phar/phar.phar /usr/local/bin
ln -s -f /usr/local/bin/phar.phar /usr/local/bin/phar
Installing PDO headers:          /usr/local/include/php/ext/pdo/
[root@life php-5.4.5]#

[root@life php-5.4.5]# libtool --finish /home/webadm/lnx/php-5.4.5/libs
libtool: finish: PATH="/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/webadm/.local/bin:/home/webadm/bin:/sbin" ldconfig -n /home/webadm/lnx/php-5.4.5/libs
----------------------------------------------------------------------
Libraries have been installed in:
   /home/webadm/lnx/php-5.4.5/libs

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
[root@life php-5.4.5]#


(14)
[root@life conf]# pwd
/usr/local/apache2/conf
[root@life conf]# vi httpd.conf


[root@life conf]# cat httpd.conf|grep php
LoadModule php5_module        modules/libphp5.so
    DirectoryIndex index.php index.html
    AddType application/x-httpd-php .php .phtml .php3
[root@life conf]# cat httpd.conf|grep ServerName
# ServerName gives the name and port that the server uses to identify itself.
ServerName life.kmvs.km.edu.tw:80
[root@life conf]#
[root@life conf]# cat httpd.conf|grep www
User www
Group www
    # Redirect permanent /foo http://www.example.com/bar
#ErrorDocument 402 http://www.example.com/subscription_info.html
[root@life conf]#
[root@life conf]# /usr/local/apache2/bin/apachectl start
[root@life conf]# ps ax|grep httpd
27882 ?        Ss     0:00 /usr/local/apache2/bin/httpd -k start
27883 ?        Sl     0:00 /usr/local/apache2/bin/httpd -k start
27884 ?        Sl     0:00 /usr/local/apache2/bin/httpd -k start
27886 ?        Sl     0:00 /usr/local/apache2/bin/httpd -k start
27968 pts/0    S+     0:00 grep --color=auto httpd
[root@life conf]#



[root@life conf]# groupadd www
[root@life conf]# useradd www -g www
[root@life conf]#


select id,article_id,topic,text from lt_articles_text where article_id =239; ok. update lt_articles set num_reads=num_reads +1 where id=239; ok.