Both sides previous revisionPrevious revisionNext revision | Previous revision |
installation:ubuntu [2023/06/22 10:58] – [Example 1: Installing an Older JDK] demiankatz | installation:ubuntu [2024/02/12 12:55] (current) – demiankatz |
---|
| |
<code bash> | <code bash> |
wget https://github.com/vufind-org/vufind/releases/download/v9.0.1/vufind_9.0.1.deb | wget https://github.com/vufind-org/vufind/releases/download/v9.1.1/vufind_9.1.1.deb |
</code> | </code> |
| |
:!: This option is not supported before VuFind® 7.1, which increased the flexibility of Java handling in the .deb package. | :!: This option is not supported before VuFind® 7.1, which increased the flexibility of Java handling in the .deb package. |
| |
If you want to run VuFind® with JDK 17, you can simply run: ''sudo apt-get install openjdk-17-jdk'' | If you want to run VuFind® with JDK 17 in an Ubuntu release that uses JDK 11 by default, you can simply run: ''sudo apt-get install openjdk-17-jdk'' prior to installing the .deb package. |
| |
==== Example 2: Using MariaDB instead of MySQL ==== | ==== Example 2: Using MariaDB instead of MySQL ==== |
| |
If you prefer MariaDB to MySQL, simply run this command before installing VuFind®: //sudo apt-get install mariadb-server// | If you prefer MariaDB to MySQL, simply run this command before installing VuFind®: ''sudo apt-get install mariadb-server'' |
| |
===== 3. Install the package ===== | ===== 3. Install the package ===== |
| |
<code bash> | <code bash> |
sudo dpkg -i vufind_9.0.1.deb | sudo dpkg -i vufind_9.1.1.deb |
</code> | </code> |
| |
==== Database Issues ==== | ==== Database Issues ==== |
| |
* **Case 1 - MySQL, Ubuntu 20/21:** If you wish to connect to the root account through the web-based installer in order to set up VuFind®'s database, you should follow these steps: | * **Case 1 - MySQL:** If you wish to connect to the root account through the web-based installer in order to set up VuFind®'s database, you should follow these steps: |
- Disable the root account's "auth_socket" plugin, which prevents regular logins, 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> | - Disable the root account's "auth_socket" plugin, which prevents regular logins, 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>'' |
- Quit the MySQL tool and run "sudo /usr/bin/mysql_secure_installation" at the command line to set a root password. | - Quit the MySQL tool and run ''sudo /usr/bin/mysql_secure_installation'' at the command line to automatically improve some database security settings. |
- 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. | - If the mysql_secure_installation process does not automatically help you set a root password, you may wish to do so manually, by logging in with ''sudo mysql -uroot'' and then running ''<nowiki>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'your-password-here';</nowiki>'' |
* **Case 2 - MySQL, Ubuntu 22+:** See notes in Case 1, but in step 3, add "authentication_policy=mysql_native_password" to mysqld.cnf instead of the now-deprecated default_authentication_plugin setting. | - Edit /etc/mysql/mysql.conf.d/mysqld.cnf, add the appropriate line for your Ubuntu version to the bottom of the file: |
* **Case 3 - MariaDB 10.3 and earlier:** 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> | * **Ubuntu 20/21**: default_authentication_plugin=mysql_native_password |
* **Case 4 - MariaDB 10.4 and later:** MariaDB 10.4 significantly changes how authentication is handled; see [[https://mariadb.com/kb/en/authentication-from-mariadb-104/|Authentication from MariaDB 10.4]] in the application's documentation for more details. Notes on successfully configuring MariaDB 10.4 and VuFind® will be added here as time permits. | * **Ubuntu 22+:** authentication_policy=mysql_native_password |
* **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. | * 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 2 - MariaDB 10.3 and earlier:** 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>'' |
| * **Case 3 - MariaDB 10.4 and later:** MariaDB 10.4 significantly changes how authentication is handled; see [[https://mariadb.com/kb/en/authentication-from-mariadb-104/|Authentication from MariaDB 10.4]] in the application's documentation for more details. Notes on successfully configuring MariaDB 10.4 and VuFind® will be added here as time permits. |
| * **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. |
| |
==== Encryption Issues ==== | ==== Encryption Issues ==== |
| |
If you are using Ubuntu 22.04 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. See [[https://openlibraryfoundation.atlassian.net/browse/VUFIND-1563|VUFIND-1563]] for a workaround. | If you are using Ubuntu 22.04 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 [[https://openlibraryfoundation.atlassian.net/browse/VUFIND-1563|VUFIND-1563]] for a workaround. |
| |
==== ILS-Specific Issues ==== | ==== ILS-Specific Issues ==== |
</code> | </code> |
| |
Note: During installation, you will be prompted for a MySQL root password. 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. | Note: See [[installation:ubuntu#database_issues|Database Issues]] above for some important notes on additional setup that may be necessary to make the database compatible with VuFind®. |
| |
Note: 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 will 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> | |
| |
Note: If you would like to do web-based administration of your database, you may also find it helpful to install the phpmyadmin tool: sudo apt-get install phpmyadmin | Note: If you would like to do web-based administration of your database, you may also find it helpful to install the phpmyadmin tool: sudo apt-get install phpmyadmin |
| |
Note: Some Linux distributions have replaced MySQL with MariaDB. If you are working with one of those platforms (or if Ubuntu has changed its defaults by the time you are reading this), the two should be functionally equivalent. | Note: Some Linux distributions have replaced MySQL with MariaDB. The two should be functionally equivalent, and both should work equally well with VuFind®. |
===== 3. Install PHP ===== | ===== 3. Install PHP ===== |
| |
<code> | <code> |
cd /tmp | cd /tmp |
wget https://github.com/vufind-org/vufind/releases/download/v9.0.1/vufind-9.0.1.tar.gz | wget https://github.com/vufind-org/vufind/releases/download/v9.1.1/vufind-9.1.1.tar.gz |
tar -xzvf vufind-9.0.1.tar.gz | tar -xzvf vufind-9.1.1.tar.gz |
sudo mv vufind-9.0.1 /usr/local/vufind | sudo mv vufind-9.1.1 /usr/local/vufind |
</code> | </code> |
| |
</code> | </code> |
| |
//Note: If you are using the Sun JVM instead of the default JVM, you may need to specify a different JAVA_HOME path, like /usr/lib/jvm/java-x-sun.// | //Note: If you have multiple JVMs and want to use a non-default one instead, you may need to specify a different JAVA_HOME path, like /usr/lib/jvm/java-17-openjdk-amd64.// |
| |
After creating the file, you must load it manually for the changes to take effect without forcing you to log out and back in again: | After creating the file, you must load it manually for the changes to take effect without forcing you to log out and back in again: |
| |
VuFind® won't do much good without any data – see the [[:indexing]] page for more details on loading your content into the system. | VuFind® won't do much good without any data – see the [[:indexing]] page for more details on loading your content into the system. |
| |
:!: When using Ubuntu 18 in combination with VuFind® 5.0.x, the SolrMarc importer may fail with an error message about log4j. This will be corrected in a future release; in the meantime, you should downgrade your JVM: | |
| |
<code> | |
sudo apt-get install openjdk-8-jdk | |
sudo update-java-alternatives -s java-1.8.0-openjdk-amd64 | |
sudo rm /usr/lib/jvm/default-java | |
sudo ln -s /usr/lib/jvm/java-8-openjdk-amd64 /usr/lib/jvm/default-java | |
</code> | |
===== 4. Secure Your System and Prepare for Production ===== | ===== 4. Secure Your System and Prepare for Production ===== |
| |