Mudanças entre as edições de "InstallTRAC"

De Slacam_Wiki
Ir para: navegação, pesquisa
(Criou página com ''''Instalação do TRAC''' I’m using Slicehost, but these instructions should work for any hosting provider running CentOS 5. I am not using Subversion (because it sucks and …')
 
Linha 4: Linha 4:
 
I’m using Slicehost, but these instructions should work for any hosting provider running CentOS 5. I am not using Subversion (because it sucks and has been slain by Git). If you need SVN support, check out the posts by Nick or Daniel Skinner.
 
I’m using Slicehost, but these instructions should work for any hosting provider running CentOS 5. I am not using Subversion (because it sucks and has been slain by Git). If you need SVN support, check out the posts by Nick or Daniel Skinner.
  
    Install python and mod_python (for Apache)
+
Install python and mod_python (for Apache)
 
         yum install python mod_python
 
         yum install python mod_python
    Install MySQL-python
+
Install MySQL-python
 
         Download the tarball from http://sourceforge.net/projects/mysql-python
 
         Download the tarball from http://sourceforge.net/projects/mysql-python
 
         Compile the package:
 
         Compile the package:
 
         python setup.py build && python setup.py install
 
         python setup.py build && python setup.py install
    Install Clearsilver, a templating package needed by Trac
+
Install Clearsilver, a templating package needed by Trac
        Download Clearsilver from http://www.clearsilver.net/downloads/
+
Download Clearsilver from http://www.clearsilver.net/downloads/
        Compile Clearsilver:
+
Compile Clearsilver:
 
         ./configure –with-python=/path/to/python && make && make install
 
         ./configure –with-python=/path/to/python && make && make install
        Note: My path to python is /usr/lib/python2.4
+
Note: My path to python is /usr/lib/python2.4
    Install Trac
+
Install Trac
        Download Trac from http://trac.edgewall.org/wiki/TracDownload
+
Download Trac from http://trac.edgewall.org/wiki/TracDownload
        Setup Trac:
+
Setup Trac:
 
         python ./setup.py install
 
         python ./setup.py install
    Create a Trac project
+
Create a Trac project
        I’m going to keep all of my Trac projects in /var/www/apps/trac, and for this example, I’ll call my project MyTracProject
+
I’m going to keep all of my Trac projects in /var/www/apps/trac, and for this example, I’ll call my project MyTracProject
        trac-admin /var/www/apps/trac/MyTracProject initenv
+
      trac-admin /var/www/apps/trac/MyTracProject initenv
        Give your project a name of your choosing, but accept the default for all other settings.
+
Give your project a name of your choosing, but accept the default for all other settings.
    Install TracWebAdmin
+
Install TracWebAdmin
        Note: This is an optional step, if you would like to administer Trac from within Trac itself. Also, installation of this plugin is only necessary if you’re running Trac version 0.10 or earlier as 0.11 has integrated this plugin into the core Trac package.
+
Note: This is an optional step, if you would like to administer Trac from within Trac itself. Also, installation of this plugin is only necessary if you’re running Trac version 0.10 or earlier as 0.11 has integrated this plugin into the core Trac package.
        In a temporaty directory, grab the TracWebAdmin package:
+
In a temporaty directory, grab the TracWebAdmin package:
 
         svn co http://svn.edgewall.com/repos/trac/sandbox/webadmin/
 
         svn co http://svn.edgewall.com/repos/trac/sandbox/webadmin/
 
         cd webadmin
 
         cd webadmin
 
         python setup.py egg_info
 
         python setup.py egg_info
 
         cp dist/TracWebAdmin-0.1.2dev_r5753-py2.4.egg /var/www/apps/trac/MyTracProject/plugins (Note: the actual filename may be different, depending on the build)
 
         cp dist/TracWebAdmin-0.1.2dev_r5753-py2.4.egg /var/www/apps/trac/MyTracProject/plugins (Note: the actual filename may be different, depending on the build)
        Enable the plugin by adding the following to your trac.ini found at /var/www/apps/trac/MyTracProject/conf/trac.in
+
Enable the plugin by adding the following to your trac.ini found at /var/www/apps/trac/MyTracProject/conf/trac.in
        view sourceprint?
+
 
         1.[components]
 
         1.[components]
 
         2.webadmin.* = enabled
 
         2.webadmin.* = enabled
    Define some Trac users
+
Define some Trac users
        Create a file to store your authorized users:
+
Create a file to store your authorized users:
 
         touch /var/www/apps/trac/auth-file
 
         touch /var/www/apps/trac/auth-file
        Add a user to the file:
+
Add a user to the file:
 
         htpasswd -m /var/www/apps/trac/auth-file <username>
 
         htpasswd -m /var/www/apps/trac/auth-file <username>
    Give admin permissions to the Trac user
+
Give admin permissions to the Trac user
 
         trac-admin /var/www/apps/trac/MyTracProject permission add <username> TRAC_ADMIN
 
         trac-admin /var/www/apps/trac/MyTracProject permission add <username> TRAC_ADMIN
    Configure Apache
+
Configure Apache
        Load mod_python by editing your httpd.conf (for me this is /etc/httpd/conf/httpd.conf) and add “LoadModule python_module modules/mod_python.so”
+
Load mod_python by editing your httpd.conf (for me this is /etc/httpd/conf/httpd.conf) and add “LoadModule python_module modules/mod_python.so”
        I want to access Trac via http://trac.mytrackproject.com
+
I want to access Trac via http://trac.mytrackproject.com
        You’ll need a CNAME record in your DNS to support the trac.mytrackproject.com subdomain.
+
You’ll need a CNAME record in your DNS to support the trac.mytrackproject.com subdomain.
        You’ll also need to create a VirtualHost section in Apache’s httpd.conf file. For example:
+
You’ll also need to create a VirtualHost section in Apache’s httpd.conf file. For example:
        view sourceprint?
+
 
         01.<virtualHost *:80>
 
         01.<virtualHost *:80>
 
         02.  
 
         02.  
Linha 65: Linha 63:
 
         17.  
 
         17.  
 
         18.</virtualHost>
 
         18.</virtualHost>
    Restart Apache: service httpd restart
+
Restart Apache: service httpd restart
    Go to http://trac.mytrackproject.com and start using Trac
+
Go to http://trac.mytrackproject.com and start using Trac

Edição das 02h35min de 17 de setembro de 2011

Instalação do TRAC


I’m using Slicehost, but these instructions should work for any hosting provider running CentOS 5. I am not using Subversion (because it sucks and has been slain by Git). If you need SVN support, check out the posts by Nick or Daniel Skinner.

Install python and mod_python (for Apache)

       yum install python mod_python

Install MySQL-python

       Download the tarball from http://sourceforge.net/projects/mysql-python
       Compile the package:
       python setup.py build && python setup.py install

Install Clearsilver, a templating package needed by Trac Download Clearsilver from http://www.clearsilver.net/downloads/ Compile Clearsilver:

       ./configure –with-python=/path/to/python && make && make install

Note: My path to python is /usr/lib/python2.4 Install Trac Download Trac from http://trac.edgewall.org/wiki/TracDownload Setup Trac:

       python ./setup.py install

Create a Trac project I’m going to keep all of my Trac projects in /var/www/apps/trac, and for this example, I’ll call my project MyTracProject

      trac-admin /var/www/apps/trac/MyTracProject initenv

Give your project a name of your choosing, but accept the default for all other settings. Install TracWebAdmin Note: This is an optional step, if you would like to administer Trac from within Trac itself. Also, installation of this plugin is only necessary if you’re running Trac version 0.10 or earlier as 0.11 has integrated this plugin into the core Trac package. In a temporaty directory, grab the TracWebAdmin package:

       svn co http://svn.edgewall.com/repos/trac/sandbox/webadmin/
       cd webadmin
       python setup.py egg_info
       cp dist/TracWebAdmin-0.1.2dev_r5753-py2.4.egg /var/www/apps/trac/MyTracProject/plugins (Note: the actual filename may be different, depending on the build)

Enable the plugin by adding the following to your trac.ini found at /var/www/apps/trac/MyTracProject/conf/trac.in

       1.[components]
       2.webadmin.* = enabled

Define some Trac users Create a file to store your authorized users:

       touch /var/www/apps/trac/auth-file

Add a user to the file:

       htpasswd -m /var/www/apps/trac/auth-file <username>

Give admin permissions to the Trac user

       trac-admin /var/www/apps/trac/MyTracProject permission add <username> TRAC_ADMIN

Configure Apache Load mod_python by editing your httpd.conf (for me this is /etc/httpd/conf/httpd.conf) and add “LoadModule python_module modules/mod_python.so” I want to access Trac via http://trac.mytrackproject.com You’ll need a CNAME record in your DNS to support the trac.mytrackproject.com subdomain. You’ll also need to create a VirtualHost section in Apache’s httpd.conf file. For example:

       01.<virtualHost *:80>
       02. 
       03.ServerName trac.mytrackproject.com
       04. 
       05.<location />
       06.SetHandler mod_python
       07.PythonHandler trac.web.modpython_frontend
       08.PythonOption TracEnv /var/www/apps/trac/mytrackproject
       09.PythonOption TracUriRoot /
       10.</location>
       11.<location "/login">
       12.AuthType Basic
       13.AuthName "trac"
       14.AuthUserFile /var/www/apps/trac/auth-file
       15.Require valid-user
       16.</location>
       17. 
       18.</virtualHost>

Restart Apache: service httpd restart Go to http://trac.mytrackproject.com and start using Trac