CentOS6.5上的trac安装(v1.0.1)
来源:互联网 发布:开淘宝店要多少钱押金 编辑:程序博客网 时间:2024/05/22 02:21
1. 安装python和pip
2.安装以下软件:
pip install trac babel flup TracAccountManager
3.初始化一个trac项目:
trac-admin /path/to/project initenv
4. 创建用户
htpasswd -cm /path/to/project/user.htpasswd admin
htpasswd -m /path/to/project/user.htpasswd yc
5.赋予admin用户管理员权限
trac-admin /path/to/project permission add admin TRAC_ADMIN
6.安装nginx,配置site-enabled下的配置文件,假设为develop.conf
location / {
fastcgi_pass 127.0.0.1:9010;
# auth_basic "trac Realm";
# auth_basic_user_file /path/to/project/user.htpasswd;
#fastcgi_param AUTH_USER $remote_user;
#fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_pass_header Authorization;
fastcgi_intercept_errors off;
}
7.配置trac.ini
增加以下行:
[account-manager]
password_store = HtPasswdStore
password_format = htpasswd
htpasswd_hash_type = md5
htpasswd_file =/path/to/project/user.htpasswd ; new style (acct_mgr >= 0.4)
reset_password = false
[components]
trac.web.auth.loginmodule = disabled
acct_mgr.admin.* = enabled
acct_mgr.api.* = enabled
acct_mgr.db.sessionstore = disabled
acct_mgr.htfile.htdigeststore = disabled
acct_mgr.htfile.htpasswdstore = enabled
acct_mgr.http.* = disabled
acct_mgr.notification.* = enabled
acct_mgr.pwhash.* = disabled
acct_mgr.register.* = enabled
acct_mgr.svnserve.svnservepasswordstore = disabled
acct_mgr.web_ui.* = enabled
acct_mgr.web_ui.resetpwstore = disabled
8.创建/etc/init.d/tracd.sh
#!/bin/sh
#
# Startup script for the DNS caching server
#
# chkconfig: 2345 70 30
# description: This script starts your tracd server
# processname: tracd
# pidfile: /var/run/tracd.pid
tracd --port 9010 --protocol=fcgi /path/to/project/ --user=username -d
9.启动tracd
chmod +x /etc/init.d/tracd.sh
/etc/init.d/tracd.sh
10.配置nginx
server {
listen 80;
error_log /data/user/log/nginx/trac.error.log;
access_log /data/user/log/nginx/trac.access.log;
client_max_body_size 4000m;
client_body_buffer_size 8m;
location / {
auth_basic "trac Realm";
auth_basic_user_file /path/to/project/user.htpasswd;
fastcgi_pass 127.0.0.1:9010;
#fastcgi_param AUTH_USER $remote_user;#采用TracAccountManager作为认证模块时必须注释掉。
#fastcgi_param REMOTE_USER $remote_user;
#fastcgi_param HTTPS on;#采用https时设置为on,http时注释掉
fastcgi_param SCRIPT_NAME "";
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_pass_header Authorization;
fastcgi_intercept_errors off;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
11.重启nginx
service nginx restart
- CentOS6.5上的trac安装(v1.0.1)
- 在公司的机器上安装 Trac
- 在ubuntu上安装trac
- Trac 在ubuntu上安装
- yael在CentOS6.5上的安装
- CentOS6.5/7.0 上 OpenVPN的安装
- Docker在CentOS6.5上的安装
- TRAC的安装
- trac的安装-windows
- Trac的安装设置
- CentOS6.5上安装tomcat
- CentOS6.5上安装Docker
- centos6.5上安装guacamole
- centos6.5上安装mysql
- CentOS6.5上安装mysql
- 在Debian/Ubuntu上安装Trac系统
- Redhat AS 5.2上安装Trac服务器
- gentoo上安装trac和bugzilla
- HDU-2049-不容易系列之(4)——考新郎
- Ubuntu终端下通过wget获取JDK
- Java System.arraycopy 针对同一数组和两个数组
- 2547. Subsequence
- 某数据系统的形成过程
- CentOS6.5上的trac安装(v1.0.1)
- java经典编程题(13-15)
- KMP复习整理
- SVN MERGE 和冲突
- XTU-1175 Hurry Up
- 全面分析 Spring 的编程式事务管理及声明式事务管理
- VS2008/2010 CDockablePane类的使用
- ★ 太空飞行计划 最大权闭合图+输出方案
- 归并排序