Apache起動時に「Could not reliably determine the server’s fully qualified domain name」のエラー

Linuxで2つの時刻の引き算して時刻を計算する

ある時刻から今の時刻を引き算して起動している時間を求める方法を紹介します。
運用では通常はすぐに終了するプロセスが、10分以上動いているアラート上げるなどの運用で使う機会も考えられま ...
PSコマンドで起動した時間順にソートする

以前にPSコマンドの記事で「PSコマンドでプロセスの起動時刻を調べる」を書きましたが、サーバを運用していると起動時刻の古い順番でソートしたいケースがあったのでその方法を調べました。 ...
makeコマンドのコンパイルを高速にする

makeコマンドで「-j」のオプションを使用すると、同時に実行できるジョブ(コマンド)の数を指定できるようになります。このオプションを使用するとmakeコマンドを並列で複数、 ...
MySQL-MHAを設定する

MySQL-MHAは、MySQLでレプリケーション構成時にMasterサーバが障害等で停止した場合に、自動的に自動的SlaveサーバーをMasterサーバに昇格してのダウンタイムで短くするツ ...
MySQLのレプリケーション設定

MHAを構築してみようと思い、その為にはMySQLのレプリケーション環境が必要なのでMaster、SlaveでのMySQLレプリケーション環境を構築しました。その際の作業メモです
CentOS manコマンドを日本語表示にする

Manコマンドの出力が英語表記の場合だと、わかりにくいので日本語表記の方法を紹介します
日本語のmanページをyumでインストール日本語で作成されているManページをyumでインストールしま ...
pacthコマンドの当て方・適用方法(Linux)

Apacehの脆弱性の関係でPatchを当てたのですが、久しぶりにPatchコマンドを使うと「–p」のオプションの使い方が忘れていたので備忘録としてメモしておきます
Patchの「-p」 ...ユーザーをグループに追加する方法(usermod -aG )

Linuxでユーザーを特定のグループに追加する場合は、「usermod」を使いますが、このコマンドでオプションを間違うと思っていたようにグループ追加ができない場合があります。
シェルスクリプトでシンボリックリンクか確認する方法

以前に「シャルスクリプトでファイル・ディレクトリ有無の確認方法「if文」 」と記事を書きましたが、確認する先がシンボリックリンクだとちゃんと動かなかったのでif文でシンボリックリンクの場合の扱いをまとめました
シンボリックリンク ...MySQLでCSV出力をするとエラーになる場合

PHPで動いているWEBシステムがありそのシステムの移行作業を実施する案件がありました。
移行先のサーバで動作確認をおこなっていると、 ...
grep でAND検索とOR検索をする方法

grepで複数の文字列を検索する場合ですが、「-e 検索する文字列」とすればOR検索ができます
書式:grep -e 【検索文字列】 -e 【検索文字列】 【ファイル名】
wgetでBasic認証があるページにアクセスする方法

前回に続いて「wget」のTIPSです。Basic認証等のにユーザー認証があるページにwgetでアクセスする場合は下記のオプションが必要となります
書式:wget –http-user=【ユーザー名】 R ...
wgetでファイル名を指定してダウンロード

wgetでファイルやHTMLファイルを取得する場合ファイル名を指定したり保存先を指定してダウンロードしたい場合があると思います。
その場合はオプションで「-O」を使用すれば ...
vimでスラッシュ(/)を含む場合の置換

昔作ったスクリプトで「/home/admin/www1/backup/」にバックアップファイルをコピーするスクリプトがあってディレクトリ構成が変わって「/home/admin/bac ...