¸Ã½Å±¾ÊÊÓÃÓÚÕûºÏÔ´Âë°ü·½Ê½µÄapache2.0.5x,php4.0.xºÍÒѱàÒëºÃµÄ£¨Binary°æ±¾£©µÄMySQL4.0.2x¡£
×¢Ò⣬ÒÔÉÏÈý¸ö°ü×îºÃ´Ó¸÷×ԵĹٷ½Õ¾µãÏÂÔØ£¬²¢ÇÒÏÂÔغó×îºÃ²»Òª¸Ä±äÎļþÃû£¡
ʹÓ÷½·¨£º
£½£½£½£½£½
1¡¢½«ÏÂÔغõÄ3¸ö°üºÍ±¾°²×°½Å±¾£¨install_lamp.sh£©·ÅÖÃÔÚ
/home/NanuÏ¡£·ÅÖõÄλÖÃËæÒ⣬µ«×¢Òâ±ØÐë°Ñ3¸ö°üºÍ±¾°²×°½Å±¾·ÅÔÚͬһĿ¼£¡
2¡¢ApacheºÍPHPµÄ./configure²¿·Ö¸ù¾ÝÐèÒª»»³ÉÄãµÄ±àÒë²ÎÊý£»
3¡¢Ö´ÐÐinstall_lamp.sh£»
4¡¢°²×°Íê³Éºó£¬MySQLµÄrootÃÜÂëĬÈϱ£´æÔÚ/usr/local/mysql/passwd.rootÖУ¬ÒÔ±¸Íü¼Ç¡£
½Å±¾´úÂ룺
£½£½£½£½£½
ÒýÓÃ:#!/bin/bash
# Mysql4.0.x Start
/bin/tar xzvf mysql*4.0.*.tar.gz
/bin/rm -f mysql*4.0.*.tar.gz
/usr/sbin/useradd mysql
/bin/mv mysql*4.0* /usr/local/mysql
/usr/local/mysql/scripts/mysql_install_db --user=mysql
/bin/chown -R root /usr/local/mysql/.
/bin/chown -R mysql /usr/local/mysql/data
/bin/chgrp -R mysql /usr/local/mysql/.
/bin/cp /usr/local/mysql/support-files/my-large.cnf /etc/my.cnf
/usr/local/mysql/bin/mysqld_safe --user=mysql &
echo "Please Set Your MySQL root Password:"
read password
/usr/local/mysql/bin/mysqladmin -u root password $password
/bin/touch /usr/local/mysql/passwd.root
echo $password >; /usr/local/mysql/passwd.root
/usr/local/mysql/bin/mysqladmin -u root --password=$password shutdown
/bin/cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
/sbin/chkconfig --add mysqld
/etc/rc.d/init.d/mysqld start
# MySQL4.0.x End
# Apache2.0.x Start
/bin/tar xzvf httpd-2.0.*.tar.gz
cd httpd-2.0.*
./configure --prefix=/usr/local/apache --mandir=/usr/share/man --enable-mods-shared=all --enable-so
make
make install
echo "AddType application/x-httpd-php .php" >;>; /usr/local/apache/conf/httpd.conf
sed -i 's/"DirectoryIndex index.html index.html.var"/"DirectoryIndex index.htm index.html index.php index.html.var"/g' /usr/local/apache/conf/httpd.conf
/usr/local/apache/bin/apachectl -k start
# Apache2.0.x End
# PHP4.0.x Start
/bin/tar xzvf php-*.tar.gz
cd php-*
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --mandir=/usr/share/man --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php/etc
make
make install
/bin/cp php.ini-recommended /etc/php.ini
sed -i 's/"register_globals = Off"/"register_globals = On"/g' /etc/php.ini
/usr/local/apache/bin/apachectl -k restart
# PHP4.0.x End
¶¡¶¡ ÓÚ 2006-08-21 20:22:31·¢±í:
up