vagrant セットアップ (centos6.5 postgreSQL)

Pocket
LINEで送る

mkdir hoge
cd hoge
vagrant init
vim Vagrantfile
(config.vm.box = “centos6.5”)
vagrant up
vagrant ssh
sudo -i
yum install vim
vim /etc/yum.conf
(#exclude=kernel*)
exit
exit
vagrant reload
vagrant ssh
sudo -i
yum install php
yum install postgresql
exit
exit
vim Vagrantfile
(config.vm.network :forwarded_port, guest: 80, host: 9090)
vagrant reload
vagrant ssh
sudo -i
service httpd start
yum -y install postgresql-server php-pgsql
rm -rf /var/www/html
mkdir /vagrant/html
ln -fs /vagrant/html /var/www/html
passwd postgres
su – postgres
initdb –encoding=UTF8 –no-locale
pg_ctl -w start
exit

yum install php-mbstring php-devel
service httpd restart
vim /etc/httpd/conf/httpd.conf (user vagrant group vagrant)
service httpd restart

cd /var/lib/php
chown -R root:vagrant session/ (パーミッションも確認)

sudo yum –enablerepo=epel install php-pecl-xdebug
vim /etc/php.d/xdebug.ini
(xdebug.default_enable = 1
xdebug.idekey = “sns”
xdebug.remote_enable = 1
xdebug.remote_port=9000
xdebug.remote_host=10.0.2.2)

service httpd restart

Pocket
LINEで送る

コメントください