tinydnsでSPFレコードを設定する

tinydnsは、小さく、信頼性の高いDNS権威サーバ/キャッシュサーバですは、開発がとまっているようで使っている人は少ないと思いますが、古いサーバーでこのDNSサーバーを利用している環境があって、そのサーバーに送信ドメイン認証のひと ...
mod_rewrite クエリー文字列でパーセントがあるエンコードされるのを避ける

「example.com/test.php?id=ID%2id1234」のようなクエリー付きのパラメータでmod_rewrite でリダイレクトをするときに「%」を含む場合に、「%2」が「%253」のように変更される場合があります
「[so:warn] module xxx is already loaded, skipping」のエラー【Apache】

Apacheは問題なく起動しているが、「/var/log/messages」を確認すると、「module cgi_module is already loaded, skipping」と表示されています。
$ sudo tail ...zabbix-agentのactive checkが失敗する

Zabbix 5.0 サーバーからログ監視をおこないたいので、アクティブチェックの監視項目を追加しましたが、アクティブチェックが有効にならずに、ログ監視ができません。
同じサーバー間のアクティブチェックは成功しますが、別の ...
監視ツール NetDataアンインストール

リアルタイムでパフォーマンスがモニタリングできる「NetData」ですが、簡単にインストールできて見た目も綺麗なので一時的には使用していましたが、その後、munin , zabbix などの監視ツールに移行したので使用していませんでし ...
サポート終了の CentOS 6 でEPELリポジトリを対応する

CentOS 6は、サポートが終了(2020-11-30)していて、yumコマンドを使うとエラーになります。以前の記事で「CentOS 6でyumコマンドエラー」で、「CentOS-Base.repo」の方は修正しています。
root権限でrsyncを実行する

webディレクトリがあるディレクトリ等でrysncコマンドを実行すると所有者権限でコピーできないディレクトリやファイルがあったりします。同一サーバー内だとroot でrsyn ...
lsコマンドでタイムスタンプ書式で表示する

lsコマンドで、「ls -l」 と入力するとファイル・ディレクトリのタイムスタンプが表示されますが、更新された月の表示が英語の略式でわかりにくかったり、昔のファイルの場合は時間が表示されなかったりするので、「2021/10/26 10 ...
vault.centos.orgに変更したレポジトリで、yumコマンドでエラー

Let’s EncryptのCA証明書の期限切れで、CentOS 6でも ...
PostgreSQL(psql)の接続と切断

普段はMySQLを使用しているので、PostgreSQLとはDBへの接続方法やDBの選択や終了などを違うので簡単にまとめてみました
psqlへの接続PostgreSQLへの ...
PostgreSQLで、データベースの一覧を確認する

久しぶりにPostgreSQLを触って、データベース一覧を表示しようと思ったら、以下のようにエラーになりました。
MySQLとコマンドが違うので、「show databases」と叩くと、「ERROR: unrecognize ...
grep で単語単位で一致した行を抽出する方法

grepで検索する単語で一致した行を抽出する時に、以下のようなテキストファイルがある場合、「192.168.0.1」でgrepすると「192.168.0.1、192.168.0.101」等の行も抽出されます
$ cat test ...grep で完全一致した行を抽出する方法

grepで検索文字と完全一致した行を表示するには「x」のオプションを利用します。
manページで確認すると、以下のような説明になります
-x, –line-regexpパターンが行全体とぴったりマッ ...
phpで「extension」の場所を確認する方法

php.iniで拡張パッケージを指定するディレクトリである「extension_dir」設定ですが、「extension」の場所がわからずに少し困りましたが、「phpinfo」関数で確認できます。
WEBで「phpinfo ...
LVMで、「/home」を削除して「/」の領域を拡張したい

OSインストール時に、DISKのパーティション設定の時にデフォルトのままでインストールしてしまい、下記のように「/」の容量が小さくて、「/home」の容量がすごく大きくなった場合、「/home」を領域を削除して「/」に全て領域を使用し ...