# Installing Sphinx

In order to use the [Sphinx Storage Engine](https://mariadb.com/docs/server/server-usage/storage-engines/sphinx-storage-engine), it is necessary to install the Sphinx daemon.

Many Linux distributions have Sphinx in their repositories. These can be used to install Sphinx instead of following the instructions below, but these are usually quite old versions and don't all include API's for easy integration. Ubuntu users can use the updated repository at [sphinxsearch-rel21](https://launchpad.net/~builds/+archive/sphinxsearch-rel21) (see instructions below).

## Debian and Ubuntu

Ubuntu users can make use of the repository, as follows:

```bash
sudo add-apt-repository ppa:builds/sphinxsearch-rel21
sudo apt-get update
sudo apt-get install sphinxsearch
```

Alternatively, install as follows:

* The Sphinx package and daemon are named `sphinxsearch`.
* `sudo apt-get install unixodbc libpq5 mariadb-client`
* `sudo dpkg -i sphinxsearch*.deb`
* [Configure Sphinx](https://mariadb.com/docs/server/server-usage/storage-engines/sphinx-storage-engine/configuring-sphinx) as required
* You may need to check `/etc/default/sphinxsearch` to see that `START=yes`
* Start with `sudo service sphinxsearch start` (and stop with `sudo service sphinxsearch stop`)

## Red Hat and CentOS

* The package name is `sphinx` and the daemon `searchd`.
* `sudo yum install postgresql-libs unixODBC`
* `sudo rpm -Uhv sphinx*.rpm`
* [Configure Sphinx](https://mariadb.com/docs/server/server-usage/storage-engines/sphinx-storage-engine/configuring-sphinx) as required
* `service searchd start`

## Windows

* Unzip and extract the downloaded zip file
* Move the extracted directory to `C:\Sphinx`
* [Configure Sphinx](https://mariadb.com/docs/server/server-usage/storage-engines/sphinx-storage-engine/configuring-sphinx) as required
* Install as a service:
  * `C:\Sphinx\bin> C:\Sphinx\bin\searchd --install --config C:\Sphinx\sphinx.conf.in --servicename SphinxSearch`

Once Sphinx has been installed, it will need to be [configured](https://mariadb.com/docs/server/server-usage/storage-engines/sphinx-storage-engine/configuring-sphinx).

Full instructions, including details on compiling Sphinx yourself, are available at [current.html](https://sphinxsearch.com/docs/current.html).

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/server-usage/storage-engines/sphinx-storage-engine/installing-sphinx.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
