mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-03 02:09:45 +07:00
Merge pull request #1543 from J0WI/php72-path
Update path to PHP 7.2 config
This commit is contained in:
@@ -15,7 +15,7 @@ archive <https://nextcloud.com/install/>`_.
|
||||
.. note:: Admins of SELinux-enabled distributions such as CentOS, Fedora, and
|
||||
Red Hat Enterprise Linux may need to set new rules to enable installing
|
||||
Nextcloud. See :ref:`selinux_tips_label` for a suggested configuration.
|
||||
|
||||
|
||||
You can also use the `Nextcloud VM scripts <https://github.com/nextcloud/vm/>`_ to install directly on a clean Ubuntu Server. It will setup everything for you and include scripts for automated installation of apps like; Collabora, OnlyOffice, Talk and so on.
|
||||
|
||||
.. _vm_label:
|
||||
@@ -28,7 +28,7 @@ using a virtual machine (VM). There are two options:
|
||||
|
||||
* **Enterprise/SME appliance**
|
||||
|
||||
Nextcloud GmbH maintains a free appliance built on the
|
||||
Nextcloud GmbH maintains a free appliance built on the
|
||||
`Univention Corporate Server (UCS) <https://www.univention.com/products/univention-app-center/app-catalog/nextcloud/>`_
|
||||
with easy graphical setup and web-based administration. It includes user
|
||||
management via LDAP, can replace an existing Active Directory setup and
|
||||
@@ -65,7 +65,7 @@ For complete instructions and downloads see:
|
||||
- `Nextcloud VM (T&M Hansson IT) <https://www.hanssonit.se/nextcloud-vm/>`_
|
||||
|
||||
.. note:: You can install the VM on several different operating systems as long as you can mount OVA, VMDK, or VHD/VHDX VM in your hypervisor. If you are using KVM then you need to install the VM from the scripts on Github. You can follow the `instructions in the README <https://github.com/nextcloud/vm#build-your-own-vm-or-install-on-a-vps>`_.
|
||||
|
||||
|
||||
.. _snaps_label:
|
||||
|
||||
Installing via Snap packages
|
||||
@@ -191,12 +191,12 @@ terminal::
|
||||
apt-get install php7.2-intl php-imagick php7.2-xml php7.2-zip
|
||||
|
||||
* This installs the packages for the Nextcloud core system.
|
||||
``libapache2-mod-php7.2`` provides the following PHP extensions::
|
||||
|
||||
bcmath bz2 calendar Core ctype date dba dom ereg exif fileinfo filter ftp gettext
|
||||
hash iconv libxml mhash openssl pcre Phar posix Reflection session shmop SimpleXML
|
||||
soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xmlreader xmlwriter zlib .
|
||||
|
||||
``libapache2-mod-php7.2`` provides the following PHP extensions::
|
||||
|
||||
bcmath bz2 calendar Core ctype date dba dom ereg exif fileinfo filter ftp gettext
|
||||
hash iconv libxml mhash openssl pcre Phar posix Reflection session shmop SimpleXML
|
||||
soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xmlreader xmlwriter zlib
|
||||
|
||||
If you are planning on running additional apps, keep in mind that they might require additional
|
||||
packages. See :ref:`prerequisites_label` for details.
|
||||
|
||||
@@ -265,9 +265,10 @@ Now make sure your system is up to date::
|
||||
yum update -y
|
||||
|
||||
**Apache**
|
||||
::
|
||||
|
||||
yum install -y httpd
|
||||
|
||||
|
||||
See :ref:`apache-web-server-configuration` for details.
|
||||
|
||||
Make sure the apache web service is enabled and started::
|
||||
@@ -289,7 +290,7 @@ Next you will need to create a few symlinks::
|
||||
ln -s /opt/rh/httpd24/root/etc/httpd/conf.d/rh-php72-php.conf /etc/httpd/conf.d/
|
||||
ln -s /opt/rh/httpd24/root/etc/httpd/conf.modules.d/15-rh-php72-php.conf /etc/httpd/conf.modules.d/
|
||||
ln -s /opt/rh/httpd24/root/etc/httpd/modules/librh-php72-php7.so /etc/httpd/modules/
|
||||
|
||||
|
||||
This next symlink will give you the opportunity to be able to invoke ``php`` from anywhere in terminal, including for ``occ`` commands::
|
||||
|
||||
ln -s /opt/rh/rh-php72/root/bin/php /usr/bin/php
|
||||
@@ -310,12 +311,13 @@ After you have done this, make sure you create a database with a username and pa
|
||||
|
||||
|
||||
**Redis**
|
||||
::
|
||||
|
||||
yum install -y redis
|
||||
systemctl enable redis.service
|
||||
systemctl start redis.service
|
||||
|
||||
|
||||
|
||||
**Installing Nextcloud**
|
||||
|
||||
Nearly there, so keep at it, you are doing great!
|
||||
@@ -351,7 +353,7 @@ For the sake of the walk-through, we grabbed the latest version of Nextcloud in
|
||||
Copy the content over to the root directory of your webserver. In our case, we are using apache so it will be ``/var/www/html/``::
|
||||
|
||||
cp -R nextcloud/ /var/www/html/
|
||||
|
||||
|
||||
During the install process, no data folder is created, so we will create one manually to help with the installation wizard::
|
||||
|
||||
mkdir /var/www/html/nextcloud/data
|
||||
@@ -374,16 +376,16 @@ Create a firewall rule for access to apache::
|
||||
Again, there is an extensive write-up done on SELinux which can be found at :doc:`../installation/selinux_configuration`, so if you are using SELinux in Enforcing mode, please run the commands suggested on that page.
|
||||
The following commands only refers to this tutorial::
|
||||
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/data(/.*)?'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/config(/.*)?'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/apps(/.*)?'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/.htaccess'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/.user.ini'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/3rdparty/aws/aws-sdk-php/src/data/logs(/.*)?'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/data(/.*)?'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/config(/.*)?'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/apps(/.*)?'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/.htaccess'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/.user.ini'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/3rdparty/aws/aws-sdk-php/src/data/logs(/.*)?'
|
||||
|
||||
restorecon -R '/var/www/html/nextcloud/'
|
||||
restorecon -R '/var/www/html/nextcloud/'
|
||||
|
||||
setsebool -P httpd_can_network_connect on
|
||||
setsebool -P httpd_can_network_connect on
|
||||
|
||||
If you need more SELinux configs, refer to the above-mentioned URL, return to this tutorial.
|
||||
|
||||
@@ -395,13 +397,13 @@ Because we used ``Redis`` as a memcache, you will need a config similar to the f
|
||||
|
||||
Example config::
|
||||
|
||||
'memcache.distributed' => '\OC\Memcache\Redis',
|
||||
'memcache.locking' => '\OC\Memcache\Redis',
|
||||
'memcache.local' => '\OC\Memcache\APCu',
|
||||
'redis' => array(
|
||||
'host' => 'localhost',
|
||||
'port' => 6379,
|
||||
),
|
||||
'memcache.distributed' => '\OC\Memcache\Redis',
|
||||
'memcache.locking' => '\OC\Memcache\Redis',
|
||||
'memcache.local' => '\OC\Memcache\APCu',
|
||||
'redis' => array(
|
||||
'host' => 'localhost',
|
||||
'port' => 6379,
|
||||
),
|
||||
|
||||
Remember, this tutorial is only for a basic setup of Nextcloud on CentOS 7, with PHP 7.2. If you are going to use more features like LDAP or Single Sign On, you will need additional PHP modules as well as extra configurations. So please visit the rest of the Admin manual, :doc:`../index`, for detailed descriptions on how to get this done.
|
||||
|
||||
@@ -415,47 +417,45 @@ configuration so all you have to do is create a
|
||||
:file:`/etc/apache2/sites-available/nextcloud.conf` file with these lines in
|
||||
it, replacing the **Directory** and other filepaths with your own filepaths::
|
||||
|
||||
Alias /nextcloud "/var/www/nextcloud/"
|
||||
Alias /nextcloud "/var/www/nextcloud/"
|
||||
|
||||
<Directory /var/www/nextcloud/>
|
||||
Require all granted
|
||||
Options FollowSymlinks MultiViews
|
||||
AllowOverride All
|
||||
<Directory /var/www/nextcloud/>
|
||||
Require all granted
|
||||
Options FollowSymlinks MultiViews
|
||||
AllowOverride All
|
||||
|
||||
<IfModule mod_dav.c>
|
||||
Dav off
|
||||
</IfModule>
|
||||
<IfModule mod_dav.c>
|
||||
Dav off
|
||||
</IfModule>
|
||||
|
||||
SetEnv HOME /var/www/nextcloud
|
||||
SetEnv HTTP_HOME /var/www/nextcloud
|
||||
SetEnv HOME /var/www/nextcloud
|
||||
SetEnv HTTP_HOME /var/www/nextcloud
|
||||
|
||||
</Directory>
|
||||
|
||||
</Directory>
|
||||
|
||||
Then enable the newly created site::
|
||||
|
||||
a2ensite nextcloud.conf
|
||||
|
||||
a2ensite nextcloud.conf
|
||||
|
||||
On CentOS/RHEL, create a virtualhost :file:`/etc/httpd/conf.d/nextcloud.conf`and add the following content to it:
|
||||
|
||||
On CentOS/RHEL, create a virtualhost :file:`/etc/httpd/conf.d/nextcloud.conf` and add the following content to it::
|
||||
|
||||
<VirtualHost *:80>
|
||||
|
||||
DocumentRoot /var/www/nextcloud/
|
||||
ServerName your.server.com
|
||||
DocumentRoot /var/www/nextcloud/
|
||||
ServerName your.server.com
|
||||
|
||||
<Directory "/var/www/nextcloud/">
|
||||
|
||||
Require all granted
|
||||
AllowOverride All
|
||||
Options FollowSymLinks MultiViews
|
||||
|
||||
<IfModule mod_dav.c>
|
||||
Dav off
|
||||
</IfModule>
|
||||
|
||||
</Directory>
|
||||
<Directory "/var/www/nextcloud/">
|
||||
Require all granted
|
||||
AllowOverride All
|
||||
Options FollowSymLinks MultiViews
|
||||
|
||||
<IfModule mod_dav.c>
|
||||
Dav off
|
||||
</IfModule>
|
||||
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
|
||||
|
||||
Additional Apache configurations
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -491,7 +491,7 @@ Additional Apache configurations
|
||||
|
||||
* Now restart Apache::
|
||||
|
||||
service apache2 restart
|
||||
service apache2 restart
|
||||
|
||||
* If you're running Nextcloud in a subdirectory and want to use CalDAV or
|
||||
CardDAV clients make sure you have configured the correct
|
||||
@@ -509,18 +509,18 @@ making URLs shorter and thus prettier.
|
||||
``mod_env`` and ``mod_rewrite`` must be installed on your webserver and the :file:`.htaccess`
|
||||
must be writable by the HTTP user. Then you can set in the :file:`config.php` two variables::
|
||||
|
||||
'overwrite.cli.url' => 'https://example.org/nextcloud',
|
||||
'htaccess.RewriteBase' => '/nextcloud',
|
||||
'overwrite.cli.url' => 'https://example.org/nextcloud',
|
||||
'htaccess.RewriteBase' => '/nextcloud',
|
||||
|
||||
if your setup is available on ``https://example.org/nextcloud`` or::
|
||||
|
||||
'overwrite.cli.url' => 'https://example.org/',
|
||||
'htaccess.RewriteBase' => '/',
|
||||
'overwrite.cli.url' => 'https://example.org/',
|
||||
'htaccess.RewriteBase' => '/',
|
||||
|
||||
if it isn't installed in a subfolder. Finally run this occ-command to update
|
||||
your .htaccess file::
|
||||
|
||||
sudo -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess
|
||||
sudo -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess
|
||||
|
||||
After each update, these changes are automatically applied to the ``.htaccess``-file.
|
||||
|
||||
@@ -537,9 +537,9 @@ Apache installed under Ubuntu comes already set-up with a simple
|
||||
self-signed certificate. All you have to do is to enable the ssl module and
|
||||
the default site. Open a terminal and run::
|
||||
|
||||
a2enmod ssl
|
||||
a2ensite default-ssl
|
||||
service apache2 reload
|
||||
a2enmod ssl
|
||||
a2ensite default-ssl
|
||||
service apache2 reload
|
||||
|
||||
.. note:: Self-signed certificates have their drawbacks - especially when you
|
||||
plan to make your Nextcloud server publicly accessible. You might
|
||||
@@ -555,9 +555,9 @@ Installation wizard
|
||||
After restarting Apache you must complete your installation by running either
|
||||
the graphical Installation Wizard, or on the command line with the ``occ``
|
||||
command. To enable this, change the ownership on your Nextcloud directories to
|
||||
your HTTP user:
|
||||
your HTTP user::
|
||||
|
||||
chown -R www-data:www-data /var/www/nextcloud/
|
||||
chown -R www-data:www-data /var/www/nextcloud/
|
||||
|
||||
.. note:: Admins of SELinux-enabled distributions may need to write new SELinux
|
||||
rules to complete their Nextcloud installation; see
|
||||
@@ -586,17 +586,18 @@ ini file. This can be the case, for example, for the ``date.timezone`` setting.
|
||||
**php.ini - used by the Web server:**
|
||||
::
|
||||
|
||||
/etc/php/7.0/apache2/php.ini
|
||||
or
|
||||
/etc/php/7.0/fpm/php.ini
|
||||
or ...
|
||||
/etc/php/7.2/apache2/php.ini
|
||||
or
|
||||
/etc/php/7.2/fpm/php.ini
|
||||
or ...
|
||||
|
||||
**php.ini - used by the php-cli and so by Nextcloud CRON jobs:**
|
||||
::
|
||||
|
||||
/etc/php/7.0/cli/php.ini
|
||||
/etc/php/7.2/cli/php.ini
|
||||
|
||||
.. note:: Path names have to be set in respect of the installed PHP (>= 7.0, 7.1 or 7.2) as applicable.
|
||||
.. note:: Path names have to be set in respect of the installed PHP
|
||||
(>= 7.0, 7.1, 7.2 or 7.3) as applicable.
|
||||
|
||||
.. _php_fpm_tips_label:
|
||||
|
||||
@@ -616,8 +617,7 @@ Here are some example root paths for these ini/config files:
|
||||
+-----------------------+-----------------------+
|
||||
| Debian/Ubuntu/Mint | CentOS/Red Hat/Fedora |
|
||||
+-----------------------+-----------------------+
|
||||
| | ``/etc/php-fpm.d/`` |
|
||||
| ``/etc/php/7.0/fpm/`` | |
|
||||
| ``/etc/php/7.2/fpm/`` | ``/etc/php-fpm.d/`` |
|
||||
+-----------------------+-----------------------+
|
||||
|
||||
In both examples, the ini/config file is called ``www.conf``, and depending on
|
||||
@@ -635,18 +635,18 @@ already in the file, but commented out like this::
|
||||
Uncomment the appropriate existing entries. Then run ``printenv PATH`` to
|
||||
confirm your paths, for example::
|
||||
|
||||
$ printenv PATH
|
||||
/home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:
|
||||
/sbin:/bin:/
|
||||
$ printenv PATH
|
||||
/home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:
|
||||
/sbin:/bin:/
|
||||
|
||||
If any of your system environment variables are not present in the file then
|
||||
you must add them.
|
||||
|
||||
Alternatively it is possible to use the environemt variables of your system by modifying
|
||||
Alternatively it is possible to use the environemt variables of your system by modifying::
|
||||
|
||||
/etc/php/7.0/fpm/pool.d/www.conf
|
||||
/etc/php/7.2/fpm/pool.d/www.conf
|
||||
|
||||
and uncommenting the line
|
||||
and uncommenting the line::
|
||||
|
||||
clear_env = no
|
||||
|
||||
@@ -681,4 +681,4 @@ Other Web servers
|
||||
|
||||
|
||||
.. _Nextcloud VM:
|
||||
https://github.com/nextcloud/vm
|
||||
https://github.com/nextcloud/vm
|
||||
|
||||
Reference in New Issue
Block a user