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


Ïà¹ØÎĵµ£º

½«ÈÕÖ¾ÎļþдÈëMySqLÖÐ

Ê×ÏȽ¨Ò»¸ö¹¤³Ì£¬×¼±¸ºÃlog4jµÄjar°üºÍMysqLµÄÇý¶¯°ü¡£
ÅäÖÃlog4j.propertiesÎļþ£º
    #´Ë¾äΪ¶¨ÒåÃûΪstdoutµÄÊä³ö¶ËÊÇÄÄÖÖÀàÐÍ£¬¿ÉÒÔÊÇ
#org.apache.log4j.ConsoleAppender£¨¿ØÖÆ̨£©£¬
#org.apache.log4j.FileAppender£¨Îļþ£©£¬
#org.apache.log4j.DailyRollingFileAppender£¨Ã¿Ìì²úÉúÒ»¸öÈÕÖ¾ÎÄ ......

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

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

PHPͨ¹ýgettextʵÏÖ¶àÓïÑÔ¹ú¼Ê»¯Ö§³Ö

֮ǰPHPʵÏÖ¶àÓïÑÔ¹ú¼Ê»¯£¬´ó²¿·Ö¶¼»á²ÉÓðÑÓïÑÔÖ±½ÓÌá³öÀ´×÷ΪÊý×éÀ´µ÷Óã¬ÀýÈç±È½ÏÓÐÃûphpMyadmin£¬discuzµÈÖªÃû¿ªÔ´ÏµÍ³£¬²»¹ý£¬ÕâÀï½éÉÜÈçºÎͨ¹ýgettext£¬¼´ÓÃ×ÊÔ´ÎļþÀ´ÊµÏÖ¡£µäÐ͵ÄCMS°¸Àý-wordpressÒ²ÊÇͨ¹ýËüʵÏÖµÄÓïÑÔ¹ú¼Ê»¯£¬ÏÂÃæÀ´ËµÏÂphpÖÐÈçºÎÀ´ÀûÓÃÅäÖÃÎļþʵÏÖ¹ú¼Ê»¯µÄ¡£
Ê×ÏȽéÉÜÏÂ.MOÎļþ£¬ÔÚPHPÖÐÊÇÀûÓà ......

php ×Ö·û´®²Ù×÷º¯ÊýÏê½â

×Ö·û´®µÄ²Ù×÷ÔÚPHP±à³ÌÖÐÕ¼ÓÐÖØÒªµÄµØ룬¼¸ºõËùÓÐPHP½Å±¾µÄÊäÈëºÍÊä³ö¶¼Óõ½×Ö·û´®¡£ÓÈÆäÔÚPHPÏîÄ¿¿ª·¢¹ý³ÌÖУ¬ÎªÁËʵÏÖijÏÄÜ£¬¾©³ÇÐèÒª¶ÔijЩ×Ö·û´®½øÐÐÌØÊâ´¦Àí£¬Èç»ñÈ¡×Ö·û´®µÄ³¤¶È¡¢½ØÈ¡×Ö·û´®¡¢Ìæ»»×Ö·û´®µÈ¡£ËùÒÔÕâÒ²ÊÇÎÒÃǽñÌì¿Î³ÌµÄÖ÷ÒªÄÚÈÝ£¬Ï£ÍûѧԱ¿ÉÒÔÈÏÕæѧϰ£¬ÇÚ¼ÓÁ·Ï°¡£
8.3.1 È¥³ý×Ö·û´®Ê×λ¿Õ¸ñºÍÌØÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ