今まで使っていたvagrant上にPHP環境を作成するvagrantFileで
エラーが出るようになりました。
一箇所怪しいところがあったので、修正して試してみたも、appacheが入って
おりませんでした。
このファイルのどこを直したら良いか教えていただければ幸いです。
php環境を構築できれば良いです。
http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm の箇所は従来は
http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm でした(最後の~release-7-5 を ~release-7-9に変更したら、
エラーは出なくなったが、appaheがインストールされない)
config.vm.provision :shell, :inline => <<-EOS
yum -y install deltarpm
yum -y update yum -y install kernel-devel kernel-headers dkms rpm --import http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7 rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi yum install -y http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm yum install -y --enablerepo=remi --enablerepo=remi-php56\ gcc git \ httpd mariadb mariadb-server icu libicu-devel \ php php-devel php-mbstring php-intl php-mcrypt php-gd php-mysqlnd \ php-pecl-xdebug \ phpMyAdmin # Server timezone setting timedatectl set-timezone Asia/Tokyo # PHP setting cat << EOF > /etc/php.d/php.ini
max_execution_time = 60
memory_limit = 256M
post_max_size = 128M
default_charset = UTF-8
upload_max_filesize = 100M
date.timezone = Asia/Tokyo
intl.default_locale = ja
mbstring.internal_encoding = UTF-8
mbstring.http_input = UTF-8
mbstring.http_output = UTF-8
mbstring.encoding_translation = On
mbstring.detect_order = auto
session.gc_maxlifetime = 84600
session.use_trans_sid = 0
session.use_cookies = 1
session.use_only_cookies = 1
session.name = sid
session.cookie_secure = 0
session.use_strict_mode = 1
EOF
# Xdebug setting cat << EOF > /etc/php.d/xdebug.ini
xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
EOF
# phpMyAdmin setting sed -i -e "s/127.0.0.1/10.0/" /etc/httpd/conf.d/phpMyAdmin.conf sed -i -e "s/Require local/Require ip 10.0/" /etc/httpd/conf.d/phpMyAdmin.conf sed -i -e "s/\\['AllowNoPassword'\\] = false/\\['AllowNoPassword'\\] = true/" /etc/phpMyAdmin/config.inc.php # Virtual Host setting cat << EOF > /etc/httpd/conf.d/app.conf
ServerName localhost.local
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www/html
ServerName localhost
<Directory /var/www/html>
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /vagrant/app
ServerName app.localhost
<Directory /vagrant/app>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<Directory /vagrant>
EnableMMAP Off
EnableSendfile Off
</Directory>
EOF
# Composer install cd /usr/local/src curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer cd /vagrant/app /usr/local/bin/composer install cd # CakePHP Setting cd /vagrant/app chown -R apache:apache tmp chown -R apache:apache logs chmod -R 755 tmp chmod -R 755 logs cd systemctl start httpd.service systemctl start mariadb.service systemctl enable httpd.service systemctl enable mariadb.service # Database setting mysql -u root << EOF CREATE DATABASE appdb DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE USER 'appuser'@'localhost' IDENTIFIED BY 'password'; USE appdb; GRANT ALL PRIVILEGES ON appdb.* TO 'appuser'@'localhost'; FLUSH PRIVILEGES;
EOF
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
EOS
end
あなたの回答
tips
プレビュー