/var/log/messages で変更後のホスト名が反映されない場合の対処方法

ホスト名を変更後に「/var/log/messages」に出力されるホスト名は、変更前のホスト名がなっている場合の対処方法を紹介します
現在のホスト名が「www01」の場合で、ホスト名を「web01」に変更した場合に「/v ...
シェルスクリプトで小数点以下を四捨五入する方法

シェルスクリプトで小数点以下を四捨五入する方法ですが、awk コマンドを利用すればできます。
awkコマンドでは、「printf(“%d\n”,x)」とすれば整数として出力できるので、小数点以下を切 ...
SSL証明書の有効期限をメールで通知するスクリプト

無料のSSL証明書の「Let’s Encrypt」を利用しています。有償のSSL証明書と比べると有効期限が短いので更新を忘れそうなので、SSL証明書の有効期限をチェックしてその期限をメールするスクリプトを作成しました
ce ...
MySQLTunerを利用して、MariaDB パフォーマンスのチューニング

DBのチューニングのツールで「MySQLTuner」があります。DBのパラメータの問題点を診断してくれるツールでこれをインストールしてMariaDBのパラメータの値を見直して ...
historyコマンドの履歴を削除する方法

コマンドの履歴を表示する「history」コマンドがあります。コマンドで引数にパスワードを付きのコマンドを利用したり、間違った内容をペーストしたりして「history」の履歴したい場合あるかと思います。個 ...
シンボリックリンクの作成と削除【CentOS】

Linuxでは、シンボリックリンクを作成するには「ln」コマンドを使用します。「-s」のオプションでハードリンクの代わりにシンボリックリンクを作成するように指定します
書式: ln -s
CentOS 7, CentOS 8 に「pstree」をインストールする

CentOS 7, CentOS 8で最小インストールすると「pstree」がインストールされていません。「pstree」をインストールするには「psmisc」のパッケージをインストールすると下記の ...
PostgreSQLのバックアップとリストア(pg_dump・pg_restore)

PostgreSQLのデータベースをバックアップするには「pg_dump」を使用して、リストアする時は「pg_restore」を利用してバックアップ及びリストアします
pg_du ...PostgreSQLのバックアップとリストア 上書きできずエラー

サーバーの移設の話で、移行先のPostgreSQLのDBに移行前のDBを反映しようと思ったら、下記のエラーでレストアのエラーになります
# 移行前のサーバーよりDBの ...CentOS 8 WordPress インストール

CentOS 8で稼働しているサーバーでWordpressを利用できるようにします、インストールする環境は以下の ...
CentOS 8 初期設定(Vultr)

Lightsail のVPSで稼働していたこのWEBですが、CentOS8がリリースされてもLightsail では使えないので、同じ月費用で利用できるVultrに移行しました。Vultrは海 ...
Apache 2.4 で「client denied by server configuration: 」のエラーがログに出力される

CentOS 6で動いていた、Apache 2.2を、CentOS 7のApache 2.4に移行したサイトでエラーログを確認すると以下のようなエラーが頻繁に出力されていました
AH01797: client denied ...PostgreSQL データの格納場所を変更する

下記の環境で、PostgreSQLのデータベースの格納場所をデフォルトから違う場所に変更します。
デフォルトの「/var/lib/pgsql/」があるディレクトリの ...
Let’s Encrypt証明書発行から削除する方法

発行したLet’s Encrypt証明書を削除するには、以下のディレクトリにあるファイルを削除すれば、証明書が削除することができます
/etc/letsencrypt/arch ...openssl コマンドで SSL証明書の有効期限を確認する

ブラウザでSSL証明書を確認するのはブラウザのURL付近の鍵マークをクリックすれば確認できますが、LinuxのCUI環境だとブラウザも使えないのでSSL証明書の有効期限を確認するには「op ...