パッケージから入れようと思ってたが、某氏より「ひどい目に合うから本体だけはソースにしとけ」と言われたのもあって、そのようにしてみる
pkgにはphp83があるが、NextCloudはphp8.2までの対応なので注意
nextcloud本体もpkgで入れれば動くかもしれないが今回はソースからなので8.2を入れます
# pkg search -d nextcloud-php82 nextcloud-php82-27.0.0 Comment : Collaboration platform which runs on your own server Depends on : php82-session-8.2.7 php82-opcache-8.2.7 php82-xsl-8.2.7 php82-xmlwriter-8.2.7 php82-xmlreader-8.2.7 php82-xml-8.2.7 php82-simplexml-8.2.7 php82-dom-8.2.7 php82-ctype-8.2.7 php82-posix-8.2.7 php82-fileinfo-8.2.7 php82-filter-8.2.7 php82-ldap-8.2.7 php82-gmp-8.2.7 php82-bcmath-8.2.7 php82-8.2.7 php82-gd-8.2.7 php82-exif-8.2.7 php82-curl-8.2.7 php82-sysvsem-8.2.7 php82-pcntl-8.2.7 php82-intl-8.2.7 php82-pecl-APCu-5.1.22 gettext-runtime-0.21.1 php82-pdo_mysql-8.2.7 <- これは外す php82-pdo-8.2.7 php82-mbstring-8.2.7 php82-iconv-8.2.7 php82-zlib-8.2.7 php82-zip-8.2.7 php82-bz2-8.2.7
DBにはPostgreSQLを使う
# pkg search -d php82-pdo_pgsql php82-pdo_pgsql-8.2.7 Comment : The pdo_pgsql shared extension for php Depends on : php82-8.2.7 postgresql13-client-13.11 php82-pdo-8.2.7
phpが13までなのでPostgreSQLは13系列を入れる
webサーバはNginxにする
という事で入れていく
まずはphp関連
# pkg install php82 php82-session php82-opcache php82-xsl php82-xmlwriter php82-xmlreader php82-xml php82-simplexml php82-dom php82-ctype php82-posix php82-fileinfo php82-filter php82-ldap php82-gmp php82-bcmath php82-gd php82-exif php82-curl php82-sysvsem php82-pcntl php82-intl php82-pecl-APCu gettext-runtime php82-pdo php82-mbstring php82-iconv php82-zlib php82-zip php82-bz2 New packages to be INSTALLED: brotli: 1.0.9,1 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: 1.47 libiconv: 1.17 liblz4: 1.9.4,1 libxml2: 2.10.4 libxslt: 1.1.37 libzip: 1.10.0 oniguruma: 6.9.8_1 openldap26-client: 2.6.4 pcre2: 10.42 php82: 8.2.7 php82-bcmath: 8.2.7 php82-bz2: 8.2.7 php82-ctype: 8.2.7 php82-curl: 8.2.7 php82-dom: 8.2.7 php82-exif: 8.2.7 php82-fileinfo: 8.2.7 php82-filter: 8.2.7 php82-gd: 8.2.7 php82-gmp: 8.2.7 php82-iconv: 8.2.7 php82-intl: 8.2.7 php82-ldap: 8.2.7 php82-mbstring: 8.2.7 php82-opcache: 8.2.7 php82-pcntl: 8.2.7 php82-pdo: 8.2.7 php82-pecl-APCu: 5.1.22 php82-posix: 8.2.7 php82-session: 8.2.7 php82-simplexml: 8.2.7 php82-sysvsem: 8.2.7 php82-xml: 8.2.7 php82-xmlreader: 8.2.7 php82-xmlwriter: 8.2.7 php82-xsl: 8.2.7 php82-zip: 8.2.7 php82-zlib: 8.2.7 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: 57 The process will require 167 MiB more space. 7 MiB to be downloaded.
お次に、Nginx
# pkg install nginx memcached php82-pdo_pgsql php82-pgsql New packages to be INSTALLED: libevent: 2.1.12 memcached: 1.6.21 nginx: 1.24.0_6,3 php82-pdo_pgsql: 8.2.7 php82-pgsql: 8.2.7 postgresql13-client: 13.11 Number of packages to be installed: 6 The process will require 17 MiB more space.
GitHUBまたはNextCloud公式サーバからソースを持ってきて、/usr/local/wwwに展開しておく
# cd /usr/local/www # curl -OL https://github.com/nextcloud/server/archive/refs/tags/v27.0.1.tar.gz # tar -xzf v27.0.1.tar.gz または # curl -OL https://download.nextcloud.com/server/releases/nextcloud-27.0.1.tar.bz2 # tar -xjf nextcloud-27.0.1.tar.bz2 # chown -R www:www nextcloud