How To Install sphinx on Fedora 34

sphinx is Free open-source SQL full-text search engine

Introduction

In this tutorial we learn how to install sphinx on Fedora 34.

What is sphinx

Sphinx is a full-text search engine, distributed under GPL version 2. Commercial licensing (e.g. for embedded use) is also available upon request. Generally, it’s a standalone search engine, meant to provide fast, size-efficient and relevant full-text search functions to other applications. Sphinx was specially designed to integrate well with SQL databases and scripting languages. Currently built-in data source drivers support fetching data either via direct connection to MySQL, or PostgreSQL, or from a pipe in a custom XML format. Adding new drivers (e.g. native support other DBMSes) is designed to be as easy as possible. Search API native ported to PHP, Python, Perl, Ruby, Java, and also available as a plug-gable MySQL storage engine. API is very lightweight so porting it to new language is known to take a few hours. As for the name, Sphinx is an acronym which is officially decoded as SQL Phrase Index. Yes, I know about CMU’s Sphinx project.

We can use yum or dnf to install sphinx on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install sphinx.

Install sphinx on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install sphinx using dnf by running the following command:

sudo dnf -y install sphinx

Install sphinx on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install sphinx using yum by running the following command:

sudo yum -y install sphinx

How To Uninstall sphinx on Fedora 34

To uninstall only the sphinx package we can use the following command:

sudo dnf remove sphinx

sphinx Package Contents on Fedora 34

/etc/logrotate.d/sphinx
/etc/sphinx
/etc/sphinx/sphinx.conf
/usr/bin/indexer
/usr/bin/indextool
/usr/bin/searchd
/usr/bin/spelldump
/usr/bin/wordbreaker
/usr/lib/.build-id
/usr/lib/.build-id/61
/usr/lib/.build-id/61/b81459717433cf0dbae7a9b12ab97672d02290
/usr/lib/.build-id/6a
/usr/lib/.build-id/6a/1aead9b22845a7b536f4c8ceea94e7de90770a
/usr/lib/.build-id/a0
/usr/lib/.build-id/a0/de6fcd3f7942c9ee2ef48e82b1b70ec3f7a69b
/usr/lib/.build-id/b2
/usr/lib/.build-id/b2/0e3cfcc2d014fe2ca15da0cb1ba77f2215f901
/usr/lib/.build-id/d3
/usr/lib/.build-id/d3/23775f318b44bdc63f69f703abc85c0cc1338a
/usr/lib/systemd/system/searchd.service
/usr/lib/tmpfiles.d/sphinx.conf
/usr/share/doc/sphinx
/usr/share/doc/sphinx/COPYING
/usr/share/doc/sphinx/example.sql
/usr/share/doc/sphinx/sphinx-min.conf.dist
/usr/share/doc/sphinx/sphinx.conf.dist
/usr/share/doc/sphinx/sphinx.txt
/usr/share/man/man1/indexer.1.gz
/usr/share/man/man1/indextool.1.gz
/usr/share/man/man1/searchd.1.gz
/usr/share/man/man1/spelldump.1.gz
/var/lib/sphinx
/var/log/sphinx
/var/run/sphinx

References

Summary

In this tutorial we learn how to install sphinx on Fedora 34 using yum and dnf.