2018年9月2日日曜日

ubuntu17.10以降のnetwork設定

2018 Sep. 02.

https://qiita.com/zen3/items/757f96cbe522a9ad397d より

設定変更

/etc/netplan/xxx.yamlを編集する。
 network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.1.70/24]
      gateway4: 192.168.1.1
      nameservers:
        addresses: [192.168.1.1, 8.8.8.8, 8.8.4.4]

設定反映

$ netplan apply

nfsサーバーインストール

2018 Sep. 02.

# apt install nfs-kernel-server

/etc/exports設定
  /DIR 192.168.1.0/24(rw,sync,no_root_squash,no_subtree_check)

ファイアウォール設定
  portmapper: 111/tcp, 111/udp
  nfs: 2049/tcp, 2049/udp

  # ufw allow proto tcp from 192.168.1.0/255.255.255.0 to any port 111
  # ufw allow proto udp from 192.168.1.0/255.255.255.0 to any port 111
  # ufw allow proto tcp from 192.168.1.0/255.255.255.0 to any port2049
  # ufw allow proto udp from 192.168.1.0/255.255.255.0 to any port2049
  # ufw reload

HDDパーティションのUUIDの確認とUUIDを使ったマウント

2018 Sep. 02.

ハードディスクパーティションのUUID確認
# blkid /dev/sda1

パーティションのマウント
# mount UUID=YOUR-PARTITION-UUID /DIR
  UUIDを引用符で囲まない。


2018年9月1日土曜日

android emulatorをqemu kvm で動かす

2018 Sep. 02.
2018 Sep. 01.

・# apt install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils virtinst cpu-checker

  インストール結果確認
   # kvm-ok
   INFO: /dev/kvm exists
   KVM acceleration can be used

・kvmグループにユーザーを追加する

・# chown USER:kvm /dev/kvm
 もしくは
 # chmod a+x /dev/kvm

apt パッケージ更新禁止設定

2018 Sep. 01.

dpkg –set-selections での設定
 https://server-setting.info/debian/debian-no-apt-upgrade.html

pinでの設定
 https://server-setting.info/debian/debian-no-apt-upgrade.html

 https://yoheikikuta.github.io/ubuntu-kernel/

apt-mark hold での設定
 https://teratail.com/questions/108796

xfce4 ウィンドウを前面に出さずにマウスでスクロール可能で、ウィンドウをクリックしたらフォーカスを得る設定

2018 Sep. 01.

メニュー→設定→ウィンドウマネージャー→フォーカス→
フォーカスモデル→「クリックでフォーカス」にチェックを入れる

メニュー→設定→ウィンドウマネージャー→フォーカス→
フォーカスで前面に出す→「ウィンドウがフォーカスを取得した場合自動的に前面に出す」にチェックを入れる

systemdによる時刻合わせ

2019 Jun. 22.
2018 Sep. 01.

NTPクライアント機能を有効化
# timedatectl set-ntp true

設定ファイル
/etc/systemd/timesyncd.conf
  NTP=ntp.nict.jp
  FallbackNTP=ntp.ubuntu.com  # 予備サーバー


 
再起動
# systemctl restart systemd-timesyncd.service
 
確認
$ systemctl -l status systemd-timesyncd
もしくは 
$ timedatectl