| 1 | = easyTrac installer = |
| 2 | |
| 3 | The easyTrac installer is a source-installation kit that installs a complete Trac environment and all its dependecies. |
| 4 | |
| 5 | Feedback/bugs to: |
| 6 | * Email: manuel.viera.tirado at gmail.com |
| 7 | * Twitter: http://twitter.com/mviera |
| 8 | |
| 9 | |
| 10 | == Installation instructions == |
| 11 | |
| 12 | The installer will compile '''Nginx''' and '''uWSGI''' and it will install all required python dependencies also. |
| 13 | But for compile Nginx and uWSGI a few dependencies are required to be installed in the system. This dependencies |
| 14 | are the following: |
| 15 | |
| 16 | === Dependencies === |
| 17 | * libpcre3-dev |
| 18 | * libssl-dev |
| 19 | * libxml2-dev |
| 20 | * libxslt-dev |
| 21 | * libsqlite3-dev |
| 22 | * libzzip-dev |
| 23 | * libapr1-dev |
| 24 | * libaprutil1-dev |
| 25 | |
| 26 | PLEASE NOTE: You can run the easyTrac installation as root or as a normal user. Personally, I prefer to run the installation as a normal user. |
| 27 | |
| 28 | The installer config works out of the box, but if you want, you can edit buildout.cfg and |
| 29 | modify the following parameters: |
| 30 | |
| 31 | * '''nginx-http-port''': http port that will be used for Nginx. |
| 32 | * '''nginx-https-port''': https port that will be used for Nginx (in case you want to use https). |
| 33 | * '''supervisor-http-port''': http port that will be used for supervisor. |
| 34 | * '''host''': host ip address of fqdn. |
| 35 | * '''socket-directory''': directory where the socket will be stored. |
| 36 | * '''pid-directory''': directory where the pid files will be stored. |
| 37 | * '''log-directory''': logs directory. |
| 38 | * '''trac-projects-directory''': directory where the Trac projects will be created. |
| 39 | * '''svn-repository-directory''': directory where the svn repositories will be created. |
| 40 | |
| 41 | Once you have installed all required dependencies, you can continue with the installation process. |
| 42 | So you execute the following command: |
| 43 | {{{ |
| 44 | $ python bootstrap.py |
| 45 | }}} |
| 46 | |
| 47 | You should have the buildout environment ready to go. Now, you must execute the buildout installation: |
| 48 | {{{ |
| 49 | $ ./bin/buildout |
| 50 | }}} |
| 51 | |
| 52 | == How to start, stop, restart services == |
| 53 | |
| 54 | Supervisor provides a control script to start, stop or restart our |
| 55 | services. In our supervisor we only get two services: nginx and uwsgi. |
| 56 | |
| 57 | The supervisorctl syntax is: |
| 58 | {{{ |
| 59 | $ ./bin/supervisorctl <command> <service-name> |
| 60 | }}} |
| 61 | === start services === |
| 62 | {{{ |
| 63 | $ ./bin/supervisorctl start nginx |
| 64 | }}} |
| 65 | === stop services === |
| 66 | {{{ |
| 67 | $ ./bin/supervisorctl stop nginx |
| 68 | }}} |
| 69 | === restart services === |
| 70 | {{{ |
| 71 | $ ./bin/supervisorctl restart nginx |
| 72 | }}} |
| 73 | Also, supervisor provides an especial word 'all', so we don't need to specify |
| 74 | every service name. For example, if we need to restart all services: |
| 75 | {{{ |
| 76 | $ ./bin/supervisorct restart all |
| 77 | }}} |
| 78 | |
| 79 | Supervisor has an admin panel on where we can control our services via web. This admin control |
| 80 | panel is accesible at: |
| 81 | |
| 82 | http://localhost:9000 |
| 83 | |
| 84 | NOTE: by default, the username is 'admin' and the password is 'admin.' To change the admin password, |
| 85 | edit the [supervisor] part in buildout.cfg and run bin/buildout. |
| 86 | |
| 87 | == Uninstall instructions == |
| 88 | |
| 89 | 1. Stop supervisord by running: ./bin/supervisorctl shutdown |
| 90 | 1. Remove the folder <installdir>/easyTrac |
| 91 | |
| 92 | == Backup instructions == |
| 93 | |
| 94 | easyTrac includes a backup script. So, if you want to make a backup you only must to |
| 95 | execute the following command: |
| 96 | {{{ |
| 97 | $ ./bin/backup |
| 98 | }}} |
| 99 | and all the trac projects will be backed up into a tarball to the backups directory, called '''backups'''. |
| 100 | |
| 101 | == Restore instructions == |
| 102 | |
| 103 | Also, easyTrac provides a restore script, useful to restore old backups. Its usage is as simple as follow: |
| 104 | {{{ |
| 105 | $ ./bin/restore backups/backup-file.tar.gz |
| 106 | }}} |
| 107 | and all the trac projects will be restored. |