Ubuntu Server 18.04にpkgsrcで新しめのffmpegとsambaをインストールするテスト(2)
おつぎはsamba
sambaはCentOSのパッケージのやつは、Active Directory Domain Controller*1が使えない形でビルドされていて、Ubuntuのやつはそんなことはないんだけど、systemctlだかなんだかで機能を開放してやらないと使えないらしい。*2
でもせっかくなのでWindows Serverのまねごとをさせてみるのも楽しそうという事で、AD-DCの設定までやってみようと思います。
次回になりますが、途中でsystemd-resolvedの常駐を止めます。DNSはsambaにやらせるんで*3。
まずはビルド
ビルドオプション確認。
root@zeit:/usr/pkgsrc/net/samba4# bmake show-options Any of the following general options may be selected: acl Enable POSIX ACL support. ads Enable Windows Active Directory support. avahi Enable DNS service discovery and multicast DNS support. fam Support using File Alteration Monitor (FAM). ldap Enable LDAP support. pam Enable PAM support. winbind Enable name-service switch daemon support using Windows Servers. These options are enabled by default: ads ads avahi ldap pam winbind These options are currently enabled: ads avahi ldap pam winbind You can select which build options to use by setting PKG_DEFAULT_OPTIONS or PKG_OPTIONS.samba4.
aclとfamを足せば全部乗せだな。
ビルドオプション設定
root@zeit:/usr/pkgsrc/net/samba4# nano /usr/pkg/etc/mk.conf root@zeit:/usr/pkgsrc/net/samba4# cat /usr/pkg/etc/mk.conf # Example /usr/pkg/etc/mk.conf file produced by bootstrap-pkgsrc # Tue Apr 7 20:21:27 JST 2020 .ifdef BSD_PKG_MK # begin pkgsrc settings ABI= 64 PKG_DBDIR= /usr/pkg/pkgdb LOCALBASE= /usr/pkg VARBASE= /var PKG_TOOLS_BIN= /usr/pkg/sbin PKGINFODIR= info PKGMANDIR= man TOOLS_PLATFORM.awk?= /usr/pkg/bin/nawk TOOLS_PLATFORM.sh?= /bin/bash ALLOW_VULNERABLE_PACKAGES=yes _ACCEPTABLE= yes PKG_OPTIONS.ffmpeg4+= fdk-aac rtmp x265 PKG_OPTIONS.samba4+= acl fam ( 全部乗せに挑戦 ) .endif # end pkgsrc settings
特別措置?
今回、(1)systemctlで起動とか制御したいなあ*4。(2)試しにビルドしてみたらopenldapの公式が落ちてたなあ。(3)実はacl周りのライブラリが無い、てビルドこけたんで何とかしてあげんとなあ、という3点に対応するため、ちょっとズルをする。
( /usr/pkgsrc/distfiles配下にビルドするソースコードをダウンロードしてきて処理するようなので、予めミラーからダウンロードしておいてやる。 ) root@zeit:/usr/pkgsrc/distfiles# wget http://gpl.savoirfairelinux.net/pub/mirrors/openldap/openldap-release/openldap-2.4.49.tgz --2020-04-07 20:36:24-- http://gpl.savoirfairelinux.net/pub/mirrors/openldap/openldap-release/openldap-2.4.49.tgz Resolving gpl.savoirfairelinux.net (gpl.savoirfairelinux.net)... 2607:fad8:4:6::9, 208.88.110.42 Connecting to gpl.savoirfairelinux.net (gpl.savoirfairelinux.net)|2607:fad8:4:6::9|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 5704723 (5.4M) [application/x-gzip] Saving to: ‘openldap-2.4.49.tgz’ openldap-2.4.49.tgz 100%[========================================================================================================================================>] 5.44M 1.00MB/s in 6.3s 2020-04-07 20:36:31 (879 KB/s) - ‘openldap-2.4.49.tgz’ saved [5704723/5704723] ( SambaWikiの記載にあった、Ubuntuのlibsystemd-dev、libacl1-devをインストールしておいてやる。 ) root@zeit:/usr/pkgsrc/distfiles# apt install libsystemd-dev Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: libsystemd-dev 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 184 kB of archives. After this operation, 742 kB of additional disk space will be used. Get:1 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsystemd-dev amd64 237-3ubuntu10.39 [184 kB] Fetched 184 kB in 1s (301 kB/s) Selecting previously unselected package libsystemd-dev:amd64. (Reading database ... 72489 files and directories currently installed.) Preparing to unpack .../libsystemd-dev_237-3ubuntu10.39_amd64.deb ... Unpacking libsystemd-dev:amd64 (237-3ubuntu10.39) ... Setting up libsystemd-dev:amd64 (237-3ubuntu10.39) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... root@zeit:/usr/pkgsrc/net/samba4# apt install libacl1-dev Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libattr1-dev The following NEW packages will be installed: libacl1-dev libattr1-dev 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 104 kB of archives. After this operation, 324 kB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 http://jp.archive.ubuntu.com/ubuntu bionic/main amd64 libattr1-dev amd64 1:2.4.47-2build1 [30.0 kB] Get:2 http://jp.archive.ubuntu.com/ubuntu bionic/main amd64 libacl1-dev amd64 2.2.52-3build1 [74.0 kB] Fetched 104 kB in 0s (1265 kB/s) Selecting previously unselected package libattr1-dev:amd64. (Reading database ... 72910 files and directories currently installed.) Preparing to unpack .../libattr1-dev_1%3a2.4.47-2build1_amd64.deb ... Unpacking libattr1-dev:amd64 (1:2.4.47-2build1) ... Selecting previously unselected package libacl1-dev. Preparing to unpack .../libacl1-dev_2.2.52-3build1_amd64.deb ... Unpacking libacl1-dev (2.2.52-3build1) ... Setting up libattr1-dev:amd64 (1:2.4.47-2build1) ... Setting up libacl1-dev (2.2.52-3build1) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ...