Installation af SQLite3 på AlmaLinux 9 fra kilden.
SQLite is a widely used, lightweight, and embedded relational database management system (RDBMS) that supports a variety of programming languages. It is known for its portability, self-contained nature, and small size, making it a popular choice for applications that require local data storage.
Forudsætninger:
- AlmaLinux 9 operating system
- Root or sudo user privileges
Trin:
- Opdater systemet:
dnf update -y
- Install required packages:
The wget package is needed to download the SQLite source code from the official website. If wget is already installed, skip this step.
dnf install wget -y
- Install the build toolchain:
The build toolchain includes various development tools required for compiling SQLite. If you are unsure about the specific packages needed, you can install the entire “Development Tools” gruppe.
dnf groupinstall "Development Tools" -y
- Download the SQLite source code:
- Navigate to the SQLite download page: https://www.sqlite.org/download.html
- Copy the link to the latest autoconf source code, which will be named in the format: sqlite-autoconf-<version>.tar.gz
- Download the source code using wget and extract it using tar:
wget https://www.sqlite.org/2023/sqlite-autoconf-3420000.tar.gz
tar xvfz sqlite-autoconf-<version>.tar.gz
- Rename the extracted directory to “sqlite”:
mv sqlite-autoconf-<version> sqlite
- Change to the sqlite directory:
cd sqlite
- Build and install SQLite3:
- Run the configure script to prepare the build environment:
./configure
- Compile the SQLite source code:
make
- Install SQLite:
make install
This will install the SQLite3 library system-wide.
- Bekræft installationen:
Check the SQLite3 version to confirm the installation:
sqlite3 --version
This should display the installed SQLite version, såsom:
3.42.0 2023-07-18 11:54:15
456j34k6j34oij64kj6543kj6kj34j6kl4j63l4kj6kl34j634643j6klj34k6j
Konklusion:
This tutorial has demonstrated the process of installing SQLite3 on AlmaLinux 9. SQLite is now ready for use in your applications.