VVV(Varying Vagrant Vagrants) 環境を構築してみたのでその時のメモです。
Vagrant 環境なので構築という程でもないですが…とりあえず入れてみました。
Varying Vagrant Vagrants出典:varyingvagrantvagrants.org
A local Vagrant environment for developing with WordPressVarying Vagrant Vagrants is an open source Vagrant configuration focused on WordPress development.
VVV is ideal for developing themes and plugins as well as for contributing to WordPress core.
これを使うと、ほとんど何も考えることなく WordPress を構築できてしまいます…!
$ git clone git@github.com:Varying-Vagrant-Vagrants/VVV.git
$ cd VVV
$ vagrant up
__ ___ ___ __ ____
\ \ / \ \ / \ \ / / |___ \
\ \ / / \ \ / / \ \ / / __) |
\ V / \ V / \ V / / __/
\_/ \_/ \_/ |_____|
Varying Vagrant Vagrants 2.0.0
Docs: https://varyingvagrantvagrants.org/
Contribute: https://github.com/varying-vagrant-vagrants/vvv
Bringing machine 'default' up with 'virtualbox' provider...
最終的に、以下のように nginx が起動すればOKです。
(一部伏せています)
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => /xxx/VVV
default: /srv/www => /xxx/VVV/www
default: /srv/log => /xxx/VVV/log
default: /srv/config => /xxx/VVV/config
default: /srv/database => /xxx/VVV/database
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
==> default: Running provisioner: shell...
default: Running: inline script
==> default: * Stopping MariaDB database server mysqld
==> default: ...done.
==> default: * Starting MariaDB database server mysqld
==> default: ...done.
==> default: * Checking for corrupt, not cleanly closed and upgrade needing tables.
==> default: Running provisioner: shell...
default: Running: inline script
==> default: * Restarting nginx nginx
==> default: ...done.
$ vagrant provision
__ ___ ___ __ ____
\ \ / \ \ / \ \ / / |___ \
\ \ / / \ \ / / \ \ / / __) |
\ V / \ V / \ V / / __/
\_/ \_/ \_/ |_____|
Varying Vagrant Vagrants 2.0.0
Docs: https://varyingvagrantvagrants.org/
Contribute: https://github.com/varying-vagrant-vagrants/vvv
==> default: Running provisioner: fix-no-tty (shell)...
default: Running: inline script
==> default: Running provisioner: default (shell)...
default: Running: /var/folders/c4/36002rhx55x_lxlhmz8sg12m0000gn/T/vagrant-shell20170914-995-1lqj4d0.sh
==> default: Network connection detected...
==> default: Bash profile setup and directories.
==> default: sending incremental file list
==> default: deleting develop_git
==> default: db_backup
==> default: db_restore
==> default: makepot
==> default: vagrant_destroy
==> default: vagrant_halt
==> default: vagrant_suspend
==> default: vagrant_up
==> default: xdebug_off
==> default: xdebug_on
==> default: sent 2.45K bytes received 202 bytes 5.30K bytes/sec
==> default: total size is 3.29K speedup is 1.24
==> default: * Copied /srv/config/bash_profile to /home/vagrant/.bash_profile
==> default: * Copied /srv/config/bash_aliases to /home/vagrant/.bash_aliases
==> default: * Copied /srv/config/vimrc to /home/vagrant/.vimrc
==> default: * Copied /srv/config/subversion-servers to /home/vagrant/.subversion/servers
==> default: * Copied /srv/config/subversion-config to /home/vagrant/.subversion/config
==> default: * rsync'd /srv/config/homebin to /home/vagrant/bin
==> default: Network connection detected...
==> default:
==> default: Main packages check and install.
==> default: Adding ppa:git-core/ppa repository
==> default: * php7.0-fpm 7.0.23-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php7.0-cli 7.0.23-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php7.0-common 7.0.23-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php7.0-dev 7.0.23-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php-pear 1:1.10.5+submodules+notgz-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php-imagick 3.4.3-2~ubuntu14.04.1+deb.sury.org+1
==> default: * php-memcache 3.0.9~20160311.4991c2f-6+ubuntu14.04.1+deb.sury.org+2
==> default: * php-memcached 3.0.3+2.2.0-1+ubuntu14.04.1+deb.sury.org+3
==> default: * php-ssh2 1.1.2+0.13-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php-xdebug 2.5.5-3+ubuntu14.04.1+deb.sury.org+1
==> default: * php7.0-bcmath 7.0.23-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php7.0-curl 7.0.23-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php7.0-gd 7.0.23-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php7.0-mbstring 7.0.23-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php7.0-mcrypt 7.0.23-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php7.0-mysql 7.0.23-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php7.0-imap 7.0.23-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php7.0-json 7.0.23-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php7.0-soap 7.0.23-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php7.0-xml 7.0.23-1+ubuntu14.04.1+deb.sury.org+1
==> default: * php7.0-zip 7.0.23-1+ubuntu14.04.1+deb.sury.org+1
==> default: * nginx 1.13.5-1~trusty
==> default: * memcached 1.4.14-0ubuntu9.1
==> default: * mariadb-server 10.1.26+maria-1~trusty
==> default: * imagemagick 8:6.7.7.10-6ubuntu3.9
==> default: * subversion 1.8.8-1ubuntu3.3
==> default: * git 1:2.14.1-1.1~ppa0~ubuntu14.04.1
==> default: * zip 3.0-8
==> default: * unzip 6.0-9ubuntu1.5
==> default: * ngrep 1.45.ds2-12
==> default: * curl 7.35.0-1ubuntu2.10
==> default: * make 3.81-8.2ubuntu3
==> default: * vim 2:7.4.052-1ubuntu3.1
==> default: * colordiff 1.0.13-1
==> default: * postfix 2.11.0-1ubuntu1
==> default: * python-pip 1.5.4-1ubuntu4
==> default: * ntp 1:4.2.6.p5+dfsg-3ubuntu2.14.04.12
==> default: * gettext 0.18.3.1-1ubuntu3
==> default: * graphviz 2.36.0-0ubuntu3.2
==> default: * dos2unix 6.0.4-1
==> default: * g++ 4:4.8.2-1ubuntu6
==> default: * nodejs 6.11.3-1nodesource1
==> default: * libsqlite3-dev 3.8.2-1ubuntu2.1
==> default: Linked custom apt sources
==> default: No apt packages to install.
==> default: php7.0-fpm stop/waiting
==> default: php7.0-fpm start/running, process 9290
#... 以下略
# まず vagrant に ssh ログインして hosts を参照する
$ vagrant ssh
...
...
vagrant@vvv:~$ cat /etc/hosts
127.0.0.1 vvv vvv
127.0.0.1 localhost
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
127.0.0.1 local.wordpress.dev # vvv-auto
127.0.0.1 local.wordpress.dev # vvv-auto
127.0.0.1 src.wordpress-develop.dev # vvv-auto
127.0.0.1 build.wordpress-develop.dev # vvv-auto
127.0.0.1 src.wordpress-develop.dev # vvv-auto
127.0.0.1 build.wordpress-develop.dev # vvv-auto
# VVV で設定されているローカルIPは 192.168.50.4
192.168.50.4 local.wordpress.dev # vvv-auto
192.168.50.4 local.wordpress.dev # vvv-auto
192.168.50.4 src.wordpress-develop.dev # vvv-auto
192.168.50.4 build.wordpress-develop.dev # vvv-auto
192.168.50.4 src.wordpress-develop.dev # vvv-auto
192.168.50.4 build.wordpress-develop.dev # vvv-auto
各種リンクが貼られているので、そこから WordPress の各環境に飛べます。
このままだと英語版ですが、すでにインストールされている WP-CLI で簡単に日本語化できるようです。
新しい記事へ
WordCamp Tokyo 2017 に参加してきました
古い記事へ
今月やりたいことリスト(2017年9月)
mac に pip をインストールする
mac は標準で python が入っていますが、パッケージ管理の pip がインストールされていないので入れてみました。
2017/05/26 09:00
[GAS] Google Drive の特定フォルダ配下のフォルダ・ファイルの権限を一括で移譲する
Google Drive の特定フォルダ配下のファイル・フォルダの権限を一括で移譲するツールを Google Apps Script で作りました。
2018/11/10 15:54
[Windows] Ophcrack を使ってユーザーパスワードを解析する方法
家族で使っていた Windows7 のログインパスワードを忘れたため、Ophcrack を使って解析したときの記録です。
2017/09/30 21:00
[shell] フォルダ内にある大量の ZIP ファイルをまとめて解凍する
とある ZIP を解凍すると中に大量の ZIP が居たときに幸せになれるコマンドを紹介します
2018/06/19 23:45
[MySQL] データファイルから DB を復元する
先日 MySQL が再起動できなくなる問題が発生し、急遽データファイル(.frm, .ibd)から復元しました
2018/11/25 12:44