ownCloudでメンテナンスモードのOff / On の切り替え方

ownCloudでメンテナンスモードをオン/オフにする方法は、該当サーバーにログインして、CUI環境よりコマンドラインを使用して実行します。
ownCloudがインストールされているディレクトリに移動して、occコマンドのメン ...
cronで曜日を指定してスケジュールを設定する方法【Linux】

Cronの基本フォーマット(書式)は、以下の形式で記述されます
Cronの編集方法は、と入力すると、実行ユーザーのcronが編集できます
$ crontab -e設定したcronの確認...
PHP OPcacheのキャッシュサイズを確認する方法

PHP OPcacheのキャッシュサイズを確認する方法はいくつかありますが、2つほどその方法をご紹介します。
PHPスクリプトで確認するOPcacheの状態を確認するには、opca ...
Squidでhostsファイル(/etc/hosts)の変更を反映させる方法

開発環境でSquidを使用しています。
新規の開発環境のドメインを「/etc/hosts」ファイルに追加しましたがsquid経由でアクセスすると、開発環境では ...
Nextcloudをアップデート後エラー「One or more mimetype migrations are available.~ 」

Nextcloudを30.0.1 にアップデートして管理画面にアクセスすると下記のエラーが表示されました
One or more mimetype migrations are available. Occasionall ...
タイムゾーンを日本標準時(JST)に変更 【timedatectl】

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

シェルスクリプトを作成するときに、文字列や数値の比較して条件分岐する際にif文を利用するケースがあります。その際に条件を比較する時に条件式を使いますが、いつも条件式の条件を忘れてしまいその都度に過去のスクリ ...
特定のIPアドレスのみWordPress管理画面にアクセスを許可する方法

WordPressのセキュリティ対策で管理画面へアクセスは、特定のIPアドレスのみアクセスできるように設定していますが、WordPressの ...
Nextcloudのログの場所

Nextcloudの管理画面にログインするとログファイルに過去のエラーがあるとの警告がでるケースが多くなってきました。過去の分で修正しているので気にしなくてもいいですが、Nextcloudのログファイルはどこにあるのか気になったの調べ ...
Nextcloudをアップデート後エラー「データベースにいくつかのインデックスがありません 」

Nextcloudを29.0や30.0.1にアップデート後に管理画面にログインすると以下のエラーが表示されます。
・Nextcloud 29.0にアップデート時のエラー
「データベースにいくつかのインデックスが ...
gz形式のファイルを解凍しないで中身を確認する

ローテーションしているログファイルで、古いログはgz形式で以下のように圧縮している場合があると思います。
$ sudo ls/var/log/mariadb/mariadb.log mariadb.log-20230922.gz ...lsコマンドで、容量が大きいサイズ順にソートする方法

容量関係でついでですが、lsコマンドで容量が大きい順にソートするのは「-S」オプションを使用します
この「-S」コマンドは、ファイルやディレクトリを容量の大きい順にリ ...
CentOS系でファイル名の文字を置換してファイル名を変換

CentOS系で、「test_01.txt」等のファイルが有り「test01.txt」の用に「_」を省略したいときがあります。「mv」コマンドでもで ...
Linux の起動時間を調べる

CentOS、Ubuntuのサーバーが起動した時間を調べる方法はいくつかあります
uptimeコマンドを使用するuptimeコマンドを使用するとサーバーが起動してからの時間を確認できます。下記では、「up 1 day, 3 ...
シェルスクリプトでコマンドの結果を変数に代入する

シェルスクリプトで、コマンドの実行結果を変数に代入したいケースがあります。代入する方法は下記のようなコマンド代入できます。
結果を代入したいコマンドをバッククォート(`)で囲むか、$()の括弧の部分にコマンドをいれるかのどちら ...