Trac搭建
2015-12-29 18:13
211 查看
# on Unbuntu14.04, apache2.4
# apache2.2 need change access 777
sudo apt-get install python2.7 python-pip
#sudo apt-get install python2.7-dev #if header files needed
sudo pip install Genshi Trac==1.0 Babel==0.9.6
sudo apt-get install apache2-dev apache2-utils apache2-doc
sudo apt-get install libapache2-mod-fastcgi
#sudo apt-get install libapache2-mod-python libapache2-mod-wsgi
#config cgi
#sudo a2enmod mod_fastcgi #already enabled when install fastcgi module
#check /etc/apache2/mods-enabled/fastcgi.load and .conf exist.
sudo touch /etc/apache2/sites-available/trac-site
sudo cat >/etc/apache2/sites-available/trac-site <<'EOF'
<VirtualHost *:80>
#the end slash cannot be omitted!
ScriptAlias /trac /var/www/trac/cgi-bin/trac.fcgi/
<Directory /var/www/trac>
Options Indexes FollowSymLinks
# apache2.4 syntax
Require all granted
</Directory>
#change to accountmanager
#Basic Authentication
#<Location "/trac/login">
#AuthType Basic
#AuthName "Trac"
#AuthUserFile /var/www/trac/trac.htpasswd
#Require valid-user
#</Location>
</VirtualHost>
#<IfModule mod_fastcgi.c>
# FastCgiConfig -initial-env TRAC_ENV=/var/www/trac
#</IfModule>
EOF
sudo a2ensite trac-site
# refer to APACHE_RUN_USER in /etc/apache2/envvars
sudo chown www-data:www-data /var/www/trac
sudo chmod 777 /var/www/trac
#create trac environment
mkcd trac
trac-admin trac/ initenv
trac-admin trac/ deploy trac/deploy
cp -rf deploy/* .
#create link to target trac directory
sudo ln -s /var/www/trac ~/Documents/trac
#add apache2 access permissons to trac directory and files.
sudo chmod 777 trac trac/conf trac/db trac/plugins
sudo chmod 666 trac/conf/trac.ini trac/db/trac.db
#config trac
#look for help:
#trac-admin trac/demo_project help command [sub-command]
#add manager accmount
trac-admin trac/demo_project permission add admin TRAC_ADMIN
#add user permissions:
trac-admin trac/demo_project permission add user WIKI_ADMIN TICKET_ADMIN
################################
#README: https://trac-hacks.org/wiki/AccountManagerPlugin
# https://trac-hacks.org/wiki/CookBook/AccountManagerPluginConfiguration
#define AccountManagerPlugin
#ifdef AccountManagerPlugin
pip install -egg -t trac/plugins https://trac-hacks.org/svn/accountmanagerplugin/tags/acct_mgr-0.4.4
cat >> trac/conf/trac.ini <<'EOF'
[ticket-workflow]
complete = * -> closed
complete.default = -2
complete.permissions = TICKET_MODIFY
create = <none> -> new
create.operations = set_owner
create.permissions = TICKET_CREATE
create.set_owner = allen,ray,flynn,chenlei,challen,xuyang,wangxudong,c_cdun
leave = * -> *
leave.default = 1
leave.operations = leave_status
ongoing = * -> ongoing
ongoing.default = 0
ongoing.operations = set_owner_to_self
ongoing.permissions = TICKET_MODIFY
risk = * -> risk
risk.default = -1
risk.pemissions = TICKET_MODIFY
[components]
#https://trac-hacks.org/wiki/CookBook/AccountManagerPluginConfiguration
#trac.web.auth.loginmodule = disabled
#acct_mgr.web_ui.LoginModule = enabled
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
[account-manager]
password_store = HtPasswdStore
htpasswd_hash_type = md5
htpasswd_file = /var/www/trac/trac.htpasswd
EOF
touch trac/trac.htpasswd
#else
#config login
#only first need -c optoin:
#htpasswd -c trac/trac.htpasswd username password
#end
################################
# startup web-server
sudo apache2ctl restart
# trac standalone-server
trac-admin ~/work/trac/ ermission add admin TRAC_ADMIN
tracd --port 8099 /var/www/trac
###################################################
# On Windows only standalone-server easy #
###################################################
1. install python2.7
2. pip install Genshi Trac==1.0 Babel
3.
# trac standalone-server
trac-admin ~/work/trac/ ermission add admin TRAC_ADMIN
tracd --port 8000 /var/www/trac
4. open chrome explorer
5. combine apache2.4 failed because of socket fromfd
6. install apache2.4
7. install mod_fastcgi.so in apache2.4/modules
8. edit httpd.conf
9. try AJP/IIS
# apache2.2 need change access 777
sudo apt-get install python2.7 python-pip
#sudo apt-get install python2.7-dev #if header files needed
sudo pip install Genshi Trac==1.0 Babel==0.9.6
sudo apt-get install apache2-dev apache2-utils apache2-doc
sudo apt-get install libapache2-mod-fastcgi
#sudo apt-get install libapache2-mod-python libapache2-mod-wsgi
#config cgi
#sudo a2enmod mod_fastcgi #already enabled when install fastcgi module
#check /etc/apache2/mods-enabled/fastcgi.load and .conf exist.
sudo touch /etc/apache2/sites-available/trac-site
sudo cat >/etc/apache2/sites-available/trac-site <<'EOF'
<VirtualHost *:80>
#the end slash cannot be omitted!
ScriptAlias /trac /var/www/trac/cgi-bin/trac.fcgi/
<Directory /var/www/trac>
Options Indexes FollowSymLinks
# apache2.4 syntax
Require all granted
</Directory>
#change to accountmanager
#Basic Authentication
#<Location "/trac/login">
#AuthType Basic
#AuthName "Trac"
#AuthUserFile /var/www/trac/trac.htpasswd
#Require valid-user
#</Location>
</VirtualHost>
#<IfModule mod_fastcgi.c>
# FastCgiConfig -initial-env TRAC_ENV=/var/www/trac
#</IfModule>
EOF
sudo a2ensite trac-site
# refer to APACHE_RUN_USER in /etc/apache2/envvars
sudo chown www-data:www-data /var/www/trac
sudo chmod 777 /var/www/trac
#create trac environment
mkcd trac
trac-admin trac/ initenv
trac-admin trac/ deploy trac/deploy
cp -rf deploy/* .
#create link to target trac directory
sudo ln -s /var/www/trac ~/Documents/trac
#add apache2 access permissons to trac directory and files.
sudo chmod 777 trac trac/conf trac/db trac/plugins
sudo chmod 666 trac/conf/trac.ini trac/db/trac.db
#config trac
#look for help:
#trac-admin trac/demo_project help command [sub-command]
#add manager accmount
trac-admin trac/demo_project permission add admin TRAC_ADMIN
#add user permissions:
trac-admin trac/demo_project permission add user WIKI_ADMIN TICKET_ADMIN
################################
#README: https://trac-hacks.org/wiki/AccountManagerPlugin
# https://trac-hacks.org/wiki/CookBook/AccountManagerPluginConfiguration
#define AccountManagerPlugin
#ifdef AccountManagerPlugin
pip install -egg -t trac/plugins https://trac-hacks.org/svn/accountmanagerplugin/tags/acct_mgr-0.4.4
cat >> trac/conf/trac.ini <<'EOF'
[ticket-workflow]
complete = * -> closed
complete.default = -2
complete.permissions = TICKET_MODIFY
create = <none> -> new
create.operations = set_owner
create.permissions = TICKET_CREATE
create.set_owner = allen,ray,flynn,chenlei,challen,xuyang,wangxudong,c_cdun
leave = * -> *
leave.default = 1
leave.operations = leave_status
ongoing = * -> ongoing
ongoing.default = 0
ongoing.operations = set_owner_to_self
ongoing.permissions = TICKET_MODIFY
risk = * -> risk
risk.default = -1
risk.pemissions = TICKET_MODIFY
[components]
#https://trac-hacks.org/wiki/CookBook/AccountManagerPluginConfiguration
#trac.web.auth.loginmodule = disabled
#acct_mgr.web_ui.LoginModule = enabled
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
[account-manager]
password_store = HtPasswdStore
htpasswd_hash_type = md5
htpasswd_file = /var/www/trac/trac.htpasswd
EOF
touch trac/trac.htpasswd
#else
#config login
#only first need -c optoin:
#htpasswd -c trac/trac.htpasswd username password
#end
################################
# startup web-server
sudo apache2ctl restart
# trac standalone-server
trac-admin ~/work/trac/ ermission add admin TRAC_ADMIN
tracd --port 8099 /var/www/trac
###################################################
# On Windows only standalone-server easy #
###################################################
1. install python2.7
2. pip install Genshi Trac==1.0 Babel
3.
# trac standalone-server
trac-admin ~/work/trac/ ermission add admin TRAC_ADMIN
tracd --port 8000 /var/www/trac
4. open chrome explorer
5. combine apache2.4 failed because of socket fromfd
6. install apache2.4
7. install mod_fastcgi.so in apache2.4/modules
8. edit httpd.conf
9. try AJP/IIS
相关文章推荐
- Ubuntu搭建trac平台步骤
- CSS3特效:案例&3D转换
- sharesdk微信分享
- Android App内存分析
- mysql 性能小记
- percona innobackupex 使用
- postgresql 优化之--不会使用索引
- [CSS3 Practice] Simulate MacBook Dock
- 【概率】poj 2096:Collecting Bugs
- 过山车
- Cmake MySQL5.6 编译安装
- angularjs指令中的compile与link函数详解
- 读者写者问题
- java -Xms -Xmx -XX:PermSize -XX:MaxPermSize
- (转载)java提高篇(五)-----抽象类与接口
- OpenStack高可用核心架构分析
- c strtok()
- 【笔记】jQuery中on()与delegate()方法给动态添加元素绑定事件
- BZOJ1503 NOI2004 郁闷的出纳员 题解&代码
- POJ 1703 Find them, Catch them(并查集)