Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

fedora12Ï°²×°apache+php+mysql(LAMP)+phpmyadmin

1 °²×°MySQL5
ÓÃÏÂÁÐÃüÁî°²×°MySQL£º
yum install mysql mysql-server
È»ºóÎÒÃÇΪMySQL´´½¨ÏµÍ³Æô¶¯Á´½Ó£¨ÕâÑùµÄ»°£¬MySQL¾Í»áËæ×ÅϵͳÆô¶¯¶øÆô¶¯£©£¬²¢Æô¶¯MySQL·þÎñÆ÷£º
chkconfig –levels 235 mysqld on
/etc/init.d/mysqld start
ÔËÐÐ
mysqladmin -u root password yourrootsqlpassword
À´ÎªrootÓû§ÉèÖÃÒ»¸öÃÜÂ루·ñÔòÈκÎÈ˶¼¿ÉÒÔ·ÃÎÊÄãµÄMySQLÊý¾Ý¿â£¡£©
2 °²×°Apache2
Fedora12ĬÈÏÓÐApache2Õâ¸ö°ü£¬ÎÒÃÇ¿ÉÒÔÓÃÏÂÁÐÃüÁî°²×°Ëü£º
yum install httpd
ÏÖÔÚÅäÖÃÏÂϵͳʹµÃApacheÄܹ»Ëæ×ÅϵͳÆô¶¯¶øÆô¶¯…
chkconfig –levels 235 httpd on
… Æô¶¯Apache:
/etc/init.d/httpd start
ÏÖÔÚ´ò¿ªä¯ÀÀÆ÷£¬·ÃÎÊhttp://192.168.0.100
»òÕßlocalhost£¬Äã¾ÍÓ¦¸ÃÄÜ¿´µ½Apache2µÄÔ¤ÁôÒ³ÁË£º
 
ÔÚFedoraÖÐApacheµÄĬÈÏÎĵµÂ·¾¶ÔÚ/var/www/html£¬ÅäÖÃÎļþÊÇ/etc/httpd/conf/httpd.conf¡£ÆäÓàµÄÅäÖÃÎļþ´æ´¢ÔÚ/etc/httpd/conf.d/¡£
 
3
°²×°PHP5
ÎÒÃÇÓÃÏÂÁÐÃüÁî°²×°PHP5ºÍApache PHP5Ä£¿é£º
yum install php
È»ºóÎÒÃÇÆô¶¯ÏÂApache£º
/etc/init.d/httpd restart
 
4
²âÊÔPHP5/»ñÈ¡PHP5°²×°ºóµÄÏêϸÐÅÏ¢
ÍøÕ¾µÄĬÈÏÎĵµÂ·¾¶ÊÇ/var/www/html¡£ÎÒÃÇÏÖÔÚÔÚÕâ¸öÎļþ¼ÐÖд´½¨Ò»¸öСÐÍPHP(info.php)Îļþ£¬²¢ÔÚ£»ä¯ÀÀÆ÷ÖзÃÎÊËü¡£Õâ¸öÎļþ»áÏÔʾ¹ØÓÚPHP°²×°µÄ´óÁ¿µÄϸ½Ú£¬ÀýÈçPHPµÄ°æ±¾¡£
vi /var/www/html/info.php
<?php
phpinfo();
?>
ÏÖÔÚÎÒÃÇÔÚä¯ÀÀÆ÷ÖзÃÎÊÕâ¸öÎļþ(ÀýÈçhttp://192.168.0.100/info.php
»òÕßlocalhost/info.php)£º
 
ÕýÈçÄãËù¿´µ½µÄÒ»Ñù£¬PHP5ÒѾ­Õý³£¹¤×÷ÁË£¬²¢ÇÒÔÚServer APIÕâÒ»ÐÐÖÐÏÔʾµÄApacheÊÇÒÔApache2.0
Handlerģʽ¹¤×÷µÄ¡£Èç¹ûÄãÏòÏ·­Ò³£¬Ä㽫»á¿´µ½ÒѾ­°²×°ÁËPHP5µÄËùÓеÄÄ£¿é¡£MySQLûÓÐÔÚÕâÀïÁгöÀ´£¬Ò²¾ÍÒâζ×ÅÄ¿Ç°PHP5²¢²»Ö§³Ö
MySQL¡£
5 ÈÃPHP5Ö§³ÖMySQL
ÎÒÃÇ°²×°php-mysqlÕâ¸ö°ü¼È¿ÉÒÔʹMySQLÖ§³ÖphpÁË¡£ÔÚÕâÀï×îºÃÒ²°²×°ÆäËûµÄPHP5Ä£¿é£¬ÕâЩģ¿éÒ²ÐíÄã»áÔÚÆäËûµÄÓ¦ÓÃÖÐÓõ½¡£Äã¿ÉÒÔʹÓÃÏÂÁÐÃ÷ÐÇÏÈËÑË÷Ò»ÏÂPHP5µÄÄ£¿é£º
yum search php
Ñ¡È¡ÄãÐèÒªµÄÄ£¿é£¬²¢Ê¹ÓÃÏÂÁÐÃüÁî°²×°ËüÃÇ£º
yum install php-mysql php-gd php-imap php-ldap php-odbc
php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand
php-magpierss php-mapserver php-mbstring php-mcrypt php-mhash php-mssql
php-shout php-snmp php-soap php-tidy


Ïà¹ØÎĵµ£º

PHP³ÌÐòÔ±×îÒ×·¸10ÖÖ´íÎó

PHPÊǸöΰ´óµÄweb¿ª·¢ÓïÑÔ£¬Áé»îµÄÓïÑÔ£¬µ«ÊÇ¿´µ½php³ÌÐòÔ±Öܶø¸´Ê¼µÄ·¸µÄһЩ´íÎó¡£ÎÒ×öÁËÏÂÃæÕâ¸öÁÐ±í£¬ÁгöÁËPHP³ÌÐòÔ±¾­³£·¸µÄ10ÖдíÎ󣬴ó¶àÊýºÍ°²È«Ïà¹Ø¡£¿´¿´Äã·¸Á˼¸ÖÖ
1.²»×ªÒâhtml entities
   Ò»¸ö»ù±¾µÄ³£Ê¶£ºËùÓв»¿ÉÐÅÈεÄÊäÈ루ÌرðÊÇÓû§´ÓformÖÐÌá½»µÄÊý¾Ý£© £¬Êä³ö֮ǰ¶¼Òª×ªÒâ¡£
echo $_GE ......

PHP 5.3.1·¢²¼


PHP 5.3.1·¢²¼ÁË£¡´Ë´Î²¢Ã»ÓÐÔö¼Ó¶àÉÙÐÂÌØÐÔ£¬Ö÷ÒªÊǹ¦ÄܵĸĽøºÍbugµÄÐÞ¸´£º
ÐÂÔöÁËÒ»¸ömax_file_uploads²ÎÊý£¬ÓÃÓÚÏÔʾÿ¸öÇëÇóÉÏ´«ÎļþµÄ¸öÊý
ÐÂÔöÁËÔÙ´¦Àí¹ý³ÌÖеÄÍêÕûÐÔ¼ì²â
ÐÞ¸´ÁË´«µÝtempnam()º¯Êýʱsafe_modeÖеÄÎÊÌâ
ÐÞ¸´ÁË´«µÝposix_mkfifo()ʱopen_basedirÖеÄÎÊÌâ
ÐÞ¸´ÁËsafe_mode_include_dirÖеÄÎ ......

PHP 5.2.11°²×°

#ÕÒµ½:
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gz ......

ÓÃmysqldumpslow·ÖÎömysqlµÄslow query log

mysqlÓÐÒ»¸ö¹¦ÄܾÍÊÇ¿ÉÒÔlogÏÂÀ´ÔËÐеıȽÏÂýµÄsqlÓï¾ä£¬Ä¬ÈÏÊÇûÓÐÕâ¸ölogµÄ£¬ÎªÁË¿ªÆôÕâ¸ö¹¦ÄÜ£¬
ÒªÐÞ¸Ämy.cnf»òÕßÔÚmysqlÆô¶¯µÄʱºò¼ÓÈëһЩ²ÎÊý¡£Èç¹ûÔÚmy.cnfÀïÃæÐ޸ģ¬ÐèÔö¼ÓÈçϼ¸ÐÐ
long_query_time = 1
log-slow-queries = /var/youpath/slow.log
log-queries-not-using-indexes
long_query_time ÊÇÖ¸Ö´ ......

¸ù¾ÝstatusÐÅÏ¢¶ÔMySQL·þÎñÆ÷½øÐÐÓÅ»¯

¡¡ÍøÉÏÓкܶàµÄÎÄÕ½ÌÔõôÅäÖÃMySQL·þÎñÆ÷£¬µ«¿¼Âǵ½·þÎñÆ÷Ó²¼þÅäÖõIJ»Í¬£¬¾ßÌåÓ¦ÓõIJî±ð£¬ÄÇЩÎÄÕµÄ×ö·¨Ö»ÄÜ×÷Ϊ³õ²½ÉèÖòο¼£¬ÎÒÃÇÐèÒª¸ù¾Ý×Ô¼ºµÄÇé¿ö½øÐÐÅäÖÃÓÅ»¯£¬ºÃµÄ×ö·¨ÊÇMySQL·þÎñÆ÷Îȶ¨ÔËÐÐÁËÒ»¶Îʱ¼äºóÔËÐУ¬¸ù¾Ý·þÎñÆ÷µÄ”״̬”½øÐÐÓÅ»¯¡£
mysql> show global status;
¡¡¡¡¿ÉÒÔÁгöMySQL·þÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ