@zhangyy
2018-06-03T06:26:40.000000Z
字数 1734
阅读 158
运维系列
centos7.4x64
主机名:
192.168.4.11 trac.yangyang.com trac
trac:
Trac-0.12.7.tar.gz
trac 的备份包:
anebi.tar.gz
----
上传所需安装包到 CentOS7.4x64 上面
# Packages needed to create a release.
setuptools>=0.8 # Min version to ensure PEP-0440 compliant version numbers
wheel
genshi
babel
setuptools_subversion
reindent
twine
yum install -y setuptools wheel genshi babel setuptools_subversion reindent twine
tar -zxvf Trac-0.12.7.tar.gz
cd Trac-0.12.7
python ./setup.py install
新建一个测试项目:
mkdir -p /var/www/yangyang
trac-admin /var/www/yangyang/ initenv
启动这个测试项目:
tracd --port 8000 /var/www/yangyang
能够打开页面即可
然后结束停止占用的8000 端口
解压备份安装包:
tar -zxvf anebi.tar.gz
mv anebi /var/www/neusoft
启动备份项目
tracd --port 8000 /var/www/neusoft
yum install -y httpd* wsgi*
----
deploy 相关项目目录:
trac-admin /var/www/neusoft/ deploy /var/www/neusoft/deploy
修改配置Apache 的httpd 配置文件:
vim /etc/httpd/conf/httpd.conf
在最后增加:
Alias /trac/neusoft/chrome/common /var/www/neusoft/deploy/htdocs/common
Alias /trac/neusoft/chrome/site /var/www/neusoft/deploy/htdocs/site
WSGIScriptAlias /trac/neusoft /var/www/neusoft/deploy/cgi-bin/trac.wsgi
<Directory "/var/www/neusoft/deploy/htdocs">
Order allow,deny
Allow from all
</Directory>
<Location "/trac/chrome/common/">
SetHandler None
</Location>
<Directory "/var/www/neusoft/deploy/cgi-bin">
WSGIApplicationGroup %{GLOBAL}
Order allow,deny
Allow from all
</Directory>
<Location /trac/neusoft/login>
AuthType Basic
AuthName "Trac Login"
AuthUserFile /etc/subversion/passwd
Require valid-user
</Location>
htpasswd -c /etc/subversion/passwd admin
输入用户名与密码
确认即可:
最后重启 apache 服务即可
service httpd restart
192.168.4.11/trac/neusoft
然后登录测试即可
然后就是改log 与 更新 下面内容了