スキップしてメイン コンテンツに移動

投稿

2月, 2016の投稿を表示しています

Corosync と Pacemaker でクラスタ化されたサーバのメンテナス

普通に監視対象サービスを停止しちゃうとフェイルオーバーするので、 それを回避する方法。 1.メンテナンスモードを有効にする。 crm configure property maintenance-mode=true 2.必要な作業を行う。 サービス停止してもフェイルオーバーしないので、設定ファイルいじったりできる。 停止したサービスは、起動してから次の手順へ。 停止は crm resource stop リソース名 開始は crm resource start リソース名 再起動は crm resource restart リソース名 ※その他、crmコマンドの詳細は、こちらのサイトがわかりやすかったです。 CRM CLI (command line interface) tool 3.メンテナンスモードを終了する。 crm configure property maintenance-mode=false 以上!

systemctl と chkconfig と service の使い方まとめ

サービス一覧 # chkconfig --list # systemctl list-unit-files -t service 自動起動設定 # chkconfig hoge on # systemctl enable hoge.service 自動起動解除 # chkconfig hoge off # systemctl disable hoge.service サービス起動 # service hoge start # systemctl start hoge.service サービス状態確認 # service hoge status # systemctl status hoge.service サービス停止 # service hoge stop # systemctl stop hoge.service

CentOS 7 ClamAV インストール

yum install epel-release yum install clamav clamav-update vi /etc/freshclam.conf ------------------------------------------------------------ #Example ------------------------------------------------------------ /etc/sysconfig/freshclam ------------------------------------------------------------ #FRESHCLAM_DELAY=disabled-warn # REMOVE ME ------------------------------------------------------------ vi /etc/cron.weekly/clamscan ------------------------------------------------------------ #!/bin/bash PATH=/usr/bin:/bin # clamd update yum -y update clamav clamav-update > /dev/null 2>&1 # excludeopt setup excludelist=/usr/local/etc/clamscan.exclude if [ -s $excludelist ]; then for i in `cat $excludelist` do if [ $(echo "$i"|grep \/$) ]; then i=`echo $i|sed -e 's/^\([^ ]*\)\/$/\1/p' -e d` excludeopt="${excludeopt} --exclude-dir=$i" else excludeopt="${excludeopt} --exclude=$i" fi ...