ソフトがアップデートしているかチェックするスクリプト

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

diff コマンドでファイルを比較できますが、下記のように標準出力だと少しわかりにくいです。
構文:diff ファイル1 ファイル2
$ cat test1.txttest1test2test3$ cat test2 ...特定のIPアドレスのみWordPress管理画面にアクセスを許可する方法

WordPressのセキュリティ対策で管理画面へアクセスは、特定のIPアドレスのみアクセスできるように設定していますが、WordPressの ...
RHEL系(CentOS) にFTPクライアントをインストールする

お客様からプログラムからFTPクライアントを使用したいが、インストールされていないと報告がありました。「vsftpd」をインストールして起動しているので、FTPクライアントも一緒にインストールされていると思いましが、/usr/bin ...
userdel でユーザー削除時にホームディレクトリも削除する

Linuxでユーザーを削除するときは、「userdel」のコマンドを削除しますがこのコマンドで何もオプションを使用しない場合は、ホームディレクトリやメールスプールのディレクトリが残ってしまいます
# testユーザーを作成します ...munin でrrdcachedを使い負荷の軽減する

CentOS 6にインストールしているmuninの負荷が高いんので、rrdcachedを利用して負荷を下げるようにしました。
インストールしたCentOS 6.xに ...
yum でインストールで「Protected multilib versions・・・」のエラー

yumで「rrdtool」をインストールしようとしたら下記のエラーがあがり「rrdtool」でインストール出来ませんでした。
$ yum install rrdtoolProtected multilib versions: r ...CentOS xfsでフォーマットしてディスクを追加する

使用しているクラウドサーバーでディスクを増設する機会があり、その際にCentOS7のデフォルトのファイルシステムとなっているxfsのファイルシステムで追加しました
ディスクを追加したサーバーですが、GMOクラウドで運用して ...
シェルスクリプトで変数が空文字であるか調べる

シェルスクリプトで変数に値が入っているか調べるには、testコマンドやif分で変数の値を比較して調べることができます。
testコマンドで変数が空文字であるか調べるtestコマンド ...
Nginx + phpMyAdminをインストールする

NginxサーバーにphpMyAdminをインストールする方法を説明します。インストールするにあたって下記のパッケージのインストールされている環境として説明します
nginxphp
php-fpm
mys ...
Ubuntuでuseaddでホームディレクトリができない

最近、UbuntuのOSをインストールして使う機会があって数年ぶり触ってみましたが、Redhat系と違い戸惑うことが多かったので、初歩的ですが躓いた箇所をブログに上 ...
curlコマンドでファイルをアップロードする

CUI環境で特定のURLでファイルをアップロードする方法にはいくつかありますが、Wgetだとうまく動かなかったので、Curlコマンドならファイルのアップロードできまし ...
CentOSにwordpressインストール

BLOGを作れるWordPressをCentOSにインストールする機会があったのでその方法を紹介します。WordPressの構築の要件は「Apache」・「MySQL(MariaD ...
OPENSSHでchroot環境を作る

OpenSSHを利用してSFTP接続で、特定のユーザーでchroot環境を作成してみました。ネットの情報だと簡単に作れると思ったけど手間取りました。
chrootできる ...
logmonでログ監視

ログ監視は、zabbix, nagios ,swatch等を利用すると導入できますが、設定が簡単ではなかったり導入を躊躇するケースがあると思います。
logmonはIBMが作成したログ監視ツー ...