Arch Linux BasedManjaro

How To Install SQLite on Manjaro

Install SQLite on Manjaro

In this tutorial, we will show you how to install SQLite on Manjaro. Manjaro Linux, known for its Arch Linux base and rolling release model, offers an adaptable platform for users. In the world of data management, SQLite is a powerful, serverless database engine that’s incredibly popular on Linux systems due to its efficiency and simplicity.

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 SQLite 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).
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for SQLite.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install SQLite on Manjaro

Step 1. Before installing any software, it’s a good practice to update your package database to ensure you’re getting the latest versions of packages. Open your terminal and enter:

sudo pacman -Syu
sudo pacman -S base-devel

Step 2. Installing SQLite on Manjaro.

  • Installation via Manjaro’s Package Manager (Pacman)

Install SQLite by running the following command:

sudo pacman -S sqlite

Pacman will display the list of packages to be installed and ask for your confirmation. Type ‘Y‘ and press ‘Enter‘ to proceed.

  • Installation via AUR (Arch User Repository)

AUR is a valuable resource for accessing a wide range of software. However, it requires an AUR helper to simplify the installation process. To install Yay, open your terminal and run:

sudo pacman -S yay

Yay provides an easy way to install software from AUR, and it handles dependencies efficiently.

Now that Yay is installed, you can use it to install SQLite. Run the following command:

yay -S sqlite

Verify that SQLite is installed by running the following command:

sqlite3

Step 3. Creating a Sample Database.

Let’s create a simple SQLite database as a test. Type the following commands within the SQLite prompt:

CREATE TABLE students (id INTEGER PRIMARY KEY, name TEXT, age INTEGER);
INSERT INTO students (name, age) VALUES ('Meilana Maria', 25);
INSERT INTO students (name, age) VALUES ('Ranty Ratna', 22);

You’ve just created a ‘students’ table and inserted two rows of data.

Step 4. Basic SQLite Commands and Operations.

SQLite offers a rich set of SQL commands for data management. Here are some fundamental operations to get you started:

  • Select Data: Retrieve data from a table using the SELECT statement.
SELECT * FROM students;
  • Update Data: Modify existing data with the UPDATE statement.
UPDATE students SET age = 26 WHERE name = 'Meilana Maria';
  • Delete Data: Remove data using the DELETE statement.
DELETE FROM students WHERE name = 'Ranty Ratna';
  • Exit SQLite: When you’re done, type .exit or press Ctrl+D to exit the SQLite prompt.

Congratulations! You have successfully installed SQLite. Thanks for using this tutorial to install the latest version of SQLite on the Manjaro system. For additional help or useful information, we recommend you check the official SQLite website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button