更新 2020.4.20 12:31閲覧 4150XAMPP の代わりに Docker を使う
前提
- LMDE で XAMPP を使っていた
- MySQL と ProFTPD を使っていなかった
- XAMPP に ImageMagick をインストールして辟易した
環境
LMDE 4 Debbie
Docker version 18.09.1, build 4c52b90
docker-compose version 1.21.0, build unknown
インストール
Synaptic パッケージマネージャで、docker.io、docker-compose をインストール
設定
/etc/group を Root で開き、docker:x:999: の後ろにユーザー名を入力し保存
構築
- https://github.com/DOlDNa/lapi をダウンロード
- XAMPP の /opt/lampp/htdocs/ に相当する任意の場所で展開(例:/opt/lapi/)
- /opt/lapi/ で端末を開き、
docker-compose build を実行
- チューニングを参考に適宜設定
起動確認終了
- 起動:
docker-compose up
- 確認: http://localhost/
- 終了:
docker-compose stop
一括削除
docker-compose rm
docker system prune
docker rmi -f `docker images -q`
チューニング等 overlay2 フォルダ内で各ファイル名を検索
000-default.conf
ErrorLog /tmp/error.log
CustomLog /tmp/access.log combined
apache2.conf
ErrorLog /tmp/error.log
ServerName localhost
dir.conf
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>
openssl.cnf
[system_default_sect]
#MinProtocol = TLSv1.2
#CipherString = DEFAULT@SECLEVEL=2
MinProtocol = None
CipherString = DEFAULT
sysctl.conf
net.core.netdev_max_backlog=65536
net.core.rmem_max=33554432
net.core.somaxconn=65536
net.core.wmem_max=33554432
net.ipv4.conf.default.accept_source_route=0
net.ipv4.conf.eth180.arp_announce=2
net.ipv4.conf.eth180.arp_ignore=1
net.ipv4.tcp_fin_timeout=5
net.ipv4.tcp_max_syn_backlog=65536
net.ipv4.tcp_max_tw_buckets=65536
net.ipv4.tcp_rmem=4096 262144 33554432
net.ipv4.tcp_wmem=4096 262144 33554432
000-default.conf などが入っている階層の etc に msmtprc ファイルを作成しメールアカウントを入力
account default
auth on
tls on
host xxx.xxx.com
port 587
from xxx@xxx.xxx.com
user xxx@xxx.xxx.com
password ******