[关闭]
@zhangyy 2018-06-03T06:26:40.000000Z 字数 1734 阅读 158

Trac 的安装配置

运维系列



一:trac 的安装配置

1.1 系统准备:

  1. centos7.4x64
  2. 主机名:
  3. 192.168.4.11 trac.yangyang.com trac

1.2 软件准备

  1. trac:
  2. Trac-0.12.7.tar.gz
  3. trac 的备份包:
  4. anebi.tar.gz
  5. ----
  6. 上传所需安装包到 CentOS7.4x64 上面

1.3 系统环境准备

  1. # Packages needed to create a release.
  2. setuptools>=0.8 # Min version to ensure PEP-0440 compliant version numbers
  3. wheel
  4. genshi
  5. babel
  6. setuptools_subversion
  7. reindent
  8. twine
  1. yum install -y setuptools wheel genshi babel setuptools_subversion reindent twine

二:trac 安装

  1. tar -zxvf Trac-0.12.7.tar.gz
  2. cd Trac-0.12.7
  3. python ./setup.py install

image_1bv4m1dpn1q5s1q2c1m5ed8pa699.png-290.3kB


  1. 新建一个测试项目:
  2. mkdir -p /var/www/yangyang
  3. trac-admin /var/www/yangyang/ initenv

image_1bv4mjtmk1jgj1dg1iihn6c1nqgm.png-438kB

image_1bv4mlf76oh82r430kh71uq21j.png-470.5kB


  1. 启动这个测试项目:
  2. tracd --port 8000 /var/www/yangyang
  3. 能够打开页面即可
  4. 然后结束停止占用的8000 端口

image_1bv4mpt5l1rti9311c0e110613o220.png-94.3kB

image_1bv4mqo1n1ivn10ou1go0d401h552d.png-135.7kB

image_1bv4mrd091gn61e731e971cgdgk52q.png-274.2kB


三: anebi备份项目安装:

  1. 解压备份安装包:
  2. tar -zxvf anebi.tar.gz
  3. mv anebi /var/www/neusoft
  4. 启动备份项目
  5. tracd --port 8000 /var/www/neusoft

image_1bv4n2ja1e3sde1d761bct1n3g37.png-88.7kB

image_1bv4n3bgihrqi4jt6kfofkkl3k.png-140.4kB

image_1bv4n3s0s1v7p57pnkm1t561ou641.png-314.3kB

四:配置trac与 apache 集成:

4.1 安装 apache 与 插件 wsgi

  1. yum install -y httpd* wsgi*
  2. ----
  3. deploy 相关项目目录:
  4. trac-admin /var/www/neusoft/ deploy /var/www/neusoft/deploy
  1. 修改配置Apache httpd 配置文件:
  2. vim /etc/httpd/conf/httpd.conf
  3. 在最后增加:
  4. Alias /trac/neusoft/chrome/common /var/www/neusoft/deploy/htdocs/common
  5. Alias /trac/neusoft/chrome/site /var/www/neusoft/deploy/htdocs/site
  6. WSGIScriptAlias /trac/neusoft /var/www/neusoft/deploy/cgi-bin/trac.wsgi
  7. <Directory "/var/www/neusoft/deploy/htdocs">
  8. Order allow,deny
  9. Allow from all
  10. </Directory>
  11. <Location "/trac/chrome/common/">
  12. SetHandler None
  13. </Location>
  14. <Directory "/var/www/neusoft/deploy/cgi-bin">
  15. WSGIApplicationGroup %{GLOBAL}
  16. Order allow,deny
  17. Allow from all
  18. </Directory>
  19. <Location /trac/neusoft/login>
  20. AuthType Basic
  21. AuthName "Trac Login"
  22. AuthUserFile /etc/subversion/passwd
  23. Require valid-user
  24. </Location>

4.2配置用户登录

  1. htpasswd -c /etc/subversion/passwd admin
  2. 输入用户名与密码
  3. 确认即可:
  4. 最后重启 apache 服务即可
  5. service httpd restart

4.3 登录测试:

  1. 192.168.4.11/trac/neusoft
  2. 然后登录测试即可
  3. 然后就是改log 更新 下面内容了

image_1bv4nlq6abtl6ic8e8epcvhi4e.png-243.4kB

image_1bv4nrlkj1ic9okf1an41o8k19085l.png-347.3kB

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注