Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.8] [PR 369] Server Preparation for Ubuntu 22.04 #397

Merged
merged 3 commits into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ To prepare your Ubuntu 20.04 server for the use with ownCloud, follow the
xref:installation/manual_installation/server_prep_ubuntu_20.04.adoc[Ubuntu 20.04 preparation guide].
This guide installs PHP 7.4

=== Ubuntu 22.04 LTS Server

To prepare your Ubuntu 22.04 server for the use with ownCloud, follow the
xref:installation/manual_installation/server_prep_ubuntu_22.04.adoc[Ubuntu 22.04 preparation guide].

NOTE: Ubuntu 22.04 only provides PHP 8.x which is currently not supported by ownCloud. Therefore PHP 7.4 is installed via PPA.

=== Install a Database

If you do not already have a supported database installed, follow the
Expand Down Expand Up @@ -109,7 +116,7 @@ options automatically.

Use the following commands if you want to do the basic setup without any changes and physical installation options.
Consider using the xref:installation/manual_installation/script_guided_install.adoc[Script-Guided Installation]
if you plan on improving your setup from step one.
if you plan to improve your setup from step one.

* Extract the archive contents and run the unpacking command for your tar archive:
+
Expand All @@ -128,9 +135,8 @@ tar -xjf {oc-complete-name}.tar.bz2
cp -r owncloud /var/www
----

After the installation, set the correct ownership and permissions.
To do so, we suggest using the scripts from the
xref:installation/manual_installation/script_guided_install.adoc[Script-Guided Installation].
After the installation, set the correct ownership and permissions according to the needs of your environment. While you can do that manually, we suggest using the scripts from the
xref:installation/manual_installation/script_guided_install.adoc[Script-Guided Installation] which ease the process a lot.

== Complete the Installation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@
:pecl_url: https://pecl.php.net/package/smbclient
:phpmyadmin_latest_url: https://www.phpmyadmin.net/downloads/
:pear-package_url: https://pear.php.net/package/PEAR/
:phpseclib-url: https://phpseclib.com/docs/why

:description: This guide gives you detailed information on preparing your Ubuntu 20.04 server for the use with ownCloud.

== Introduction

{description}

The target audience for this document are experienced admins with additional needs and setup scenarios. Ubuntu 20.04 by default only provides PHP 7.4. In case you are running a PHP version lower than 7.4, your PHP version is already EOL. Consider upgrading to PHP 7.4. For more information see {php-supported-versions-url}[Currently Supported PHP Versions]. This document considers two basic scenarios. You have/plan to upgrade from 18.04 LTS to 20.04 LTS or you have a fresh Ubuntu 20.04 LTS installation.

IMPORTANT: PHP 8.0 is not currently supported by the ownCloud server.
Expand All @@ -28,10 +33,30 @@ Without going into the upgrade details, you can now upgrade directly from Ubuntu
[source,bash]
----
sudo apt update
----

[source,bash]
----
sudo apt upgrade
----

[source,bash]
----
sudo apt dist-upgrade
----

[source,bash]
----
sudo apt autoremove
----

[source,bash]
----
sudo apt install update-manager-core
----

[source,bash]
----
sudo do-release-upgrade
----

Expand Down Expand Up @@ -66,8 +91,20 @@ If you had installed the `ondrej php` PPA, remove it, else it will reinstall PHP
[source,bash]
----
sudo apt install ppa-purge
----

[source,bash]
----
sudo ppa-purge ppa:ondrej/php
----

[source,bash]
----
sudo rm -i /etc/apt/sources.list.d/ondrej-ubuntu-php-*
----

[source,bash]
----
sudo apt update
----

Expand All @@ -85,22 +122,53 @@ install PHP 7.4 and necessary extensions:
[source,bash]
----
sudo apt install php-fpm php-cgi
----

[source,bash]
----
sudo apt install php
sudo apt install php-mysql php-mbstring php-intl php-redis php-imagick \
php-igbinary php-gmp php-bcmath php-curl php-gd php-zip php-imap \
php-ldap php-bz2 php-ssh2 php-phpseclib php-common php-json php-xml
sudo apt install php-dev libsmbclient-dev php-pear
----

[source,bash]
----
sudo apt install php-mysql php-mbstring php-intl php-imagick \
php-redis php-apcu php-igbinary php-gmp php-bcmath \
php-curl php-gd php-zip php-imap php-ldap php-bz2 \
php-ssh2 php-phpseclib php-common php-json php-xml \
php-dev libsmbclient-dev php-pear
----

Note that the `php-phpseclib` package is a {phpseclib-url}[pure PHP implementation] for handling various ciphers and not dependent to the php source.

Use the following commands to install some common prerequisites:

[source,bash]
----
sudo apt install smbclient
----

[source,bash]
----
sudo apt install redis-server
----

[source,bash]
----
sudo apt install unzip
----

[source,bash]
----
sudo apt install openssl
----

[source,bash]
----
sudo apt install rsync
----

[source,bash]
----
sudo apt install imagemagick
----

Expand All @@ -109,16 +177,45 @@ The following step is necessary to upgrade PEAR because of a change in PHP 7.4.1
[source,bash]
----
pear version
----

[source,bash]
----
sudo mkdir -p /tmp/pear/cache
sudo pear upgrade --force --alldeps http://pear.php.net/get/PEAR-1.10.13
----

[source,bash]
----
sudo pear upgrade --force \
--alldeps http://pear.php.net/get/PEAR-1.10.13
----

[source,bash]
----
sudo pear clear-cache
----

[source,bash]
----
sudo pear update-channels
----

[source,bash]
----
sudo pear upgrade --force
----

[source,bash]
----
sudo pear upgrade-all
----

[source,bash]
----
pear version
----

If you get any notices containing `You should add "extension=...`, check if the extension is listed in `/etc/php/7.4/mods-available`. If it is not present, add the .ini file manually and xref:useful-commands-for-managing-php-extensions[enable it].
If you get any notices containing `You should add "extension=...`, check if the extension is listed in `/etc/php/7.4/mods-available`. If it is not present, add the `.ini` file manually and xref:useful-commands-for-managing-php-extensions[enable it].

Post upgrading pear, you can safely remove the directory `/tmp/pear/cache`.

Expand Down Expand Up @@ -178,6 +275,7 @@ If you have multiple concurrent PHP versions installed, which will happen when u
----
sudo update-alternatives --config php
----

Here is an example output:

[source,plaintext]
Expand Down Expand Up @@ -205,8 +303,20 @@ WARNING: After selecting your PHP version, it is **highly** recommended to switc
[source,bash]
----
sudo update-alternatives --set phar /usr/bin/phar7.4
----

[source,bash]
----
sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.4
----

[source,bash]
----
sudo update-alternatives --set phpize /usr/bin/phpize7.4
----

[source,bash]
----
sudo update-alternatives --set php-config /usr/bin/php-config7.4
----

Expand Down Expand Up @@ -265,6 +375,10 @@ from ownCloud's Enterprise Edition. To install it, run the commands described be
[source,bash]
----
sudo pecl channel-update pecl.php.net
----

[source,bash]
----
sudo pecl install smbclient
----

Expand Down Expand Up @@ -329,8 +443,7 @@ xref:installation/manual_installation/manual_installation_db.adoc[Manual Install
NOTE: Follow the procedure described in xref:useful-tips[Useful Tips], if you want to `Disable Transparent Huge Pages (THP),Transparent Huge Pages`

You may want to use the latest version of phpmyadmin as the OS default versions lags behind the {phpmyadmin_latest_url}[latest available stable] version a lot and may report PHP errors with PHP 7.3 onwards. Follow this
xref:installation/manual_installation/upgrade_install_phpmyadmin.adoc[quick upgrade guide]
to install it.
xref:installation/manual_installation/upgrade_install_phpmyadmin.adoc[quick upgrade guide] to install it.

== Useful Tips

Expand Down
Loading