Ubuntu でプロキシサーバー(squid)のインストール

ubuntu 16.04にプロキシサーバーとして機能する「squid 3.5」をインストールします。プロキシサーバーに接続する際ですが、BASIC認証を利用しユーザー名と ...
Linux でOSのバージョン、カーネルのバージョンの確認方法

Redhat系のCentOSで、OSのバージョンを確認するには、「/etc/redhat-release」をみると確認できます
$ cat/etc/redhat-releaseCentOS Li ...MacBookのバッテリー状態を確認する方法

2014年のMacBook Proをを所有して、3〜4年使用しています。メインはACアダプターに繋げての利用ですのでバッテリーはあまり劣化していないと思うのですが、実際にどのくらい充電されて ...
PHP Warning: Module ‘mbstring’ already loaded in Unknown on line 0 エラー

最近、PHPのプログラムの編集作業があって久しぶりにPHPのプログラムを修正してテストすると、以下のようなエラーがでました。
$ php test_sftp.phpPHP Warning: Module 'mbstring' a ...ownCloud手動アップデート (9.1.x から 10.x)

ownCloudのバージョンが9系のまま使用していましたが、Windowsクライアントを最新にするとエラーみたいのが出てサーバー側を最新にするような感じのメッセージがでるようになったの ...
シェルスクリプトでwhile内のでsshコマンドを使用すると1回しか処理されない

シェルスクリプトでwhile文を利用して、そのループ処理内にsshコマンドを使用するとループ処理されずに1回のみとなる場合の対処方法です
下記のシェルスクリプトでは、LIST_FILE=/home/admin/list.t ...
macOSでログイン時自動起動するアプリケーションの設定

WindowsのスタートアップのようにOSを起動時に起動するアプリケーションを設定をする項目ですが、macOSでは「ログインとグループ」内にあります。この項目の設定を変更するとOSが起動した時に自動で実行されるアプリケーションを設定で ...
vim のタブ幅を4文字に変更する

vimでのタブの文字数はデフォルトでは「8文字」です。プログラムとか書いているとタブが8文字だと横幅が長くなり見難くなるので、タブ幅を8文字から4文字に変更するには「.vimrc」に以下を追加します
$ ~/.vimrcset ...sedコマンドで空行を削除する

sedコマンドで空行の削除して表示するには、以下のように「sed ‘/^$/d’ (ファイル名)」で表示できます
$ cat test123456789$ sed '/ ...設定ファイルのコメントアウトを空行を除外して表示

Apacheの設定ファイルなどで「#」でコメントアウトしている設定は除外して表示するには「cat」,「grep」コマンドを利用すれば表示できます。
コマンド:cat (設定ファ ...
CentOS 7.x でPHP 7.2にアップデートする

CentOS 7.x系では、PHPのバージョンは5.4系です。Wordpressは5.6系から使用できたので、5.6系にバージョンアップして使っていましたが、wordpres ...
デスクトップにシェルを叩くと新規テキストファイル作成

Windowsだとエクスプローラーから、右クリックメニューで新規テキストファイルを作成する事ができますが、macOSだとFinderにその項目がありません。「Automator」だとその機能を追 ...
dateコマンドで曜日を取得する

下記のように「SELECT * FROM 〜〜 INTO OUTFILE 〜〜」でMySQLのデータをCSVファイルにエクスポートした場合、「Null」を含 ...
Avastをインストールしている場合、FirefoxでHTTPSページが開けない

Firefoxの調子が悪くなり再インストールしたら、「」など、httpsで始まるSSLページにアクセスすると「安全な接続ではありません」と表示されWEB ...
macOSでバッククォートの入力方法

プログラミングで使用するバッククォート「`」を紹介します
JISキーボードでバックスラッシュの入力方法JISキーボードでは、「Shift」+「@」でバッククォートになります
USキーボードでバックスラッシュの入力方法 ...