Category Archive Debian

Debianのバージョン確認

Debian 8.3 で実行すると、


# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.3 (jessie)
Release: 8.3
Codename: jessie

 

lsb-releaseパッケージが入っていない場合はインストールする。

# apt-get install lsb-release

Postfixのメールキュー

Postfixのメールキューを確認する。

# postqueue -p

キューをID指定で削除する。

# postsuper -d [QUEUE ID]

キューを全て削除する。

# postsuper -d ALL

キューの強制送信

# postfix flush

Debian9 strech samba-toolでProvision failedエラー

samba-toolsを実行すると、下記エラーが発生し、smb.confが作成できない。

# samba-tool domain provision \
> –use-rfc2307 –interactive –use-ntvfs \
> –function-level=2008_R2

ERROR(): Provision failed – ProvisioningError: guess_names: ‘realm =’ was not specified in supplied /etc/samba/smb.conf. Please remove the smb.conf file and let provision generate it
File “/usr/lib/python2.7/dist-packages/samba/netcmd/domain.py”, line 434, in run
nosync=ldap_backend_nosync, ldap_dryrun_mode=ldap_dryrun_mode)
File “/usr/lib/python2.7/dist-packages/samba/provision/__init__.py”, line 2022, in provision
sitename=sitename, rootdn=rootdn, domain_names_forced=(samdb_fill == FILL_DRS))
File “/usr/lib/python2.7/dist-packages/samba/provision/__init__.py”, line 603, in guess_names
raise ProvisioningError(“guess_names: ‘realm =’ was not specified in supplied %s. Please remove the smb.conf file and let provision generate it” % lp.configfile)

以下のように対応する。

/etc/hosts にドメイン情報を付加する

【変更前】
$ cat hosts
127.0.0.1 localhost
127.0.1.1 myhost

【変更後】
$ sudo vim /etc/hosts
127.0.0.1 localhost.localdomain localhost
127.0.1.1 myhost.orangebox.lbn.bz myhost

/etc/hostname にドメイン情報を付加する

$ sudo vim /etc/hostname
orangebox.lbn.bz

ネットワークインタフェースの再起動

$ sudo /etc/init.d/networking restart

Debian9 Let’s Encrypt SSL証明書の導入

Certbot クライアントのインストール

https://letsencrypt.jp/usage/install-certbot.html#OtherUNIX
上記サイトを参考にインストールを行う。

# wget https://dl.eff.org/certbot-auto
–2018-12-21 09:49:09– https://dl.eff.org/certbot-auto
dl.eff.org (dl.eff.org) をDNSに問いあわせています… 2a04:4e42:11::201, 151.101.72.201
dl.eff.org (dl.eff.org)|2a04:4e42:11::201|:443 に接続しています… 接続しました 。
HTTP による接続要求を送信しました、応答を待っています… 200 OK
長さ: 63562 (62K) [application/octet-stream]
`certbot-auto’ に保存中

certbot-auto 100%[===================>] 62.07K –.-KB/s in 0.04s

2018-12-21 09:49:09 (1.64 MB/s) – `certbot-auto’ へ保存完了 [63562/63562]

# chmod a+x certbot-auto
# ./certbot-auto
Bootstrapping dependencies for Debian-based OSes… (you can skip this with –no-bootstrap)
取得:1 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
取得:2 http://security.debian.org/debian-security stretch/updates/main Sources [187 kB]
カ荳シ倖3 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [463 kB]
取得:4 http://security.debian.org/debian-security stretch/updates/main Translation-en [202 kB]
無視:5 http://ftp.jp.debian.org/debian stretch InRelease
取得:6 http://ftp.jp.debian.org/debian stretch-backports InRelease [91.8 kB]
ヒット:7 http://ftp.jp.debian.org/debian stretch Release
取得:8 http://ftp.jp.debian.org/debian stretch-backports/main Sources.diff/Index [27.8 kB]
取得:9 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages.diff/Index [27.8 kB]
取得:10 http://ftp.jp.debian.org/debian stretch-backports/main Translation-en.diff/Index [27.8 kB]
取得:12 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-12-2012.06.pdiff [33 B]
取得:13 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-13-0814.06.pdiff [729 B]
取得:14 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-14-0810.05.pdiff [633 B]
取得:15 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-14-1411.30.pdiff [33 B]
取得:16 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-14-2014.23.pdiff [1,511 B]
取得:17 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-15-0213.41.pdiff [807 B]
取得:18 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-15-0811.54.pdiff [33 B]
取得:19 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-15-1407.41.pdiff [678 B]
取得:20 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-15-2009.52.pdiff [963 B]
取得:21 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-16-0210.43.pdiff [33 B]
取得:22 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-16-1411.41.pdiff [2,722 B]
取得:23 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-16-2011.29.pdiff [49 B]
取得:24 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-17-0210.49.pdiff [549 B]
取得:25 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-17-1412.13.pdiff [3,086 B]
取得:26 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-18-0812.30.pdiff [33 B]
取得:27 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-18-1421.09.pdiff [27.2 kB]
取得:28 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-18-2013.13.pdiff [1,745 B]
取得:29 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-19-0218.50.pdiff [1,178 B]
取得:30 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-19-0819.52.pdiff [56 B]
取得:31 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-19-1410.32.pdiff [2,933 B]
取得:32 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-19-2010.27.pdiff [33 B]
取得:33 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-20-0210.19.pdiff [966 B]
取得:34 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-20-0810.06.pdiff [1,707 B]
取得:35 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-20-1413.30.pdiff [606 B]
取得:36 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-12-1702.23.pdiff [218 B]
取得:37 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-13-1410.34.pdiff [301 B]
取得:35 http://ftp.jp.debian.org/debian stretch-backports/main Sources 2018-12-20-1413.30.pdiff [606 B]
取得:38 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-14-1411.30.pdiff [220 B]
取得:39 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-15-0213.41.pdiff [520 B]
取得:40 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-15-1407.41.pdiff [227 B]
取得:41 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-15-2009.52.pdiff [1,007 B]
取得:42 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-16-0210.43.pdiff [1,411 B]
取得:43 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-16-2011.29.pdiff [2,477 B]
取得:44 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-17-0210.49.pdiff [328 B]
取得:45 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-17-1412.13.pdiff [1,803 B]
取得:46 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-18-1421.09.pdiff [13.2 kB]
取得:47 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-18-2013.13.pdiff [208 B]
取得:48 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-19-0218.50.pdiff [2,702 B]
取得:49 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-19-0819.52.pdiff [4,233 B]
取得:50 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-19-1410.32.pdiff [1,431 B]
取得:51 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-19-2010.27.pdiff [2,802 B]
取得:52 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-20-0810.06.pdiff [821 B]
取得:53 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-20-1413.30.pdiff [1,927 B]
取得:54 http://ftp.jp.debian.org/debian stretch-backports/main Translation-en 2018-12-18-1421.09.pdiff [7,921 B]
取得:55 http://ftp.jp.debian.org/debian stretch-backports/main Translation-en 2018-12-18-2013.13.pdiff [866 B]
取得:56 http://ftp.jp.debian.org/debian stretch-backports/main Translation-en 2018-12-19-0218.50.pdiff [1,044 B]
取得:57 http://ftp.jp.debian.org/debian stretch-backports/main Translation-en 2018-12-19-0819.52.pdiff [1,281 B]
取得:53 http://ftp.jp.debian.org/debian stretch-backports/main amd64 Packages 2018-12-20-1413.30.pdiff [1,927 B]
取得:58 http://ftp.jp.debian.org/debian stretch-backports/main Translation-en 2018-12-19-1410.32.pdiff [822 B]
取得:59 http://ftp.jp.debian.org/debian stretch-backports/main Translation-en 2018-12-19-2010.27.pdiff [923 B]
取得:60 http://ftp.jp.debian.org/debian stretch-backports/main Translation-en 2018-12-20-0810.06.pdiff [729 B]
取得:61 http://ftp.jp.debian.org/debian stretch-backports/main Translation-en 2018-12-20-1413.30.pdiff [260 B]
取得:61 http://ftp.jp.debian.org/debian stretch-backports/main Translation-en 2018-12-20-1413.30.pdiff [260 B]
1,219 kB を 1秒 で取得しました (669 kB/s)
パッケージリストを読み込んでいます… 完了
パッケージリストを読み込んでいます… 完了
依存関係ツリーを作成しています
状態情報を読み取っています… 完了
augeas-lenses はすでに最新バージョン (1.8.0-1+deb9u1) です。
augeas-lenses は手動でインストールしたと設定されました。
libaugeas0 はすでに最新バージョン (1.8.0-1+deb9u1) です。
libaugeas0 は手動でインストールしたと設定されました。
ca-certificates はすでに最新バージョン (20161130+nmu1+deb9u1) です。
ca-certificates は手動でインストールしたと設定されました。
python はすでに最新バージョン (2.7.13-2) です。
以下の追加パッケージがインストールされます:
binutils cpp cpp-6 gcc-6 libasan3 libatomic1 libc-dev-bin libc6-dev libcc1-0
libcilkrts5 libexpat1-dev libgcc-6-dev libgomp1 libisl15 libitm1 liblsan0
libmpc3 libmpx2 libpython-dev libpython2.7 libpython2.7-dev libssl1.1
libtsan0 libubsan0 linux-libc-dev python-pip-whl python-pkg-resources
python2.7-dev python3-virtualenv
提案パッケージ:
binutils-doc cpp-doc gcc-6-locales gcc-multilib make manpages-dev autoconf
automake libtool flex bison gdb gcc-doc gcc-6-multilib gcc-6-doc libgcc1-dbg
libgomp1-dbg libitm1-dbg libatomic1-dbg libasan3-dbg liblsan0-dbg
libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg
glibc-doc python-setuptools
推奨パッケージ:
manpages-dev libssl-doc
以下のパッケージが新たにインストールされます:
binutils cpp cpp-6 gcc gcc-6 libasan3 libatomic1 libc-dev-bin libc6-dev
libcc1-0 libcilkrts5 libexpat1-dev libffi-dev libgcc-6-dev libgomp1 libisl15
libitm1 liblsan0 libmpc3 libmpx2 libpython-dev libpython2.7 libpython2.7-dev
libssl-dev libtsan0 libubsan0 linux-libc-dev python-dev python-pip-whl
python-pkg-resources python-virtualenv python2.7-dev python3-virtualenv
virtualenv
以下のパッケージはアップグレードされます:
libssl1.1 openssl
アップグレード: 2 個、新規インストール: 34 個、削除: 0 個、保留: 56 個。
60.4 MB のアーカイブを取得する必要があります。
この操作後に追加で 169 MB のディスク容量が消費されます。
続行しますか? [Y/n] y
取得:1 http://security.debian.org/debian-security stretch/updates/main amd64 libssl1.1 amd64 1.1.0j-1~deb9u1 [1,354 kB]
取得:2 http://ftp.jp.debian.org/debian stretch/main amd64 binutils amd64 2.28-5 [3,770 kB]
取得:3 http://security.debian.org/debian-security stretch/updates/main amd64 libssl-dev amd64 1.1.0j-1~deb9u1 [1,588 kB]
取得:4 http://ftp.jp.debian.org/debian stretch/main amd64 libisl15 amd64 0.18-1 [564 kB]
取得:5 http://ftp.jp.debian.org/debian stretch/main amd64 libmpc3 amd64 1.0.3-1+b2 [39.9 kB]
取得:6 http://ftp.jp.debian.org/debian stretch/main amd64 cpp-6 amd64 6.3.0-18+deb9u1 [6,584 kB]
取得:7 http://security.debian.org/debian-security stretch/updates/main amd64 openssl amd64 1.1.0j-1~deb9u1 [746 kB]
取得:8 http://ftp.jp.debian.org/debian stretch/main amd64 cpp amd64 4:6.3.0-4 [18.7 kB]
取得:9 http://ftp.jp.debian.org/debian stretch/main amd64 libcc1-0 amd64 6.3.0-18+deb9u1 [30.6 kB]
取得:10 http://ftp.jp.debian.org/debian stretch/main amd64 libgomp1 amd64 6.3.0-18+deb9u1 [73.3 kB]
取得:11 http://ftp.jp.debian.org/debian stretch/main amd64 libitm1 amd64 6.3.0-18+deb9u1 [27.3 kB]
取得:12 http://ftp.jp.debian.org/debian stretch/main amd64 libatomic1 amd64 6.3.0-18+deb9u1 [8,966 B]
取得:13 http://ftp.jp.debian.org/debian stretch/main amd64 libasan3 amd64 6.3.0-18+deb9u1 [311 kB]
取得:14 http://ftp.jp.debian.org/debian stretch/main amd64 liblsan0 amd64 6.3.0-18+deb9u1 [115 kB]
取得:15 http://ftp.jp.debian.org/debian stretch/main amd64 libtsan0 amd64 6.3.0-18+deb9u1 [257 kB]
取得:16 http://ftp.jp.debian.org/debian stretch/main amd64 libubsan0 amd64 6.3.0-18+deb9u1 [107 kB]
取得:17 http://ftp.jp.debian.org/debian stretch/main amd64 libcilkrts5 amd64 6.3.0-18+deb9u1 [40.5 kB]
取得:18 http://ftp.jp.debian.org/debian stretch/main amd64 libmpx2 amd64 6.3.0-18+deb9u1 [11.2 kB]
取得:19 http://ftp.jp.debian.org/debian stretch/main amd64 libgcc-6-dev amd64 6.3.0-18+deb9u1 [2,296 kB]
取得:20 http://ftp.jp.debian.org/debian stretch/main amd64 gcc-6 amd64 6.3.0-18+deb9u1 [6,900 kB]
取得:21 http://ftp.jp.debian.org/debian stretch/main amd64 gcc amd64 4:6.3.0-4 [5,196 B]
取得:22 http://ftp.jp.debian.org/debian stretch/main amd64 libc-dev-bin amd64 2.24-11+deb9u3 [258 kB]
取得:23 http://ftp.jp.debian.org/debian stretch/main amd64 linux-libc-dev amd64 4.9.130-2 [1,373 kB]
取得:24 http://ftp.jp.debian.org/debian stretch/main amd64 libc6-dev amd64 2.24-11+deb9u3 [2,361 kB]
取得:25 http://ftp.jp.debian.org/debian stretch/main amd64 libexpat1-dev amd64 2.2.0-2+deb9u1 [134 kB]
取得:26 http://ftp.jp.debian.org/debian stretch/main amd64 libffi-dev amd64 3.2.1-6 [161 kB]
取得:27 http://ftp.jp.debian.org/debian stretch/main amd64 libpython2.7 amd64 2.7.13-2+deb9u3 [1,071 kB]
取得:28 http://ftp.jp.debian.org/debian stretch/main amd64 libpython2.7-dev amd64 2.7.13-2+deb9u3 [28.2 MB]
取得:29 http://ftp.jp.debian.org/debian stretch/main amd64 libpython-dev amd64 2.7.13-2 [20.1 kB]
取得:30 http://ftp.jp.debian.org/debian stretch/main amd64 python2.7-dev amd64 2.7.13-2+deb9u3 [290 kB]
取得:31 http://ftp.jp.debian.org/debian stretch/main amd64 python-dev amd64 2.7.13-2 [1,126 B]
取得:32 http://ftp.jp.debian.org/debian stretch/main amd64 python-pip-whl all 9.0.1-2 [1,406 kB]
取得:33 http://ftp.jp.debian.org/debian stretch/main amd64 python-pkg-resources all 33.1.1-1 [166 kB]
取得:34 http://ftp.jp.debian.org/debian stretch/main amd64 python-virtualenv all 15.1.0+ds-1 [61.1 kB]
取得:35 http://ftp.jp.debian.org/debian stretch/main amd64 python3-virtualenv all 15.1.0+ds-1 [57.7 kB]
取得:36 http://ftp.jp.debian.org/debian stretch/main amd64 virtualenv all 15.1.0+ds-1 [19.7 kB]
60.4 MB を 8秒 で取得しました (6,915 kB/s)
changelog を読んでいます… 完了
パッケージからテンプレートを展開しています: 100%
パッケージを事前設定しています …
(データベースを読み込んでいます … 現在 35530 個のファイルとディレクトリがイン ストールされています。)
…/00-libssl1.1_1.1.0j-1~deb9u1_amd64.deb を展開する準備をしています …
libssl1.1:amd64 (1.1.0j-1~deb9u1) で (1.1.0f-3+deb9u2 に) 上書き展開しています …
以前に未選択のパッケージ binutils を選択しています。
…/01-binutils_2.28-5_amd64.deb を展開する準備をしています …
binutils (2.28-5) を展開しています…
以前に未選択のパッケージ libisl15:amd64 を選択しています。
…/02-libisl15_0.18-1_amd64.deb を展開する準備をしています …
libisl15:amd64 (0.18-1) を展開しています…
以前に未選択のパッケージ libmpc3:amd64 を選択しています。
…/03-libmpc3_1.0.3-1+b2_amd64.deb を展開する準備をしています …
libmpc3:amd64 (1.0.3-1+b2) を展開しています…
以前に未選択のパッケージ cpp-6 を選択しています。
…/04-cpp-6_6.3.0-18+deb9u1_amd64.deb を展開する準備をしています …
cpp-6 (6.3.0-18+deb9u1) を展開しています…
以前に未選択のパッケージ cpp を選択しています。
…/05-cpp_4%3a6.3.0-4_amd64.deb を展開する準備をしています …
cpp (4:6.3.0-4) を展開しています…
以前に未選択のパッケージ libcc1-0:amd64 を選択しています。
…/06-libcc1-0_6.3.0-18+deb9u1_amd64.deb を展開する準備をしています …
libcc1-0:amd64 (6.3.0-18+deb9u1) を展開しています…
以前に未選択のパッケージ libgomp1:amd64 を選択しています。
…/07-libgomp1_6.3.0-18+deb9u1_amd64.deb を展開する準備をしています …
libgomp1:amd64 (6.3.0-18+deb9u1) を展開しています…
以前に未選択のパッケージ libitm1:amd64 を選択しています。
…/08-libitm1_6.3.0-18+deb9u1_amd64.deb を展開する準備をしています …
libitm1:amd64 (6.3.0-18+deb9u1) を展開しています…
以前に未選択のパッケージ libatomic1:amd64 を選択しています。
…/09-libatomic1_6.3.0-18+deb9u1_amd64.deb を展開する準備をしています …
libatomic1:amd64 (6.3.0-18+deb9u1) を展開しています…
以前に未選択のパッケージ libasan3:amd64 を選択しています。
…/10-libasan3_6.3.0-18+deb9u1_amd64.deb を展開する準備をしています …
libasan3:amd64 (6.3.0-18+deb9u1) を展開しています…
以前に未選択のパッケージ liblsan0:amd64 を選択しています。
…/11-liblsan0_6.3.0-18+deb9u1_amd64.deb を展開する準備をしています …
liblsan0:amd64 (6.3.0-18+deb9u1) を展開しています…
以前に未選択のパッケージ libtsan0:amd64 を選択しています。
…/12-libtsan0_6.3.0-18+deb9u1_amd64.deb を展開する準備をしています …
libtsan0:amd64 (6.3.0-18+deb9u1) を展開しています…
以前に未選択のパッケージ libubsan0:amd64 を選択しています。
…/13-libubsan0_6.3.0-18+deb9u1_amd64.deb を展開する準備をしています …
libubsan0:amd64 (6.3.0-18+deb9u1) を展開しています…
以前に未選択のパッケージ libcilkrts5:amd64 を選択しています。
…/14-libcilkrts5_6.3.0-18+deb9u1_amd64.deb を展開する準備をしています …
libcilkrts5:amd64 (6.3.0-18+deb9u1) を展開しています…
以前に未選択のパッケージ libmpx2:amd64 を選択しています。
…/15-libmpx2_6.3.0-18+deb9u1_amd64.deb を展開する準備をしています …
libmpx2:amd64 (6.3.0-18+deb9u1) を展開しています…
以前に未選択のパッケージ libgcc-6-dev:amd64 を選択しています。
…/16-libgcc-6-dev_6.3.0-18+deb9u1_amd64.deb を展開する準備をしています …
libgcc-6-dev:amd64 (6.3.0-18+deb9u1) を展開しています…
以前に未選択のパッケージ gcc-6 を選択しています。
…/17-gcc-6_6.3.0-18+deb9u1_amd64.deb を展開する準備をしています …
gcc-6 (6.3.0-18+deb9u1) を展開しています…
以前に未選択のパッケージ gcc を選択しています。
…/18-gcc_4%3a6.3.0-4_amd64.deb を展開する準備をしています …
gcc (4:6.3.0-4) を展開しています…
以前に未選択のパッケージ libc-dev-bin を選択しています。
…/19-libc-dev-bin_2.24-11+deb9u3_amd64.deb を展開する準備をしています …
libc-dev-bin (2.24-11+deb9u3) を展開しています…
以前に未選択のパッケージ linux-libc-dev:amd64 を選択しています。
…/20-linux-libc-dev_4.9.130-2_amd64.deb を展開する準備をしています …
linux-libc-dev:amd64 (4.9.130-2) を展開しています…
以前に未選択のパッケージ libc6-dev:amd64 を選択しています。
…/21-libc6-dev_2.24-11+deb9u3_amd64.deb を展開する準備をしています …
libc6-dev:amd64 (2.24-11+deb9u3) を展開しています…
以前に未選択のパッケージ libexpat1-dev:amd64 を選択しています。
…/22-libexpat1-dev_2.2.0-2+deb9u1_amd64.deb を展開する準備をしています …
libexpat1-dev:amd64 (2.2.0-2+deb9u1) を展開しています…
以前に未選択のパッケージ libffi-dev:amd64 を選択しています。
…/23-libffi-dev_3.2.1-6_amd64.deb を展開する準備をしています …
libffi-dev:amd64 (3.2.1-6) を展開しています…
以前に未選択のパッケージ libpython2.7:amd64 を選択しています。
…/24-libpython2.7_2.7.13-2+deb9u3_amd64.deb を展開する準備をしています …
libpython2.7:amd64 (2.7.13-2+deb9u3) を展開しています…
以前に未選択のパッケージ libpython2.7-dev:amd64 を選択しています。
…/25-libpython2.7-dev_2.7.13-2+deb9u3_amd64.deb を展開する準備をしています …
libpython2.7-dev:amd64 (2.7.13-2+deb9u3) を展開しています…
以前に未選択のパッケージ libpython-dev:amd64 を選択しています。
…/26-libpython-dev_2.7.13-2_amd64.deb を展開する準備をしています …
libpython-dev:amd64 (2.7.13-2) を展開しています…
以前に未選択のパッケージ libssl-dev:amd64 を選択しています。
…/27-libssl-dev_1.1.0j-1~deb9u1_amd64.deb を展開する準備をしています …
libssl-dev:amd64 (1.1.0j-1~deb9u1) を展開しています…
…/28-openssl_1.1.0j-1~deb9u1_amd64.deb を展開する準備をしています …
openssl (1.1.0j-1~deb9u1) で (1.1.0f-3+deb9u2 に) 上書き展開しています …
以前に未選択のパッケージ python2.7-dev を選択しています。
…/29-python2.7-dev_2.7.13-2+deb9u3_amd64.deb を展開する準備をしています …
python2.7-dev (2.7.13-2+deb9u3) を展開しています…
以前に未選択のパッケージ python-dev を選択しています。
…/30-python-dev_2.7.13-2_amd64.deb を展開する準備をしています …
python-dev (2.7.13-2) を展開しています…
以前に未選択のパッケージ python-pip-whl を選択しています。
…/31-python-pip-whl_9.0.1-2_all.deb を展開する準備をしています …
python-pip-whl (9.0.1-2) を展開しています…
以前に未選択のパッケージ python-pkg-resources を選択しています。
…/32-python-pkg-resources_33.1.1-1_all.deb を展開する準備をしています …
python-pkg-resources (33.1.1-1) を展開しています…
以前に未選択のパッケージ python-virtualenv を選択しています。
…/33-python-virtualenv_15.1.0+ds-1_all.deb を展開する準備をしています …
python-virtualenv (15.1.0+ds-1) を展開しています…
以前に未選択のパッケージ python3-virtualenv を選択しています。
…/34-python3-virtualenv_15.1.0+ds-1_all.deb を展開する準備をしています …
python3-virtualenv (15.1.0+ds-1) を展開しています…
以前に未選択のパッケージ virtualenv を選択しています。
…/35-virtualenv_15.1.0+ds-1_all.deb を展開する準備をしています …
virtualenv (15.1.0+ds-1) を展開しています…
libgomp1:amd64 (6.3.0-18+deb9u1) を設定しています …
libatomic1:amd64 (6.3.0-18+deb9u1) を設定しています …
python-pip-whl (9.0.1-2) を設定しています …
libcc1-0:amd64 (6.3.0-18+deb9u1) を設定しています …
libasan3:amd64 (6.3.0-18+deb9u1) を設定しています …
libcilkrts5:amd64 (6.3.0-18+deb9u1) を設定しています …
libubsan0:amd64 (6.3.0-18+deb9u1) を設定しています …
libtsan0:amd64 (6.3.0-18+deb9u1) を設定しています …
linux-libc-dev:amd64 (4.9.130-2) を設定しています …
libffi-dev:amd64 (3.2.1-6) を設定しています …
python-pkg-resources (33.1.1-1) を設定しています …
liblsan0:amd64 (6.3.0-18+deb9u1) を設定しています …
libmpx2:amd64 (6.3.0-18+deb9u1) を設定しています …
libisl15:amd64 (0.18-1) を設定しています …
libc-bin (2.24-11+deb9u3) のトリガを処理しています …
libssl1.1:amd64 (1.1.0j-1~deb9u1) を設定しています …
python3-virtualenv (15.1.0+ds-1) を設定しています …
libpython2.7:amd64 (2.7.13-2+deb9u3) を設定しています …
openssl (1.1.0j-1~deb9u1) を設定しています …
python-virtualenv (15.1.0+ds-1) を設定しています …
man-db (2.7.6.1-2) のトリガを処理しています …
libmpc3:amd64 (1.0.3-1+b2) を設定しています …
binutils (2.28-5) を設定しています …
cpp-6 (6.3.0-18+deb9u1) を設定しています …
libc-dev-bin (2.24-11+deb9u3) を設定しています …
libc6-dev:amd64 (2.24-11+deb9u3) を設定しています …
virtualenv (15.1.0+ds-1) を設定しています …
libitm1:amd64 (6.3.0-18+deb9u1) を設定しています …
cpp (4:6.3.0-4) を設定しています …
libgcc-6-dev:amd64 (6.3.0-18+deb9u1) を設定しています …
libssl-dev:amd64 (1.1.0j-1~deb9u1) を設定しています …
gcc-6 (6.3.0-18+deb9u1) を設定しています …
libexpat1-dev:amd64 (2.2.0-2+deb9u1) を設定しています …
libpython2.7-dev:amd64 (2.7.13-2+deb9u3) を設定しています …
python2.7-dev (2.7.13-2+deb9u3) を設定しています …
libpython-dev:amd64 (2.7.13-2) を設定しています …
python-dev (2.7.13-2) を設定しています …
gcc (4:6.3.0-4) を設定しています …
libc-bin (2.24-11+deb9u3) のトリガを処理しています …
Creating virtual environment…
Installing Python packages…
Installation succeeded.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache

Which names would you like to activate HTTPS for?
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
1: xxxx.org
2: site1.xxxx.org
3: site2.xxxx.org
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter ‘c’ to cancel): 1
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for xxxx.org
Waiting for verification…
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/apache2/sites-enabled/xxxx.org-le-ssl.conf

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
1: No redirect – Make no further changes to the webserver configuration.
2: Redirect – Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you’re confident your site works on HTTPS. You can undo this
change by editing your web server’s configuration.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Select the appropriate number [1-2] then [enter] (press ‘c’ to cancel): 2
Enhancement redirect was already set.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Congratulations! You have successfully enabled https://xxxx.org

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=xxxx.org
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

IMPORTANT NOTES:
– Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/xxxx.org-0001/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/xxxx.org-0001/privkey.pem
Your cert will expire on 2019-03-21. To obtain a new or tweaked
version of this certificate in the future, simply run certbot-auto
again with the “certonly” option. To non-interactively renew *all*
of your certificates, run “certbot-auto renew”
– If you like Certbot, please consider supporting our work by:

Donating to ISRG / Let’s Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le

VMWare上のDebian8を起動時に UNEXPECTED INCONSISTENCY で起動しない

VMwareでLinuxを使用していると、ファイルシステムに以上がでることがたまにあります。

電源が突然落ちた時など、
ファイルシステムに整合性がなくなった状態になることがあります。
その場合、以下ようにLinux 起動時にエラーで止まります。

Your system appears to have shut down uncleanly
Press Y within 3 seconds to force file system integrity check…
Checking root filesystem

/dev/sd1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options )
[FAILED]

*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
Give root password for maintenance
(or type Control-D for normal startup):

fsckを手動で実行します。

fsck -t ext3 /dev/sd1

Debian9 stretch Postfixでメールサーバー構築

Debian9 stretch Postfixでメールサーバー構築

# apt-get install postfix sasl2-bin
パッケージリストを読み込んでいます… 完了
依存関係ツリーを作成しています
状態情報を読み取っています… 完了
以下の追加パッケージがインストールされます:
db-util db5.3-util postfix-sqlite
提案パッケージ:
procmail postfix-mysql postfix-pgsql postfix-ldap postfix-pcre postfix-lmdb
dovecot-common resolvconf postfix-cdb mail-reader ufw postfix-doc
以下のパッケージが新たにインストールされます:
db-util db5.3-util postfix postfix-sqlite sasl2-bin
アップグレード: 0 個、新規インストール: 5 個、削除: 0 個、保留: 1 個。
1,985 kB のアーカイブを取得する必要があります。
この操作後に追加で 5,093 kB のディスク容量が消費されます。
続行しますか? [Y/n]
取得:1 http://ftp.jp.debian.org/debian stretch/main amd64 db5.3-util amd64 5.3.28-12+deb9u1 [64.8 kB]
取得:2 http://ftp.jp.debian.org/debian stretch/main amd64 db-util all 5.3.1 [2,782 B]
取得:3 http://ftp.jp.debian.org/debian stretch/main amd64 sasl2-bin amd64 2.1.27~101-g0780600+dfsg-3 [162 kB]
取得:4 http://ftp.jp.debian.org/debian stretch/main amd64 postfix-sqlite amd64 3.1.8-0+deb9u1 [318 kB]
取得:5 http://ftp.jp.debian.org/debian stretch/main amd64 postfix amd64 3.1.8-0+deb9u1 [1,437 kB]
1,985 kB を 0秒 で取得しました (2,521 kB/s)
パッケージを事前設定しています …
以前に未選択のパッケージ db5.3-util を選択しています。
(データベースを読み込んでいます … 現在 32767 個のファイルとディレクトリがインストールされています。)
…/db5.3-util_5.3.28-12+deb9u1_amd64.deb を展開する準備をしています …
db5.3-util (5.3.28-12+deb9u1) を展開しています…
以前に未選択のパッケージ db-util を選択しています。
…/archives/db-util_5.3.1_all.deb を展開する準備をしています …
db-util (5.3.1) を展開しています…
以前に未選択のパッケージ sasl2-bin を選択しています。
…/sasl2-bin_2.1.27~101-g0780600+dfsg-3_amd64.deb を展開する準備をしています …
sasl2-bin (2.1.27~101-g0780600+dfsg-3) を展開しています…
以前に未選択のパッケージ postfix-sqlite を選択しています。
…/postfix-sqlite_3.1.8-0+deb9u1_amd64.deb を展開する準備をしています …
postfix-sqlite (3.1.8-0+deb9u1) を展開しています…
以前に未選択のパッケージ postfix を選択しています。
…/postfix_3.1.8-0+deb9u1_amd64.deb を展開する準備をしています …
postfix (3.1.8-0+deb9u1) を展開しています…
systemd (232-25+deb9u4) のトリガを処理しています …
db5.3-util (5.3.28-12+deb9u1) を設定しています …
man-db (2.7.6.1-2) のトリガを処理しています …
postfix-sqlite (3.1.8-0+deb9u1) を設定しています …
grep: /etc/postfix/dynamicmaps.cf: そのようなファイルやディレクトリはありません
Adding sqlite map entry to /etc/postfix/dynamicmaps.cf
rsyslog (8.24.0-1) のトリガを処理しています …
postfix (3.1.8-0+deb9u1) を設定しています …
Created symlink /etc/systemd/system/multi-user.target.wants/postfix.service → /lib/systemd/system/postfix.service.
グループ `postfix’ (グループ ID 114) を追加しています…
完了。
システムユーザ `postfix’ (UID 109) を追加しています…
新しいユーザ `postfix’ (UID 109) をグループ `postfix’ に追加しています…
ホームディレクトリ `/var/spool/postfix’ は作成しません。
グループ `postdrop’ (グループ ID 115) を追加しています…
完了。
setting myhostname: ik1-999-99999.xxxxxxx.com
setting alias maps
setting alias database
changing /etc/mailname to xxxxxxx.com
setting myorigin
setting destinations: $myhostname, xxxxxxx.com, ik1-999-99999.xxxxxxx.com, localhost
setting relayhost:
setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
setting inet_protocols: all
/etc/aliases does not exist, creating it.
WARNING: /etc/aliases exists, but does not have a root alias.

Postfix (main.cf) is now set up with a default configuration. If you need to
make changes, edit /etc/postfix/main.cf (and others) as needed. To view
Postfix configuration values, see postconf(1).

After modifying main.cf, be sure to run ‘service postfix reload’.

Running newaliases
db-util (5.3.1) を設定しています …
sasl2-bin (2.1.27~101-g0780600+dfsg-3) を設定しています …
systemd (232-25+deb9u4) のトリガを処理しています …
rsyslog (8.24.0-1) のトリガを処理しています …
#

設定ファイルのコピー
# cp /usr/share/postfix/main.cf.dist /etc/postfix/main.cf

編集
# vi /etc/postfix/main.cf

Debian9 stretch MySQLのインストール

Debian9 stretch MySQLのインストール

# apt-get install mysql-server
パッケージリストを読み込んでいます… 完了
依存関係ツリーを作成しています
状態情報を読み取っています… 完了
以下の追加パッケージがインストールされます:
default-mysql-server galera-3 gawk libaio1 libdbi-perl libjemalloc1 libmpfr4
libreadline5 libsigsegv2 mariadb-client-10.1 mariadb-client-core-10.1
mariadb-common mariadb-server-10.1 mariadb-server-core-10.1 mysql-common
rsync socat
提案パッケージ:
gawk-doc libclone-perl libmldbm-perl libnet-daemon-perl
libsql-statement-perl mailx mariadb-test netcat-openbsd tinyca
推奨パッケージ:
libdbd-mysql-perl libterm-readkey-perl libhtml-template-perl
以下のパッケージが新たにインストールされます:
default-mysql-server galera-3 gawk libaio1 libdbi-perl libjemalloc1 libmpfr4
libreadline5 libsigsegv2 mariadb-client-10.1 mariadb-client-core-10.1
mariadb-common mariadb-server-10.1 mariadb-server-core-10.1 mysql-common
mysql-server rsync socat
アップグレード: 0 個、新規インストール: 18 個、削除: 0 個、保留: 5 個。
25.3 MB のアーカイブを取得する必要があります。
この操作後に追加で 187 MB のディスク容量が消費されます。
続行しますか? [Y/n]
取得:1 http://ftp.jp.debian.org/debian stretch/main amd64 libmpfr4 amd64 3.1.5-1 [556 kB]
取得:2 http://ftp.jp.debian.org/debian stretch/main amd64 libsigsegv2 amd64 2.10-5 [28.9 kB]
取得:3 http://ftp.jp.debian.org/debian stretch/main amd64 gawk amd64 1:4.1.4+dfsg-1 [571 kB]
取得:4 http://ftp.jp.debian.org/debian stretch/main amd64 mysql-common all 5.8+1.0.2 [5,608 B]
取得:5 http://ftp.jp.debian.org/debian stretch/main amd64 mariadb-common all 10.1.26-0+deb9u1 [27.3 kB]
取得:6 http://ftp.jp.debian.org/debian stretch/main amd64 galera-3 amd64 25.3.19-2 [955 kB]
取得:7 http://ftp.jp.debian.org/debian stretch/main amd64 libdbi-perl amd64 1.636-1+b1 [766 kB]
取得:8 http://ftp.jp.debian.org/debian stretch/main amd64 libaio1 amd64 0.3.110-3 [9,412 B]
取得:9 http://ftp.jp.debian.org/debian stretch/main amd64 libreadline5 amd64 5.2+dfsg-3+b1 [119 kB]
取得:10 http://ftp.jp.debian.org/debian stretch/main amd64 mariadb-client-core-10.1 amd64 10.1.26-0+deb9u1 [5,042 kB]
取得:11 http://ftp.jp.debian.org/debian stretch/main amd64 libjemalloc1 amd64 3.6.0-9.1 [89.8 kB]
取得:12 http://ftp.jp.debian.org/debian stretch/main amd64 mariadb-client-10.1 amd64 10.1.26-0+deb9u1 [5,841 kB]
取得:13 http://ftp.jp.debian.org/debian stretch/main amd64 mariadb-server-core-10.1 amd64 10.1.26-0+deb9u1 [5,177 kB]
取得:14 http://ftp.jp.debian.org/debian stretch/main amd64 rsync amd64 3.1.2-1+deb9u1 [393 kB]
取得:15 http://ftp.jp.debian.org/debian stretch/main amd64 socat amd64 1.7.3.1-2+deb9u1 [353 kB]
取得:16 http://ftp.jp.debian.org/debian stretch/main amd64 mariadb-server-10.1 amd64 10.1.26-0+deb9u1 [5,333 kB]
取得:17 http://ftp.jp.debian.org/debian stretch/main amd64 default-mysql-server all 1.0.2 [3,048 B]
取得:18 http://ftp.jp.debian.org/debian stretch/main amd64 mysql-server amd64 5.5.9999+default [1,706 B]
25.3 MB を 3秒 で取得しました (6,759 kB/s)
パッケージを事前設定しています …
以前に未選択のパッケージ libmpfr4:amd64 を選択しています。
(データベースを読み込んでいます … 現在 32005 個のファイルとディレクトリがインストールされています。)
…/libmpfr4_3.1.5-1_amd64.deb を展開する準備をしています …
libmpfr4:amd64 (3.1.5-1) を展開しています…
以前に未選択のパッケージ libsigsegv2:amd64 を選択しています。
…/libsigsegv2_2.10-5_amd64.deb を展開する準備をしています …
libsigsegv2:amd64 (2.10-5) を展開しています…
libmpfr4:amd64 (3.1.5-1) を設定しています …
libsigsegv2:amd64 (2.10-5) を設定しています …
以前に未選択のパッケージ gawk を選択しています。
(データベースを読み込んでいます … 現在 32027 個のファイルとディレクトリがインストールされています。)
…/00-gawk_1%3a4.1.4+dfsg-1_amd64.deb を展開する準備をしています …
gawk (1:4.1.4+dfsg-1) を展開しています…
以前に未選択のパッケージ mysql-common を選択しています。
…/01-mysql-common_5.8+1.0.2_all.deb を展開する準備をしています …
mysql-common (5.8+1.0.2) を展開しています…
以前に未選択のパッケージ mariadb-common を選択しています。
…/02-mariadb-common_10.1.26-0+deb9u1_all.deb を展開する準備をしています …
mariadb-common (10.1.26-0+deb9u1) を展開しています…
以前に未選択のパッケージ galera-3 を選択しています。
…/03-galera-3_25.3.19-2_amd64.deb を展開する準備をしています …
galera-3 (25.3.19-2) を展開しています…
以前に未選択のパッケージ libdbi-perl を選択しています。
…/04-libdbi-perl_1.636-1+b1_amd64.deb を展開する準備をしています …
libdbi-perl (1.636-1+b1) を展開しています…
以前に未選択のパッケージ libaio1:amd64 を選択しています。
…/05-libaio1_0.3.110-3_amd64.deb を展開する準備をしています …
libaio1:amd64 (0.3.110-3) を展開しています…
以前に未選択のパッケージ libreadline5:amd64 を選択しています。
…/06-libreadline5_5.2+dfsg-3+b1_amd64.deb を展開する準備をしています …
libreadline5:amd64 (5.2+dfsg-3+b1) を展開しています…
以前に未選択のパッケージ mariadb-client-core-10.1 を選択しています。
…/07-mariadb-client-core-10.1_10.1.26-0+deb9u1_amd64.deb を展開する準備をしています …
mariadb-client-core-10.1 (10.1.26-0+deb9u1) を展開しています…
以前に未選択のパッケージ libjemalloc1 を選択しています。
…/08-libjemalloc1_3.6.0-9.1_amd64.deb を展開する準備をしています …
libjemalloc1 (3.6.0-9.1) を展開しています…
以前に未選択のパッケージ mariadb-client-10.1 を選択しています。
…/09-mariadb-client-10.1_10.1.26-0+deb9u1_amd64.deb を展開する準備をしています …
mariadb-client-10.1 (10.1.26-0+deb9u1) を展開しています…
以前に未選択のパッケージ mariadb-server-core-10.1 を選択しています。
…/10-mariadb-server-core-10.1_10.1.26-0+deb9u1_amd64.deb を展開する準備をしています …
mariadb-server-core-10.1 (10.1.26-0+deb9u1) を展開しています…
以前に未選択のパッケージ rsync を選択しています。
…/11-rsync_3.1.2-1+deb9u1_amd64.deb を展開する準備をしています …
rsync (3.1.2-1+deb9u1) を展開しています…
以前に未選択のパッケージ socat を選択しています。
…/12-socat_1.7.3.1-2+deb9u1_amd64.deb を展開する準備をしています …
socat (1.7.3.1-2+deb9u1) を展開しています…
mysql-common (5.8+1.0.2) を設定しています …
update-alternatives: /etc/mysql/my.cnf (my.cnf) を提供するために自動モードで /etc/mysql/my.cnf.fallback を使います
mariadb-common (10.1.26-0+deb9u1) を設定しています …
update-alternatives: /etc/mysql/my.cnf (my.cnf) を提供するために自動モードで /etc/mysql/mariadb.cnf を使います
以前に未選択のパッケージ mariadb-server-10.1 を選択しています。
(データベースを読み込んでいます … 現在 32607 個のファイルとディレクトリがインストールされています。)
…/mariadb-server-10.1_10.1.26-0+deb9u1_amd64.deb を展開する準備をしています …
mariadb-server-10.1 (10.1.26-0+deb9u1) を展開しています…
以前に未選択のパッケージ default-mysql-server を選択しています。
…/default-mysql-server_1.0.2_all.deb を展開する準備をしています …
default-mysql-server (1.0.2) を展開しています…
以前に未選択のパッケージ mysql-server を選択しています。
…/mysql-server_5.5.9999+default_amd64.deb を展開する準備をしています …
mysql-server (5.5.9999+default) を展開しています…
libjemalloc1 (3.6.0-9.1) を設定しています …
socat (1.7.3.1-2+deb9u1) を設定しています …
gawk (1:4.1.4+dfsg-1) を設定しています …
rsync (3.1.2-1+deb9u1) を設定しています …
Created symlink /etc/systemd/system/multi-user.target.wants/rsync.service → /lib/systemd/system/rsync.service.
libc-bin (2.24-11+deb9u3) のトリガを処理しています …
libaio1:amd64 (0.3.110-3) を設定しています …
galera-3 (25.3.19-2) を設定しています …
systemd (232-25+deb9u4) のトリガを処理しています …
man-db (2.7.6.1-2) のトリガを処理しています …
libreadline5:amd64 (5.2+dfsg-3+b1) を設定しています …
libdbi-perl (1.636-1+b1) を設定しています …
mariadb-server-core-10.1 (10.1.26-0+deb9u1) を設定しています …
mariadb-client-core-10.1 (10.1.26-0+deb9u1) を設定しています …
mariadb-client-10.1 (10.1.26-0+deb9u1) を設定しています …
mariadb-server-10.1 (10.1.26-0+deb9u1) を設定しています …
Created symlink /etc/systemd/system/mysql.service → /lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /lib/systemd/system/mariadb.service.
default-mysql-server (1.0.2) を設定しています …
mysql-server (5.5.9999+default) を設定しています …
libc-bin (2.24-11+deb9u3) のトリガを処理しています …
systemd (232-25+deb9u4) のトリガを処理しています …
#

phpでmysqlを利用する場合は、php-mysqlもインストールする。

# apt-get install php-mysql
パッケージリストを読み込んでいます… 完了
依存関係ツリーを作成しています
状態情報を読み取っています… 完了
以下の追加パッケージがインストールされます:
php7.0-mysql
以下のパッケージが新たにインストールされます:
php-mysql php7.0-mysql
アップグレード: 0 個、新規インストール: 2 個、削除: 0 個、保留: 5 個。
129 kB のアーカイブを取得する必要があります。
この操作後に追加で 502 kB のディスク容量が消費されます。
続行しますか? [Y/n] y
取得:1 http://ftp.jp.debian.org/debian stretch/main amd64 php7.0-mysql amd64 7.0.30-0+deb9u1 [124 kB]
取得:2 http://ftp.jp.debian.org/debian stretch/main amd64 php-mysql all 1:7.0+49 [5,052 B]
129 kB を 0秒 で取得しました (273 kB/s)
以前に未選択のパッケージ php7.0-mysql を選択しています。
(データベースを読み込んでいます … 現在 32751 個のファイルとディレクトリがインストールされています。)
…/php7.0-mysql_7.0.30-0+deb9u1_amd64.deb を展開する準備をしています …
php7.0-mysql (7.0.30-0+deb9u1) を展開しています…
以前に未選択のパッケージ php-mysql を選択しています。
…/php-mysql_1%3a7.0+49_all.deb を展開する準備をしています …
php-mysql (1:7.0+49) を展開しています…
php7.0-mysql (7.0.30-0+deb9u1) を設定しています …

Creating config file /etc/php/7.0/mods-available/mysqlnd.ini with new version

Creating config file /etc/php/7.0/mods-available/mysqli.ini with new version

Creating config file /etc/php/7.0/mods-available/pdo_mysql.ini with new version
libapache2-mod-php7.0 (7.0.30-0+deb9u1) のトリガを処理しています …
php-mysql (1:7.0+49) を設定しています …
#

Debian9 stretch PostgreSQLのインストール

Debian9 stretchにPostgreSQLをインストールする。

本体価格今なら0円!!【novas WiMAX】


# apt-get install postgresql
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
以下の追加パッケージがインストールされます:
libpq5 postgresql-9.6 postgresql-client-9.6 postgresql-client-common postgresql-common ssl-cert
提案パッケージ:
postgresql-doc locales-all postgresql-doc-9.6 openssl-blacklist
推奨パッケージ:
postgresql-contrib-9.6 sysstat
以下のパッケージが新たにインストールされます:
libpq5 postgresql postgresql-9.6 postgresql-client-9.6 postgresql-client-common postgresql-common ssl-cert
アップグレード: 0 個、新規インストール: 7 個、削除: 0 個、保留: 5 個。
6,135 kB のアーカイブを取得する必要があります。
この操作後に追加で 28.8 MB のディスク容量が消費されます。
続行しますか? [Y/n]
取得:1 http://security.debian.org/debian-security stretch/updates/main amd64 libpq5 amd64 9.6.10-0+deb9u1 [136 kB]
取得:2 http://security.debian.org/debian-security stretch/updates/main amd64 postgresql-client-9.6 amd64 9.6.10-0+deb9u1 [1,279 kB]
取得:3 http://ftp.jp.debian.org/debian stretch/main amd64 postgresql-client-common all 181+deb9u2 [79.2 kB]
取得:4 http://ftp.jp.debian.org/debian stretch/main amd64 ssl-cert all 1.0.39 [20.8 kB]
取得:5 http://ftp.jp.debian.org/debian stretch/main amd64 postgresql-common all 181+deb9u2 [217 kB]
取得:6 http://ftp.jp.debian.org/debian stretch/main amd64 postgresql all 9.6+181+deb9u2 [55.8 kB]
取得:7 http://security.debian.org/debian-security stretch/updates/main amd64 postgresql-9.6 amd64 9.6.10-0+deb9u1 [4,348 kB]
6,135 kB を 1秒 で取得しました (5,654 kB/s)
パッケージを事前設定しています ...
以前に未選択のパッケージ libpq5:amd64 を選択しています。
(データベースを読み込んでいます ... 現在 31346 個のファイルとディレクトリがインストールされています。)
.../0-libpq5_9.6.10-0+deb9u1_amd64.deb を展開する準備をしています ...
libpq5:amd64 (9.6.10-0+deb9u1) を展開しています...
以前に未選択のパッケージ postgresql-client-common を選択しています。
.../1-postgresql-client-common_181+deb9u2_all.deb を展開する準備をしています ...
postgresql-client-common (181+deb9u2) を展開しています...
以前に未選択のパッケージ postgresql-client-9.6 を選択しています。
.../2-postgresql-client-9.6_9.6.10-0+deb9u1_amd64.deb を展開する準備をしています ...
postgresql-client-9.6 (9.6.10-0+deb9u1) を展開しています...
以前に未選択のパッケージ ssl-cert を選択しています。
.../3-ssl-cert_1.0.39_all.deb を展開する準備をしています ...
ssl-cert (1.0.39) を展開しています...
以前に未選択のパッケージ postgresql-common を選択しています。
.../4-postgresql-common_181+deb9u2_all.deb を展開する準備をしています ...
'postgresql-common による /usr/bin/pg_config から /usr/bin/pg_config.libpq-dev への退避 (divert)' を追加しています
postgresql-common (181+deb9u2) を展開しています...
以前に未選択のパッケージ postgresql-9.6 を選択しています。
.../5-postgresql-9.6_9.6.10-0+deb9u1_amd64.deb を展開する準備をしています ...
postgresql-9.6 (9.6.10-0+deb9u1) を展開しています...
以前に未選択のパッケージ postgresql を選択しています。
.../6-postgresql_9.6+181+deb9u2_all.deb を展開する準備をしています ...
postgresql (9.6+181+deb9u2) を展開しています...
ssl-cert (1.0.39) を設定しています ...
libpq5:amd64 (9.6.10-0+deb9u1) を設定しています ...
libc-bin (2.24-11+deb9u3) のトリガを処理しています ...
postgresql-client-common (181+deb9u2) を設定しています ...
systemd (232-25+deb9u4) のトリガを処理しています ...
postgresql-common (181+deb9u2) を設定しています ...
ユーザ postgres をグループ ssl-cert に追加

Creating config file /etc/postgresql-common/createcluster.conf with new version

Creating config file /etc/logrotate.d/postgresql-common with new version
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql.service → /lib/systemd/system/postgresql.service.
man-db (2.7.6.1-2) のトリガを処理しています ...
postgresql-client-9.6 (9.6.10-0+deb9u1) を設定しています ...
update-alternatives: /usr/share/man/man1/psql.1.gz (psql.1.gz) を提供するために自動モードで /usr/share/postgresql/9.6/man/man1/psql.1.gz を使います
postgresql-9.6 (9.6.10-0+deb9u1) を設定しています ...
Creating new cluster 9.6/main ...
config /etc/postgresql/9.6/main
data /var/lib/postgresql/9.6/main
locale ja_JP.UTF-8
socket /var/run/postgresql
port 5432
update-alternatives: /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) を提供するために自動モードで /usr/share/postgresql/9.6/man/man1/postmaster.1.gz を使います
postgresql (9.6+181+deb9u2) を設定しています ...
systemd (232-25+deb9u4) のトリガを処理しています ...
#

Debian9 stretchでifconfigを使う

Debian9 stretchでは、標準ではifconfigが利用できない。

net-tools というパッケージを入れるとifconfigが利用できるようになる。


# apt-get install net-tools
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
以下のパッケージが新たにインストールされます:
net-tools
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 5 個。
248 kB のアーカイブを取得する必要があります。
この操作後に追加で 963 kB のディスク容量が消費されます。
取得:1 http://ftp.jp.debian.org/debian stretch/main amd64 net-tools amd64 1.60+git20161116.90da8a0-1 [248 kB]
248 kB を 0秒 で取得しました (497 kB/s)
以前に未選択のパッケージ net-tools を選択しています。
(データベースを読み込んでいます ... 現在 31290 個のファイルとディレクトリがインストールされています。)
.../net-tools_1.60+git20161116.90da8a0-1_amd64.deb を展開する準備をしています ...
net-tools (1.60+git20161116.90da8a0-1) を展開しています...
man-db (2.7.6.1-2) のトリガを処理しています ...
net-tools (1.60+git20161116.90da8a0-1) を設定しています ...
#

これで、ifconfigやnettoolsが利用できる。

WordPressを使うならロリポップ!
簡単インストール完備で楽々スタート!

Debian9 apache2.4+php7の導入

apache2.4のインストール
# apt-get install apache2

php7のインストール
# pat-get install php7