1 °²×°
apt-get install apache php4 php4-gd php4-mysql mysql-server mysql-client
2 ÅäÖÃApacheÒÔ±ãÌṩphpÖ§³Ö
Apache¸Õ×°ÉϵÄʱºò²»ÌṩphpÖ§³Ö¡£µ±Äãµã»÷ÓÐ.php½Å±¾µÄÁ¬½Ó£¬ä¯ÀÀÆ÷»áÏÂÔØÕâ¸ö½Å±¾:-(
ÐÞ¸Ä/etc/apache/httpd.conf£¬ÒÔ±ãÌṩphpÖ§³Ö¡£ÔËÐУº
# nano /etc/apache/httpd.conf
ÕÒµ½ÏÂÃæÕâÒ»ÐУº# LoadModule php4_module /usr/lib/apache/1.3/libphp4.so
°ÑÕâÒ»ÐÐÇ°ÃæµÄ¾®ºÅÈ¥µô£¬ÒÔ±ãapache¼ÒÔÚÕâ¸ölibphp4.soÄ£¿é¡£
±£´æºó£¬Í˳önano¡£
ÖØÐÂÆô¶¯Apache£¬ÔËÐУº
# apachecrl restart
×¢Ò⣺ÔÚ/var/wwwÏÂдһ¸ö²âÊÔÎļþ: phpinfo(); ?>
²âÊÔÒ»ÏÂÊÇ·ñ¿ÉÓÃÄØ?
3 ÐÞ¸ÄMySQLµÄ¿ÚÁî
ÓÉÓÚMySQLĬÈÏûÓпÚÁΪÁË°²È«Æð¼û£¬Ò»¶¨ÒªÐÞ¸ÄÄãµÄ¿ÚÁ
ÏÈÀ´¿´¿´ÄãµÄmysqlÊDz»ÊÇÕæµÄûÓпÚÁ
# mysqladmin version
Èç¹ûÄãÄܹ»¿´µ½mysqlµÄ°æ±¾ÐÅÏ¢£¬Ö¤Ã÷Ä¿Ç°MySQLûÓпÚÁî¡£
ºÃ£¬ÔËÐÐmysqladmin password xxxxxx Ð޸ĿÚÁî¡£
ÕâÀïxxxxxxÊÇÄãµÄпÚÁî¡£
ÏÖÔÚÄãÐèÒªÔËÐÐ mysqladmin version --user=root --pass,È»ºóÊäÈë¿ÚÁ²ÅÄܲ鿴°æ±¾ºÅµÈÐÅÏ¢¡£
ΪÁ˳¤¾ÃµÄÐÞ¸ÄÃÜÂ룬ÄãÐèÒªÐÞ¸Ä/etc/mysql/my.cnfÕâ¸öÅäÖÃÎļþ¡£
# nano /etc/mysql/my.cnf
ÕÒµ½ÕâÒ»ÐУº#password = my_password
È»ºó°ÑËüÇ°ÃæµÄ¾®ºÅÈ¥µô£¬°ÑºóÃæµÄmy_password¸Ã³ÉÄã×Ô¼ºµÄ¿ÚÁî¡£
4 ºÃÁË£¡ÅäÖÃÍêÁË£¡