serverapps:nextcloud
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
serverapps:nextcloud [2023/07/28 12:11] – [Nginx] hayashi | serverapps:nextcloud [2023/08/26 11:39] (現在) – [nextcloud404" failed] hayashi | ||
---|---|---|---|
行 1: | 行 1: | ||
====== NextCloud ====== | ====== NextCloud ====== | ||
- | ===== Install ===== | ||
- | パッケージから入れようと思ってたが、某氏より「ひどい目に合うから本体だけはソースにしとけ」と言われたのもあって、そのようにしてみる | + | FreeBSD 13.2 上に構築した時の記録 |
- | ==== 本体 | + | ===== Tips ===== |
+ | ==== nextcloud404" | ||
+ | nextcloud404" | ||
- | [[https:// | + | とlogに記録されて404エラー |
- | /usr/local/wwwに展開しておく | + | どうやら、ヘッダのホスト名とnginxのserver名がアンマッチだと生じる模様\\ |
+ | なので、localで http://localhost でアクセスしてもでる\\ | ||
+ | http:// | ||
+ | ===== 参考 ===== | ||
- | + | * [[https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html|NGINX configuration]] | |
- | + | * [[https://www.seirios.org/seirios/dokuwiki/doku.php?id=tweet:2020: | |
- | ==== 依存パッケージを調べる ==== | + | |
- | + | ||
- | + | ||
- | < | + | |
- | # pkg search -d nextcloud-php83 | + | |
- | nextcloud-php83-27.0.0 | + | |
- | Comment | + | |
- | Depends on : | + | |
- | php83-session-8.3.0.a2 | + | |
- | php83-opcache-8.3.0.a2 | + | |
- | php83-xsl-8.3.0.a2 | + | |
- | php83-xmlwriter-8.3.0.a2 | + | |
- | php83-xmlreader-8.3.0.a2 | + | |
- | php83-xml-8.3.0.a2 | + | |
- | php83-simplexml-8.3.0.a2 | + | |
- | php83-dom-8.3.0.a2 | + | |
- | php83-ctype-8.3.0.a2 | + | |
- | php83-posix-8.3.0.a2 | + | |
- | php83-fileinfo-8.3.0.a2 | + | |
- | php83-filter-8.3.0.a2 | + | |
- | php83-ldap-8.3.0.a2 | + | |
- | php83-gmp-8.3.0.a2 | + | |
- | php83-bcmath-8.3.0.a2 | + | |
- | php83-8.3.0.a2 | + | |
- | php83-gd-8.3.0.a2 | + | |
- | php83-exif-8.3.0.a2 | + | |
- | php83-curl-8.3.0.a2 | + | |
- | php83-sysvsem-8.3.0.a2 | + | |
- | php83-pcntl-8.3.0.a2 | + | |
- | php83-intl-8.3.0.a2 | + | |
- | php83-pecl-APCu-5.1.22 | + | |
- | gettext-runtime-0.21.1 | + | |
- | php83-pdo_mysql-8.3.0.a2 < | + | |
- | php83-pdo-8.3.0.a2 | + | |
- | php83-mbstring-8.3.0.a2 | + | |
- | php83-iconv-8.3.0.a2 | + | |
- | php83-zlib-8.3.0.a2 | + | |
- | php83-zip-8.3.0.a2 | + | |
- | php83-bz2-8.3.0.a2 | + | |
- | </code> | + | |
- | + | ||
- | DBにはPostgreSQLを使う | + | |
- | + | ||
- | < | + | |
- | # pkg search -d php83-pdo_pgsql | + | |
- | php83-pdo_pgsql-8.3.0.a2 | + | |
- | Comment | + | |
- | Depends on : | + | |
- | php83-8.3.0.a2 | + | |
- | postgresql13-client-13.11 | + | |
- | php83-pdo-8.3.0.a2 | + | |
- | </code> | + | |
- | + | ||
- | phpが13までなのでPostgreSQLは13系列を入れる\\ | + | |
- | webサーバはNginxにする | + | |
- | + | ||
- | ==== php関連 ==== | + | |
- | + | ||
- | + | ||
- | という事で入れていく\\ | + | |
- | まずはphp関連 | + | |
- | + | ||
- | # pkg install php83-session php83-opcache php83-xsl php83-xmlwriter php83-xmlreader php83-xml php83-simplexml php83-dom php83-ctype php83-posix php83-fileinfo php83-filter php83-ldap php83-gmp php83-bcmath php83 php83-gd php83-exif php83-curl php83-sysvsem php83-pcntl php83-intl php83-pecl-APCu gettext-runtime php83-pdo php83-mbstring php83-iconv php83-zlib php83-zip php83-bz2 | + | |
- | + | ||
- | New packages to be INSTALLED: | + | |
- | brotli: 1.0.9,1 | + | |
- | curl: 8.1.2 | + | |
- | cyrus-sasl: 2.1.28 | + | |
- | expat: 2.5.0 | + | |
- | fontconfig: 2.14.2,1 | + | |
- | freetype2: 2.12.1_2 | + | |
- | giflib: 5.2.1 | + | |
- | gmp: 6.2.1 | + | |
- | icu: 73.2,1 | + | |
- | jbigkit: 2.1_1 | + | |
- | jpeg-turbo: 2.1.5.1 | + | |
- | libargon2: 20190702 | + | |
- | libdeflate: 1.18 | + | |
- | libgcrypt: 1.10.2 | + | |
- | libgd: 2.3.3_5,1 | + | |
- | libgpg-error: | + | |
- | libiconv: 1.17 | + | |
- | liblz4: 1.9.4,1 | + | |
- | libnghttp2: 1.53.0 | + | |
- | libxml2: 2.10.4 | + | |
- | libxslt: 1.1.37 | + | |
- | libzip: 1.10.0 | + | |
- | oniguruma: 6.9.8_1 | + | |
- | openldap26-client: | + | |
- | pcre2: 10.42 | + | |
- | php83: 8.3.0.a2 | + | |
- | php83-bcmath: | + | |
- | php83-bz2: 8.3.0.a2 | + | |
- | php83-ctype: | + | |
- | php83-curl: 8.3.0.a2 | + | |
- | php83-dom: 8.3.0.a2 | + | |
- | php83-exif: 8.3.0.a2 | + | |
- | php83-fileinfo: | + | |
- | php83-filter: | + | |
- | php83-gd: 8.3.0.a2 | + | |
- | php83-gmp: 8.3.0.a2 | + | |
- | php83-iconv: | + | |
- | php83-intl: 8.3.0.a2 | + | |
- | php83-ldap: 8.3.0.a2 | + | |
- | php83-mbstring: | + | |
- | php83-opcache: | + | |
- | php83-pcntl: | + | |
- | php83-pdo: 8.3.0.a2 | + | |
- | php83-pecl-APCu: | + | |
- | php83-posix: | + | |
- | php83-session: | + | |
- | php83-simplexml: | + | |
- | php83-sysvsem: | + | |
- | php83-xml: 8.3.0.a2 | + | |
- | php83-xmlreader: | + | |
- | php83-xmlwriter: | + | |
- | php83-xsl: 8.3.0.a2 | + | |
- | php83-zip: 8.3.0.a2 | + | |
- | php83-zlib: 8.3.0.a2 | + | |
- | png: 1.6.39 | + | |
- | readline: 8.2.1 | + | |
- | tiff: 4.4.0_1 | + | |
- | webp: 1.3.0_1 | + | |
- | zstd: 1.5.5 | + | |
- | + | ||
- | Number of packages to be installed: 59 | + | |
- | + | ||
- | The process will require 173 MiB more space. | + | |
- | + | ||
- | ==== Nginx ==== | + | |
- | + | ||
- | お次に、Nginx | + | |
- | + | ||
- | # pkg install nginx memcached php83-pdo_pgsql php83-pgsql | + | |
- | New packages to be INSTALLED: | + | |
- | libevent: 2.1.12 | + | |
- | memcached: 1.6.21 | + | |
- | nginx: 1.24.0_6, | + | |
- | php83-pdo_pgsql: | + | |
- | php83-pgsql: | + | |
- | postgresql13-client: | + | |
- | + | ||
- | Number of packages to be installed: 14 | + | |
- | + | ||
- | The process will require 1 GiB more space | + | |
- | + | ||
- | ==== PostgreSQL==== | + | |
- | + | ||
- | PostgreSQLは別マシンへ | + | |
- | + | ||
- | # pkg install postgresql13-client postgresql13-server | + | |
- | New packages to be INSTALLED: | + | |
- | icu: 73.2,1 | + | |
- | libedit: 3.1.20221030, | + | |
- | libffi: 3.4.4 | + | |
- | liblz4: 1.9.4,1 | + | |
- | llvm15: 15.0.7_5 | + | |
- | lua53: 5.3.6 | + | |
- | mpdecimal: 2.5.1 | + | |
- | perl5: 5.32.1_3 | + | |
- | postgresql13-client: | + | |
- | postgresql13-server: | + | |
- | python39: 3.9.17 | + | |
- | readline: 8.2.1 | + | |
- | zstd: 1.5.5 | + | |
- | + | ||
- | インストールの最後に表示されるPostgreSQL設定について | + | |
- | * バキューム:普通Autoなのでいらんけど、独自にやりたいなら以下参照 | + | |
- | * /usr/local/etc/periodic/ | + | |
- | * バックアップ:以下が役に立つかも | + | |
- | * /usr/local/ | + | |
- | + | ||
- | ===== 設定 ===== | + | |
- | ==== PostgreSQL ==== | + | |
- | === rc.conf === | + | |
- | + | ||
- | /etc/rc.confまたは/etc/rc.conf.localに記述 | + | |
- | + | ||
- | postgresql_enable=" | + | |
- | postgresql_data="/ | + | |
- | + | ||
- | data領域はzfsで別にとるので、disk追加してpool作成 | + | |
- | + | ||
- | # zpool create zdata / | + | |
- | # zfs create -o mountpoint=/ | + | |
- | # mkdir / | + | |
- | # chown postgres:postgres / | + | |
- | + | ||
- | === 初期化 === | + | |
- | + | ||
- | + | ||
- | < | + | |
- | # service postgresql initdb | + | |
- | The files belonging to this database system will be owned by user " | + | |
- | This user must also own the server process. | + | |
- | + | ||
- | The database cluster will be initialized with locales | + | |
- | COLLATE: | + | |
- | CTYPE: | + | |
- | | + | |
- | MONETARY: C.UTF-8 | + | |
- | NUMERIC: | + | |
- | TIME: | + | |
- | The default text search configuration will be set to " | + | |
- | + | ||
- | Data page checksums are disabled. | + | |
- | + | ||
- | fixing permissions on existing directory | + | |
- | creating subdirectories ... ok | + | |
- | selecting dynamic shared memory implementation ... posix | + | |
- | selecting default max_connections ... 100 | + | |
- | selecting default shared_buffers ... 128MB | + | |
- | selecting default time zone ... Japan | + | |
- | creating configuration files ... ok | + | |
- | running bootstrap script ... ok | + | |
- | performing post-bootstrap initialization ... ok | + | |
- | syncing data to disk ... ok | + | |
- | + | ||
- | initdb: warning: enabling " | + | |
- | You can change this by editing pg_hba.conf or using the option -A, or | + | |
- | --auth-local and --auth-host, | + | |
- | + | ||
- | Success. You can now start the database server using: | + | |
- | + | ||
- | | + | |
- | </code> | + | |
- | + | ||
- | === pg_hba.conf の編集 === | + | |
- | + | ||
- | 外部からの接続を | + | |
- | + | ||
- | # TYPE DATABASE | + | |
- | host all | + | |
- | + | ||
- | postgresql.confのlisten_addresses も変更 | + | |
- | + | ||
- | listen_addresses = ' | + | |
- | + | ||
- | === 起動 === | + | |
- | PostgrSQLを起動 | + | |
- | # service postgresql start | + | |
- | + | ||
- | === NextCloud用設定 === | + | |
- | + | ||
- | < | + | |
- | # psql -h localhost -U postgres | + | |
- | psql (13.11) | + | |
- | Type " | + | |
- | + | ||
- | postgres=# CREATE ROLE ncadm WITH LOGIN PASSWORD ' | + | |
- | CREATE ROLE | + | |
- | postgres=# CREATE DATABASE nc WITH OWNER ncadm TEMPLATE template0 | + | |
- | postgres=# ENCODING UTF8 LC_COLLATE ' | + | |
- | CREATE DATABASE | + | |
- | </ | + | |
- | + | ||
- | ==== Nginx ==== | + | |
- | === Log === | + | |
- | + | ||
- | # mkdir -p / | + | |
- | # chown www:www / | + | |
- | + | ||
- | === / | + | |
serverapps/nextcloud.1690546288.txt.gz · 最終更新: 2023/07/28 12:11 by hayashi