Trac at job4: Difference between revisions

From JoBaPedia
Jump to navigation Jump to search
 
Line 1: Line 1:
== Installation ==
== Installation ==
* enable python2 for apache
 
* Install tracd in /usr/local/bin
* create and login as user trac
** sudo pip2 install Trac
* get python > 3.5
* create and activate venv
* pip install trac
* Install Graphwiz plugin (nice to have)
* Install Graphwiz plugin (nice to have)
** sudo pip2 install TracGraphviz
** pip install TracGraphviz
** After trac (re)start: page Admin/Plugins: enable TracGraphviz
** After trac (re)start: page Admin/Plugins: enable TracGraphviz
** Test this:
** Test this:
Line 14: Line 16:
  }}}
  }}}
* Install Plant UML Plugin (nice to have)
* Install Plant UML Plugin (nice to have)
** sudo pip2 install TracPlantUml
** pip install TracPlantUml
** After trac (re)start: page Admin/Plugins: enable TracPlantUml
** After trac (re)start: page Admin/Plugins: enable TracPlantUml
** DL file to trac folder
** DL file to trac folder
  cd /home/joachim/Dokumente/trac
  cd /home/trac/data
  wget https://sourceforge.net/projects/plantuml/files/plantuml.jar
  wget https://sourceforge.net/projects/plantuml/files/plantuml.jar
** Add this to trac.ini
** Add this to trac.ini
  [plantuml]
  [plantuml]
  java_bin = java
  java_bin = java
  plantuml_jar = /home/joachim/Dokumente/trac/plantuml.jar
  plantuml_jar = /home/trac/data/plantuml.jar
** Test this:
** Test this:
  {{{#!PlantUml
  {{{#!PlantUml
Line 32: Line 34:
  @enduml
  @enduml
  }}}
  }}}
* Create wiki in /home/joachim/Dokumente/trac
* Create wiki in /home/trac/data
* Autostart
* Autostart
  job4:/etc/systemd/system # cat trac.service  
  job4:/etc/systemd/system # cat trac.service  
Line 40: Line 42:
  [Service]
  [Service]
  Type=simple
  Type=simple
  User=joachim
  User=trac
  ExecStart=/usr/bin/python2 /usr/local/bin/tracd -s --port 8000 --auth='*,/home/joachim/Dokumente/trac/users.htdigest,Joachim privat' trac
  ExecStart=/home/trac/python-3.12.2/venv/base/bin/tracd -s --port 8000 --auth='*,/home/trac/data/users.htdigest,Joachim privat' data
  WorkingDirectory=/home/joachim/Dokumente/
  WorkingDirectory=/home/trac
  Restart=on-failure
  Restart=on-failure
   
   

Latest revision as of 19:23, 15 March 2024

Installation

  • create and login as user trac
  • get python > 3.5
  • create and activate venv
  • pip install trac
  • Install Graphwiz plugin (nice to have)
    • pip install TracGraphviz
    • After trac (re)start: page Admin/Plugins: enable TracGraphviz
    • Test this:
{{{#!graphviz
digraph G {
  "All Paths"->"All Uses"->"All P Uses"->"All Defs" 
               "All Uses"->"All C Uses"->"All Defs" 
}
}}}
  • Install Plant UML Plugin (nice to have)
    • pip install TracPlantUml
    • After trac (re)start: page Admin/Plugins: enable TracPlantUml
    • DL file to trac folder
cd /home/trac/data
wget https://sourceforge.net/projects/plantuml/files/plantuml.jar
    • Add this to trac.ini
[plantuml]
java_bin = java
plantuml_jar = /home/trac/data/plantuml.jar
    • Test this:
{{{#!PlantUml
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@enduml
}}}
  • Create wiki in /home/trac/data
  • Autostart
job4:/etc/systemd/system # cat trac.service 
[Unit]
Description=Trac Wiki

[Service]
Type=simple
User=trac
ExecStart=/home/trac/python-3.12.2/venv/base/bin/tracd -s --port 8000 --auth='*,/home/trac/data/users.htdigest,Joachim privat' data
WorkingDirectory=/home/trac
Restart=on-failure

[Install]
WantedBy=multi-user.target

Users

  • /home/joachim/Dokumente/trac/users.htdigest
  • /home/joachim/Dokumente/trac/README.users.htdigest
htdigest /home/joachim/Dokumente/trac/users.htdigest 'Joachim privat' julian