From 59f82726f06e016050c4fe9e8a01fa53f9d0041f Mon Sep 17 00:00:00 2001 From: Goran Nushkov Date: Thu, 18 Oct 2018 11:29:47 +0200 Subject: [PATCH] ubuntu-18.04 install support --- .../installing/install-from-source.rst | 27 +++++++++++++------ doc/maintaining/installing/solr.rst | 26 ++++++++++++++++-- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/doc/maintaining/installing/install-from-source.rst b/doc/maintaining/installing/install-from-source.rst index c5127eb4804..2ee49d894b1 100644 --- a/doc/maintaining/installing/install-from-source.rst +++ b/doc/maintaining/installing/install-from-source.rst @@ -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 `_ +: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 `_ wiki page. From source is also the right installation method for developers who want to @@ -21,7 +20,11 @@ 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:: + + sudo apt-get install python-dev postgresql libpq-dev python-pip python-virtualenv git-core solr-jetty openjdk-8-jdk redis-server + +or for 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 @@ -78,7 +81,7 @@ a. Create a Python `virtual environment `_ sudo mkdir -p |virtualenv| sudo chown \`whoami\` |virtualenv| - virtualenv --no-site-packages |virtualenv| + virtualenv --python=/usr/bin/python2.7 --no-site-packages |virtualenv| |activate| .. important:: @@ -360,3 +363,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 \ No newline at end of file diff --git a/doc/maintaining/installing/solr.rst b/doc/maintaining/installing/solr.rst index 5da3851ce85..7a0890de4a2 100644 --- a/doc/maintaining/installing/solr.rst +++ b/doc/maintaining/installing/solr.rst @@ -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 +.. important:: + + Do this step only if your system is using ``jetty9``. + + 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) @@ -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 @@ -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 @@ -83,4 +106,3 @@ installed, we need to install and configure Solr. point to your Solr server, for example:: solr_url=http://127.0.0.1:8983/solr -