2017年4月26日水曜日

Windows2012server NTP 時刻がずれる

Windows2012より、NTPの同期間隔が1週間と長い為、時刻がずれる。


同期間隔を1日にする
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\NtpServerの末尾を0x1

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient\SpecialPollInterval
を86400

2017年4月10日月曜日

TIME_WAITが残る

■CentOS7の場合。
# vi /etc/sysctl.conf
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_fin_timeout = 5
net.ipv4.tcp_tw_reuse = 1

tm_recycleは、悪影響もありそうなので、0のまま。

# sysctl -p  で反映させる。


# netstat -anpto  で確認


■Windowsの場合
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters 

TcpTimedWaitDelay(DWORD)を追加して値を代入

2017年4月4日火曜日

CentOS サービス自動起動

/etc/systemd/system/httpgwd.service
[Unit]
Description=HTTP Proxy deamon
After=network.target

[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/usr/local/sbin/httpgwd 80 192.168.1.1:80
 
[Install]
WantedBy=multi-user.target



CentOS7のサービス確認
systemctl list-unit-files

2017年3月30日木曜日

CentOS7でNTP設定

# yum -y install chrony
chrony-2.1.1-4.el7.centos.x86_64

# vi /etc/chrony.conf

#server 0.centos.pool.ntp.org iburst  
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server 192.168.25.111 iburst
port 0
makestep 1.0 3                                 # 10 3になっていないかを確認。

※ port 0 は、クラアイントとして動作、(port 123のListenをしない)
※ makestep 1.0.3  一秒以上の差が3回続いたら、stepモードで調整。(通常はslewモード)


NTPD停止
# systemctl stop ntpd
# systemctl disable ntpd

Chronyd起動
# systemctl enable chronyd
# systemctl restart chronyd

時刻同期確認
# chronyc sources
#  chronyc tracking

手動で同期
# chronyc -a makestep

2017年3月24日金曜日

vmwareからkvmに変換

vmwareフォルダで、
 
# qemu-img convert -p -f vmdk -O raw *-s???.vmdk disk.img
 
新しい仮想マシーンを作成し、「既存ディスクイメージをインポート」

2017年3月22日水曜日

windowsでポートフォワーディング

 これは便利

> netsh interface portproxy add v4tov4 listenport=80 listenaddr=192.168.6.199
connectport=80 connectaddress=192.168.25.199


確認
> netsh interface portproxy show all

削除
> netsh interface portproxy delete v4tov4 listenport=80
 

2017年3月14日火曜日

VMwareのゲストOSブート時にエラー。

VMwareのゲストOSブート時にエラー。

no valid rapl domains found in package 0

実害はなさそう。

でも、気持ち悪いので、

# vi /etc/modprobe.d/blacklist.conf
blacklist intel_rapl

NEXTJS PWA化

$ cd frontend $ npm install @ducanh2912/next-pwa $ vi next.config.ts<<__EOF__ import withPWAInit from "@ducanh2912/next-pwa"...