Edgewall Software

Changes between Version 8 and Version 9 of TracOnRhel4WithoutYum


Ignore:
Timestamp:
Feb 22, 2015, 12:49:51 PM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

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
    22
    33'''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.'''
    44
    5 '''UPDATE: 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.
    66
    77Because of the environment I'm setting up my Trac, I had no external internet access, barring an SFTP pipe.
    88
    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:
    1614   * libdbi-dbd-pgsql
    1715   * perl-DBD-Pg
     
    2523   * postgresql-python
    2624   * 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
    3230
    3331{{{
     
    3836}}}
    3937
    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
     40Obviously, if you already have your users, you don't need to do this part:
    4441
    4542{{{
     
    4744}}}
    4845
    49 This is the group to which all users who can access your Repo should belong, for SVN+SSH protocol, or just SVN.`
     46This is the group to which all users who can access your Repo should belong, for SVN+SSH protocol, or just SVN:
    5047
    5148{{{
     
    5451}}}
    5552
    56 At this point, create a password for the user Fred_Bloggs - I'll use Fred_Bloggs_Password for the purposes of this document
    57 
    58 == Creating the Support Files for Subversion ==
     53At this point, create a password for the user `Fred_Bloggs` with password `Fred_Bloggs_Password`.
     54
     55== Creating the Support Files for Subversion
    5956
    6057{{{
     
    6562}}}
    6663
    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 Postgres ==
    70 
    71 {{{
    72 su - postgres -c 'createuser  -E -P -A -D MyRepoUser'
    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 These switches mean:
     64This 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{{{
     69su - postgres -c 'createuser -E -P -A -D MyRepoUser'
     70}}}
     71
     72At 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
     74The switches are:
    7875
    7976 * -E = Encrypt password
    8077 * -P = Assign a password
    81  * -A = Not an admin (and can't create users)
     78 * -A = Not an admin and can't create users
    8279 * -D = Can't create other databases
    8380
     
    8683}}}
    8784
    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 postgres does not allow you to connect to the server using TCP/IP Sockets. You'll need to adjust the following files:
     85By 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:
    8986
    9087 * /var/lib/pgsql/data/pg_hba.conf
     
    9693}}}
    9794
    98 These lines seem to mean
    99 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
     95These 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.
    10299
    103100 * /etc/init.d/postgres
    104101
    105 Find the line
     102Find the line:
    106103
    107104{{{
     
    109106}}}
    110107
    111 Replace it with 
     108Replace it with:
    112109{{{
    113110$SU -l postgres -c "$PGENGINE/postmaster -i -p ${PGPORT} -D '${PGDATA}' ${PGOPTS} &" >> $PGLOG 2>&1 < /dev/null
    114111}}}
    115112
    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
     113Note the additional `-i` which allows "Internet" traffic, which was the main blocker.
     114
     115Then restart PostgreSQL with:
    119116
    120117{{{
     
    122119}}}
    123120
    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
     123trac-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:
    127124
    128125{{{
     
    131128}}}
    132129
    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 command
     130System 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:
    134131
    135132{{{
     
    137134}}}
    138135
    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
     138The 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:
    142139
    143140{{{
     
    147144}}}
    148145
    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.conf
     146I 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`:
    150147
    151148{{{
     
    180177}}}
    181178
    182 Finally, restart your HTTPD service with
     179Finally, restart your httpd service with:
    183180
    184181{{{
     
    186183}}}
    187184
    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
     187Essentially, you can do a Search & Replace on !MyRepo and put in your repository name. This stage requires input:
     188
    193189{{{
    194190su - postgres -c 'createuser  -E -P -A -D  MyRepoUser'
    195191}}}
    196192
    197 The rest of these steps can be performed without input
     193The rest of these steps can be performed without input:
     194
    198195{{{
    199196svnadmin create /var/svn/repo/MyRepo
     
    208205}}}
    209206
    210 Create this file /etc/httpd/conf.d/Trac_MyRepo.conf
     207Create this file /etc/httpd/conf.d/Trac_MyRepo.conf:
     208
    211209{{{
    212210<LocationMatch /cgi-bin/MyRepo\.f?cgi>