$ sudo hostnamectl set-hostname [ホスト名]
$ sudo yum update -y
if &term =~ "xterm" let &t_ti .= "\e[?2004h" let &t_te .= "\e[?2004l" let &pastetoggle = "\e[201~" function XTermPasteBegin(ret) set paste return a:ret endfunction noremap <special> <expr> <Esc>[200~ XTermPasteBegin("0i") inoremap <special> <expr> <Esc>[200~ XTermPasteBegin("") cnoremap <special> <Esc>[200~ <nop> cnoremap <special> <Esc>[201~ <nop> endif
$ sudo yum -y install docker-io $ sudo service docker start $ sudo docker --version Docker version 1.12.6, build 3a094bd/1.12.6
$ sudo systemctl enable docker.service
$ kusanagi init --tz tokyo --keyboard ja --lang ja --passwd [ユーザ kusanagi のパスワード] --nophrase --dbrootpass [MySQLのrootパスワード] --nginx --hhvm
$ kusanagi provision --wplang ja --fqdn [FQDN] --email [メールアドレス] --dbname [DB名] --dbuser [DBユーザ] --dbpass [DBユーザのパスワード] [プロファイル名]
$ sed -ne '/\/\*\*\#\@\-\*\//,$ p' /home/kusanagi/[プロファイル名]/DocumentRoot/wp-config-sample.php | wp core config --dbname=[DB名] --dbuser=[DBユーザ] --dbpass=[DBユーザのパスワード] --dbhost=localhost --dbcharset=utf8mb4 --extra-php --path=/home/kusanagi/[プロファイル名]/DocumentRoot
$ wp core install --url=[http://aaa.com] --title=test --admin_user=[WPユーザ] --admin_password=[WPユーザのパスワード] --admin_email=[メールアドレス] --path=/home/kusanagi/[プロファイル名]/DocumentRoot
# kusanagi remove -y [プロファイル名]
# mkdir /etc/nginx/sites-available # mkdir /etc/nginx/sites-enable
# aaa.com server { listen 80; server_name aaa.com; access_log /var/log/nginx/access.aaa.com.log; error_log /var/log/nginx/error.aaa.com.log; location / { root /home/kusanagi/aaa.com/DocumentRoot/ index index.php; } }
server { listen 80 default_server; server_name _; access_log /var/log/nginx/access.proxy.log; error_log /var/log/nginx/error.proxy.log; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { proxy_pass http://localhost:8080/; } }
# ln -s /etc/nginx/sites-available/aaa.com /etc/nginx/sites-enable/ # ln -s /etc/nginx/sites-available/bbb.com /etc/nginx/sites-enable/ # ln -s /etc/nginx/sites-available/ccc.com /etc/nginx/sites-enable/ # ln -s /etc/nginx/sites-available/proxy /etc/nginx/sites-enable/
include /etc/nginx/sites-enable/*;
# service nginx restart
# docker pull jwilder/nginx-proxy # docker pull greyltc/lamp
# docker run --name proxy -d -p 8080:80 -p 8443:443 -v /var/run/docker.sock:/tmp/docker.sock:ro docker.io/jwilder/nginx-proxy
# docker run --name lamp01 -p :80 -p :443 -d -e VIRTUAL_HOST=foo.bar.com greyltc/lamp
$ cat /etc/redhat-release
$ yum list installed | grep '[パッケージ]'