How To Install OpenSSL on Manjaro
In this tutorial, we will show you how to install OpenSSL on Manjaro. Before we dive into the installation process, let’s take a moment to understand what OpenSSL is and why it’s so important. OpenSSL is a robust, commercial-grade open-source toolkit that implements the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols. These protocols are essential for establishing secure encrypted connections between clients and servers over the internet. OpenSSL is widely used by various applications and services to protect sensitive data, such as passwords, credit card numbers, and personal information, from interception and tampering.
In addition to providing the SSL/TLS implementation, OpenSSL also offers a comprehensive set of command-line tools for performing cryptographic operations. These tools allow you to generate private keys, create certificate signing requests (CSRs), sign certificates, and perform other tasks related to encryption and decryption.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step installation of the OpenSSL on a Manjaro Linux.
Prerequisites
- A server or desktop running one of the following operating systems: Manjaro, and other Arch-based distributions.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- A stable internet connection is crucial for downloading and installing packages. Verify your connection before proceeding.
- Access to a Manjaro Linux system with a non-root sudo user or root user.
Install OpenSSL on Manjaro
Step 1. Keep your system up-to-date to ensure compatibility with the latest software packages.
sudo pacman -Syu
Step 2. Checking Your Current OpenSSL Version.
Before proceeding with the installation of a specific OpenSSL version, it’s a good idea to check which version is currently installed on your Manjaro system. You can easily do this by running the following command in your terminal:
openssl version
The output will display the OpenSSL version number along with some additional information. For example:
OpenSSL 3.0.8 24 Aug 2023
Step 3. Installing Dependencies.
Install the necessary build dependencies by running the following command:
sudo pacman -S base-devel perl zlib
This command will install the essential build tools, Perl programming language, and zlib compression library, which are required for compiling OpenSSL.
Step 4. Installing OpenSSL on Manjaro.
Download the OpenSSL source code tarball and its corresponding signature file from the official OpenSSL website. Choose the version you want to install:
wget https://www.openssl.org/source/openssl-3.3.0.tar.gz
Verify the integrity of the downloaded source code by checking its digital signature. This step ensures that the code hasn’t been tampered with. Use the following command to verify the signature:
openssl dgst -sha256 -verify openssl-<version>.tar.gz.asc -signature openssl-<version>.tar.gz
Replace <version>
with the actual version number of the downloaded OpenSSL source code.
Extract the source code tarball using the following command:
tar -xzf openssl-<version>.tar.gz
Change into the extracted OpenSSL source code directory:
cd openssl-<version>
Configure the OpenSSL build by running the ./config
script with the desired options. For example, to configure OpenSSL with a custom installation prefix and OpenSSL directory, you can run:
./config --prefix=/opt/openssl --openssldir=/opt/openssl/ssl
Once the configuration is complete, compile OpenSSL by running:
make
After the compilation finishes successfully, install OpenSSL by running:
sudo make install
Update the symbolic links to point to the newly installed OpenSSL version. You can use the following commands:
sudo ln -sf /opt/openssl/bin/openssl /usr/bin/openssl sudo ln -sf /opt/openssl/include/openssl /usr/include/openssl sudo ln -sf /opt/openssl/lib/libssl.so /usr/lib/libssl.so sudo ln -sf /opt/openssl/lib/libcrypto.so /usr/lib/libcrypto.so
Verify that the installed OpenSSL version is being used by running:
openssl version
The output should display the version number of the newly installed OpenSSL.
Congratulations! You have successfully installed OpenSSL. Thanks for using this tutorial to install the latest version of the OpenSSL on the Manjaro system. For additional help or useful information, we recommend you check the official OpenSSL website.