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

Fedora 8ÏÂÓÃYum°²×°Apache+PHP+MySQL»·¾³


fedora8 ÓÃyumÀ´¹ÜÀí°²×°Apache+PHP+MysqlµÄ»ù±¾°²×°¡£
1. °²×°Apahce, PHP, Mysql, ÒÔ¼°phpÁ¬½Ómysql¿â×é¼þ¡£
yum -y install httpd php mysql mysql-server php-mysql
2. ÅäÖÿª»úÆô¶¯·þÎñ
/sbin/chkconfig httpd on             [ÉèÖÃapache·þÎñÆ÷httpd·þÎñ¿ª»úÆô¶¯]
/sbin/chkconfig --add mysqld         [ÔÚ·þÎñÇåµ¥ÖÐÌí¼Ómysql·þÎñ]
/sbin/chkconfig mysqld on             [ÉèÖÃmysql·þÎñ¿ª»úÆô¶¯]
/sbin/service httpd start            [Æô¶¯httpd·þÎñ,Ó뿪»úÆô¶¯ÎÞ¹Ø]
/sbin/service mysqld start           [Æô¶¯mysql·þÎñ,Ó뿪»úÎÞ¹Ø]
3.ÉèÖÃmysqlÊý¾Ý¿ârootÕʺÅÃÜÂë¡£
mysqladmin -u root password 'newpassword'           [ÒýºÅÄÚÌîÃÜÂë]
4. ÈÃmysqlÊý¾Ý¿â¸ü°²È«
mysql -u root -p
mysql> DROP DATABASE test;                            [ɾ³ýtestÊý¾Ý¿â]
mysql> DELETE from mysql.user WHERE user = '';        [ɾ³ýÄäÃûÕÊ»§]
mysql> FLUSH PRIVILEGES;                              [ÖØÔØȨÏÞ]
5. °´ÕÕÒÔÉϵݲװ·½Ê½, ÅäÖóöÀ´µÄĬÈÏÕ¾µãĿ¼Ϊ/var/www/html/
н¨Ò»¸öphp½Å±¾:
6. н¨Ò»¸öÊý¾Ý¿â£¬Ìí¼ÓÒ»¸öÊý¾Ý¿âÓû§£¬ÉèÖÃÓû§È¨ÏÞ¡£Ð´¸öphp½Å±¾²âÊÔÒ»ÏÂÊý¾Ý¿âÁ¬½Ó°É¡£
mysql> CREATE DATABASE my_db;
mysql> GRANT ALL PRIVILEGES ON my_db.* TO 'user'@'localhost' IDENTIFIED BY 'password';



//°²×°apacheÀ©Õ¹
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
//°²×°phpµÄÀ©Õ¹
yum install php-gd
yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
//°²×°mysqlÀ©Õ¹
yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
[root@soft bin]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through s


Ïà¹ØÎĵµ£º

windowsÏÂPHP5+APACHE+MYSQLÍêÕûÅäÖÃ

Èí¼þ°æ±¾:
php-5.2.13-Win32
apache_2.2.9-win32-x86-no_ssl-r2.msi(×¢Ò⣺APACHE 2.2.X°æ±¾ÒÔÉÏÒªÔö¼Ó²å¼þ²ÅÖ§³ÖPHP 5µÄ)
mysql-5.1.44-win32.msi
ÏÈ×°µÄphp5,Ö±½Ó½âѹÎļþµ½C:\php(°²×°µ½ÄÄÀï²¢²»»áÓÐÓ°Ï죬ƾ¸öÈËϲºÅ£¬±¾ÎÄÖеÄËùÓз¾¶¶¼ÒÔÎҵݲװ·¾¶£¬Çë´ó¼ÒÔÚ×Ô¼ºµÄ»úÆ÷ÉÏ°²×°µÄʱºò×¢ÒâÐÞ¸ÄΪ×Ô¼ºµÄ·¾¶)
½Ó× ......

¾­µäMYSQLÓï¾ä

SQL·ÖÀࣺ
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(Create£¬Alter£¬Drop£¬DECLARE)
DML—Êý¾Ý²Ù×ÝÓïÑÔ(Select£¬Delete£¬Update£¬Insert)
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK)
Ê×ÏÈ,¼òÒª½éÉÜ»ù´¡Óï¾ä£º
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
Create DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾Ý¿â
drop database dbname
3¡ ......

linuxÏÂ php5.3.2 µ÷ÓÃ so

php ͨÓõĵ÷Óà soµÄ·½·¨ÊÇʹÓÃdl()º¯Êý£¬µ«ÊÇÔÚphp5.3Ö®ºó²»ÔÙÖ§³ÖÕâÖÖ·½·¨£¬½öÖ§³Ö¾²Ì¬µ÷Óã¬Ê¹ÓÃdl() ¶¯Ì¬µ÷Óõķ½·¨¼û£º
   ÒýÓÃÒ³1:   http://tech.idv2.com/2007/07/06/use-local-so-in-php/
¸Ðлԭ×÷ÕßÌṩµÄÇåÎúÃ÷Á˵ķ½·¨£¬µ«ÊÇÎÒÔÚ5.3.1°æ±¾iÖÐûÓÐͨ¹ý£¬ÓÚÊÇÎÒÕÒµ½ÁËÒ³Ã棺
    ......

ʵÏÖÖ§³ÖpostºÍgetµÄPHPº¯Êý

function getsock($strUrl,$arrParameter=array(),$strMethod="POST"){
 if(!$strUrl||!$strMethod){ return "";}
 $strMethod = strtoupper($strMethod);
 $arrUrl = parse_url($strUrl);
 if($arrUrl["port"]==0){$arrUrl["port"]=80;}
 $fso = fsockopen($arrUrl["host"],$arrUrl["port"] ......

CentOS+Apache+Mysql+Php°²×°¼°ÓÅ»¯ÅäÖÃС¼Ç


±¾ÎÄÈí¼þµÄÏÂÔصØÖ·¾Í²»Áгö£¬Ö÷ÒªÊǼǼ°²×°Ê±µÄ²½Öè¼°Ïà¹ØÎÊÌâµÄ´¦Àí·½·¨£»»ùÓÚ°²×°·½·¨Ä¿Ç°ÓÐÁ½ÖÖ£¬Ò»ÖÖÊÇÀûÓÃRPM°ü°²×°£¬Ò»ÖÖÔ´Âë±àÒë°²×°£»ÒÔÏÂÖ÷
ÒªÊÇÒÔÔ´Âë±àÒë°²×°£»ÒòΪԴÂë°²×°Èí¼þµÄÏ໥ÒÀÀµÐÔС£¬°²×°·½Ê½Óø÷ÖÖunix/linuxϵͳ£¬Î¬»¤·½±ã¡£Èç¹ûÏëÈ¥³ýÏà¹Ø·þÎñʱ£¬Ö±½Órm
–rfĿ¼ ¼´¿É£»½¨Òé²ÉÓÃÔ´Âë· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ