| 1 | ================================ |
|---|
| 2 | ISPManCCP - Install Instructions |
|---|
| 3 | ================================ |
|---|
| 4 | |
|---|
| 5 | The one thing ISPManCCP can't do for you is install |
|---|
| 6 | `python-ldap <http://python-ldap.sourceforge.net/>`_ and |
|---|
| 7 | `pyDNS <http://pydns.sourceforge.net/>`_, but most |
|---|
| 8 | distributions can provide that for you. |
|---|
| 9 | |
|---|
| 10 | **NOTE**: If you choose not to install `pyDNS |
|---|
| 11 | <http://pydns.sourceforge.net/>`_, the only that will happen is that email |
|---|
| 12 | forwarding addresses will not be checked for a valid DNS MX record. |
|---|
| 13 | `python-ldap <http://python-ldap.sourceforge.net/>`_ on the other hand is |
|---|
| 14 | **required** and will make setup fail if not present on your system. |
|---|
| 15 | |
|---|
| 16 | After `python-ldap <http://python-ldap.sourceforge.net/>`_ and |
|---|
| 17 | `pyDNS <http://pydns.sourceforge.net/>`_ is installed, ISPManCCP |
|---|
| 18 | can then be installed with `Easy Install |
|---|
| 19 | <http://peak.telecommunity.com/DevCenter/EasyInstall>`_ by typing:: |
|---|
| 20 | |
|---|
| 21 | > easy_install ISPManCCP |
|---|
| 22 | |
|---|
| 23 | If the above fails and you're on debian, please do:: |
|---|
| 24 | |
|---|
| 25 | > apt-get install libperl-dev |
|---|
| 26 | |
|---|
| 27 | Then try to install ISPManCCP again. |
|---|
| 28 | |
|---|
| 29 | Now make a config file as follows:: |
|---|
| 30 | |
|---|
| 31 | > mkdir /etc/ispmanccp |
|---|
| 32 | > cd /etc/ispmanccp |
|---|
| 33 | > paster make-config ISPManCCP config.ini |
|---|
| 34 | |
|---|
| 35 | I created a directory in ``/etc`` because ISPManCCP creates a ``data`` |
|---|
| 36 | sub-directory where the ``config.ini`` resides if you don't change |
|---|
| 37 | ``cache_data_dir`` and ``session_data_dir`` to point to an absolute path, |
|---|
| 38 | ie, without that ``%(here)s``. |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | You should now edit ``config.ini`` and change it to your needs. |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | Serve the application |
|---|
| 45 | --------------------- |
|---|
| 46 | |
|---|
| 47 | You can serve the application with `paster <http://pythonpaste.org/>`_ by typing:: |
|---|
| 48 | |
|---|
| 49 | > paster serve /etc/ispmanccp/config.ini |
|---|
| 50 | |
|---|
| 51 | Since most `ISPMan <http://ispman.net>`_ installations will already have |
|---|
| 52 | apache installed, you can opt by having apache proxy requests to/from `paster |
|---|
| 53 | <http://pythonpaste.org/>`_. I find this the ideal setup because I can just run |
|---|
| 54 | `paster <http://pythonpaste.org/>`_ with a specific user and group(one with |
|---|
| 55 | permissions to read from the `ISPMan <http://ispman.net>`_ installation and |
|---|
| 56 | still use port 80. |
|---|
| 57 | |
|---|
| 58 | Of course, running paster like shown on the above command means you have to do |
|---|
| 59 | it by hand. `Paster <http://pythonpaste.org/>`_ can be daemon'ized, so you |
|---|
| 60 | could create an init script. |
|---|
| 61 | |
|---|
| 62 | Bellow I'll show you some examples on how you could use `paster |
|---|
| 63 | <http://pythonpaste.org/>`_ running as a daemon with user *ccp*, group |
|---|
| 64 | *ispman* and logging to */etc/ispman/ispmanccp.log* |
|---|
| 65 | |
|---|
| 66 | Starting `paster <http://pythonpaste.org/>`_:: |
|---|
| 67 | |
|---|
| 68 | > /usr/bin/paster serve --daemon --user=ccp --group=ispman \ |
|---|
| 69 | --log-file=/etc/ispmanccp/ispmanccp.log /etc/ispmanccp/config.ini start |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | Stopping `paster <http://pythonpaste.org/>`_:: |
|---|
| 73 | |
|---|
| 74 | > /usr/bin/paster serve --daemon --user=ccp --group=ispman \ |
|---|
| 75 | --log-file=/etc/ispmanccp/ispmanccp.log /etc/ispmanccp/config.ini stop |
|---|
| 76 | |
|---|
| 77 | |
|---|
| 78 | Re-starting `paster <http://pythonpaste.org/>`_:: |
|---|
| 79 | |
|---|
| 80 | > /usr/bin/paster serve --daemon --user=ccp --group=ispman \ |
|---|
| 81 | --log-file=/etc/ispmanccp/ispmanccp.log /etc/ispmanccp/config.ini restart |
|---|
| 82 | |
|---|
| 83 | |
|---|
| 84 | Now, here's a minimal apache *vhost* configuration example:: |
|---|
| 85 | |
|---|
| 86 | <VirtualHost *:80> |
|---|
| 87 | ServerName ccp.domain.tld |
|---|
| 88 | ProxyPreserveHost On |
|---|
| 89 | <Location /> |
|---|
| 90 | SetHandler None |
|---|
| 91 | ProxyPass http://localhost:5000 |
|---|
| 92 | ProxyPassReverse http://localhost:5000 |
|---|
| 93 | AllowOverride None |
|---|
| 94 | Order allow,deny |
|---|
| 95 | Allow from all |
|---|
| 96 | </Location> |
|---|
| 97 | </VirtualHost> |
|---|
| 98 | |
|---|
| 99 | |
|---|
| 100 | |
|---|
| 101 | And that's about it. |
|---|
| 102 | |
|---|
| 103 | You can find more info on the |
|---|
| 104 | `ISPManCCP <http://ccp.ufsoft.org/>`_ site where bugs and new feature requests |
|---|
| 105 | should go to. |
|---|