Trac + Subversion + Mod_Python + Apache2 + PostgreSQL for RH

一、安装APACHE2

  1. #tar xvzf httd-2.0.55.tar.gz
  2. #cd httpd-2.0.55
  3. //安装APR和APR-UTIL
  4. #cd srclib/apr
  5. #./buildconf
  6. #./configure --prefix=/usr/local/apr
  7. #make && make install
  8. #cd ../apr-util
  9. #./buildconf
  10. #./configure –prefix=/usr/local/apr –with-apr=/usr/local/apr
  11. #make && make install
  12. #cd ../..
  13. #./configure --enable-dav --enable-maintainer-mode --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --with-mpm=worker --enable-track-vars --enable-cgi --enable-modules=so --enable-rewrite
  14. #make && make install

二、安装PostgreSQL
下载PostgreSQL FOR RHEL 4 RPM包,并安装(在RHEL 4的安装盘中有)
安装完后启动服务。

  1. #service postgresql start

新建数据库和用户

  1. #su - postgres
  2. $createdb jobc_trac
  3. $psql jobc_trac
  4. \create user jobc with password 'jobc';    //增加jobc用户,密码为jobc
  5. \alter user jobc with password 'jobc';    //修改jobc用户的密码为jobc
  6. \\q    //退出SQL环境

三、安装MYSQL、ORACLE等PHP环境
请参阅相关文章
ORACLE 10g for RHEL AS4 U2 x86_64 安装文档

四、安装PHP5

  1. #./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir --with-openssl --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --with-curlwrappers --enable-exif --enable-ftp --with-gettext --with-mysqli --with-oci8=/u01/oracle/10.2.0/db_1/ --enable-soap --enable-sockets --with-iconv --with-libdir=lib64 --with-gd --with-jpeg-dir --with-png-dir --with-mysql --enable-xslt --with-xslt-sablot=/usr/local/sablot/lib --prefix=/usr/local/php5 --sysconfdir=/etc --with-pgsql
  2. #make && make install
  3.  
  4. 修改httpd.conf文件
  5. 加入
  6. LoadModule php5_module modules/libphp5.so
  7.  
  8. AddType application/x-httpd-php .php .php3 .inc
  9. AddType application/x-httpd-php-source .phps

五、安装SWIG

  1. #tar -xzvf swig-1.3.27.tar.gz
  2. #cd swig-1.3.27
  3. #./configure --with-python=/usr/bin/python
  4. #make && make install

六、安装SUBVERSION

  1. #tar -xzvf subversion-1.3.0.tar.gz
  2. #cd subversion-1.3.0
  3. #./configure --with-apxs=/usr/local/apache2/bin/apxs --with-swig=/usr/local/ --prefix=/usr/local/subversion
  4. #make && make install
  5. #make swig-py && make install-swig-py
  6. #ldconfig

七、安装cleansilver

  1. #tar -xzvf clearsilver-0.10.2.tar.gz
  2. #cd clearsilver-0.10.2
  3. #./configure
  4. #make && make install
  5. #cd python
  6. #python setup.py install

该步骤python setup.py install如果失败(或有错误),则将该目录下的neo_cgi.so复制到PYTHON目录中
或执行以下命令

  1. #cp neo_cgi.so /usr/lib/python2.3/site-packages

八、安装mod_python

  1. #tar -xzvf mod_python-3.1.4.tgz.gz
  2. #./configure --with-apxs=/usr/local/apache2/bin/apxs
  3. #make && make install
  4. #make install_dso
  5. #make install_py_lib

九、安装Trac

  1. #tar -xzvf trac-0.9.3.tar.gz
  2. #cd trac-0.9.3
  3. #python ./setup.py install
  4.  
  5. #ln -s /usr/local/subversion/lib/svn-python/svn/ /usr/lib/python2.3/site-packages/svn
  6.  
  7. #ln -s /usr/local/subversion/lib/svn-python/libsvn/ /usr/lib/python2.3/site-packages/libsvn
  8.  
  9. #ln -s /usr/local/subversion/lib/svn-python /usr/lib/python2.3/site-packages/svn-python

十、配置
初始化项目

  1. trac-admin /somedir/trac/project_name initenv

Apache2配置
httpd.conf

  1. <virtualhost * >
  2.     DocumentRoot /var/trac/myproject
  3.     ServerName trac.mycompany.com
  4.     <location />
  5.         SetHandler mod_python
  6.         PythonHandler trac.web.modpython_frontend
  7.         PythonOption TracEnv /var/trac/myproject
  8.         PythonOption TracUriRoot /
  9.     
  10.     <location /login>
  11.         AuthType Basic
  12.         AuthName "MyCompany Trac Server"
  13.         AuthUserFile /var/trac/myproject/.htusers
  14.         Require valid-user
  15.     </location>
  16. </virtualhost>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值