LINUXƽ̨²¿Êðapache+mod_python+django
ǰһƪÎÄÕÂдµÄÔÚAPACHE°²×°MOD_PYTHONµÄ¾¹ý,Æäʵͦ¼òµ¥,¾ÍÊÇ°æ±¾²»¼æÈݵÄÎÊÌâ.Õâ´ÎÎÒ´ó¸Å˵ϲ¿ÊðDJANGOµÄ¹ý³Ì.
ÏÈÐÞ¸ÄAPACHEÅäÖÃÎļþ,ʹÆä¼ÓÔØmod_pythonÄ£¿é
LoadModule python_module libexec/mod_python.so
ÔËÐÐÃüÁî²é¿´
bin/httpd -M¿ÉÒÔ¿´µ½
python_module (shared)
Syntax OK
˵Ã÷apacheÒѾ³É¹¦¼ÓÔØmod_python.
ÏÂÃæÎÒ˵ÏÂÎÒµÄʵ¼ÊµÄ»·¾³ºÍÏîÄ¿Çé¿ö:
/infoware/xx/webÊÇdjango³ÌÐòĿ¼
/infoware/_conf/xx/ÊÇ¿ØÖÆdjangoµÄ³ÌÐò»¹ÓÐһЩÅäÖÃ(ÓÐЩÅäÖñäÁ¿Ã»ÓÐдÔÚsettings),ÕâÒ»²½¿ÉÒÔ²»ÐèÒª,ÒòΪ´ó¶àÊýÈË»áÖ±½ÓÅäÖÃsettingsÎļþµÄ.ÎÒÊÇÔÚÐéÄâÖ÷»úÉϲÙ×÷.
–CENTOS5.2+APACHE2.2.11+PYTHON 2.4.3+MOD_PYTHON3.3.1+DJANGO 0.96
ÏÂÃæÊÇapacheÅäÖÃÎļþ
—————————————————-
<VirtualHost *:80>
ServerAdmin webmaster@xxcom
DocumentRoot “/infoware/xx/web”
ServerName www1.xx.com
ServerAlias www1.xx.com
ErrorLog “/var/log/apache/xx/xx_error_log”
CustomLog “/var/log/apache/xx/xx_access_log” common
<Directory “/infoware/xx/web”>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Location “/”>
SetHandler python-program
&nb
Ïà¹ØÎĵµ£º
bashrcÓëprofileµÄÇø±ð
Òª¸ãÇåbashrcÓëprofileµÄÇø±ð£¬Ê×ÏÈҪŪÃ÷°×ʲôÊǽ»»¥Ê½shellºÍ·Ç½»»¥Ê½shell£¬Ê²Ã´ÊÇlogin shell ºÍnon-login shell¡£
½»»¥Ê½Ä£Ê½¾ÍÊÇshellµÈ´ýÄãµÄÊäÈ룬²¢ÇÒÖ´ÐÐÄãÌá½»µÄÃüÁî¡£ÕâÖÖģʽ±»³Æ×÷½»»¥Ê½ÊÇÒòΪshellÓëÓû§½øÐн»»¥¡£ÕâÖÖģʽҲÊÇ´ó¶àÊýÓû§·Ç³£ÊìϤµÄ£ºµÇ¼¡¢Ö´ÐÐһЩÃüÁǩÍË¡ ......
1¡¢°²×°°ü£º
ÏÂÔØÍøÖ·£ºhttp://java.sun.com/javase/downloads/index.jsp
jdk-6u12-linux-i586-rpm£¨°æ±¾£º1.6.0_12£©
2¡¢Ö´Ðа²×°
chmod 777 jdk-6u12-linux-i586-rpm.bin
./ jdk-6u12-linux-i586-rpm.bin
½ÓÊÜÐÒ飬°´enter¼´¿É»Ø¸´yes
3¡¢¸Ä±ä°²×°Ä¿Â¼£º
mv /usr/java/jdk1.6.0_12 /usr/local/java
4¡¢×îºóÉèÖà ......
ÕâÕó×ÓÔÚlinuxϵÄÒ»¸öÏîÄ¿ÐèÒªÓõ½epollÀ´³ÐÊÜÍøÂçµÄ¸ß¸ºÔØ£¬µ«ÊÇÔÚʹÓõĹý³ÌÖоÍÓöµ½ÁËһЩÎÊÌâ¡£
ÔÚÕû¸ö¹ý³ÌÖУ¬ÎÒÊÇÓÃEPOLL µÄ±ßÔµ´¥·¢Ä£Ê½À´ÊµÏÖÎÒÏëÒªµÄ¹¦ÄÜ¡£
ÎÒÊÇÕâÑùʵÏֵģºÔÚEPOLLÀïÃæ°Ñ¼àÌýµÄÃèÊö·û¸ø¼ÓÁ˽øÈ¥£¬È»ºóµ÷ÓÃepoll_waitÀ´¶Ô¿Í»§¶ ......
ºÍBashµÄ»·¾³É趨ÓйصÄÎļþÓÐ
/etc/profile (Ö÷Òª)
$HOME/.bash_profile (Ö÷Òª)
$HOME/.bash_login
$HOME/.profile
$HOME/.bash_logout (Ö÷Òª)
$HOME/.bashrc (Ö÷Òª)
/etc/bashrc
˵Ã÷ÈçÏ£º
µÇÈë(login)ʱ
ÏÈÖ´ÐÐ /etc/profile
½Ó×Åbash»á¼ì²éʹÓÃÕßµÄ×Ô¼ÒĿ¼ÖУ¬ÊÇ·ñÓÐ .bash_profile »òÕß .bash_login»òÕß ......
author:skate
time:2010-05-07
ÓÃrdateÃüÁîʵÏÖͬ²½Ê±¼ä
Ç°Á½Ìì˵µ½ÓÃntpʱ¼ä·þÎñÆ÷ºÍntpdateÃüÁîͬ²½Ê±¼ä£¬½ñÌì¼òµ¥¼Ç¼ÏÂÓÃrdateͬ²½Ê±¼ä
http://blog.csdn.net/wyzxg/archive/2010/05/06/5561548.aspx
ÔÚ¸÷ÖÖlinuxÖж¼ÓÐrdateÃüÁî
1. Ñ¡ÔÚһ̨linux×÷Ϊmaster£¬È»ºóÆô¶¯ÉÏÃæµÄʱÖÓ·þÎñ
#chkconfig time on
Èç¹û² ......