Setting up a Lino hosting siteΒΆ

Cheat sheet for setting up a new Lino site:

$ cd /usr/local/python/lino_sites
$ ls xxx  # must give error
$ cp -a TPL xxx

$ mkdir /var/log/lino/xxx
$ go xxx

$ ln -s /var/log/lino/xxx log
$ virtualenv env
$ cp -a /usr/local/python/lino_sites/TPL/env/repositories env

$ nano pull.sh  # check which repositories are used by this project
$ pip install -U setuptools pip
$ pip install -e env/repositories/lino
$ pip install -e env/repositories/xl
$ ...

$ cd /etc/supervisor/conf.d
$ sudo cp linod_TPL.conf linod_xxx.conf
$ nano xxx.conf  # ALT-R and replace TPL by xxx

$ cd /etc/apache2/sites-available
$ sudo cp TPL.conf xxx.conf
$ nano xxx.conf  # ALT-R and replace TPL by xxx
$ sudo a2ensite xxx.conf

$ reload_services
  • TPL : some existing_site

  • xxx : name of new site

The /usr/local/python directory is our customized site-wide Python path:

$ mkdir /usr/local/python
$ touch /usr/local/python/__init__.py

The following files are the same for every project:

manage.py:

#!/usr/bin/env python
if __name__ == "__main__":
    import sys ; sys.path.append('/usr/local/python')
    from lino_local import manage ; manage(__file__)