Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
installation:ubuntu [2019/02/04 16:07] – demiankatz | installation:ubuntu [2020/08/31 14:07] – demiankatz |
---|
====== Version Requirements ====== | ====== Version Requirements ====== |
| |
These instructions were most recently tested on Ubuntu 18.10 but should also work with other recent versions with little or no modification. If you are using an older Ubuntu distribution, make sure it meets the [[installation:requirements|requirements]] (such as minimum PHP version) of the VuFind release you are installing. | These instructions were most recently tested on Ubuntu 20.04 and Debian 10.1 but should also work with other recent versions with little or no modification. If you are using an older Ubuntu distribution, make sure it meets the [[installation:requirements|requirements]] (such as minimum PHP version) of the VuFind release you are installing. |
====== Getting Started ====== | ====== Getting Started ====== |
| |
| |
<code bash> | <code bash> |
wget https://github.com/vufind-org/vufind/releases/download/v5.1/vufind_5.1.deb | wget https://github.com/vufind-org/vufind/releases/download/v7.0.1/vufind_7.0.1.deb |
</code> | </code> |
| |
| |
<code bash> | <code bash> |
sudo dpkg -i vufind_5.1.deb | sudo dpkg -i vufind_7.0.1.deb |
</code> | </code> |
| |
| |
* **Case 1 - MySQL, Ubuntu 17 or earlier:** If you need to install MySQL, you may be prompted for a root password during installation. For better security, it is a good idea to set this; if you do, be sure you remember it so you can configure VuFind to access the database later. | * **Case 1 - MySQL, Ubuntu 17 or earlier:** If you need to install MySQL, you may be prompted for a root password during installation. For better security, it is a good idea to set this; if you do, be sure you remember it so you can configure VuFind to access the database later. |
* **Case 2 - MySQL, Ubuntu 18+:** If you wish to connect to the root account through the web-based installer in order to set up VuFind's database, you will need to disable the root account's "auth_socket" plugin, which prevents regular logins. You can do this by logging in with "sudo mysql -uroot" and then running <nowiki>"UPDATE mysql.user SET plugin='mysql_native_password' WHERE User='root'; FLUSH PRIVILEGES;"</nowiki> Next you should run "sudo /usr/bin/mysql_secure_installation" to set a root password. | * **Case 2 - MySQL, Ubuntu 18+:** If you wish to connect to the root account through the web-based installer in order to set up VuFind's database, you will need to disable the root account's "auth_socket" plugin, which prevents regular logins. You can do this by logging in with "sudo mysql -uroot" and then running <nowiki>"UPDATE mysql.user SET plugin='mysql_native_password' WHERE User='root'; FLUSH PRIVILEGES;"</nowiki> Next you should quit the MySQL tool and run "sudo /usr/bin/mysql_secure_installation" at the command line to set a root password. |
* **Case 3 - MariaDB:** If you are using a distribution that includes MariaDB instead of MySQL, you will not be prompted to set a root password. Instead, you should run "sudo /usr/bin/mysql_secure_installation" to properly set up security. If you wish to connect to the root account through the web-based installer in order to set up VuFind's database, you may also need to disable the root account's "unix_socket" plugin, which prevents regular logins. You can do this by logging in with "sudo mysql -uroot -p" and then running <nowiki>"UPDATE mysql.user SET plugin='' WHERE User='root'; FLUSH PRIVILEGES;"</nowiki> | * **Case 3 - MySQL, Ubuntu 19.10+:** Follow the instructions above under "Ubuntu 18+," but also edit /etc/mysql/mysql.conf.d/mysqld.cnf, add the line "default_authentication_plugin= mysql_native_password" and run "sudo service mysql restart" before attempting to set up VuFind. This will ensure that new accounts are created using a PHP-compatible authentication method. |
| * **Case 4 - MariaDB:** If you are using a distribution that includes MariaDB instead of MySQL, you will not be prompted to set a root password during installation. Instead, you should run "sudo /usr/bin/mysql_secure_installation" to properly set up security. If this command is missing, try installing the mariadb-client and mariadb-server packages with apt-get. If you wish to connect to the root account through the web-based installer in order to set up VuFind's database, you may also need to disable the root account's "unix_socket" plugin, which prevents regular logins. You can do this by logging in with "sudo mysql -uroot -p" and then running <nowiki>"UPDATE mysql.user SET plugin='' WHERE User='root'; FLUSH PRIVILEGES;"</nowiki> |
| * **When all else fails:** If you cannot successfully connect to the database with VuFind's installer using the root account, you can still set up the database manually through the command line. When filling out the "Auto Configure" database form, omit the "MySQL Root User" and "MySQL Root Password" fields at the bottom, and instead of clicking the regular "Submit" form, click the "Skip" button below it. This will show you all of the SQL commands that need to be run to set up VuFind's database. Using the MySQL command line client ("mysql -u root -p"), run the first four (CREATE DATABASE/CREATE USER/GRANT/FLUSH) commands that are displayed. This will set up your new VuFind database. Now, you need to run a "USE" command to select that database (e.g. "USE vufind;" if you're using the default database name of "vufind"). Finally, copy and paste the remainder of the SQL (consisting of many CREATE TABLE statements). This will populate your new VuFind database. You may also need to edit the [Database] section of config.ini to adjust the database connection string to use the credentials created for your new database. |
| |
==== ILS-Specific Issues ==== | ==== ILS-Specific Issues ==== |
| |
* If you are a Voyager library, you will also need to install the PHP OCI Driver for Oracle – see [[php_oci|this page]] for detailed instructions. | * If you are a Voyager library, you will also need to install the PHP OCI Driver for Oracle – see [[php_oci|this page]] for detailed instructions. |
* If you will be accessing a Sybase database (e.g. for the Horizon LMS), you should also install the php5-sybase package using apt-get. | * If you will be accessing a Sybase database (e.g. for the Horizon LMS), you should also install the php-sybase package using apt-get. |
| |
==== Rolling Back ==== | ==== Rolling Back ==== |
| |
<code bash> | <code bash> |
sudo apt-get -y install libapache2-mod-php php-mbstring php-pear php php-dev php-gd php-intl php-json php-ldap php-mysql php-xml php-soap | sudo apt-get -y install libapache2-mod-php php-mbstring php-pear php php-dev php-gd php-intl php-json php-ldap php-mysql php-xml php-soap php-curl |
</code> | </code> |
| |
<code> | <code> |
cd /tmp | cd /tmp |
wget https://github.com/vufind-org/vufind/releases/download/v5.1/vufind-5.1.tar.gz | wget https://github.com/vufind-org/vufind/releases/download/v7.0.1/vufind-7.0.1.tar.gz |
tar xzvf vufind-5.1.tar.gz | tar -xzvf vufind-7.0.1.tar.gz |
sudo mv vufind-5.1 /usr/local/vufind | sudo mv vufind-7.0.1 /usr/local/vufind |
</code> | </code> |
| |
| |
<code bash> | <code bash> |
mkdir /usr/local/vufind/local/cache/cli | sudo mkdir /usr/local/vufind/local/cache/cli |
sudo chmod 777 /usr/local/vufind/local/cache/cli | sudo chmod 777 /usr/local/vufind/local/cache/cli |
</code> | </code> |
If you see a blank white screen, something is wrong. | If you see a blank white screen, something is wrong. |
| |
* Check your Apache error log (usually /var/log/apache2/error.log) for messages. | The [[development:troubleshooting|troubleshooting page]] has several suggestions that may help. |
* If that does not help, try editing /usr/local/vufind/local/httpd_vufind.conf and uncommenting the "SetEnv VUFIND_ENV development" line -- after an Apache restart, this will put VuFind into development mode (which will display more detailed error messages if the code is capable of running). | |
* :!: There is a known issue in Ubuntu 13.10 that prevents the PHP mcrypt module from installing correctly. See [[http://askubuntu.com/questions/362082/php-is-not-working-well-on-ubuntu-13-10-and-mcrypt-is-missing-in-phpmyadmin|this page]] for a workaround. | |
* :!: Ubuntu 14.04, 14.10, 15.04 and 15.10 also suffer from the mcrypt module installation problem, though the solution is simpler: sudo php5enmod mcrypt ; sudo service apache2 restart | |
| |
If you are still stuck, try one of the mailing lists on the [[http://vufind.org/support.php|support page]]. | If you are still stuck, try one of the mailing lists on the [[http://vufind.org/support.php|support page]]; the community is always willing to help new arrivals. |
| |
==== Auto-Configuration ==== | ==== Auto-Configuration ==== |