Skip to content

Commit

Permalink
Merge pull request #4511 from nushkovg/ubuntu-18.04-docs
Browse files Browse the repository at this point in the history
Ubuntu 18.04 docs
  • Loading branch information
Konstantin Sivakov committed Oct 19, 2018
2 parents 70128fb + 9f34f80 commit 154627d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 10 deletions.
33 changes: 26 additions & 7 deletions doc/maintaining/installing/install-from-source.rst
Expand Up @@ -5,12 +5,11 @@ Installing CKAN from source
===========================

This section describes how to install CKAN from source. Although
:doc:`install-from-package` is simpler, it requires Ubuntu 16.04 64-bit or
Ubuntu 14.04 64-bit. Installing CKAN from source works with other versions of
Ubuntu and with other operating systems (e.g. RedHat, Fedora, CentOS, OS X). If
you install CKAN from source on your own operating system, please share your
experiences on our
`How to Install CKAN <https://github.com/ckan/ckan/wiki/How-to-Install-CKAN>`_
:doc:`install-from-package` is simpler, it requires Ubuntu 18.04 64-bit, Ubuntu
16.04 64-bit, or Ubuntu 14.04 64-bit. Installing CKAN from source works with other
versions of Ubuntu and with other operating systems (e.g. RedHat, Fedora, CentOS, OS X).
If you install CKAN from source on your own operating system, please share your
experiences on our `How to Install CKAN <https://github.com/ckan/ckan/wiki/How-to-Install-CKAN>`_
wiki page.

From source is also the right installation method for developers who want to
Expand All @@ -21,7 +20,7 @@ work on CKAN.
--------------------------------

If you're using a Debian-based operating system (such as Ubuntu) install the
required packages with this command for Ubuntu 16.04::
required packages with this command for Ubuntu 18.04 and Ubuntu 16.04::

sudo apt-get install python-dev postgresql libpq-dev python-pip python-virtualenv git-core solr-jetty openjdk-8-jdk redis-server

Expand Down Expand Up @@ -80,6 +79,18 @@ a. Create a Python `virtual environment <http://www.virtualenv.org>`_
sudo chown \`whoami\` |virtualenv|
virtualenv --no-site-packages |virtualenv|
|activate|
.. note::

If your system uses Python3 by default (e.g. Ubuntu 18.04) make sure to create
the virtualenv using the Python2.7 executable with the ``--python`` option:

.. parsed-literal::
sudo mkdir -p |virtualenv|
sudo chown \`whoami\` |virtualenv|
virtualenv --python=/usr/bin/python2.7 --no-site-packages |virtualenv|
|activate|
.. important::

Expand Down Expand Up @@ -360,3 +371,11 @@ This is seen occasionally with Jetty and Ubuntu 14.04. It requires a solr-jetty
wget https://launchpad.net/~vshn/+archive/ubuntu/solr/+files/solr-jetty-jsp-fix_1.0.2_all.deb
sudo dpkg -i solr-jetty-jsp-fix_1.0.2_all.deb
sudo service jetty restart

ImportError: No module named 'flask_debugtoolbar'
-------------------------------------------------

This may show up if you are creating the database tables and you have enabled debug
mode in the config file. Simply install the development requirements::

pip install -r /usr/lib/ckan/default/src/ckan/dev-requirements.txt
28 changes: 25 additions & 3 deletions doc/maintaining/installing/solr.rst
Expand Up @@ -12,7 +12,22 @@ installed, we need to install and configure Solr.
server, but CKAN doesn't require Jetty - you can deploy Solr to another web
server, such as Tomcat, if that's convenient on your operating system.

#. Edit the Jetty configuration file (``/etc/default/jetty8`` or
.. tip::

Do this step only if you are using Ubuntu 18.04.

Ubuntu 18.04 64-bit uses ``jetty9`` which does not observe the symlink created
by the Solr package. As a result, Jetty is unable to serve Solr content. To
fix this, create the symlink in the ``/var/lib/jetty9/webapps/`` directory::

sudo ln -s /etc/solr/solr-jetty.xml /var/lib/jetty9/webapps/solr.xml

The Jetty port value must also be changed on ``jetty9``. To do that, edit the
``jetty.port`` value in ``/etc/jetty9/start.ini``::

jetty.port=8983 # (line 23)

#. Edit the Jetty configuration file (``/etc/default/jetty8(9)`` or
``/etc/default/jetty``) and change the following variables::

NO_START=0 # (line 4)
Expand All @@ -28,6 +43,10 @@ installed, we need to install and configure Solr.

Start or restart the Jetty server.

For Ubuntu 18.04::

sudo service jetty9 restart

For Ubuntu 16.04::

sudo service jetty8 restart
Expand Down Expand Up @@ -68,6 +87,10 @@ installed, we need to install and configure Solr.
Now restart Solr:

For Ubuntu 18.04::

sudo service jetty9 restart

For Ubuntu 16.04::

sudo service jetty8 restart
Expand All @@ -82,5 +105,4 @@ installed, we need to install and configure Solr.
#. Finally, change the :ref:`solr_url` setting in your :ref:`config_file` (|production.ini|) to
point to your Solr server, for example::

solr_url=http://127.0.0.1:8983/solr

solr_url=http://127.0.0.1:8983/solr

0 comments on commit 154627d

Please sign in to comment.