Boot CampでWindows・MacOSを起動を切り替える方法

Boot Campを使用しているMacで、Windows・macOSを起動を切り替える方法を紹介します。たまにしかWindowsを起動しないのでよく忘 ...
コマンドの結果を、for 文で処理する

lsの結果を変数に代入して、その変数をfor文で処理する方法を初回します。以下ではFindの結果をFor文で処理しています
#!/bin/bashflist=`find/etc/httpd/ ...findで古いファイルを削除・移動・圧縮する方法

findとxargsを使用して、古いファイルを削除・移動・圧縮する方法を紹介します。個人的にはログファイル等をメンテナンス時によく使うコマンドです。
findで、n日より古いファイルを削除する特定の日数以上のファイルを「- ...
grep の結果でファイル名のみ表示する

grepで検索した結果で、ファイル名のみ表示したい場合は「grep -l pattern file1 file2…」とすれば、ファイル名のみ表示します
$ grep ...grepでエスケープをしないで検索する

grepでは正規表現で使用する特殊な文字(\、、^、$、*、.など)は、バックスラッシュ(\)を付けて検索する必要があります。1文字ぐらいなら問題ありませんが複数ある場合は手間になります ...
PHP等のURLパラメータでIP制限やBASIC認証を設定する

ApacehでIP制限をしているページがあり、そのページにアクセスがある場合、特定のパラメータを付きだとIP制限をせずにアクセスしたいって要望があ ...
「Directory」, 「Location」 が.htaccessでは使えない

Apacheで「test」ディレクトリだけBASIC認証したいって要望があり、その際に「.htaccess」で記述したい事なので、「.htaccess」に<Directory&g ...
エラーCentOS 7で「systemd: Unit kdump.service entered failed state」の

KAGOYA CLOUDのVPSサーバーで、突然、再起動がかかり起動時に「systemd: Unit kdump.service entered failed state」のエラーが出 ...
LibreOfficeの日本語化(MacOS)

macOSでOffice系ソフトは無料の「LibreOffice」を使用しています。Office系のソフトを使う場合は、基本的にWindowsで編集などおこない、macOSでは閲覧と簡単な ...
phpMyAdminにアクセスすると「You don’t have permission to access /phpMyAdmin/ on this server.」

yumでphpMyAdminをインストールしてアクセすると「You don’t have permission to access/phpMyAdmin/on this server.」と ...
Apache 2.4のセキュリティを考慮した初期設定

CentOS7から、Apacheのバージョンは2.4となり、Apache2.2と設定箇所が違う箇所が多くなっています。初期設定でもApacheは稼働しますが、セキュリティを考慮して少し設定変更をして稼働し ...
CentOS 6.x に、Apache2.4とPHP 5.6をインストールする

CentOS6系では、yumでインストールするとApache 2.2系がインストールされます。これをApache2.4系をインストール手順を紹介します。
作業の流れとしては ...
Apache起動時に「Could not reliably determine the server’s fully qualified domain name」のエラー

DNS 逆引き設定【さくらクラウド】

さくらクラウドにMailサーバを移設する話があってサーバは構築しましたが、一部のお客様からメールが届かないって話になりました。いろいろ調べてみると「逆引き出来ないメールサーバからのメールを拒 ...
MacOSで応答しないアプリケーションの強制終了の仕方

使用しているアプリケーションがハングアップして応答しない場合は、Windowsでは「Ctrl」+「Alt」+「Delete」を押してからタスクマネージャーでプロセスを終了します。
mac ...