Install Apache Solr Ubuntu 16.04

Apache Zeppelin is a web-based open source notebook and collaborative tool for interactive data ingestion, discovery, analytics and visualization. Zeppelin supports more than 20 languages including Apache Spark, SQL, R, Elasticsearch and many more. Apache Zeppelin allows you to create beautifuls Encrypt CA.

In this guide we will install and configure the Apache web server on Ubuntu 16.04 / 17.10. You can use this guide for a single domain website or multiple domains using Virtual Hosts. Prerequisites You should use a non-root user account with sudo privileges. Please see Initial server setup for Ubuntu 16.04 / 17.10 for. I have been tasked with installing Apache Solr on Cloud, for which I have selected a VM running Ubuntu 16.04. I have completed the instalation of Solr 7.3.0. However, when I enter the following command: command bin/solr start I get the following message: WARNING: Starting Solr as the root user is a security risk and is not best practice. The installation is quite simple. I will show you through the step by step installation Apache Solr on Ubuntu 14.04. First, Install Java. Because tomcat and solr are Java based softwares we need the Java environment (As it is advised in the Solr wiki: prefere a full JDK to a simple JRE.) Add the webupd8team Java PPA repository in your. Install Solr 6 for Drupal 8 on Ubuntu 16.04. Submitted by christophe on Wed, - 21:55. Restrict access to the Apache Solr admin interface. This tutorial will show you how to install the latest Solr version on Ubuntu 16.04 LTS. The steps will most likely work with later Ubuntu versions as well. Update your System. Use a non-root sudo user to login into your Ubuntu server. Through this user, you will have to perform all the steps and use the Solr later.

Note: To obtain certificates from Let's Encrypt CA, the domain for which the certificates are to be generated must be pointed towards the server. If not, make the necessary changes to the DNS records of the domain and wait for the DNS to propagate before making the certificate request again. Certbot checks the domain authority before providing the certificates.

Generate the SSL certificates.

The generated certificates are likely to be stored in /etc/letsencrypt/live/zeppelin.example.com/. The SSL certificate will be stored as fullchain.pem and private key will be stored as privkey.pem.

Let's Encrypt certificates expire in 90 days, hence it is recommended to set up auto-renewal of the certificates using Cron jobs.

Open the cron job file.

Add the following line at the end of the file.

The above cron job will run every day at 5:30 AM. If the certificate is due for expiration, it will automatically be renewed.

Create a new server block file for the Zeppelin site.

Populate the file.

Activate the configuration file.

Restart Nginx so that the changes can take effect.

Zeppelin is now accessible on the following address.

By default, there is no authentication enabled, so you can use the application directly.

Since the application is accessible to everyone, the notebooks you create are also accessible to everyone. It is very important to disable anonymous access and enable authentication so that only the authenticated users can access the application.

Disable Anonymous Access

Install

To disable the default anonymous access, copy the configuration file template to its live location.

Edit the configuration file.

Find the following lines in the file.

Apache solr build website

Change the value to false to disable the anonymous access.

Enable Shiro Authentication

Now that we have disabled the anonymous access, we need to enable some kind of authentication mechanism so that privileged users can log in. Apache Zeppelin uses Apache Shiro authentication. Copy the Shiro configuration file.

Edit the configuration file.

Apache

Find the following lines in the file.

The list contains the username, password, and roles of the users. For now, we will only use admin and user1. Change the password of admin and user1 and disable the other users by commenting them. You can also change the username and roles of the users. To learn more about Apache Shiro users and roles, read the Shiro authorization guide.

Once you have changed the passwords, the code block should will like this.

Now restart Zeppelin to apply the changes.

You will see that the authentication has been enabled and you will be able to log in using the username and password set in the Shiro configuration file.

This section describes how to install CKAN from package. This is the quickestand easiest way to install CKAN, but it requires Ubuntu 16.04 64-bit or Ubuntu 14.04 64-bit. Ifyou’re not using Ubuntu 16.04 64-bit or Ubuntu 14.04 64-bit, or if you’re installing CKAN fordevelopment, you should follow Installing CKAN from source instead.

At the end of the installation process you will end up with two running webapplications, CKAN itself and the DataPusher, a separate service for automaticallyimporting data to CKAN’s DataStore extension.

Host ports requirements:

ServicePortUsed for
NGINX80Proxy
Apache28080Web Server
Solr/Jetty8983Search
PostgreSQL5432Database
Redis6379Search

1. Install the CKAN package¶

On your Ubuntu system, open a terminal and run these commands to installCKAN:

  1. Update Ubuntu’s package index:

  2. Install the Ubuntu packages that CKAN requires (and ‘git’, to enable you to install CKAN extensions):

  3. Download the CKAN package:

    • On Ubuntu 16.04:

    • On Ubuntu 14.04:

  4. Install the CKAN package:

    • On Ubuntu 16.04:

    • On Ubuntu 14.04:

    Note

    If you get the following error it means that for some reason theApache WSGI module was not enabled:

    You can enable it by running these commands in a terminal:

2. Install and configure PostgreSQL¶

Tip

You can install PostgreSQL and CKAN on different servers. Justchange the sqlalchemy.url setting in your/etc/ckan/default/production.ini file to reference your PostgreSQL server.

Install PostgreSQL, running this command in a terminal:

orphan:

Check that PostgreSQL was installed correctly by listing the existing databases:

Check that the encoding of databases is UTF8, if not internationalisationmay be a problem. Since changing the encoding of PostgreSQL may mean deletingexisting databases, it is suggested that this is fixed before continuing withthe CKAN install.

Next you’ll need to create a database user if one doesn’t already exist.Create a new PostgreSQL database user called ckan_default, and enter apassword for the user when prompted. You’ll need this password later:

Create a new PostgreSQL database, called ckan_default, owned by thedatabase user you just created:

Note

If PostgreSQL is run on a separate server, you will need to editpostgresql.conf and pg_hba.conf. For PostgreSQL 9.1 on Ubuntu, thesefiles are located in etc/postgresql/9.1/main.

Uncomment the listen_addresses parameter and specify a comma-separatedlist of IP addresses of the network interfaces PostgreSQL should listen onor ‘*’ to listen on all interfaces. For example,

listen_addresses='localhost,192.168.1.21'

Add a line similar to the line below to the bottom of pg_hba.conf toallow the machine running Apache to connect to PostgreSQL. Please changethe IP address as desired according to your network settings.

hostallall192.168.1.22/32md5

Edit the sqlalchemy.url option in your CKAN configuration file (/etc/ckan/default/production.ini) file andset the correct password, database and database user.

Apache Solr On Azure

3. Install and configure Solr¶

Tip

You can install Solr and CKAN on different servers. Justchange the solr_url setting in your/etc/ckan/default/production.ini file to reference your Solr server.

Install Solr, running this command in a terminal:

The install will whirr away, then towards the end you’ll see this:

orphan:

CKAN uses Solr as its search platform, and uses a customized Solr schema filethat takes into account CKAN’s specific search needs. Now that we have CKANinstalled, we need to install and configure Solr.

Note

These instructions explain how to deploy Solr using the Jetty webserver, but CKAN doesn’t require Jetty - you can deploy Solr to another webserver, such as Tomcat, if that’s convenient on your operating system.

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

    Note

    This JETTY_HOST setting will only allow connections from the same machine.If CKAN is not installed on the same machine as Jetty/Solr you will need tochange it to the relevant host or to 0.0.0.0 (and probably set up your firewallaccordingly).

    Start or restart the Jetty server.

    For Ubuntu 16.04:

    Or for Ubuntu 14.04:

    Note

    Ignore any warning that it wasn’t already running - some Ubuntudistributions choose not to start Jetty on install, but it’s not important.

    You should now see a welcome page from Solr if you openhttp://localhost:8983/solr/ in your web browser (replace localhost withyour server address if needed).

    Note

    If you get the message CouldnotstartJettyservletenginebecausenoJavaDevelopmentKit(JDK)wasfound. then you will have to edit theJAVA_HOME setting in /etc/default/jetty to point to your machine’sJDK install location. For example:

    or:

  2. Replace the default schema.xml file with a symlink to the CKAN schemafile included in the sources.

    Now restart Solr:

    For Ubuntu 16.04:

    or for Ubuntu 14.04:

    Check that Solr is running by opening http://localhost:8983/solr/.

  3. Finally, change the solr_url setting in your CKAN configuration file (/etc/ckan/default/production.ini) topoint to your Solr server, for example:

4. Update the configuration and initialize the database¶

Drupal Apache Solr

  1. Edit the CKAN configuration file (/etc/ckan/default/production.ini) to set up the following options:

    site_id

    Each CKAN site should have a unique site_id, for example:

    site_url

    Provide the site’s URL. For example:

  2. Initialize your CKAN database by running this command in a terminal:

  3. Optionally, setup the DataStore and DataPusher by following theinstructions in DataStore extension.

  4. Also optionally, you can enable file uploads by following theinstructions in FileStore and file uploads.

5. Restart Apache and Nginx¶

Install Solr On Windows

Restart Apache and Nginx by running this command in a terminal:

6. You’re done!¶

Open http://localhost in your web browser. You should see the CKAN frontpage, which will look something like this:

Apache Solr Download

You can now move on to Getting started to begin using and customizingyour CKAN site.

Apache Solr Build Website

Note

The default authorization settings on a new install are deliberatelyrestrictive. Regular users won’t be able to create datasets or organizations.You should check the Organizations and authorization documentation, configure CKAN accordinglyand grant other users the relevant permissions using the sysadmin account.