Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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


Ïà¹ØÎĵµ£º

JDBCÁ¬½ÓÖ´ÐÐMySQL´æ´¢¹ý³Ì±¨¿ÕÖ¸Õë»òȨÏÞ´íÎó

 ×î½üʹÓÃ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 " ......

64λ¶¯Ì¬phpÀ©Õ¹¿âµÄ±àÒë

64λ¶¯Ì¬phpÀ©Õ¹¿âµÄ±àÒë
 ¹¤×÷ÉÏÐèÒª£¬Õâ¸öÎÊÌâÕÛÌÚÁËÒ»Õó×Ó¡£²»¹ýµ±±àÒë³É¹¦Ö®ºó£¬ÐÄÀﻹÊÇÏ൱µÄÐË·Ü£¬¸ÐÊܵ½ÁËÒ»Öֳɾ͸С£Ò²Êǹ¤×÷ÖеÄÒ»ÖÖÀÖȤ¡£
ÏÖÔÚ½«Õû¸ö¹ý³ÌдÏÂÀ´£¬ÒÔ±¸ºóÐøÖ®Ðè¡£
a.shared object
(1) download and install the apache
´ÓÍøÂçÖÐÏÂÔØapache-2.0.48.tar.gz
´æÖÁ/home/tmp
cd /home/ ......

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

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

MYSQLµÄһЩС¼Ç

ÏÂÎç¿´ÁËÒ»¶ÎPHP100µÄÊÓƵ¡£
Ò²ËãÓеãÊÕ»ñ¡£
ÀïÃæµÄÒ»¶Î×ÔдµÄfindallµÄSQLº¯Êý£º
public function findall($table) {
$this->query("SELECT * from $table");
}

Ô­À´Ö»ÊÇÕâô¼òµ¥£¬¸Õ»¹ÔÚ˼¿¼¡£
ʹÓÃÁËTAB¼üÉÏÃæµÄ¶ÙºÅÀ´ÐÞÊÎMYSQLÀïµÄ×Ö¶ÎÃû£¬È磺
UPDATE tablename SET `fieldname`='values' wh ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ