ʹÓÃPHP×öLinux/UnixÊØ»¤½ø³Ì
http://linux.chinaitlab.com/administer/774036.html
[ ÆðÔ´ ]Linux/UnixÏÂÊØ»¤½ø³Ì£¨Daemon£©´ó¼Ò¶¼ÖªµÀ£¬±ÈÈçÎÒÃdz£ÓõÄhttpd¡¢mysqldµÈµÈ£¬¾ÍÊdz£×¤ÄÚ´æÔËÐеijÌÐò£¬ÀàËÆÓÚWindowsϵķþÎñ¡£Ò»°ãÊØ»¤½ø³Ì¶¼ÊÇʹÓÃC/C++À´Ð´£¬¾ÍÊÇͨ¹ýforkÉú³É×Ó½ø³Ì£¬µ±Ç°Ì¨shellϵĸ¸½ø³Ì±»É±µô£¬×Ó½ø³Ì¾Íתµ½ºǫ́ÔËÐУ¬ÎªÁ˲»ÔÚÖն˲úÉúÊä³öÐÅÏ¢£¬¾Íͨ¹ýsyslogµÈº¯ÊýÀ´Ð´ÈÕÖ¾Îļþ¡£
ÎÒÃÇÖªµÀphpÊǽű¾ÓïÑÔ£¬Í¨¹ýphpµÄ½Å±¾ÒýÇæÀ´Ö´ÐУ¬ËùÒÔÒª×ö³ÉÊØ»¤½ø³Ì±È½ÏÂé·³£¬ÎÒÃǽñÌì¾ÍÀ´½áºÏUnix/LinuxµÄÃüÁîÀ´ÊµÏÖÎÒÃÇÊØ»¤½ø³ÌµÄ¹¦ÄÜ¡£
[ ÔÀí ]UnixÖеÄnohupÃüÁîµÄ¹¦ÄܾÍÊDz»¹Ò¶ÏµØÔËÐÐÃüÁͬʱnohup°Ñ³ÌÐòµÄËùÓÐÊä³öµ½·Åµ½µ±Ç°Ä¿Â¼µÄnohup.outÎļþÖУ¬Èç¹ûÎļþ²»¿Éд£¬Ôò·Åµ½<Óû§Ö÷Ŀ¼>/nohup.out ÎļþÖС£ÄÇôÓÐÁËÕâ¸öÃüÁîÒÔºó£¬ÎÒÃǵÄphp³ÌÐò¾Íд³Ìshell½Å±¾£¬Ê¹ÓÃÑ»·À´ÈÃÎÒÃǵĽű¾Ò»Ö±ÔËÐУ¬ÄÇô²»¹ÜÎÒÃÇÖն˴°¿ÚÊÇ·ñ¹Ø±Õ£¬¶¼Äܹ»ÈÃÎÒÃǵÄphp½Å±¾Ò»Ö±ÔËÐС£µ±È»£¬µ±ÎÒÃǵÄphp½ø³Ì±»É±»òÕßÎÒÃǵIJÙ×÷ϵͳÖØÆôÁË£¬×ÔÈ»¾Í»áÖÐÖ¹ÁË¡£
[ ¹¦ÄÜ ]¿Ï¶¨»áÎÊ£¬ÈÃÎÒÃǵÄphp½Å±¾×öÁËÊØ»¤½ø³ÌÓÖÓÐʲôÓô¦ÄØ£¿µ±È»ÓУ¬±ÈÈç×îµäÐ͵Ä×÷Óã¬Äܹ»»ù±¾µÄÌæ´úcronµÄ¹¦ÄÜ£¬±ÈÈçÎÒÃÇÐèÒª¶¨ÆÚʵÐеÄijЩ²Ù×÷£¬ÍêÈ«¿ÉÒÔ½»¸øËüÀ´×ö£¬²»ÔÙÐèÒªcron£¬µ±È»£¬Èç¹û·þÎñÆ÷ÖØÆô¾ÍûÓа취ÁË£¬²»¹ý£¬Ò»°ãµÄUnix·þÎñÆ÷²»ÊÇÄÇôÈÝÒ×ÖØÆôµÄ¡£ÁíÍ⣬ÎÒÃÇ»¹¿ÉÒÔ×öÒ»¸ö¼òµ¥µÄ·þÎñÆ÷¶ËµÄ¹¦ÄÜ£¬±ÈÈç×öÒ»¸öÄܹ»Telnet¹ýÈ¥µÄ·þÎñÆ÷£¬ºÙºÙ£¬¿ÉÒÔ×ö³ÉÒ»¸öСºóÃÅ£¬²»¹ýÕâÑùʵÏÖÉÔ΢Óе㸴ÔÓ¡£
[ ʵ¼ù ]Àý×ÓÒ»£º×Ô¶¯Éú³ÉÎļþ
ÎÒÃÇÏÖÔÚÀ´×öÁ½¸öÀý×ÓÀ´Ö¤Ã÷ÎÒÃÇÉÏÃæµÄ˵·¨¡£Ê×ÏȵÚÒ»¸öÊÇÿ¸öÈýÊ®Ãë×Ô¶¯Éú³ÉÒ»¸öÎļþ£¬ÓÀÔ¶Ö´ÐÐÏÂÈ¥¡£
Ê×±ØÐëÈ·±£²Ù×÷ϵͳÊÇUnix»òÕßLinux£¬±ÈÈç¿ÉÒÔÊÇFreeBSD¡¢Redhat¡¢Fedora»òÕßSUSEʲôµÄ¡£È»ºóÎÒÃDZØÐëÈ·±£ÎÒÃǵÄphp½Å±¾ÒýÇæÊÇÔÚ /usr/local/php/bin/php£¬¾ßÌå·¾¶¿ÉÒÔ°´ÕÕÄãʵ¼Ê·¾¶À´Ð´£¬Èç¹ûûÓнű¾ÒýÇ棬Çë×ÔÐа²×°¡£
±ÈÈ統ǰĿ¼ÊÇ /home/heiyeluren/£¬ÄÇôÎÒÃÇʹÓÃvi»òÕßÆäËû±à¼Æ÷±àдһ¸ö½Ð×öphp_daemon1.phpµÄÎļþ£º
$ vi php_daemon1.php
È»ºóдÈëÈçÏ´úÂ룺
#! /usr/local/php/bin/php
<?
set_time_l
Ïà¹ØÎĵµ£º
Ò»¡¢
1.¼ì²éĿ¼»òÎļþµÄȨÏÞ
2.Ð޸ĻòÌí¼ÓÅäÖÃÎļþ
3.¼ì²éÅäÖÃÎļþµÄÕýÈ·ÐÔ
4.µ¼ÈëÊý¾Ý¿â
5.Ëø¶¨»òɾ³ý°²×°Îļþ
ÔÀí£º
Æäʵphp³ÌÐòµÄ°²×°ÔÀí¾ÍÊǽ«Êý¾Ý¿â½á¹¹ÄÚÈݵ¼Èëµ½ÏàÓ¦µÄÊý¾Ý¿âÖУ¬´ÓÕâ¸ö¹ý³ÌÖÐÖØзÖÅäÁ¬½ÓÊý¾Ý¿âµÄ²ÎÊýºÍÎļþ£¬ÎªÁ˱£Ö¤²»±»±ðÈ˶ñÒâÓð²×°Îļþ£¬µ±°²×°Íê³ÉºóÐèÒªÐ޸ݲװÎļþ¡£
¶þ¡¢ÖÆ×÷° ......
Allocaº¯Êý£¬ÓÃÓÚÔÚÕ»ÉÏ·ÖÅäÄڴ棬
gcc
µÄ¶¯Ì¬Êý×é¾ÍÊÇͨ¹ýËüÀ´Ö§³ÖµÄ¡£
ÖжϺÍÐźŵĸÅÄîÊDz»Í¬µÄ£¬ÐźÅÊÇ·¢¸ø½ø³ÌµÄ£¬Ó²ÖжÏÊÇÄں˺ÍÓ²¼þÖ®¼ä£¬¶¼ÊÇÒì²½µÄ£¬²»¿ÉÔ¤ÖªµÄ¡£
ϵͳµ÷ÓýøÈëÄÚºËÊDz»·¢Éú½ø³ÌÇл»µÄ¡£DIRECT_IO
²»Ê¹ÓÃϵͳ
IO
»º´æ£¬»¹Òª±£Ö¤»º³åÇøÄÚ´æ²»±»
swap
£¬Õâ¸öÓÃÓÚÄÇЩÓû§²ã½øÐлº´æµÄÓ¦ÓÃ³Ì ......
phpMyAdminÌáʾû×Ö·û´®±àÂëºÍ×Ö·û´®´¦Àí¿âphp_mbstring
SSHÁ¬½ÓÉϺó£ºyum install php-mbstring°²×°À©Õ¹
vi usr/local/lxlabs/ext/php/etc/php.ini±à¼PHP.iniÎļþ
È¥µôÒ»ÐеÄ×¢ÊÍ£ºextension=mbstring.so
(ÓÐЩ¿ÉÒÔ²»ÓÃÉèÖÃÕâÁ½ÐУ¬php.iniÖв»´æÔÚ£»extension=mbstring.so
£¬
Ö»ÒªmbStringÀ©Õ¹°²×°µ½ÁËextension ......
ÔÚ/etc/rc.localÖÐÌí¼Ó
su - oracle "-c dbstart"
ÔÚ´Ë֮ǰÄãҪȷ±£¸ÃÃüÁî¿ÉÒÔÆô¶¯ÄãÐèÒªµÄÊý¾Ý¿â, ÐèÒª²âÊÔÒ»ÏÂ
su - oracle "-c dbstart"
dbstartÃüÁîÕý³£ÔËÐÐÐèÒªÅäÖÃ/etc/oratab,ÀïÃæ¿ÉÒÔÅäÖöà¸öÊý¾Ý¿âʵÀý,ÿ¸öµÄ¸ñʽ:
$ORACLE_SID:$ORACLE_HOME:<N|Y>
Õý³£Çé¿öÏÂÅäÖúÃ/etc/oratab, dbstartÃüÁî¾Í¿ÉÒÔÕý ......