mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-02 17:59:36 +07:00
236
admin_manual/installation/example_openbsd.rst
Normal file
236
admin_manual/installation/example_openbsd.rst
Normal file
@@ -0,0 +1,236 @@
|
||||
.. _openbsd_installation_label:
|
||||
|
||||
Nextcloud does not have official OpenBSD or other BSDs support
|
||||
==============================================================
|
||||
|
||||
|
||||
Example installation on OpenBSD
|
||||
===============================
|
||||
|
||||
In this install tutorial we will be deploying Nextcloud on a minimal OpenBSD with our own httpd(8), PHP, PostgreSQL and redis (for -stable or -current are the same steps).
|
||||
|
||||
From a base installed OpenBSD system you can just do::
|
||||
|
||||
# pkg_add nextcloud
|
||||
|
||||
The extra packages::
|
||||
|
||||
# pkg_add postgresql-server redis pecl74-redis php-pdo_pgsql
|
||||
|
||||
|
||||
This will take care of your dependencies and give you the options to choose which PHP version do you want.
|
||||
|
||||
HTTPD(8)
|
||||
--------
|
||||
|
||||
Create a virtualhost in ``/etc/httpd.conf`` and add the following content to it::
|
||||
|
||||
server "domain.tld" {
|
||||
listen on egress tls port 443
|
||||
hsts max-age 15768000
|
||||
|
||||
tls {
|
||||
certificate "/etc/ssl/domain.tld_fullchain.pem"
|
||||
key "/etc/ssl/private/domain.tld_private.pem"
|
||||
}
|
||||
|
||||
# Set max upload size to 513M (in bytes)
|
||||
connection max request body 537919488
|
||||
connection max requests 1000
|
||||
connection request timeout 3600
|
||||
connection timeout 3600
|
||||
|
||||
block drop
|
||||
|
||||
# Ensure that no '*.php*' files can be fetched from these directories
|
||||
location "/nextcloud/config/*" {
|
||||
block drop
|
||||
}
|
||||
|
||||
location "/nextcloud/data/*" {
|
||||
block drop
|
||||
}
|
||||
|
||||
# Note that this matches "*.php*" anywhere in the request path.
|
||||
location "/nextcloud/*.php*" {
|
||||
root "/nextcloud"
|
||||
request strip 1
|
||||
fastcgi socket "/run/php-fpm.sock"
|
||||
pass
|
||||
}
|
||||
|
||||
location "/nextcloud/apps/*" {
|
||||
root "/nextcloud"
|
||||
request strip 1
|
||||
pass
|
||||
}
|
||||
|
||||
location "/nextcloud/core/*" {
|
||||
root "/nextcloud"
|
||||
request strip 1
|
||||
pass
|
||||
}
|
||||
|
||||
location "/nextcloud" {
|
||||
block return 301 "$DOCUMENT_URI/index.php"
|
||||
}
|
||||
|
||||
location "/nextcloud/" {
|
||||
block return 301 "$DOCUMENT_URI/index.php"
|
||||
}
|
||||
|
||||
location "/.well-known/carddav" {
|
||||
block return 301 "https://$SERVER_NAME/nextcloud/remote.php/dav"
|
||||
}
|
||||
|
||||
location "/.well-known/caldav" {
|
||||
block return 301 "https://$SERVER_NAME/nextcloud/remote.php/dav"
|
||||
}
|
||||
|
||||
location "/.well-known/webfinger" {
|
||||
block return 301 "https://$SERVER_NAME/nextcloud/public.php?service=webfinger"
|
||||
}
|
||||
|
||||
location match "/nextcloud/oc[ms]%-provider/*" {
|
||||
directory index index.php
|
||||
pass
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Make sure that httpd(8) is enabled and started::
|
||||
|
||||
# rcctl enable httpd
|
||||
# rcctl start httpd
|
||||
|
||||
PHP
|
||||
---
|
||||
|
||||
Assuming that you are on OpenBSD -current (or >= 6.8-stable) you could use PHP 7.4 so I will keep this version, but the concept is the same for other version.
|
||||
|
||||
The PHP packages will be available since you installed Nextcloud with pkg_add, so you just need to adjust a bit your php.ini.
|
||||
|
||||
It is recommended to add opcache to it::
|
||||
|
||||
[opcache]
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.memory_consumption=512
|
||||
opcache.interned_strings_buffer=8
|
||||
opcache.max_accelerated_files=10000
|
||||
opcache.revalidate_freq=1
|
||||
opcache.save_comments=1
|
||||
|
||||
|
||||
And increase some limits::
|
||||
|
||||
post_max_size = 513M
|
||||
upload_max_filesize = 513M
|
||||
|
||||
|
||||
We can enable the PHP modules with::
|
||||
|
||||
# cd /etc/php-7.4.sample
|
||||
# for i in *; do ln -sf ../php-7.4.sample/$i ../php-7.4/; done
|
||||
|
||||
And then we just enable and start PHP::
|
||||
|
||||
# rcctl enable php74_fpm
|
||||
# rcctl start php74_fpm
|
||||
|
||||
|
||||
Database
|
||||
--------
|
||||
|
||||
As mentioned, we will be using PostgreSQL as our database, and we already installed it, now we need to initialised::
|
||||
|
||||
$ su - _postgresql
|
||||
$ mkdir /var/postgresql/data
|
||||
$ initdb -D /var/postgresql/data -U postgres -A md5 -E UTF8 -W
|
||||
...
|
||||
Enter new superuser password: PASSWORD
|
||||
Enter it again: PASSWORD
|
||||
...
|
||||
Success. You can now start the database server using:
|
||||
|
||||
pg_ctl -D /var/postgresql/data -l logfile start
|
||||
|
||||
$ pg_ctl -D /var/postgresql/data -l logfile start
|
||||
server starting
|
||||
$ exit
|
||||
|
||||
|
||||
We need to check, enable and start postgres::
|
||||
|
||||
# rcctl check postgresql
|
||||
# rcctl enable postgresql
|
||||
# rcctl start postgresql
|
||||
|
||||
You can follow the README on ``/usr/local/share/doc/pkg-readmes/postgresql-server`` to create users and permission.
|
||||
|
||||
|
||||
Redis
|
||||
-----
|
||||
|
||||
We installed redis before, we need to enable it and start it and also add it to the Nextcloud conf::
|
||||
|
||||
# rcctl enable redis
|
||||
# rcctl start redis
|
||||
# mg /var/www/nextcloud/config/config.php
|
||||
...
|
||||
'memcache.local' => '\OC\Memcache\Redis',
|
||||
'redis' => array(
|
||||
'host' => 'localhost',
|
||||
'port' => 6379,
|
||||
'timeout' => 0.0,
|
||||
),
|
||||
...
|
||||
|
||||
|
||||
Cron job
|
||||
--------
|
||||
|
||||
We need to add the Nextcloud cron job to get some tasks done by adding this entry on your cronjob::
|
||||
|
||||
*/5 * * * * /usr/bin/ftp -Vo - https://domain.tld/cron.php >/dev/null
|
||||
|
||||
Chroot
|
||||
------
|
||||
|
||||
Since in OpenBSD httpd(8) works with a chroot(8) by default, we need to be sure that we have the relevant files into the /var/www jail::
|
||||
|
||||
# mkdir -p /var/www/etc/ssl
|
||||
# install -m 444 -o root -g bin /etc/ssl/cert.pem /etc/ssl/openssl.cnf \
|
||||
/var/www/etc/ssl/
|
||||
# cp /etc/resolv.conf /var/www/etc
|
||||
|
||||
|
||||
Nextcloud final steps
|
||||
---------------------
|
||||
|
||||
Now that we have all in place, you should go to your browser with your URL (I am asuming you have an SSL already installed)::
|
||||
|
||||
https://domain.tld
|
||||
|
||||
Now you just need to follow the steps and put in place your DB name, usr and passwords.
|
||||
|
||||
Keep in mind that the upgrades for Nextcloud you can do it by running on -current::
|
||||
|
||||
# pkg_add -u -Dsnap
|
||||
|
||||
And on -stable::
|
||||
|
||||
# pkg_add -u
|
||||
|
||||
Then you just follow the steps from your browser.
|
||||
|
||||
|
||||
|
||||
NOTE
|
||||
----
|
||||
|
||||
Remember always to read all the READMES from the OpenBSD packages on::
|
||||
|
||||
/usr/local/share/doc/pkg-readmes/
|
||||
|
||||
All this information and more is available for you there.
|
||||
@@ -18,3 +18,4 @@ Installation and server configuration
|
||||
|
||||
example_ubuntu
|
||||
example_centos
|
||||
example_openbsd
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2020 Nextcloud GmbH
|
||||
# Copyright (C) 2021 Nextcloud GmbH
|
||||
# This file is distributed under the same license as the Nextcloud latest User Manual package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
# Translators:
|
||||
# Andrey Atapin <atab@kirovedu.ru>, 2020
|
||||
# Aleksandr Koppelmann <kop@ocean-stainless.ru>, 2021
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Nextcloud latest User Manual latest\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-07-28 07:41+0000\n"
|
||||
"POT-Creation-Date: 2021-01-15 16:50+0000\n"
|
||||
"PO-Revision-Date: 2019-11-07 20:28+0000\n"
|
||||
"Last-Translator: Andrey Atapin <atab@kirovedu.ru>, 2020\n"
|
||||
"Last-Translator: Aleksandr Koppelmann <kop@ocean-stainless.ru>, 2021\n"
|
||||
"Language-Team: Russian (https://www.transifex.com/nextcloud/teams/64236/ru/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -26,25 +27,27 @@ msgid "What's new for users in Nextcloud |version|"
|
||||
msgstr "Что нового для пользователей в Nextcloud |version|"
|
||||
|
||||
#: ../../whats_new.rst:5
|
||||
msgid "Easier way to select a new app"
|
||||
msgstr "Более простой способ выбрать новое приложение"
|
||||
msgid "Easier way to select a new app:"
|
||||
msgstr "Облегчен выбор нового приложения"
|
||||
|
||||
#: ../../whats_new.rst:10
|
||||
msgid "New Contacts menu to reach your colleagues or friends easier"
|
||||
msgstr "Новое меню Контакты для облегчения работы с коллегами или друзьями"
|
||||
msgid "New Contacts menu to reach your colleagues or friends easier:"
|
||||
msgstr "Новое меню Контакты поможет найти друзей и коллег"
|
||||
|
||||
#: ../../whats_new.rst:15
|
||||
msgid "A contact popup menu over avatars everywhere"
|
||||
msgstr "Всплывающее меню над изображениями контактов"
|
||||
msgid "A contact popup menu over avatars everywhere:"
|
||||
msgstr ""
|
||||
"Всплывающее меню с данными контакта при наведении указателя на аватар "
|
||||
"доступно везде"
|
||||
|
||||
#: ../../whats_new.rst:20
|
||||
msgid ""
|
||||
"Ability to send multiple unique sharing links each with their own settings, "
|
||||
"by entering email addresses (the recipient will receive an email)"
|
||||
"by entering email addresses (the recipient will receive an email):"
|
||||
msgstr ""
|
||||
"Возможность отправки нескольких уникальных ссылок для обмена, каждая со "
|
||||
"своими настройками, путем ввода адресов электронной почты (получатель "
|
||||
"получит электронное письмо)"
|
||||
"Возможность послать много уникальных ссылок для доступа к общим ресурсам - "
|
||||
"каждая со своими настройками - путем ввода адреса электронной почты ( "
|
||||
"получатель получит письмо )"
|
||||
|
||||
#: ../../whats_new.rst:25
|
||||
msgid ""
|
||||
@@ -54,8 +57,9 @@ msgid ""
|
||||
"a shared folder even if the removal was done by a recipient, directly "
|
||||
"sharing to social media and much more."
|
||||
msgstr ""
|
||||
"Многие другие улучшения и новые приложения, такие как совместное "
|
||||
"использование экрана в видеовызовах, новое приложение Круги для определенных"
|
||||
" пользователем групп, push-уведомления, уведомления об изменениях файлов "
|
||||
"даже при передаче на другой сервер, отмена удаления файлов из общей папки, "
|
||||
"даже если удаление было выполнено получателем и многое другое."
|
||||
"Множество других улучшения и новых приложений, таких как совместное "
|
||||
"использование экрана в видео звонках, новое приложение Круги для "
|
||||
"определенных пользователем групп, push-уведомления, уведомления об "
|
||||
"изменениях файлов даже при передаче на другой сервер, отмена удаления файлов"
|
||||
" из общей папки, даже если удаление было выполнено абонентом социальных "
|
||||
"сетей и многое другое."
|
||||
|
||||
Reference in New Issue
Block a user