Changes between Version 10 and Version 11 of TracOnArchLinux
- Timestamp:
- Apr 21, 2018, 11:26:27 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracOnArchLinux
v10 v11 1 {{{#!div style="background-color: #ffd; border:1px outset #ddc; font-size: 85%" 2 {{{#!div style="text-align:center" 3 1 {{{#!div style="background-color: #ffd; border:1px outset #ddc;" 4 2 **Caveat: this page is not necessarily up to date...** 5 6 }}}7 3 8 4 As a general advice for any ''platform specific'' installation guide like this one, you should first make sure that the tips given here are not out of date with respect to the generic instructions given in TracInstall and TracUpgrade. 9 5 The latter are documenting either the latest stable version of Trac, or the one about to be released (0.12 as of this writing). 10 If you're planning to install an older version of Trac, have a look at the corresponding archived pages, for example: 11 - [[0.11/TracInstall]] and [[0.11/TracUpgrade]] 12 - [[0.10/TracInstall]] and [[0.10/TracUpgrade]] 6 If you're planning to install an older version of Trac, have a look at the corresponding archived pages, for example [[0.11/TracInstall]] and [[0.11/TracUpgrade]] 13 7 }}} 14 8 15 9 [[PageOutline(2-3)]] 16 = Installing Trac on !ArchLinux for Multiple Projects using Mod_Python = 17 [http://www.archlinux.org ArchLinux] is powered by a simple and lightweight package management system. It is release by rolling binary system. Keep update by command line '''pacman -Syu''' will get the most recent version. 18 19 In following steps, I set these variable for simply input 10 11 = Installing Trac on !ArchLinux for Multiple Projects using Mod_Python 12 13 [http://www.archlinux.org ArchLinux] uses a lightweight package management system. It is released by a rolling binary system. Keep your Arch-Linux system up to date by command line '''pacman -Syu''', which will retrieve the most recent versions of your packages. 14 15 In the following steps, set these variables: 20 16 {{{ 21 17 TROOT=/home/trac # put the multiple trac project's db … … 24 20 }}} 25 21 26 == install packages == 27 === install depend packages from binary === 22 == Install packages 23 24 === Install depend packages from binary 25 28 26 {{{ 29 27 pacman -S mod_python python-pysqlite subversion 30 28 }}} 31 === Download trac from binary === 32 Trac is already on community repository, check /etc/pacman.conf, make sure uncomment the following. 33 {{{ 29 30 === Download Trac from binary 31 32 Trac is already on community repository, check /etc/pacman.conf, make sure uncomment the following: 33 {{{#!ini 34 34 [community] 35 35 # Add your preferred servers here, they will be used first … … 39 39 SUPFILES=(arch extra !unstable community !testing) 40 40 41 download and install it 41 Download and install it: 42 42 43 {{{ 43 44 pacman -S trac 44 45 }}} 45 46 46 === or, build trac from source === 47 if want the newest version trac. 48 49 edit the /etc/abs/abs.conf, unmark the community 47 === Or, build Trac from source 48 49 If you want the newest version Trac, edit the /etc/abs/abs.conf, unmark the community: 50 50 {{{ 51 51 SUPFILES=(arch extra !unstable community !testing) 52 52 }}} 53 53 54 {{{ 54 {{{#!sh 55 55 cd /var/abs/community/network/trac 56 56 vi PKGBUILD # modify the version to the newest version … … 61 61 }}} 62 62 63 == configure mod_python and svn_dav == 64 edit /etc/httpd/conf/httpd.conf, append following line 65 {{{ 63 == Configure mod_python and svn_dav 64 65 Edit /etc/httpd/conf/httpd.conf, append following line: 66 {{{#!apache 66 67 LoadModule python_module modules/mod_python.so 67 68 LoadModule dav_svn_module modules/mod_dav_svn.so … … 69 70 }}} 70 71 71 use following line to restart apache, check /var/log/httpd/error.log, if failed 72 {{{ 72 Use following line to restart Apache, check /var/log/httpd/error.log if failed: 73 {{{#!sh 73 74 /etc/rc.d/httpd restart 74 75 }}} 75 76 76 Tips: you can check it by http://your_server_ip/server-info after following config 77 {{{ 78 edit /etc/httpd/conf/httpd.conf, uncomment following line 79 Include /etc/httpd/conf/extra/httpd-info.conf 80 81 edit /etc/httpd/conf/extra/httpd-info.conf, modify the "Allow from" to your client ip address 82 }}} 83 84 == setup subversion for each project == 85 {{{ 77 '''Tips''': you can check it by http://your_server_ip/server-info after applying the following configuration: 78 * Edit /etc/httpd/conf/httpd.conf, uncomment following line: Include /etc/httpd/conf/extra/httpd-info.conf 79 * Edit /etc/httpd/conf/extra/httpd-info.conf, modify the "Allow from" to your client's IP address 80 81 == Setup subversion for each project 82 83 {{{#!sh 86 84 mkdir -p $SROOT/$PRJ 87 85 mkdir /tmp/$PRJ … … 94 92 svn ls -v file://$SROOT/$PRJ # check it 95 93 }}} 96 == setup trac db for each project == 94 95 == Setup the Trac database for each project 96 97 97 mkdir -p $TROOT 98 98 99 setup by interactive questions 100 {{{ 99 Setup by interactive questions: 100 {{{#!sh 101 101 trac-admin $TROOT/$PRJ initenv 102 102 }}} 103 or, by command line parameters 104 {{{ 103 104 Or, by command line parameters: 105 {{{#!sh 105 106 trac-admin $TROOT/$PRJ initenv $PRJ sqlite:db/trac.db svn $SROOT/$PRJ /usr/share/trac/templates 106 107 }}} 107 edit $TROOT/$PRJ/conf/trac.ini 108 {{{ 108 109 Edit your `trac.ini` file: 110 {{{#!ini 109 111 [header_logo] 110 112 link = http://your_server_ip/trac 111 113 [logging] 112 log_type = file <--we need check log to figure out problems114 log_type = file # we need check log to figure out problems 113 115 [project] 114 url = http://your_server_ip/trac/project1 <-- change to $PRJ 115 }}} 116 == authentication == 117 === create password file === 118 {{{ 116 url = http://your_server_ip/trac/project1 # change to $PRJ 117 }}} 118 119 == Authentication 120 121 === Create password file 122 123 {{{#!sh 119 124 htpasswd -c /home/trac/.htpasswd admin # create 'admin' account 120 125 htpasswd /home/trac/.htpasswd new_user # append a 'new_user' account 121 126 }}} 122 === create access file === 123 sample /home/svn/.svn.access 127 128 === Create access file 129 130 Sample /home/svn/.svn.access: 124 131 {{{ 125 132 [/] … … 130 137 }}} 131 138 132 == configure apache == 133 {{{ 139 == Configure Apache as the web server 140 141 {{{#!apache 134 142 chown -R http.http $SROOT $TROOT # allow httpd's owner 'http' could read/write 135 143 … … 177 185 }}} 178 186 187 Then restart your web server: 179 188 {{{ 180 189 /etc/rc.d/httpd restart … … 182 191 apachectl -k start 183 192 }}} 184 Now, you should be able to access Trac at http://you_server_ip/trac/$PRJ 185 186 == access via https(optional) == 187 via https will be safer, but it may be slower. 188 {{{ 193 194 Now, you should be able to access Trac at `http://your_server_ip/trac/$PRJ`. 195 196 == Access via https (optional) 197 198 Data traffic via https will be safer, but it may be slower. To configure https, enter the following commands: 199 200 {{{#!sh 189 201 cd /etc/httpd/conf # must change to this directory before doing the mod_ssl.txt 190 202 more mod_ssl.txt 191 203 }}} 192 1. following the instructions in mod_ssl.txt to generate key files. 204 205 1. Follow the instructions in mod_ssl.txt to generate key files. 193 206 1. Add the the lines of httpd-vhosts.conf to /etc/httpd/conf/extra/httpd-ssl.conf. 194 1. uncomment the include /etc/httpd/conf/extra/httpd-ssl.conf in /etc/httpd/conf/httpd.conf195 1. restart apache by /etc/rc.d/httpd restart207 1. Uncomment the include /etc/httpd/conf/extra/httpd-ssl.conf in /etc/httpd/conf/httpd.conf. 208 1. Restart Apache by /etc/rc.d/httpd restart.