分类: LINUX
2009-03-23 11:09:12
tar xvfz httpd-2.2.2.tar.gz
cd httpd-2.2.2
tar xvfz apr-1.2.7.tar.gz
cd apr-1.2.7
./configure --prefix=/usr/local/apr-httpd
make
make install
cd ..
tar xvfz apr-util-1.2.7.tar.gz
cd apr-util-1.2.7
./configure --prefix=/usr/local/apr-util-httpd --with-apr=/usr/local/apr-httpd
make
make install
cd ../httpd-2.2.2
./configure --prefix=/usr/local/apache --enable-mods-shared=all --enable-module=most --with-apr=/usr/local/apr-httpd --with-apr-util=/usr/local/apr-util-httpd --enable-so
make
make install
cd ..
./jdk-1_5_0_07-linux-i586.bin
ln –s jdk1.5.0_07 jdk
vi /etc/profile
JAVA_HOME=/usr/local/jdk
JRE=$JAVA_HOME/jre
LC_ALL=zh_CN.GBK
PATH=$JAVA_HOME/bin:$JRE/bin:$PATH
CLASSPATH=.:$JAVA_HOME/bin/tools.jar:$JAVA_HOME/lib/dt.jar
export JAVA_HOME JRE LC_ALL CLASSPATH PATH
tar xvfz mysql-5.0.22.tar.gz
cd mysql-5.0.22
./configure --prefix=/usr/local/mysql/ --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler
make
make install
groupadd mysql
useradd -g mysql mysql
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql var
chgrp -R mysql .
bin/mysqld_safe --user=mysql &
mysqladmin –uroot password new-password
tar xvfz php-5.1.4.tar.gz
cd php-5.1.4
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs
make && make install
cp php.ini-dist /usr/local/lib/php.ini
tar xvfz apache-tomcat-5.5.15.tar.gz
mv apache-tomcat-5.5.15 tomcat
tar zxvf tomcat-connectors-1.2.18-src.tar.gz
cd tomcat-connectors-1.2.18-src/ native/
./configure --with-apxs=/usr/local/apache/bin/apxs
make && make install
cd /usr/local/conf/
vi httpd.conf
#ServerAdmin
#ServerName
#DocumentRoot "/usr/local/apache/htdocs"
Options FollowSymLinks
# AllowOverride None
AllowOverride all
Order deny,allow
# Deny from all
Allow from all
#
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
#
# for more information.
#
# Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
#Include conf/extra/httpd-vhosts.conf
这行#除掉 AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
#add mod_jk module
LoadModule jk_module modules/mod_jk.so
# Update this path to match your modules location
# Where to find workers.properties
# Update this path to match your conf directory location (put workers.properties next to #httpd.conf)
JkWorkersFile /usr/local/apache/conf/workers.properties
# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log next to access_log)
JkLogFile /usr/local/apache/logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
# Send everything for context /examples to worker named worker1 (ajp13)
JkMount /*.jsp worker1
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.reclycle_timeout=300
vi httpd-vhosts.conf
DirectoryIndex index.htm index.html index.jsp index.php
ServerAdmin
DocumentRoot /usr/local/tomcat/webapps/ROOT
ServerName 192.168.0.170
ErrorLog logs/170-error_log
CustomLog logs/170-access_log common
echo phpinfo() ?>