Changes between Version 8 and Version 9 of TracOnRhel4WithoutYum
- Timestamp:
- Feb 22, 2015, 12:49:51 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracOnRhel4WithoutYum
v8 v9 1 = Trac on Red Hat Enterprise Linux 4 WITHOUT using YUM =1 = Trac on Red Hat Enterprise Linux 4 without using YUM 2 2 3 3 '''Warning: Trac <= 0.10 will not work on RHEL x86_64 due to the ClearSilver dependency. ClearSilver will not compile on an x86_64 RHEL (CentOS, WBL, etc.) Linux system. Consider Trac 0.11-devel instead; it uses Genshi instead of ClearSilver.''' 4 4 5 '''U PDATE: 31-May-2007''' I have just installed Trac 0.10.4 on Centos 4.4 (x86_64)'''using''' [http://trac.edgewall.org/wiki/ClearSilver ClearSilver] ''clearsilver-0.10.4-2.el4.rf'' rpm and it worked for me.5 '''Update 31-May-2007''': I have just installed Trac 0.10.4 on [http://www.centos.org/ Centos 4.4 (x86_64)] '''using''' [http://trac.edgewall.org/wiki/ClearSilver ClearSilver] ''clearsilver-0.10.4-2.el4.rf'' rpm and it worked for me. 6 6 7 7 Because of the environment I'm setting up my Trac, I had no external internet access, barring an SFTP pipe. 8 8 9 Here's what I did. 10 11 == Installing Files == 12 13 * Install the standard RHEL 4 system, with the Web Server functionality. I needed it for the rest of the sites I was putting together. 14 * Install Subversion, mod_dav_svn and Python (if you've not already installed them - I wasn't making notes at this point!) 15 * Install the following packages (and I know it's overkill, but I wanted to be sure I had everything I needed). These were all on the redhat disks. 9 == Installing Files 10 11 * Install the standard RHEL 4 system with the Web Server functionality. 12 * Install Subversion, mod_dav_svn and Python, if you've not already installed them. 13 * Install the following packages (and I know it's overkill, but I wanted to be sure I had everything I needed). These were all on the RedHat disks: 16 14 * libdbi-dbd-pgsql 17 15 * perl-DBD-Pg … … 25 23 * postgresql-python 26 24 * postgresql-server 27 * Download and install pyPgSql - I think this was on Sourceforge.28 * Download and install clearsilver - I didn't do this bit, a collegue did. I think a google search will turn it up.29 * Download and install trac.30 31 == Creating your Paths ==25 * Download and install [http://pypgsql.sourceforge.net/ PyPgSql]. 26 * Download and install !ClearSilver; note the deprecation of this template engine in favor of [http://genshi.edgewall.org/ Genshi]. 27 * Download and install Trac. 28 29 == Creating your Paths 32 30 33 31 {{{ … … 38 36 }}} 39 37 40 41 == Creating your groups and users == 42 43 Obviously, if you already have your users, you don't need to do this part. 38 == Creating your groups and users 39 40 Obviously, if you already have your users, you don't need to do this part: 44 41 45 42 {{{ … … 47 44 }}} 48 45 49 This is the group to which all users who can access your Repo should belong, for SVN+SSH protocol, or just SVN .`46 This is the group to which all users who can access your Repo should belong, for SVN+SSH protocol, or just SVN: 50 47 51 48 {{{ … … 54 51 }}} 55 52 56 At this point, create a password for the user Fred_Bloggs - I'll use Fred_Bloggs_Password for the purposes of this document57 58 == Creating the Support Files for Subversion ==53 At this point, create a password for the user `Fred_Bloggs` with password `Fred_Bloggs_Password`. 54 55 == Creating the Support Files for Subversion 59 56 60 57 {{{ … … 65 62 }}} 66 63 67 This creates your Repo, then makes it owned by Apache (which means it can write to it), and is group owned by MyRepo_Access, which is the group your users should be in. This means they can write to this repository using the SVN client application. By making it writable from Apache (the owner), means that you can later configure mod_dav_svn to provide a fully-accessible repository via the web. The chmod -R g+s statement means that all changes preserve the group permissions as well as owner - I think.68 69 == Creating the Support Structure for Postgre s ==70 71 {{{ 72 su - postgres -c 'createuser -E -P -A -DMyRepoUser'73 }}} 74 75 At this point - you need to assign a password to the user MyRepo - I'll use MyRepoPassword for the purposes of this document. You should perform these steps as the "postgres" user, otherwise it will complain that there's no such database as "root". It's possible to work around it, but easier to do with su.76 77 The se switches mean:64 This creates your Repo, then makes it owned by Apache (which means it can write to it), and is group owned by `MyRepo_Access`, which is the group your users should be in. This means they can write to this repository using the SVN client application. By making it writable from Apache (the owner), means that you can later configure mod_dav_svn to provide a fully-accessible repository via the web. The `chmod -R g+s` statement means that all changes preserve the group permissions as well as owner. 65 66 == Creating the Support Structure for PostgreSQL 67 68 {{{ 69 su - postgres -c 'createuser -E -P -A -D MyRepoUser' 70 }}} 71 72 At this point you need to assign a password to the user `MyRepo` with password `MyRepoPassword`. You should perform these steps as the "postgres" user, otherwise it will complain that there's no such database as "root". It is possible to work around it, but easier to do with su. 73 74 The switches are: 78 75 79 76 * -E = Encrypt password 80 77 * -P = Assign a password 81 * -A = Not an admin (and can't create users)78 * -A = Not an admin and can't create users 82 79 * -D = Can't create other databases 83 80 … … 86 83 }}} 87 84 88 By keeping this all the same, it's a security hole, but easier to remember. Adjust according to your local policies! Also take into account , who can connect to this service. Bear in mind that the default install of postgresdoes not allow you to connect to the server using TCP/IP Sockets. You'll need to adjust the following files:85 By keeping this all the same, it's a security hole, but easier to remember. Adjust according to your local policies! Also take into account who can connect to this service. Bear in mind that the default install of PostgreSQL does not allow you to connect to the server using TCP/IP Sockets. You'll need to adjust the following files: 89 86 90 87 * /var/lib/pgsql/data/pg_hba.conf … … 96 93 }}} 97 94 98 These lines seem to mean99 1) `host all all` = TCP/IP connections from localhost need to authenticate with an MD5 hashed password 100 2) `local template1 all` = Socket connections to the database master table is trusted provided it's talking to (is it about?)a database with the same name as your user account.101 3) `local all all` = Socket connections from the localhost need to authenticate with an MD5 hashed password 95 These lines mean the following: 96 1. `host all all`: TCP/IP connections from localhost need to authenticate with an MD5 hashed password. 97 1. `local template1 all`: Socket connections to the database master table is trusted, provided it is talking to a database with the same name as your user account. 98 1. `local all all`: Socket connections from the localhost need to authenticate with an MD5 hashed password. 102 99 103 100 * /etc/init.d/postgres 104 101 105 Find the line 102 Find the line: 106 103 107 104 {{{ … … 109 106 }}} 110 107 111 Replace it with 108 Replace it with: 112 109 {{{ 113 110 $SU -l postgres -c "$PGENGINE/postmaster -i -p ${PGPORT} -D '${PGDATA}' ${PGOPTS} &" >> $PGLOG 2>&1 < /dev/null 114 111 }}} 115 112 116 (Note the additional -i which allows "Internet" traffic - I think. This was the main blocker for me.) 117 118 You'll then need to restart postgresql with 113 Note the additional `-i` which allows "Internet" traffic, which was the main blocker. 114 115 Then restart PostgreSQL with: 119 116 120 117 {{{ … … 122 119 }}} 123 120 124 == Create your Trac ==125 126 trac-admin will not create a repository if the path already exists (although I have seen a patch which changes this statement), so the first line in the following statements will remove the folder if you've already tried to make something there .121 == Create your Trac 122 123 trac-admin will not create a repository if the path already exists (although I have seen a patch which changes this statement), so the first line in the following statements will remove the folder if you've already tried to make something there: 127 124 128 125 {{{ … … 131 128 }}} 132 129 133 System user accounts are not the same as the user accounts for your site. If you 've got users who you want to be able to use only specific functions on trac, then use this command130 System user accounts are not the same as the user accounts for your site. If you have users who you want to be able to use only specific functions on Trac, then use this command: 134 131 135 132 {{{ … … 137 134 }}} 138 135 139 == Setup Apache ==140 141 The default install path for the trac CGI files are in /usr/share/trac/cgi-bin. These need to be copied to the relevant path for your Trac install, and renamed (if you've got multiple Trac installations.)136 == Setup Apache 137 138 The default install path for the Trac CGI files are in /usr/share/trac/cgi-bin. These need to be copied to the relevant path for your Trac install and renamed if you have multiple Trac installations: 142 139 143 140 {{{ … … 147 144 }}} 148 145 149 I don't actually know what the benefits of FCGI over CGI are, so I've made configs for them both. Create a file in /etc/httpd.d/conf.d/Trac_MyRepo.conf146 I don't actually know what the benefits of FCGI over CGI are, so I've made configs for both of them. Create a file in `/etc/httpd.d/conf.d/Trac_MyRepo.conf`: 150 147 151 148 {{{ … … 180 177 }}} 181 178 182 Finally, restart your HTTPD service with179 Finally, restart your httpd service with: 183 180 184 181 {{{ … … 186 183 }}} 187 184 188 == Adjusting this document for multiple repositories and wikis == 189 190 Essentially, you can do a Search & Replace on !MyRepo and put in your repository name. 191 192 This stage requires input 185 == Accommmodating multiple repositories and wikis 186 187 Essentially, you can do a Search & Replace on !MyRepo and put in your repository name. This stage requires input: 188 193 189 {{{ 194 190 su - postgres -c 'createuser -E -P -A -D MyRepoUser' 195 191 }}} 196 192 197 The rest of these steps can be performed without input 193 The rest of these steps can be performed without input: 194 198 195 {{{ 199 196 svnadmin create /var/svn/repo/MyRepo … … 208 205 }}} 209 206 210 Create this file /etc/httpd/conf.d/Trac_MyRepo.conf 207 Create this file /etc/httpd/conf.d/Trac_MyRepo.conf: 208 211 209 {{{ 212 210 <LocationMatch /cgi-bin/MyRepo\.f?cgi>