cron を10分おき 2時間おきに実行する方法

cronで5分おき、10分おき、15分おき、等の○分おき、cronを実行する方法です
$ crontab -e# 5分おきに実行*/5 * * * * command# 10 ...WordPress管理者のパスワード変更 【phpMyAdmin】

wordpressの管理画面のパスワードを忘れた場合の変更の方法を紹介します。通常であれば、パスワードを忘れた場合は登録しているメールアドレスでリセットできます ...
ApacheでCGIを動かす

最近、滅多に使うことがなくなったCGIの設置依頼が久しぶりに来ました。CGI設定て何年ぶりだろう。
お客様ではWor ...
無料のSSL「Let’s Encrypt」のインストール(CentOS 6.x)

無料で利用できるSSL署名書のLet’s Encryptを利用してSSL化をします。CentOS 7.xでは、Pythonのバージョンが2.7以上ですので「無料のSSL証明 ...
logmonでの除外キーワード

以前の記事「logmonでログ監視 」で「logmon」とのツールを紹介しましたが、このログ監視ツールで指定した文字を除外にできるかどうかを調べました。
結論としては、「logmon」 ...
MariaDB、MySQLでユーザー一覧を確認する

MariaDB、MySQLで設定しているユーザーを確認するコマンドです。MySQLとMariaDBとも共通で「select Host, User, Password from mysql.user;」で確認ができます。
Mari ...SSL/TLSの暗号化通信をTLS1.2 のみに制限する

お客さんが使用しているカートシステムで、セキュリティを強化するために、インターネット通信で使用する暗号化方式「TLS 1.2」のみして欲しいて要望があったので、Apacheを ...
ファイルのタイムスタンプをtouchコマンドで変更する

ファイルのタイムスタンプを指定した時間に変更するには、「touch」コマンドを使用すると変更できます。
あまりタイムスタンプを変更する必要はないかと思いますが、特定の日数を経過したフ ...
リモート先のファイルがあるないかを確認する

リモート先のサーバに特定のファイルがあるかどうか確認する必要があったので、その方法を調べてみました。
SSHでリモート先でlsコマンドを叩きます、その結果を変数に代入します。ファ ...
コマンドの結果を、for 文で処理する

lsの結果を変数に代入して、その変数をfor文で処理する方法を初回します。以下ではFindの結果をFor文で処理しています
#!/bin/bashflist=`find/etc/httpd/ ...findで古いファイルを削除・移動・圧縮する方法

findとxargsを使用して、古いファイルを削除・移動・圧縮する方法を紹介します。個人的にはログファイル等をメンテナンス時によく使うコマンドです。
findで、n日より古いファイルを削除する特定の日数以上のファイルを「- ...
grep の結果でファイル名のみ表示する

grepで検索した結果で、ファイル名のみ表示したい場合は「grep -l pattern file1 file2…」とすれば、ファイル名のみ表示します
$ grep ...grepでエスケープをしないで検索する

grepでは正規表現で使用する特殊な文字(\、、^、$、*、.など)は、バックスラッシュ(\)を付けて検索する必要があります。1文字ぐらいなら問題ありませんが複数ある場合は手間になります ...
phpMyAdminにアクセスすると「You don’t have permission to access /phpMyAdmin/ on this server.」

yumでphpMyAdminをインストールしてアクセすると「You don’t have permission to access/phpMyAdmin/on this server.」と ...
Apache 2.4のセキュリティを考慮した初期設定

CentOS7から、Apacheのバージョンは2.4となり、Apache2.2と設定箇所が違う箇所が多くなっています。初期設定でもApacheは稼働しますが、セキュリティを考慮して少し設定変更をして稼働し ...