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

シャットダウン時の後処理 (shutdown)

# vi /etc/systemd/system/drop.service [Unit] Description= stop httpgwd DefaultDependencies=no Before=shutdown.target RefuseManualStart=true ...