投稿者アーカイブ

WindowsクライアントからNFS接続

コマンドプロンプトから実行する。

>mount -o mtype=hard 192.168.x.x:/home/nfs-share V:
V: は 192.168.x.x:/home/nfs-share に正常に接続しました

現在マウント中のディレクトリを表示する。
>mount

Local Remote Properties
——————————————————————————-
V: \\192.168.x.x\home\nfs-share UID=-2, GID=-2
rsize=131072, wsize=131072
mount=hard, timeout=0.8
retry=1, locking=yes
fileaccess=755, lang=SHIFT-JIS
casesensitive=no
sec=sys

管理者

NFSサーバーの設定

・/etc/exportsに共有設定を追加

書式
共有するディレクトリ 接続可能なIPアドレス(オプション)

オプション
 ro: 読み取りのみ
 rw: 読み書き可能
 no_root_squash: デフォルトでは、クライアント マシン上のユーザー root によって行われたファイル要求は、そのサーバー上のユーザー nobody によって行われたかのように扱われる。



/home/nfs-share 192.168.0.1(rw,no_root_squash)

 

サーバーの起動

NFS を起動する。


/etc/init.d/nfs start

※Portmapと関連 rpc デーモンは、NFS を起動する前に実行されている必要があります。

/etc/exports の変更

NFS サーバーが既に実行されているときに /etc/exports に変更を加えた場合は、nfsd/etc/exports の読み取りを強制して、変更を適用する必要があります。コマンド プロンプトから、次のように入力します。

usr/sbin/exportfs -ra
管理者

NFSサーバーでマウント状況を表示する

・クライアントのホスト名とマウントされたディレクトリを表示

# showmount -a
All mount points on nfs-server:
192.168.x.x:/home/nfs-share
192.168.x.x:/home/nfs-share
192.168.x.x:/home/nfs-share

・クライアントからマウントされているディレクトリの表示

# showmount -d
Directories on nfs-server:
/home/nfs-share

・NFSサーバのエクスポートリストを表示

# showmount -e
Export list for nfs-server:
/home/nfs-share 192.168.x.x/24

管理者

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

管理者

mecOS X hostsファイルを編集

OS X でhostsファイルを編集する。

ターミナルを開き、viを起動する。

$ sudo vi /private/etc/hosts

管理者