Software & AppsOperating SystemLinux

How To Install OpenSSL 1.1.1 and LibSSL Package on Ubuntu 18.04

Ubuntu 17

In this tutorial, we will guide you through the process of installing OpenSSL 1.1.1 and the LibSSL package on Ubuntu 18.04. OpenSSL is a robust, full-featured open-source toolkit implementing the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols, as well as a full-strength general-purpose cryptography library.

Quick Answer

To install OpenSSL 1.1.1 and the LibSSL package on Ubuntu 18.04, you can download the OpenSSL 1.1.1 source package from the Ubuntu repository, extract it to a directory of your choice, configure the installation, build and install OpenSSL, and then install the LibSSL package using the package manager.

Pre-requisites

Before we begin, ensure that you have administrative privileges on your Ubuntu machine and an active internet connection.

Downloading OpenSSL 1.1.1

Firstly, we need to download the OpenSSL 1.1.1 source package from the Ubuntu repository. You can find the tar file here.

To download and extract the tar file to a directory of your choice, use the following command:

sudo tar xfvz openssl_1.1.1.orig.tar.gz --directory /opt/openssl

In this command, xfvz is a combination of four parameters:

  • x stands for extract
  • f specifies that we’re providing the name of the file we want to work with
  • v stands for verbose, which means tar will list all the files it’s working with
  • z tells tar to decompress the archive using gzip

The --directory parameter is used to specify the directory where the files will be extracted.

Configuring OpenSSL 1.1.1

Once the tar file is extracted, navigate to the extracted directory:

cd /opt/openssl/openssl-1.1.1

Next, we need to configure the installation by specifying the prefix and openssldir:

sudo ./config --prefix=/opt/openssl --openssldir=/opt/openssl/ssl

Here, --prefix is used to specify the location where the package will be installed, and --openssldir is used to specify the directory for the OpenSSL configuration file.

Building and Installing OpenSSL 1.1.1

After the configuration, we will build OpenSSL using the following command:

sudo make

make is a tool which controls the generation of executables and other non-source files of a program from the program’s source files.

To ensure everything is working correctly, it’s good practice to run the test suite:

sudo make test

Finally, we can install OpenSSL:

sudo make install

Installing the LibSSL Package

If you are open to switching to a non-LTS release of Ubuntu, you can install OpenSSL 1.1.1 directly using the package manager. For example, on Ubuntu 18.10 or later, you can run the following command:

sudo apt install libssl-dev

In this command, apt is the package handling utility in Ubuntu, install is the command to install a new package, and libssl-dev is the package name.

Conclusion

Congratulations! You have successfully installed OpenSSL 1.1.1 and the LibSSL package on Ubuntu 18.04. Remember to adjust the installation paths and commands according to your preferences and system configuration.

If you can wait a little longer, Ubuntu 19.04 is right around the corner and will likely include OpenSSL 1.1.1 in its repositories. Once it is released, you can upgrade to Ubuntu 19.04 and install OpenSSL 1.1.1 using the package manager.

We hope this guide has been helpful. If you encounter any issues during the installation, feel free to leave a comment below.

What is OpenSSL?

OpenSSL is a robust, full-featured open-source toolkit that implements the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols. It is also a general-purpose cryptography library.

What is the purpose of installing OpenSSL 1.1.1?

Installing OpenSSL 1.1.1 allows you to have the latest version of OpenSSL, which includes security updates, bug fixes, and improvements to the SSL and TLS protocols. It is important to keep OpenSSL up to date to ensure the security and integrity of your system.

How can I download OpenSSL 1.1.1?

You can download OpenSSL 1.1.1 from the Ubuntu repository by following the steps mentioned in the tutorial. The download link for the tar file is provided in the tutorial.

Can I install OpenSSL 1.1.1 using the package manager?

If you are using Ubuntu 18.10 or later, you can install OpenSSL 1.1.1 directly using the package manager by running the command sudo apt install libssl-dev. However, if you are using Ubuntu 18.04, you need to follow the manual installation process mentioned in the tutorial.

How do I configure OpenSSL 1.1.1?

After extracting the tar file, navigate to the extracted directory and run the command sudo ./config --prefix=/opt/openssl --openssldir=/opt/openssl/ssl to configure the installation. Make sure to adjust the prefix and openssldir according to your preferences and system configuration.

What is the purpose of running the test suite?

Running the test suite ensures that OpenSSL is working correctly and all the features are functioning as expected. It helps identify any potential issues or errors that may have occurred during the installation process.

Can I install OpenSSL 1.1.1 on Ubuntu 19.04?

If you are using Ubuntu 19.04 or a later version, you can directly install OpenSSL 1.1.1 using the package manager. You do not need to follow the manual installation process mentioned in the tutorial.

Leave a Comment

Your email address will not be published. Required fields are marked *