Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
Doc fix and update
Browse files Browse the repository at this point in the history
  • Loading branch information
TonisPiip committed Jun 11, 2017
1 parent 0d386b2 commit 862e9a9
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 34 deletions.
57 changes: 36 additions & 21 deletions docs/admin/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ They must have a umask 002 or 007::
Installing Lino
===============

First create the lino-sites folder.::
First create the lino_sites folder.::

$ mkdir -p /usr/local/src/lino/lino-sites/
$ sudo mkdir -p /usr/local/src/lino/lino_sites/

Create the site folder for your site, in this example we shall use *prj1*::

$ mkdir /usr/local/src/lino/lino-sites/prj1
$ cd /usr/local/src/lino/lino-sites/prj1
$ sudo mkdir /usr/local/src/lino/lino_sites/prj1
$ cd /usr/local/src/lino/lino_sites/prj1

Follow the instructions in :doc:`/dev/install` for installing a
*development* version of Lino inside of our new prj1 *site-folder*.
Expand Down Expand Up @@ -134,7 +134,7 @@ Install the python dependencies::
$ sudo apt-get install libffi-dev libssl-dev
$ pip install mysqlclient

See :doc:`mysql_install`.
For more info on how to setup a user and database see; :doc:`mysql_install`.

.. _lino.admin.site_module:

Expand Down Expand Up @@ -173,7 +173,7 @@ Every new project directory must have at least four files:

- a empty :xfile:`__init__.py` file making it able for apache to import your settings::

$ touch /usr/local/src/lino/lino-sites/prj1/__init__.py
$ touch /usr/local/src/lino/lino_sites/prj1/__init__.py

- a file :xfile:`settings.py` **Note:** Replace the 'prj1' in this file with the name of the site-folder:

Expand Down Expand Up @@ -211,20 +211,19 @@ Follow the Django documentation at `Get your database running



.. Activate file logging
=====================
Activate file logging
=====================

To activate logging to a file, you simply add a symbolic link named
:xfile:`log` which points to the actual location::
To activate logging to a file, you simply add a symbolic link named
:xfile:`log` which points to the actual location::

$ cd ~/mypy/prj1/
$ ln -s /var/log/lino/prj1 log
$ cd ~/mypy/prj1/
$ ln -s /var/log/lino/prj1 log

Create two empty directories :xfile:`media` and :xfile:`config`::
$ mkdir media
$ mkdir config
Create two empty directories :xfile:`media` and :xfile:`config`::

$ mkdir media
$ mkdir config


Collecting static files
Expand All @@ -236,22 +235,22 @@ One part of your cache directory are the static files. When your
:envvar:`LINO_CACHE_ROOT` is set, you should run Django's
:manage:`collectstatic` command::

$ cd /usr/local/src/lino/lino-sites/prj1/
$ cd /usr/local/src/lino/lino_sites/prj1/
$ python manage.py collectstatic

The output should be something like this::

You have requested to collect static files at the destination
location as specified in your settings:

/usr/local/src/lino/lino-sites/prj1/static/
/usr/local/src/lino/lino_sites/prj1/static/

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes

4688 static files copied to '/usr/local/src/lino/lino-sites/prj1/static/', 0 unmodified.
4688 static files copied to '/usr/local/src/lino/lino_sites/prj1/static/', 0 unmodified.


.. Note that you can chose an arbitrary project directory (any subdir
Expand All @@ -278,14 +277,29 @@ then one lino-site we advise you to move your static files to
.. literalinclude:: mypy/prj1/apache2/apache.conf


Do the following inorder to active the site with apache::
Do the following in order to active the site with apache::

$ sudo nano /etc/apache2/site-available/prj1.conf
$ sudo nano /etc/apache2/sites-available/prj1.conf
$ sudo a2ensite prj1.conf
$ sudo a2dissite 000-default
$ sudo a2enmod wsgi
$ sudo service apache2 restart

Apache also needs write access to the media folder of each site.::

$ sudo chown www-data /usr/local/src/lino/lino_sites/prj1/media/

Now you should be able to navigate to your domain and see a barebones
lino-app.


From here
=========

From here you should edit your settings.py file to either import a
different settings.py from another repo.

Return to the index for more information :doc:`mysql_install`.

Install TinyMCE language packs
==============================
Expand All @@ -302,3 +316,4 @@ my personal selection (de, fr, nl and et)::
# cd /usr/share/tinymce/www
# wget http://tim.saffre-rumma.net/dl/tmp/tinymce_language_pack.zip
# unzip tinymce_language_pack.zip

8 changes: 4 additions & 4 deletions docs/admin/mypy/prj1/apache2/apache.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined

WSGIScriptAlias / /home/joe/mypy/prj1/wsgi.py
WSGIDaemonProcess lino threads=15 python-path=/home/joe/virtualenvs/a/local/lib/python2.7/site-packages
WSGIScriptAlias / /usr/local/src/lino/lino_sites/prj1/wsgi.py
WSGIDaemonProcess lino threads=15 python-path=/usr/local/src/lino/lino_sites/prj1/env/local/lib/python2.7/site-packages
WSGIProcessGroup lino

<Location />
Require all granted
</Location>


Alias /media/ /home/joe/mypy/prj1/media/
Alias /media/ /usr/local/src/lino/lino_sites/prj1/media/

<Location /media/>
SetHandler none
</Location>

Alias /static/ /home/joe/mypy/prj1/static/
Alias /static/ /usr/local/src/lino/lino_sites/prj1/static/

<Location /static/>
SetHandler none
Expand Down
4 changes: 2 additions & 2 deletions docs/admin/mypy/prj1/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class Site(Site):
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'prj1',
'NAME': 'mysite', #database name
'USER': 'django',
'PASSWORD': 'My cool password',
'PASSWORD': 'my cool password',
'HOST': 'localhost',
'PORT': 3306,
'OPTIONS': {
Expand Down
16 changes: 9 additions & 7 deletions docs/dev/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ System requirements
$ free -h

#. We assume you have virtualenv_ and pip_ installed. See the next
section.
section. However at this point you should retrieve new lists of packages.::

$ sudo apt-get update

#. You will need to install git_ on your computer to get the source
files::
Expand Down Expand Up @@ -227,11 +229,11 @@ from within any Python program.
Commands::

$ cd repositories
$ pip install -e django/
$ pip install -e lino/
$ pip install -e xl/
$ pip install -e noi/
$ pip install -e book/
$ pip install -e django
$ pip install -e lino
$ pip install -e xl
$ pip install -e noi
$ pip install -e book

These commands take some time because they will download and install
all Python packages needed by Lino.
Expand Down Expand Up @@ -349,7 +351,7 @@ of commands like :cmd:`inv prep` or :cmd:`inv test`.

Note that this is the same as doing the following for each project::

$ cd lino_book/projects/min1
$ cd ~/repositories/book/lino_book/projects/min1
$ python manage.py prep

You can learn more about atelier_ in :doc:`projects`
Expand Down

0 comments on commit 862e9a9

Please sign in to comment.