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

ÕûºÏfreeBSDÏÂnginx+php+mysql°²×°·½°¸£¨ports°²×°£©

  ×î½üÒ»Ö±ÔÚÑо¿freeBSDÏÂnginx+php+mysqlµÄ°²×°£¬¿´Á˺ܶàÍøÉϵÄ×ÊÁÏÊÕ»ñ²»Ð¡£¬²»¹ý´ó²¿·Ö¶¼ÊDZàÒë°²×°£¬Ïà¶Ô³õѧÕßÀ´Ëµ±È½Ï¸´ÔÓ£¬²»ÈÝÒ×Àí½â£¬ËùÒÔÎÒÕûºÏÁËһЩports°²×°µÄ×ÊÁÏ£¬¶¼ÊǾ­¹ý×Ô¼ºÑéÖ¤ºóµÄ£¬°²×°³É¹¦Ò²±È½ÏÈÝÒ×Àí½â£¬ÏÂÃæÊÇÁ½Öֳɹ¦µÄ°¸Àý£¬ÆäÖÐÓÐÒ»¸öÊÇApache´úÌænginxµÄ°²×°£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
°²×°Ç°¸üкÃports£º
       ½øÈëϵͳºó£¬×¼±¸cvs¸üУº
1.         cd /usr/ports/net/cvsup-without-gui
2.         cp /usr/share/examples/cvsup/ports-supfile /etc/ports-supfile
3.         # vi /etc/ports-supfile
½«ÆäÖеÄ#*default host=CHANGE_THIS.FreeBSD.orgÒ»ÐиÄΪ
*default host=cvsup4.FreeBSDchina.org
4.         ¸üÐÂports
    /usr/local/bin/cvsup -g -L 2 /etc/ports-supfile
       1£¬freeBSDÏÂApache+php+mysql°²×°
       
°²×°Ê±±ØÐëÓÃrootÓû§»òsu·½Ê½µÇ¼ºóÉúЧ
°²×°ÅäÖÃapache
#cd /usr/ports/www/apache22/
#make config ½«mysql¹´ÉÏ
#make install clean
#rehash
#ee /usr/local/etc/apache22/httpd.conf ÐÞ¸ÄÒÔÏÂÅäÖÃ
ServerAdmin James@xuwenhui.com
ServerName 192.168.1.1:80
DirectoryIndex index.html index.php
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
#ee /boot/defaults/loader.conf ÐÞ¸ÄÒÔÏÂÅäÖÃ
accf_data_load="YES"
accf_http_load="YES"
#echo 'apache22_enable="YES"' >> /etc/rc.conf Æô¶¯Ê±×Ô¶¯ÔËÐÐapache·þÎñ
Èç¹û²»³É¹¦¿ÉÒÔ£ºee /etc/rc.conf ÀïÌí¼Ó
apache22_enable="YES"
#apachectl start
ÊäÈëµØÖ·¿´µ½It works!±íʾ°²×°³É¹¦.
°²×°ÅäÖÃphp5¼°php5-extensions
#cd /usr/ports/lang/php5
#make config apacheÒ»¶¨Òª¹´ÉÏ,²»È»apacheÈϲ»³öphp
#make install clean
#cd /usr/ports/lang/php5-extensions
#make config Ñ¡ÉÏÐèÒªÖ§³ÖµÄÀ©Õ¹
#make install clean
#cp /usr/local/etc/php.ini-dist /usr/local/etc/php.ini
#apachectl restart ÖØÆôapacheºóphp¾ÍÉúЧÁË
°²×°ÅäÖÃmysql
#cd


Ïà¹ØÎĵµ£º

PHPÖÐÖ´ÐÐϵͳÍⲿÃüÁî

PHP×÷ΪһÖÖ·þÎñÆ÷¶ËµÄ½Å±¾ÓïÑÔ£¬Ïó±àд¼òµ¥£¬»òÕßÊǸ´ÔӵĶ¯Ì¬ÍøÒ³ÕâÑùµÄÈÎÎñ£¬ËüÍêÈ«Äܹ»Ê¤ÈΡ£µ«ÊÂÇé²»×ÜÊÇÈç´Ë£¬ÓÐʱΪÁËʵÏÖij¸ö¹¦ÄÜ£¬±ØÐë½èÖúÓÚ
²Ù×÷ϵͳµÄÍⲿ³ÌÐò£¨»òÕß³Æ֮ΪÃüÁ£¬ÕâÑù¿ÉÒÔ×öµ½Ê°빦±¶¡£
¡¡¡¡ÄÇô£¬ÊÇ·ñ¿ÉÒÔÔÚPHP½Å±¾Öе÷ÓÃÍⲿÃüÁîÄØ£¿Èç¹ûÄÜ£¬ÈçºÎÈ¥×öÄØ£¿
ÓÐЩʲô·½ÃæµÄ¹ËÂÇÄØ£¿ÏàÐÅÄã ......

PHP µÄ×Ö·û´®±í´ïÈýÖÖ·½Ê½


µ¥ÒýºÅ
      $str = 'ÎÒÊÇһͷ´ó»ÒÀÇ';
Ë«ÒýºÅ
      $str2 = "ÄãÒ²ÊÇһͷ´ó»ÒÀÇ";
¶¨½ç·û
      $str3 = <<< DDD
          ¶¼ÊÇ´ó»ÒÀÇ£¬
   &nb ......

PHP²åÈëÊý¾Ý¿â´úÂ룬±à¼­£¬É¾³ý

²åÈë´úÂë
 <?
$action=$_GET['action'];
switch($action){
//Ìí¼Ó¼Ç¼
case"add";
$mail = trim(htmlspecialchars($_POST["mail"]));
$username = trim(htmlspecialchars($_POST["username"]));
$tel = trim(htmlspecialchars($_POST["tel"]));
$fax = trim(htmlspecialchars($_POST["fax"]));
$c ......

ÈçºÎÌá¸ßmysql load data infileµÄËÙ¶È


°æȨÉùÃ÷
£º×ªÔØʱÇëÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕÂԭʼ³ö´¦ºÍ×÷ÕßÐÅÏ¢¼°±¾ÉùÃ÷
http://bbayou.blogbus.com/logs/37045617.html
²âÊÔÊý¾Ý2.5G£¬¹²ÓÐÊý¾Ý9427567Ìõ¡£ÓõÄmysqlµÄlarge·þÎñÆ÷µÄÅäÖá£
load
Ò»´ÎÐèÒª´ó¸Å10·ÖÖÓ×óÓÒ¡£
½¨µÄ±íÓõÄÊÇMYISAM£¬µ÷ÕûÁ˼¸¸ösessionµÄ²ÎÊýÖµ
SET

SESSION

BULK_INSERT_BUFFER_S ......

MySQL´æ´¢ÒýÇæ

MySQLÓжàÖÖ´æ´¢ÒýÇ棺
MyISAM¡¢InnoDB¡¢MERGE¡¢MEMORY(HEAP)¡¢BDB(BerkeleyDB)¡¢EXAMPLE¡¢FEDERATED¡¢ARCHIVE¡¢CSV¡¢BLACKHOLE¡£
MySQLÖ§³ÖÊý¸ö´æ´¢ÒýÇæ×÷Ϊ¶Ô²»Í¬±íµÄÀàÐ͵Ĵ¦ÀíÆ÷¡£MySQL´æ´¢ÒýÇæ°üÀ¨´¦ÀíÊÂÎñ°²È«±íµÄÒýÇæºÍ´¦Àí·ÇÊÂÎñ°²È«±íµÄÒýÇ棺
¡ô MyISAM¹ÜÀí·ÇÊÂÎñ±í¡£ËüÌṩ¸ßËÙ´æ´¢ºÍ¼ìË÷£¬ÒÔ¼°È«ÎÄËÑË÷ÄÜÁ¦¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ