var_dumpの内容を改行を入れて見やすくする方法

Lightsailで運用しているCentOS 7に、muninをインストールします。
NginxをWEBサーバーを構築済みとしており、ドメインは「munin.example.com」として手順を作成しています。Nginxの ...
muninをNginx + CentOS 7 でインストール

Lightsailで運用しているCentOS 7に、muninをインストールします。
NginxをWEBサーバーを構築済みとしており、ドメインは「munin.example.com」として手順を作成しています。Nginxの ...
sedコマンドで行頭から指定した行を削除する

sedコマンドで、1行目から5行目まで削除したい時は、下記のように書けば指定した行数だけ削除できます。
$ sed -i -e '1,5d' <ファイル名>また、5行目から10行だと、下記のようにすれば指定した ...
AWS Lightsailのインスタンスで、スワップ領域の追加方法

AWSのLightsailで作成したCentOS のメモリが512MBの最小構成のインスタンスでは、スワップ領域がないのでスワップ領域を作成しました。
スワップ領域の追加スワップ領域を追加する場合は、ddコマンドでスワ ...
SSHのポート番号を変更する(Lightsail)

AWSのVPSサービスのLightsailでインスタンスのSSHポート番号を22番から任意の番号に変更します。ポート番号を変更しなくても運用はできますが、ほぼ毎日SSHのポートで外部ユーザーよりログインしようとしている不正ログイン ...
Nginx+OwnCloudでLightsailにインストール

Amazon Lightsail にCentOS 7.x + Nginx + php-fpm + MariaDBの構成で、Owncloudをインストールしてみました。Nginx + php-fpm + MariaDBのインストー ...
OwnCloudでサーバー側で直接にファイルを追加・削除する

OwnCloudサーバーでサーバー側にファイルが保存されている領域にファイルを追加したり削除してもブラウザではそのファイルは確認できません。
OwnC ...
WordPressをApache環境からNginx環境に引越し

国内のVPSサーバーでWordpressを動かしているブログを、AWSのLightsailが安くなっているのでそちらのVPSに移設してみました。移 ...
CentOS 7 「/var/log/messages」に出力されるログレベルを変更する

CentOS 7.xでsystemdのLogLev ...
MariaDB 5.x から10.xにバージョンアップ

CentOS 7.x 系では、yumコマンドでインストールするとMariaDBのバージョンは5.6系が最新版となり、Wordpressで推奨されているバージョンの1 ...
Lightsaiで nginx+PHP+MariaDB の構成でwordpressをインストール

OSのみの作成したCent OS 7系のインスタンスに「nginx」+「php」+「MariaDB」の構成でwordpressをインストールする手 ...
AWS LightsailのVPS初期設定

Lightsailで、先日作成したインスタンスのOSは、Cent OS 7系で構築しました。他のミドルウェアは入れずにOSのみです。
初期設定は必要最低限のみ行ってみま ...
シェルスクリプトを実行している絶対パスを取得する

シェルスクリプトで実行しているディレクリ名を取得する場合「dirname ${0}」でディレクトリ名を取得できます。
但し、実行時に相対パスで実行するとディレクトリ名も相対パスとなります。
下記のスクリプトでは、「 ...
vsftpdでパッシブモードを設定する

FTPサーバーのvsftpdでパッシブモードも有効にして、F/W(iptables)でパッシブモードで利用するポートを開放する手順を説明します
vsftpdでパッシブモードを有効 ...ファイルパスからディレクリ名・ファイル名を取得

ファイルパスからディレクトリ名・ファイル名を取得するには「dirname」、「basename」を使うとディレクトリ名やファイル名を取得できます
dir ...