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
Ïà¹ØÎĵµ£º
×î½üʹÓÃrootÓû§±àдÁ˼¸¸ö´æ´¢¹ý³Ì£¬µ«ÊÇʹÓÃÆÕͨÓû§Í¨¹ýJDBCÁ¬½ÓÖ´ÐÐÈ´±¨´í£º
java.lang.NullPointerException......
»ò
java.sql.SQLException: User does not have access to metadata required to determine stored procedure parameter types. If rights can not be granted, configure connection with " ......
ÔÎÄÄÚÈÝ
£º
ͻ񻣼
½ÏÔçµÄʱºò£¬ÓиöÅóÓѼ«Á¦ÍƼöÎÒÈ¥¿´¿´Ò»¿îPHPÎʾíµ÷²éϵͳ¡£ÎÒËäÈ»´ÓÊÂÈí¼þÁìÓòµÄʱ¼ä
²¢²»Ì«³¤£¬µ«Ò²ÖªµÀ¹úÄÚÔÚÕâ¸öÁìÓòÑо¿ºÍ´ÓʵÄÆóÒµºÍ¸öÈ˲¢²»ÉÙ£¬Ö®Ç°Ò²¹Ø×¢¹ýºÍÆÀ¹À¹ýһЩ²úÆ·»òϵͳ£¬×ÜÌåÉÏ¿´À´£¬´ó¶àÊý²úÆ·µÄÉÌÒµ»¯³Ì¶È²»¸ß£¬ÖÊÁ¿²Î
²î²»Æ룬Àë³ÉÊìµÄÈí¼þϵͳ»¹ÓÐÏ൱һ¸ö¾àÀë¡ ......
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 ÊÇÖ¸Ö´ ......
²é¿´·þÎñÆ÷Ŀǰ״̬ÐÅÏ¢µÄÃüÁÁ½ÖÖ·½Ê½£º
1. ÃüÁîÐУ¬½øÈëmysql/binĿ¼Ï£¬ÊäÈëmysqladmin extended-status
2. Á¬½Óµ½mysql£¬ÊäÈëshow status;
3. Èç¹ûÒª²é¿´Ä³¸öÊý¾Ý£¬¿ÉÒÔ
mysql> show s ......