apacheµÄ¾²Ì¬/¶¯Ì¬±àÒëÔÚapache+php+mysqlµÄÓ¦ÓÃ
apacheµÄ¾²Ì¬/¶¯Ì¬±àÒëÔÚapache+php+mysqlµÄÓ¦ÓÃ
ÎÒÏë´ó¼ÒÓв»ÉÙ¶¼³É¹¦ÊµÏÖapache+php+mysql£¬ÍøÉϵÄÎÄÕÂÒ²Óв»ÉÙ£¬µ«ÎÒ·¢ÏÖ²»ÉÙÎÄÕ¶¼ÊdzÀ´³È¥£¬²¢ÇÒ
ûÓÐ˵Ã÷°×±àÒëµÄ·½Ê½£¬ÓеÄË÷ÐÔapache1.3µÄ±àÒë·½·¨Ô·â²»¶¯µÄ°á¹ýÀ´Ì×ÔÚapache2.0£¬ÏÔÈ»Îóµ¼Ò»Ð©²ËÄñ £¡
ÎÒ½ñÌì¾ÍÒÔapache+mysql+php˵һϾ²Ì¬±àÒëºÍDSO¶¯Ì¬±àÒëµÄÇø±ð£¬ÎÒ»á·Ö±ðÄÃapache1.3.27ºÍapache2.0.46
˵Ã÷£¬ÒòΪÁ½¸ö°æ±¾µÄ±àÒëÃüÁîÊÇÓÐËùÇø±ðµÄ¡£
ϵͳºÍËùÐèÈí¼þ£º
Redhat9.0
apache:1.3.27 ºÍ 2.0.46
php: 4.3.2
mysql£º4.0.13
1¡£Ê×ÏÈÀ´°²×°mysql£¬Õâ²»ÊÇÎÒÃǵÄÖص㣬ËùÒÔ¹ØÓÚmysqlµÄ°²×°ÅäÖÃÎҾͺܿì¹ýÈ¥ÁË
tar zvxf mysql-4.0.13.tar.gz
cd mysql-4.0.13
./configure --prefix=/usr/local/mysql --sysconfdir=/etc --localstatedir=/var/lib/mysql &&
make &&
make install
°²×°Íê³É£¡
È»ºó³õʼ»¯Êý¾Ý¿â
/usr/local/mysql/bin/mysql_install_db
ÉèÖÃȨÏÞ£º
chown -R root /usr/local/mysql
¸´ÖÆÅäÖÃÎļþ;
cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
Æô¶¯mysql£º
/use/local/mysql/bin/mysqld_safe --user=root &
ÐÞ¸ÄÃÜÂ룺³õʼµÄrootÃÜÂëÊÇ¿ÕµÄ
/usr/local/mysql/bin/mysqladmin -u root -p password 1234
enter password:
°ÑÃÜÂëÐÞ¸ÄΪ1234£¬ÓÉÓÚ³õʼÃÜÂëΪ¿Õ£¬ËùÒÔenter passwordÖ±½Ó»Ø³µ¾ÍÐÐ
²âÊÔÒ»ÏÂеÄÃÜÂ룺
mysql -u root -p mysql
enter password:1234
Èç¹û˳ÀûµÄ»°¾ÍÄܽøÈëmysql¡£
ºÃÁËmysql¾Í½²Õâô¶à£¬ÓÐʲôÎÊÌâÒ²²»ÒªÎÊÎÒ£¬ÎÒ¶Ômysql²»ÊǺÜÊìϤ¡£
ºÃÁËÏÂÃæÊÇÎÒÃǵÄÖØÍ·Ï·£¬ÎÒ½«·Ö±ðͨ¹ý¾²Ì¬ºÍ¶¯Ì¬DSO±àÒëapache+php
ÖÁÓÚʲôÊǾ²Ì¬£¬Ê²Ã´ÊÇDSO¶¯Ì¬ÎÒÕâÀï¾Í²»¶à½²ÁË£¬±¾È˸öÈËÇãÏò´ó¼ÒÓÃDSO¶¯Ì¬±àÒë¡£
Ê×ÏÈÊÇapache1.3.29+php4.3.4+mysql4.0.13µÄ¾²Ì¬±àÒë
apacheµÚÒ»´Î±àÒë,²¢²»Òª°²×°£¬ÒòΪphpµÄ±àÒëÐèÒªapacheÖÁÉÙÒѾ±àÒë¹ýÒ»´Î
tar zvxf apache_1.3.27.tar.gz
cd apache_1.3.27
./configure --prefix=/usr/local/apache
±àÒëphp
tar zvxf php4.3.4.tar.gz
cd php4.3.4
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql \
--with-apache=../apache_1.3.27 &&
make &&
make install
µÚ¶þ´Î±àÒë°²×°apache:
cd ../apache_1.3.29
./configure --prefi=/usr/local/apache \
--activ
Ïà¹ØÎĵµ£º
Òª°²×° MySQL£¬¿ÉÒÔÔÚÖÕ¶ËÌáʾ·ûºóÔËÐÐÏÂÁÐÃüÁ
sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install php5-mysql
// °²×°php5-mysql Êǽ«phpºÍmysqlÁ¬½ÓÆðÀ´
Ò»µ©°²×°Íê³É£¬MySQL ·þÎñÆ÷Ó¦¸Ã×Ô¶¯Æô¶¯¡£Äú¿ÉÒÔÔÚÖÕ¶ËÌáʾ·ûºóÔËÐÐÒÔÏÂÃüÁîÀ´¼ì²é MySQL ·þÎñÆ÷ÊÇ·ñÕýÔÚÔËÐУº
......
¶ÔÓÚÈκÎÒ»¸öÊý¾Ý¿â¹ÜÀíϵͳÀ´Ëµ£¬ÄÚ´æµÄ·ÖÅäʹÓþø¶Ô¿ÉÒÔËãµÄÉÏÊÇÆäºËÐÄÖ®Ò»ÁË£¬ËùÒԺܶàÏ£Íû¸üΪÉîÈëÁ˽âijÊý¾Ý¿â¹ÜÀíϵͳµÄÈË£¬¶¼»áÏ£ÍûÒ»¿ú¾¿¾¹£¬ÎÒÒ²²»ÀýÍâ¡£
´ÓÄÚ´æµÄʹÓ÷½Ê½MySQL Êý¾Ý¿âµÄÄÚ´æʹÓÃÖ÷Òª·ÖΪÒÔÏÂÁ½Àà
Ï̶߳ÀÏíÄÚ´æ&nb ......
1 Apache
ÐÞ¸Ä documentroot ¸ùĿ¼
directory ·ÃÎʸùĿ¼ȨÏÞ
directoryindex ĬÈÏÊ×Ò³ ......
ÔÚÊý¾Ý¿â
ÖУ¬UNION
ºÍUNION
ALL
¹Ø¼ü×Ö¶¼Êǽ«Á½¸ö½á¹û¼¯ºÏ²¢ÎªÒ»¸ö£¬µ«ÕâÁ½Õß´ÓʹÓúÍЧ
ÂÊÉÏÀ´Ëµ¶¼ÓÐËù²»Í¬¡£
MySQL
ÖÐ
µÄUNION
UNIONÔÚ½øÐбíÁ´½Óºó»áɸѡµôÖظ´µÄ¼Ç¼£¬ËùÒÔÔÚ±íÁ´½Óºó»á¶ÔËù²úÉúµÄ½á¹û¼¯½øÐÐÅÅÐòÔËË㣬ɾ³ýÖظ´µÄ¼Ç¼ÔÙ
·µ»Ø½á¹û¡£Êµ¼Ê´ó²¿·ÖÓ¦ÓÃÖÐÊDz»»á²úÉúÖظ´µÄ¼Ç¼£¬×î³£¼ûµÄÊǹý³Ì± ......