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
Ïà¹ØÎĵµ£º
²Ù×÷ϵͳÊÇÒ»¸ö·Ç³£¸´ÔÓµÄÈí¼þ,Éè¼ÆºÍʵÏÖÒ»¸ö²Ù×÷ϵͳÐèÒª¾ßÓо«ÉîµÄÀíÂÛ֪ʶºÍ¸ß³¬µÄʵ¼ùÄÜÁ¦.´«Í³µÄ²Ù×÷ϵͳÉè¼Æ¿Î³Ì,¹ýÓÚÆ«ÖØÀíÂÛµÄѧϰ,ȱ·¦¶Ôʵ¼ùµÄÖ¸µ¼¡£Ï£ÍûÉîÈëѧϰ²Ù×÷ϵͳµÄÉè¼Æ£¬×îºÃµÄ·½·¨¾ÍÊÇÕÒÒ»¸ö²Ù×÷ϵͳÀ´×Ô¼ºÊµ¼ù£¬ÔÚʵ¼ùÖÐѧϰ£¬¿ÉÒÔ´´Ôì³öÆæ¼£¡£
......
1¡¢RootµÇ¼
2¡¢²éip:ifcongfig
3¡¢ÐÞ¸ÄÍøÂçÉèÖÃ
vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=VirtualBox
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.2
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
4¡¢Ìí¼ÓÐÂÓû§º ......
0
´¦Àí
Ä£ÐÍ
Linux kernel
µÄÆô¶¯°ü
À¨ºÜ¶à×é¼þµÄ³õʼ»¯ºÍÏà¹ØÅäÖã¬ÕâЩÅäÖòÎÊýÒ»°ãÊÇͨ¹ýcommand line
½ø
ÐÐÅäÖõġ£ÔÚ½øÐкóÐø·ÖÎö֮ǰ£¬ÏÈÀ´Àí½âÒ»ÏÂcommand line
µÄ´¦Àí
Ä£ÐÍ£º
Òª´¦ÀíµÄ¶ÔÏóÊÇÒ»¸ö×Ö·û´®£¬ÆäÖаüº¬Á˸÷ÖÖÅäÖÃÐÅÏ¢£¬Í¨³£¸÷¸öÅäÖÃÖ®¼äͨ¹ý¿Õ¸ñ½øÐзÖÀ룬ÿ¸öÅäÖõıí´ïÐÎʽÊÇ
È磺param=va ......
1¡¢°²×°°ü
ÏÂÔØÍøÖ·£ºhttp://dev.mysql.com/downloads/mysql/
mysql-5.1.38.tar.gz£¨°æ±¾£º5.1.38£©
2¡¢Ìí¼ÓmysqlÓû§ÓëȺ
groupadd mysql
useradd -g mysql -s /sbin/nologin mysql
3¡¢½âѹÓë±àÒë
tar zxvf mysql-5.1.38.tar.gz
cd mysql-5.1.38/
./configure --prefix=/usr/local/mysql/ --enable-assembler --w ......
ÔÚÍøÉϲéÕÒÁËÅäÖÃlinuxÅäÖÃIPµÄ·½·¨£¬¼òµ¥µÄÓÐÏÂÃæÁ½ÖÖ£º
×î
³£ÓõĸøÍø¿¨ÅäÖÃipµÄÃüÁîΪ
££ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
˵Ã÷£º
eth0
ÊǵÚÒ»¸öÍø¿¨£¬ÆäËûÒÀ´ÎΪeth1£¬eth*
192.168.0.1ÊǸøÍø¿¨ÅäÖõĵÚÒ»¸öÍø¿¨ÅäÖõÄipµØÖ·
netmask 255.255.255.0 Åä
......