About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
installation:fedora

VuFind® on Fedora

These instructions assume that you are starting with a clean installation of Fedora. If you already have a Fedora server, you will be able to skip some steps, but you may have to reconfigure some existing software.

Version Requirements

These instructions were most recently tested on Fedora 40 but should also work with other recent versions with little or no modification. It should also work with other members of the RedHat family, including CentOS Stream, RedHat Enterprise Linux, Oracle Linux, etc., though in some cases, you may need to replace “dnf” commands with “yum.” If you are using an older Fedora distribution, make sure it meets the requirements (such as minimum PHP version) of the VuFind® release you are installing.

A Note on SELinux

One of the key features that distinguishes Fedora from some other Linux distributions is its use of the SELinux security module. You can read a basic introduction to SELinux here (pdf). The greater security level makes installation a bit more complicated. The instructions below should get VuFind® working without forcing you to take down your security; however, I'm not an expert on this, so feel free to edit the document and improve my suggested commands if there is a better way.

Also note that SELinux can block a lot of things – if security is misconfigured, it will prevent Apache from talking to Solr and your ILS; if library files have the wrong permissions, it won't let code load or execute; etc. If you run into problems during installation, be sure to add SELinux to your troubleshooting checklist, and remember that you can temporarily turn it off if you need to confirm whether or not it is really the cause of your troubles. (But be sure to turn it back on again after you're done testing – I encourage you to solve things by working within the system, even though the temptation to turn it off for good may be strong at times!) These instructions should get you through without any trouble, but if you run into problems outside the scope of the instructions, hopefully some of the commands used here will help you do further research on your own.

Getting Started

1. Install Fedora

You can obtain a free copy of the software and find installation instructions at fedoraproject.org. If you do boot up from the Live CD, be sure you install the operating system to your hard drive BEFORE installing VuFind®; it may not work well if you try to run it entirely from the bootable ISO image.

2. Get to the System Terminal

Fedora puts you in a graphical desktop by default – to enter all of the commands described below, you will need to go to a command prompt, which you can access by selecting “Terminal” from the application menu.

3. Log in as the Root User

The commands below assume that you have root access to the system. If you are logged in as a user account, you can gain root access by entering:

sudo su

You will be prompted for the system's root password.

Root access can be dangerous, so be sure to exit out of the root account as soon as you are done with the necessary work!

4. Update the System

Make sure you have the latest patches installed.

dnf update

:!: dnf vs. yum - Most distributions have transitioned from the older yum tool to the newer dnf tool. However, if you run a dnf command in an older distribution and it does not work, try substituting yum.

It is a good idea to reboot after installing updates.

shutdown -r now

Quick Installation with RPM Package

VuFind® is not currently available in RPM format. If you have experience building RPM packages and would like to help add this support, please claim the VUFIND-12 ticket in JIRA.

Detailed Installation Instructions

Following these steps will give you a running instance of VuFind®. All instructions below assume you are at a terminal prompt, logged in as root (see steps 2 and 3 under Getting Started above).

1. Install Apache HTTP Server

Now install the Apache web server. This will facilitate communication between VuFind® and web browsers. In some distributions, this is pre-installed, but attempting to install it again is harmless.

dnf install httpd

VuFind® depends on mod_rewrite being enabled; this is turned on by default, but if you have disabled it in a pre-existing Fedora installation, you need to re-enable it for VuFind®.

IMPORTANT: If your VuFind® instance will include records with slashes in their IDs, you need to add “AllowEncodedSlashes on” to the appropriate <VirtualHost> section of your Apache configuration!

2. Install MySQL/MariaDB

VuFind® can use the MariaDB or MySQL database for storing user comments, tags and other information. You should install this component next. Most Fedora distributions use MariaDB.

dnf install mariadb-server

Once MySQL/MariaDB is installed, you should start it up:

systemctl start mariadb

For security reasons, it's also a good idea to set a root password for the database; this command will guide you through the process (regardless of whether you have MariaDB or MySQL):

/usr/bin/mysql_secure_installation

:!: The secure installation script may ask you if you want to switch to Unix socket authentication; you must answer NO to this question, as this authentication mechanism is currently incompatible with VuFind®.

3. Install PHP

Most of VuFind® is written using the PHP language. We must install this next, being sure to enable modules for key technologies used by VuFind® (MySQL, LDAP, etc.)

dnf install php php-devel php-intl php-ldap php-mysqli php-xsl php-gd php-mbstring php-json php-soap php-sodium

Note that the php-ldap library is only needed if you will be using LDAP authentication; you can exclude this package if you like. The php-soap library is only used by the Symphony ILS driver (as of this writing), but it is required by one of VuFind®'s composer dependencies and will need to be installed if you plan to run composer manually for any reason. The php-gd package is also optional, though including it will ensure better support for cover images.

If you are a Voyager library, you will also need to install the PHP OCI Driver for Oracle – see this page for detailed instructions.

If you will be accessing a Sybase database (e.g. for the Horizon LMS), also install php-mssql.

dnf install php-mssql

4. Install the Java JDK

Next install JDK (the Java Development Kit) on the server – VuFind®'s searching back-end and MARC indexing tools rely on Java. Note that some VuFind® components may be able to run using only the JRE (Java Runtime Environment), but the JDK is strongly recommended, especially if you plan to write custom SolrMarc import code in Java.

dnf install java-*-openjdk-devel

:!: This command will likely install multiple versions of Java. If you only want one version installed, you can pick a specific version appropriate to the VuFind® version you are installing (see requirements chart) – e.g. dnf install java-11-openjdk-devel.

5. Download VuFind®

All the prerequisites are in place, so now for the fun part – downloading and installing VuFind® itself!

Instructions for obtaining VuFind® can be found on the download page. You can either download a particular release in tar.gz or zip format, or you can load the latest development code directly from Git.

:!: When loading code from Git, you will also need to install dependencies using Composer.

You can choose whatever download method you prefer; here is a sample approach for downloading a pre-packaged .tar.gz file (note that this requires installing the wget tool for retrieving files over HTTP):

dnf install wget
cd /tmp
wget https://github.com/vufind-org/vufind/releases/download/v10.0/vufind-10.0.tar.gz
tar xzvf vufind-10.0.tar.gz
mv vufind-10.0 /usr/local/vufind

6. Install VuFind®

The groundwork is set, so you can now run VuFind®'s install script to set up your basic configuration. You can accept the defaults for now – you can run the installer again later if you need to make changes.

cd /usr/local/vufind
php install.php

Appropriate security permissions need to be set up so Apache can access the VuFind® code. The chcon line sets file permissions so Apache is allowed to load the files. The first setsebool command allows Apache to communicate with itself internally, which is necessary to access the search back-end. The second setsebool command allows Apache to send email, which is necessary for VuFind®'s message-sending functions. The semanage command allows Apache to communicate with Solr on its default port of 8983.

chcon -R unconfined_u:object_r:httpd_sys_content_t:s0 /usr/local/vufind/
setsebool -P httpd_can_network_relay=1
setsebool -P httpd_can_sendmail=1
semanage port -a -t http_port_t -p tcp 8983

Note: The chcon statement above allows Apache read access to more files than is strictly necessary; this is for simplicity, but by providing a longer list of directories, the security settings could be made more targeted.

It is also necessary to make a few directories writeable by Apache so VuFind® can generate cache files and base configurations:

chown -R apache:apache /usr/local/vufind/local/cache
chcon -R unconfined_u:object_r:httpd_sys_rw_content_t:s0 /usr/local/vufind/local/cache
chown -R apache:apache /usr/local/vufind/local/config
chcon -R unconfined_u:object_r:httpd_sys_rw_content_t:s0 /usr/local/vufind/local/config

If you plan to use VuFind®'s command line tools, you also need a separate cache for that:

mkdir /usr/local/vufind/local/cache/cli
chmod 777 /usr/local/vufind/local/cache/cli

Note: making the cache world-writable is a simple but less-than-secure approach to enabling proper caching. You may wish to limit ownership to a specific VuFind® CLI user or use ACL's using techniques described in Symfony's Installation Manual.

Apache needs to have some extra VuFind® settings loaded. Run these commands to set the appropriate security context for VuFind®'s configuration and then link it with Apache.

chcon system_u:object_r:httpd_config_t:s0 /usr/local/vufind/local/httpd-vufind.conf
ln -s /usr/local/vufind/local/httpd-vufind.conf /etc/httpd/conf.d/vufind.conf

Apache needs to be restarted so the changes can take effect:

apachectl restart

8. Set Up Environment Variables

Some environment variables need to be set so that VuFind®-related scripts can find required resources. If you plan on running VuFind® under a specific user account, you should set these only for that user. If you want to make the settings global for all accounts (the easiest, but not necessarily the best, approach), just run this code to create a script in the /etc/profile.d directory:

echo export VUFIND_HOME="/usr/local/vufind"  > /etc/profile.d/vufind.sh
echo export VUFIND_LOCAL_DIR="/usr/local/vufind/local"  >> /etc/profile.d/vufind.sh

After creating this file, unless you log out and back into your account first, you must manually load it for the changes to take effect immediately.

source /etc/profile.d/vufind.sh

9. Final Configuration

Everything is set up - proceed to Configuring and Starting VuFind® below.

Configuring and Starting VuFind®

Regardless of the method you used to set up VuFind®, you will need to follow these steps to configure final details and get the code running.

1. Start Solr

To start VuFind®'s Solr index:

cd /usr/local/vufind/
./solr.sh start

:!: Solr will not run under the root account by default; you should change the ownership of /usr/local/vufind/solr and run the service as a different user for better security.

:!: If you get a warning about limit settings, see the starting and stopping Solr page for details on how to fix it.

For more information on managing the operation of the Solr server, including troubleshooting notes and instructions for starting it automatically, see the Starting and Stopping Solr page.

2. Configure VuFind®

Open a web browser, and browse to this URL:

http://your-server-name/vufind/Install/Home

(Replace “your-server-name” with the address you wish to use to access VuFind®; replace “vufind” with your custom base path if you changed the default setting during installation).

Troubleshooting

403 Forbidden

If you get a 403 forbidden error, this may be caused by using Apache 2.3 or later with VuFind® 2.1.1 or earlier; you can fix this by adjusting VuFind®'s Apache configuration and restarting Apache. See VUFIND-917.

White Screen of Death

If you see a blank white screen, something is wrong.

The troubleshooting page has several suggestions that may help.

If you are still stuck, try one of the mailing lists on the support page; the community is always willing to help new arrivals.

Auto-Configuration

If installation was successful, you should now see an Auto Configure screen.

Some items on the list will be marked “Failed” with “Fix” links next to them.

Click on each Fix link in turn and follow the on-screen instructions.

After an issue is successfully resolved, you can click the “Auto Configure” breadcrumb to go back to the main list and proceed to the next problem.

Notes:

  • To set up VuFind®'s database, you will need to have the root password you set when installing MySQL.

Locking Down Configurations

Once all configuration issues are successfully resolved, you will see a “Disable Auto Configuration” link on the “Auto Configure” page. Click this to prevent future access to the install script. If you need access again in the future, you can re-enable it by manually editing your config.ini file.

After disabling auto configuration, you should also disable Apache's ability to write to your configuration directory:

chown -R root:root /usr/local/vufind/local/config
chcon -R unconfined_u:object_r:httpd_sys_content_t:s0 /usr/local/vufind/local/config

(Replace “root:root” with a different user/group if you have set up a particular Linux user for the purposes of running VuFind®; replace /usr/local/vufind with your VuFind® base path if you have customized the location of your installation).

3. Import Records

VuFind® won't do much good without any data – see the indexing page for more details on loading your content into the system.

4. Secure Your System and Prepare for Production

Congratulations – you now have a running copy of VuFind®. However, you should be aware of security concerns. See the Security page for some VuFind®-specific notes, and take some time to learn about general issues in Unix security if you are not already familiar with the topic; LinuxSecurity.com is one good source for news and tutorials.

:!: Do not forget this step before going into production – an improperly secured system on the open Internet can quickly come under attack.

There are also some further production-specific considerations listed in the Production Checklist.

5. Troubleshooting Notes

Encryption Issues

If you are using Fedora 36 or newer, OpenSSL may not be configured to support VuFind®'s default blowfish encryption algorithm, which could lead to errors when users access their ILS accounts. VuFind® 9.0 and newer should automatically help you solve this problem through the installation/upgrade process, but for earlier releases, see VUFIND-1563 for a workaround.

installation/fedora.txt · Last modified: 2024/07/11 18:57 by demiankatz