mailコマンドでメール送信できない「send-mail: Cannot open mail:25」

特定のサーバーでメールが届かないことがわかり、サーバーにログインしてmailコマンドでメール送信すると下記のようにエラーになります
$ echo "test" | mail -s "test" hoge@example.com$ ...Zabbixで最新バージョンがリリースされているか確認方法

サーバーの運用管理でZabbixを利用しています。
脆弱性対応や機能追加等で定期的にZabbixがアップデートされていますが、その都度、dnf updateコマンド ...
Squidでhostsファイル(/etc/hosts)の変更を反映させる方法

開発環境でSquidを使用しています。
新規の開発環境のドメインを「/etc/hosts」ファイルに追加しましたがsquid経由でアクセスすると、開発環境では ...
dnfコマンドでインストールしたパッケージを確認する

自分の環境ではパッケージソフトの更新は、dnfコマンドの自動更新で実施しています。更新されたパッケージ一覧はcockpit経由でメールで通知がきて確認できます。 ...
ソフトがアップデートしているかチェックするスクリプト

以前の記事で「Let’s EncryptのSSL証明書を有効にしたCockpitで証明書エラー」で、dnf updateでパッケージを更新したら、cockpitで使用しているSSL証明書が書き換わり証明書エラーとなったケースがありまし ...
diffコマンドの表示を見やすくする

diff コマンドでファイルを比較できますが、下記のように標準出力だと少しわかりにくいです。
構文:diff ファイル1 ファイル2
$ cat test1.txttest1test2test3$ cat test2 ...CentOS9 で、PHP8.2のモジュールに切り替えでエラー

CentOS 9でPHP 8.1から8.2にバージョンアップしよう ...
Nextcloudをアップデート後エラー「One or more mimetype migrations are available.~ 」

Nextcloudを30.0.1 にアップデートして管理画面にアクセスすると下記のエラーが表示されました
One or more mimetype migrations are available. Occasionall ...
RHEL系で時刻同期の確認【chronyc】

RHEL7 以降、NTPサーバーは「chronyc」になっています。時刻同期の状況を確認するには「chronyc sources」とコマンドを叩くと以下のように時刻同期の状況が確認できます
$ chronyc sourcesMS ...タイムゾーンを日本標準時(JST)に変更 【timedatectl】

インストールした直後のサーバーだとdateコマンドで日付を確認すると、時間が日本の標準時刻じゃなくてUTC(協定世界時)になっている場合があります。
OSインストール時にタイムゾーンを設定す ...
シェルスクリプトで使うif文の条件式について

シェルスクリプトを作成するときに、文字列や数値の比較して条件分岐する際にif文を利用するケースがあります。その際に条件を比較する時に条件式を使いますが、いつも条件式の条件を忘れてしまいその都度に過去のスクリ ...
作成したシェルスクリプトをCronで実行するとパスが通っておらず

Cronでシェルスクリプトをコマンドのパスをフルパスで記述していない場合は、パスが通っておらずに作ったシェルスクリプトが思っていない動作になる場合があります。C ...
grepコマンドで終了ステータスコード(grep -p ~)を取得

grepコマンドで特定の文字を含む場合に、下記のようにgrepコマンドとwcコマンドを利用して検索結果の行数を取得してif文で分岐をよく使っています
#!/bin/bashcnt=$(grep ERROR test.log | ...dnfコマンドで「libc.so.6」が必要とされていますのエラー

「fping」をdnfコマンドでインストールしようとすると、「nothing provides libc.so.6(GLIBC_2.34)(64bit) needed by fping-5.1-1.el9.x86_64 from za ...
Zabbix 6.4 から Zabbix 7 にバージョンアップ

2024 年 6 月 4 日にZabbix 7がリリースされたましたが、リリース後にバージョンアップを考えていましたが時間が取れたので、Zabbix 6.4 から Zabbix 7 にバージョ ...