linux apache 安装步骤



# wget http://jp2.php.net/get/php-4.3.10.tar.gz/from/this/mirror
# wget http://sunsite.tus.ac.jp/pub/apache/httpd/apache_1.3.33.tar.gz
# tar -zxvf php-4.3.10.tar.gz
# tar -zxvf apache_1.3.33.tar.gz
# ls -l

Total 8340
   drwxr-xr-x 8 mysql games 4096 10 28 01:47 apache_1.3.33
   drwxr-xr-x 14 1003 1003 4096 12 15 02:55 php-4.3.10# cd apache_1.3.33
# ./configure --prefix=/usr/local/apache --enable-module=so \
--enable-module=rewrite --enable-module=speling

Configuring for Apache, Version 1.3.33
  + using installation path layout: Apache (config.layout)
  Creating Makefile
  Creating Configuration.apaci in src
  Creating Makefile in src
  + configured for Linux platform
  + setting C compiler to gcc
  + setting C pre-processor to gcc -E
  + using "tr [a-z] [A-Z]" to uppercase
  + checking for system header files
  + adding selected modules
  o rewrite_module uses ConfigStart/End
  + using -ldb1 for DBM support
  enabling DBM support for mod_rewrite
  + using system Expat
  + using -ldl for vendor DSO support
  + checking sizeof various data types
  + doing sanity check on compiler and options
  Creating Makefile in src/support
  Creating Makefile in src/regex
  Creating Makefile in src/os/unix
  Creating Makefile in src/ap
  Creating Makefile in src/main
  Creating Makefile in src/modules/standard# make
# make install

   +--------------------------------------------------------+
   | You now have successfully built and installed the      |
   | Apache 1.3 HTTP server. To verify that Apache actually |
   | works correctly you now should first check the         |
   | (initially created or preserved) configuration files   |
   |                                                        |
   | /usr/local/apache/conf/httpd.conf                      |
   | and then you should be able to immediately fire up     |
   | Apache the first time by running:                      |
   |                                                        |
   | /usr/local/apache/bin/apachectl start                  |
   |                                                        |
   | Thanks for using Apache. The Apache Group              |
   | http://www.apache.org/                                 |
   +--------------------------------------------------------+# cd ../php-4.3.10
#./configure --with-mysql=/usr/local/mysql \
--with-apxs=/usr/local/apache/bin/apxs\
--with-zlib-dir --enable-mbstring=all
# make
# make install

   Installing PHP SAPI module: apache
   [activating module `php4' in /usr/local/apache/conf/httpd.conf]
   cp libs/libphp4.so /usr/local/apache/libexec/libphp4.so
   chmod 755 /usr/local/apache/libexec/libphp4.so
   cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak
   cp /usr/local/apache/conf/httpd.conf.new /usr/local/apache/conf/httpd.conf
   rm /usr/local/apache/conf/httpd.conf.new
   Installing PHP CLI binary: /usr/local/bin/
   Installing PHP CLI man page: /usr/local/man/man1/
   Installing PEAR environment: /usr/local/lib/php/
   [PEAR] Archive_Tar - installed: 1.1
   [PEAR] Console_Getopt - installed: 1.2
   [PEAR] PEAR - installed: 1.3.2
   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
   [PEAR] DB - installed: 1.6.2
   [PEAR] HTTP - installed: 1.2.2
   [PEAR] Mail - installed: 1.1.3
   [PEAR] Net_SMTP - installed: 1.2.6
   [PEAR] Net_Socket - installed: 1.0.1
   [PEAR] XML_Parser - installed: 1.0.1
   [PEAR] XML_RPC - installed: 1.1.0
   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
   program: phpextdist# cp php.ini-dist /usr/local/lib/php.ini
# echo "/usr/local/apache/bin/apachectl start" >> /etc/rc.d/rc.local
# echo "/usr/local/mysql/support-files/mysql.server start" >> /etc/rc.d/rc.local

// MyChanges in php.ini
short_open_tag = Off
output_buffering = On
zlib.output_compression = On
safe_mode = On
---------------------------------------------
安装过程出现gcc这类的错误。解决办法是在安装的第二张盘的rpm找相应的包安装。

你可能感兴趣的:(apache,PHP,linux,mysql,gcc)