softwares/ubuntu/initialconfig_bionic_desktop/index.wiki.txt

current previous
1139,14 1139,6
 

        

        
 
*デスクトップ環境の設定とカスタマイズ [#CustomizeDesktop]
*デスクトップ環境の設定とカスタマイズ [#CustomizeDesktop]
 

        

        
+
**~/.cacheディレクトリ
+
``~/.cache``ディレクトリを``/home``とは異なるパーティションに置く。
+

         
+
#code(sh){{
+
rm -rf ~/.cache
+
ln -s /opt/cache/users/user/.cache/ ~/.cache
+
}}
+

         
 
**設定
**設定
 
設定(``gnome-control-center``)を起動して設定を編集する。
設定(``gnome-control-center``)を起動して設定を編集する。
 

        

        
1162,18 1154,6
 
::[省電力]|
::[省電力]|
 
:::[ブランクスクリーン]|「しない」に設定
:::[ブランクスクリーン]|「しない」に設定
 

        

        
+
#remarks
+
ブランクスクリーンの設定を任意の時間にしたい場合は、``gsettings``コマンドを用いて``org.gnome.desktop.session``のキー``idle-delay``に秒数単位で値を設定する。 ``0``に設定すれば「しない」と同じ設定となる。
+

         
+
#code(sh,スクリーンをブランクにするまでの時間を設定する){{
+
# 3600秒(=1時間)に設定する
+
gsettings set org.gnome.desktop.session idle-delay 3600
+

         
+
# 現在設定されている値を表示する
+
gsettings get org.gnome.desktop.session idle-delay
+
}}
+
#remarks-end
+

         
 
***[デバイス]の設定
***[デバイス]の設定
 
:[キーボード]タブ|必要に応じてショートカット設定を変更
:[キーボード]タブ|必要に応じてショートカット設定を変更
 
:[マウス]タブ|マウスの速度を適当な値に変更する
:[マウス]タブ|マウスの速度を適当な値に変更する
1203,9 1183,7
 
:::[日付]|オンに変更
:::[日付]|オンに変更
 
:::[秒]|オンに変更
:::[秒]|オンに変更
 
:[フォント]タブ|
:[フォント]タブ|
~
::[等幅]|``Noto Sans Mono CJK JP Regular 11``にする
::「等幅」|``Noto Sans Mono CJK JP Regular 11``にする
+
:[外観]タブ|
+
::[アニメーション]|オフに変更
 
:[拡張機能]タブ|インストールしたものをオンにする
:[拡張機能]タブ|インストールしたものをオンにする
 

        

        
 
***Dash to dockの詳細設定
***Dash to dockの詳細設定
1270,44 1248,6
 
:[プライバシーとセキュリティ]タブ|
:[プライバシーとセキュリティ]タブ|
 
::[ウェブサイトのログイン情報とパスワードを保存する]|チェックを外す
::[ウェブサイトのログイン情報とパスワードを保存する]|チェックを外す
 

        

        
+
***プロファイルごとのショートカットを作る
+
デフォルト以外のプロファイルがまだ存在しない場合は、一旦Firefoxを終了したのちに``firefox -p``でプロファイル選択ウィンドウを開き、新しいプロファイルを作成する。
+

         
+
#code(sh){{
+
firefox -p
+
}}
+

         
+
#hr
+

         
+
``~/.local/share/applications``にデスクトップエントリファイルを作成して以下のような内容を記述する。 あるいは``/usr/share/applications/firefox.desktop``をコピーして編集する。 拡張子を除くファイル名部分は任意に設定できる。 以下の例では、プロファイル名``user2``でFirefoxを起動するようにしている。
+
#code(ini,type=configuration,~/.local/share/applications/firefox-profile-user2.desktop){{
+
[Desktop Entry]
+
Version=1.0
+
Name=Firefox (user2)
+
Exec=firefox -P "user2" %u
+
Type=Application
+
Terminal=false
+
Icon=firefox
+

         
+
# 「新しいウィンドウを開く」などのアクションを定義する場合は、Actionsキーにアクション名を記述して、
+
# 対応する名前のセクションにて動作を定義する
+
# アクションを複数定義する場合は、";"で区切ってアクション名を記述する
+
Actions=new-window;
+

         
+
[Desktop Action new-window]
+
Name=新しいウィンドウを開く
+
Exec=firefox -P "user2" --new-window
+
}}
+

         
+
デスクトップエントリファイルを作成するとアプリケーション一覧にアイコンが表示されるようになる。
+

         
+
#relevantdocs(参考)
+

         
+
-[[デスクトップエントリ - ArchWiki:https://wiki.archlinux.jp/index.php/%E3%83%87%E3%82%B9%E3%82%AF%E3%83%88%E3%83%83%E3%83%97%E3%82%A8%E3%83%B3%E3%83%88%E3%83%AA]]
+
-[[Desktop Entry Specification:https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html]]
+

         
+
#relevantdocs-end
+

         
 
**Thunderbird
**Thunderbird
 
``user.js``を作成して以下の内容を記述しておく。
``user.js``を作成して以下の内容を記述しておく。
 

        

        
1377,10 1317,10
 
enabled=False
enabled=False
 
}}
}}
 

        

        
~
``~/.config/user-dirs.locale``に記載されているロケールが``ja_JP``になっているので、``C``等に変更しておく。
``~/.config/user-dirs.locale``に記載されているロケールが``ja_JP``になっているので、``en_US``等に変更しておく。
 

        

        
 
#code(,type=configuration,~/.config/user-dirs.locale){{
#code(,type=configuration,~/.config/user-dirs.locale){{
~
C
en_US
 
}}
}}
 

        

        
 
その後、ディレクトリ名を変更する。 また不要になったディレクトリを削除する。
その後、ディレクトリ名を変更する。 また不要になったディレクトリを削除する。
1838,12 1778,13
 
.NET Core SDKをインストールする。
.NET Core SDKをインストールする。
 

        

        
 
#code(sh){{
#code(sh){{
+
sudo apt install curl gnupg apt-transport-https
+

         
 
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
 
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
 
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-bionic-prod bionic main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-bionic-prod bionic main" > /etc/apt/sources.list.d/dotnetdev.list'
-
}}
 

        

        
-
#code(sh){{
-
sudo apt install apt-transport-https
 
sudo apt update
sudo apt update
 
sudo apt install dotnet-sdk-2.1.105
sudo apt install dotnet-sdk-2.1.105
 

        

        

softwares/ubuntu/initialconfig_bionic_server/index.wiki.txt

current previous
7,7 7,7
 
:このメモの目的と内容|kvm仮想マシンを各種サーバとして使うための初期設定メモ
:このメモの目的と内容|kvm仮想マシンを各種サーバとして使うための初期設定メモ
 
:構成|
:構成|
 
::ロケール|``ja_JP``ではなく``en_US``に設定する
::ロケール|``ja_JP``ではなく``en_US``に設定する
~
::ハードウェア|256MBのメモリと2GBのストレージ(virtio)3台が接続されている仮想マシン
::ハードウェア|256MBのメモリと10GBのストレージ(virtio)2台が接続されている仮想マシン
 

        

        
 
#relevantdocs
#relevantdocs
 

        

        
72,14 72,12
 

        

        
 
|*パーティション設定
|*パーティション設定
 
|~#|~Type|~Size|~Use as|~Mount point|~Mount options|h
|~#|~Type|~Size|~Use as|~Mount point|~Mount options|h
~
|>|>|>|>|>|~Virtual disk1 (vda) 2GB|
|>|>|>|>|>|~Virtual disk1 (vda) 10GB|
 
|~#1|Primary|512M|ext4|/boot|defaults|
|~#1|Primary|512M|ext4|/boot|defaults|
 
|~#5|Logical|(max)|ext4|/usr|defaults|
|~#5|Logical|(max)|ext4|/usr|defaults|
~
|>|>|>|>|>|~Virtual disk2 (vdb) 2GB|
|>|>|>|>|>|~Virtual disk2 (vdb) 10GB|
 
|~#1|Primary|(max)|ext4|/|defaults|
|~#1|Primary|(max)|ext4|/|defaults|
 
|~#5|Logical|512M|swap|>|-|
|~#5|Logical|512M|swap|>|-|
+
|>|>|>|>|>|~Virtual disk3 (vdc) 2GB|
+
|~#1|Primary|(max)|ext4|/srv|defaults|
 
|~#|~Type|~Size|~Use as|~Mount point|~Mount options|f
|~#|~Type|~Size|~Use as|~Mount point|~Mount options|f
 

        

        
 
:Write the changes to disks?|パーティションの変更内容を確認して<Yes>を選択
:Write the changes to disks?|パーティションの変更内容を確認して<Yes>を選択
116,21 114,14
 
**シリアルコンソールの有効化/コンソール解像度の設定/ブラックアウトの抑止
**シリアルコンソールの有効化/コンソール解像度の設定/ブラックアウトの抑止
 
``virsh console``でシリアルコンソールに接続できるようにするための設定。 同時にGRUBの設定を変更する。
``virsh console``でシリアルコンソールに接続できるようにするための設定。 同時にGRUBの設定を変更する。
 

        

        
~
gettyサービスを有効化・起動する。
まずgettyサービスを有効化・起動する。
 

        

        
 
#code(,gettyサービスを起動する){{
#code(,gettyサービスを起動する){{
 
sudo systemctl enable serial-getty@ttyS0.service
sudo systemctl enable serial-getty@ttyS0.service
 
sudo systemctl start serial-getty@ttyS0.service
sudo systemctl start serial-getty@ttyS0.service
+
sudo systemctl status serial-getty@ttyS0.service
 
}}
}}
 

        

        
~
#remarks
次に``/etc/default/grub``を編集してGRUBの設定を変更する。
+
この時点で``virsh console``でシリアルコンソールに接続できるようになる。 ただしsystemdが起動するまでgettyサービスも起動しないため、GRUBメニューやブートシーケンスは表示されない。 GRUBの起動時にシリアルコンソールを有効にする場合は以降の手順を行う。
+
#remarks-end
+

         
+
#hr
+

         
+
``/etc/default/grub``を編集してGRUBの設定を変更する。
 

        

        
 
#code(,type=configuration,/etc/default/grub){{
#code(,type=configuration,/etc/default/grub){{
 
GRUB_DEFAULT=0
GRUB_DEFAULT=0
404,264 395,82
 

        

        
 

        

        
 

        

        
~
**nginx
**Logwatch
~
#code(sh,インストール){{
#code(sh){{
~
sudo apt install nginx
sudo apt install logwatch
 
}}
}}
 

        

        
~
Ubuntu 18.04でインストールされるnginx(``nginx/1.14.0``)では、Apacheのような動的モジュール(Dynamic Modules)機能をサポートしている。
テストした結果をroot宛にメールで送信する。
 

        

        
~
Ubuntu 16.04等からそのまま設定ファイルを引き継ぐ場合は、下記のように``/etc/nginx/modules-enabled/``配下にあるモジュールの設定ファイルを読み込むよう設定を追記し、使用するモジュールを有効にするよう修正する必要がある。
#code(sh){{
~

         
sudo logwatch --detail high --mailto root
+
#code(,type=configuration,/etc/nginx/nginx.conf){{
+
include /etc/nginx/modules-enabled/*.conf;
 
}}
}}
 

        

        
+
TLS関連の設定(抜粋、Let's Encrypt SSL/TLS証明書を使用)
+
#code(,type=configuration,/etc/postfix/main.cf){{
+
server {
+
  listen 443 ssl http2;
 

        

        
+
  ssl_protocols TLSv1.2;
+
  add_header Strict-Transport-Security max-age=15768000;
 

        

        
+
  ssl_certificate     /etc/letsencrypt/live/www.example.com/fullchain.pem;
+
  ssl_certificate_key /etc/letsencrypt/live/www.example.com/privkey.pem;
+
}
+
}}
 

        

        
+
#relevantdocs(参考)
 

        

        
~
-[[Generate Mozilla Security Recommended Web Server Configuration Files:https://mozilla.github.io/server-side-tls/ssl-config-generator/]]
**AWStats
~

         
#code(sh){{
~
#relevantdocs-end
sudo apt install awstats
+

         
+
その他要件に合わせて設定、詳細については省略。
+

         
+

         
+
**Postfix+Dovecot(IMAP)+Sieve
+
***Postfixのインストールと設定
+
#code(sh,インストール){{
+
sudo apt install postfix
 
}}
}}
 

        

        
~
Postfix ConfigurationでInternet Siteを選択、以降ダイアログにしたがって必要項目を入力していく。
``/etc/awstats``以下の設定ファイルを編集後、ログが読み込まれデータが正しく収集されるかテストする。
~

         
#code(sh){{
~
#hr
sudo -u www-data /usr/share/doc/awstats/examples/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -confdir="/etc/awstats/"
~

         
ls /var/lib/awstats
+
``smtpd_banner``から``$mail_name``を削除する。
+

         
+
#code(,type=configuration,/etc/postfix/main.cf){{
+
smtpd_banner = $myhostname ESMTP
 
}}
}}
 

        

        
~
メールボックスをMaildir形式にする。
必要に応じてcron(``/etc/cron.d/awstats``)の設定およびHTTPサーバの設定を更新したのち、``http&#x3A;//&var{サーバ名};/awstats/awstats.pl?config=&var{設定ファイル名};``を開いて収集されたデータが表示されるか確かめる。
 

        

        
+
#code(,type=configuration,/etc/postfix/main.cf){{
+
home_mailbox = Maildir/
+
}}
 

        

        
+
メール送出時に、内部ネットワークアドレス(以下の例では``127.0.0.1``および``192.168.0.0/24``)を含むReceivedヘッダを取り除く。
 

        

        
+
#code(,type=configuration,/etc/postfix/main.cf){{
+
header_checks = regexp:/etc/postfix/header_checks
+
}}
 

        

        
~
#code(,type=configuration,/etc/postfix/header_checks){{
#commentout{{{
~
/^Received:.*\[192\.168\..+\].*/ IGNORE
**Postfix+Dovecot(IMAP)+maildrop
~
/^Received:.*\[127\.0\.0\.1\].*/ IGNORE
#code(sh){{
-
sudo apt install postfix dovecot-core dovecot-imapd maildrop
 
}}
}}
 

        

        
~
TLS関連の設定(抜粋、Let's Encrypt SSL/TLS証明書を使用)
***メールの格納先をMaildirにする
 
#code(,type=configuration,/etc/postfix/main.cf){{
#code(,type=configuration,/etc/postfix/main.cf){{
~
smtpd_use_tls = yes
home_mailbox = Maildir/
+
smtpd_tls_security_level = may
+
smtpd_tls_auth_only = yes
+
smtpd_tls_received_header = yes
+
smtpd_tls_loglevel = 1
+
smtpd_tls_cert_file = /etc/letsencrypt/live/mail.example.net/fullchain.pem
+
smtpd_tls_key_file  = /etc/letsencrypt/live/mail.example.net/privkey.pem
+
smtpd_tls_ciphers = high
+
smtpd_tls_mandatory_ciphers = high
+
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
+
smtpd_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
+

         
+
smtp_use_tls = yes
+
smtp_tls_security_level = encrypt
+
smtp_tls_note_starttls_offer = yes
+
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
+
# 以下smtp_*も同様に設定
 
}}
}}
 

        

        
+
#relevantdocs(参考)
+

         
+
-[[Postfix - Community Help Wiki:https://help.ubuntu.com/community/Postfix]]
+
-[[Securing Application 'X' with SSL/TLS in RHEL 'Y' ?:https://access.redhat.com/articles/1462183]]
+
--[[Securing postfix with SSL/TLS on RHEL7:https://access.redhat.com/articles/1468593]]
+

         
+
#relevantdocs-end
+

         
+
その他要件に合わせて設定、詳細については省略。
+

         
+
***Dovecot(dovecot-imapd)のインストールと設定
+
#code(sh,インストール){{
+
sudo apt install apt install dovecot-imapd
+
}}
+

         
+
メールボックスをMaildir形式にする。
 
#code(,type=configuration,/etc/dovecot/conf.d/10-mail.conf){{
#code(,type=configuration,/etc/dovecot/conf.d/10-mail.conf){{
 
mail_location = maildir:~/Maildir
mail_location = maildir:~/Maildir
 
}}
}}
 

        

        
~
平文での認証を無効にする。 また許可する認証メカニズムを限定する。
***maildropでフィルタ・振り分ける
~
#code(,type=configuration,/etc/dovecot/conf.d/10-auth.conf){{
まずホームディレクトリに``.forward``を作成し、ユーザー宛のすべてのメールをmaildropコマンドに転送させる。
+
disable_plaintext_auth = yes
+
auth_mechanisms = cram-md5
+
}}
 

        

        
~
IMAPSを有効にする。
#code(,type=configuration,~/.forward){{
~
#code(,type=configuration,/etc/dovecot/conf.d/10-master.conf){{
"|/usr/bin/maildrop"
+
service imap-login {
+
  inet_listener imaps {
+
    ssl = yes
+
  }
+
}
 
}}
}}
 

        

        
~
TLS関連の設定(抜粋、Let's Encrypt SSL/TLS証明書を使用)
次に``.mailfilter``を作成し、フィルタ・振り分けの設定を記述する。
+
#code(,type=configuration,/etc/dovecot/conf.d/10-ssl.conf){{
+
ssl_cert = </etc/letsencrypt/live/mail.example.net/fullchain.pem
+
ssl_key =  </etc/letsencrypt/live/mail.example.net/privkey.pem
+
ssl_protocols = !SSLv3 !TLSv1 !TLSv1.1
+
}}
+

         
+
#relevantdocs(参考)
+

         
+
-[[Securing Application 'X' with SSL/TLS in RHEL 'Y' ?:https://access.redhat.com/articles/1462183]]
+
--[[Securing dovecot with SSL/TLS on RHEL7:https://access.redhat.com/articles/1470523]]
+

         
+
#relevantdocs-end
+

         
+
その他要件に合わせて設定、詳細については省略。
+

         
 

        

        
-
#code(,type=configuration,~/.mailfilter){{
-
# maildrop.logに動作ログを出力する
-
logfile "$HOME/maildrop.log"
 

        

        
~
***Dovecot Sieve(dovecot-sieve)のインストールと設定
# Subjectヘッダに'Cron'という文字列が含まれている場合は
~
dovecot-sieveを使ってサーバーサイドでの振り分け・破棄等のフィルタリングを行う。 またdovecot-managesievedを使ってフィルタリングスクリプトを管理する。
# メールボックス'INBOX/Cron'に振り分ける
~

         
if (/^Subject:.*Cron/:h)
~
#code(sh,インストール){{
{
~
sudo apt-get install dovecot-imapd dovecot-managesieved dovecot-sieve
  to "$HOME/Maildir/.INBOX.Cron/"
+
}}
+

         
+
sieveプラグインを有効にする。 dovecot-ldaを設定する。
+

         
+
#code(,type=configuration,/etc/dovecot/conf.d/15-lda.conf){{
+
lda_mailbox_autocreate = yes    # 振り分け先のメールボックスが存在しない場合に自動的に作成する
+
lda_mailbox_autosubscribe = yes # 同様にメールボックスを自動的に購読(SUBSCRIBE)する
+

         
+
protocol lda {
+
  mail_plugins = $mail_plugins sieve
 
}
}
+
}}
 

        

        
~
dovecot-managesievedを設定する。
# それ以外のメールは'INBOX'に振り分ける
+
#code(,type=configuration,/etc/dovecot/conf.d/20-managesieve.conf){{
+
service managesieve-login {
+
  inet_listener sieve {
+
    port = 4190
+
  }
+

         
+
  service_count = 1
+
  :
+
  :
+
}
+

         
+
service managesieve {
+
  process_limit = 10
+
}
 
}}
}}
 

        

        
~
ローカル配送にdovecot-ldaを使用するようPostfix側の設定を変更する。
#relevantdocs(参考資料)
+

         
+
#tabpage(,システムユーザーに対して設定する場合)
+

         
+
#code(,type=configuration,/etc/postfix/main.cf){{
+
mailbox_command = /usr/lib/dovecot/dovecot-lda -f "$SENDER" -a "$RECIPIENT"
+
}}
 

        

        
~
#tabpage(,バーチャルユーザーに対して設定する場合)
-[[Postfix + Maildrop Howto:http://www.postfix.org/MAILDROP_README.html]]
~

         
-[[maildropfilter:http://www.courier-mta.org/maildropfilter.html]]
+
#code(,type=configuration,/etc/postfix/main.cf){{
+
virtual_transport = dovecot
+
virtual_mailbox_domains = mail.example.net
+
dovecot_destination_recipient_limit = 1
+
}}
+

         
+
#code(,type=configuration,/etc/postfix/master.cf){{
+
# dovecot-ldaの設定を追記する
+
dovecot   unix  -       n       n       -       -       pipe
+
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -a ${original_recipient} -d ${user}@${nexthop}
+
}}
+

         
+
#tabpage-end
+

         
+
#relevantdocs(参考)
+

         
+
-[[https://wiki.dovecot.org/LDA/Postfix]]
 

        

        
 
#relevantdocs-end
#relevantdocs-end
~

         
}}}
+
#remarks
+

         
+
フィルタリングスクリプトの編集は[[Thunderbird Sieve Extension:https://github.com/thsmi/sieve]]などを使って行う。
+

         
+
#remarks-end
+

         
+

         
+

         
+
**AWStats
+
#code(sh){{
+
sudo apt install awstats
+
}}
+

         
+
``/etc/awstats/awstats.conf``を編集する。 ``LogFile``を``/dev/null``にし、それ以外の項目は共通の設定ファイルとなるように構成する。
+

         
+
#code(,type=configuration,/etc/awstats/awstats.conf){{
+
LogFile="/dev/null"
+
LogFormat=1
+
SiteDomain="example.com"
+
DirData="/var/lib/awstats"
+
DefaultFile="index.html"
+
  :
+
  :
+
}}
+

         
+
次に、ドメイン別・サーバー別などに設定ファイルを作成し、各設定ファイルからは共通の設定を含む``awstats.conf``を読み込むようにする。  各設定ファイル名は``awstats.*.conf``とする必要がある。
+

         
+
#code(,type=configuration,/etc/default/awstats.www.example.com.conf){{
+
Include "/etc/awstats/awstats.conf"
+
LogFile="/var/log/nginx/www.example.com-access.log"
+
SiteDomain="www.example.com"
+
  :
+
  :
+
}}
+

         
+
#code(,type=configuration,/etc/default/awstats.mail.example.net.conf){{
+
Include "/etc/awstats/awstats.conf"
+
LogFile="/var/log/postfix/mail.example.net-access.log"
+
LogFormat="....."
+
SiteDomain="mail.example.net"
+
  :
+
  :
+
}}
+

         
+
``/etc/awstats``以下の設定ファイルを編集後、ログが読み込まれデータが正しく収集されるかテストする。
+
#code(sh){{
+
sudo -u www-data /usr/share/doc/awstats/examples/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl -confdir="/etc/awstats/"
+
ls /var/lib/awstats
+
}}
+

         
+
必要に応じてcron(``/etc/cron.d/awstats``)の設定およびHTTPサーバの設定を更新したのち、``http&#x3A;//&var{サーバ名};/awstats/awstats.pl?config=&var{設定ファイル名};``を開いて収集されたデータが表示されるか確かめる。
 

        

        
 

        

        
 

        

        
670,12 479,9
 
sudo apt install munin-node
sudo apt install munin-node
 
}}
}}
 

        

        
~
``/etc/munin/plugins``から必要なプラグインだけを残す。 あるいは必要なプラグインを追加する。
/etc/munin/pluginsから必要なプラグインだけを残す。
 
#code(sh){{
#code(sh){{
+
# 不要なプラグインを削除する
 
sudo unlink xxx
sudo unlink xxx
+

         
+
# 必要なプラグインを追加する
 
sudo ln -s /usr/share/munin/plugins/xxx
sudo ln -s /usr/share/munin/plugins/xxx
 
}}
}}
 

        

        
714,25 520,12
 

        

        
 

        

        
 

        

        
+
**Logwatch
+
#code(sh){{
+
sudo apt install logwatch
+
}}
+

         
+
テストした結果をroot宛にメールで送信する。
+

         
+
#code(sh){{
+
sudo logwatch --detail high --mailto root
+
}}
+

         
+

         
+

         
 
*その他
*その他
 
**.NET Core [#misc_dotnet-core-runtime]
**.NET Core [#misc_dotnet-core-runtime]
 
.NET Core Runtimeをインストールする。
.NET Core Runtimeをインストールする。
 

        

        
 
#code(sh){{
#code(sh){{
~
sudo apt install curl gnupg apt-transport-https
sudo apt install curl apt-transport-https
 

        

        
 
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
 
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
741,6 534,7
 
sudo apt update
sudo apt update
 

        

        
 
# 2018-05-03時点、NO_PUBKEYエラーが出る場合
# 2018-05-03時点、NO_PUBKEYエラーが出る場合
-
sudo apt install gnupg
 
sudo apt-key adv --keyserver packages.microsoft.com --recv-keys EB3E94ADBE1229CF
sudo apt-key adv --keyserver packages.microsoft.com --recv-keys EB3E94ADBE1229CF
 
sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893
sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893