Skip to content

Commit 2f118d3

Browse files
author
Alexander Paliarush
committed
Added script for upgrading php to 7.0.7
1 parent c67dd10 commit 2f118d3

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

Vagrantfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ Vagrant.configure(VAGRANT_API_VERSION) do |config|
7575
s.inline = "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile"
7676
end
7777

78+
config.vm.provision "upgrade_environment_recurring", type: "shell", run: "always" do |s|
79+
s.path = "scripts/provision/upgrade_environment_recurring.sh"
80+
s.args = shell_script_args
81+
end
82+
7883
config.vm.provision "configure_environment", type: "shell" do |s|
7984
s.path = "scripts/provision/configure_environment.sh"
8085
s.args = shell_script_args
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env bash
2+
3+
# Enable trace printing and exit on the first error
4+
set -ex
5+
6+
use_php7=$4
7+
8+
# Upgrade for vagrant box paliarush/magento2.ubuntu v1.1.0
9+
if [[ ${use_php7} -eq 1 ]]; then
10+
if /usr/bin/php7.0 -v | grep -q '7.0.5' ; then
11+
apt-get update
12+
a2dismod php7.0
13+
rm -rf /etc/php/7.0/apache2
14+
export DEBIAN_FRONTEND=noninteractive
15+
apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install php7.0 php7.0-mcrypt php7.0-curl php7.0-cli php7.0-mysql php7.0-gd php7.0-intl php7.0-xsl php7.0-bcmath php7.0-mbstring php7.0-soap php7.0-zip libapache2-mod-php7.0
16+
a2enmod php7.0
17+
18+
# Install XDebug
19+
cd /usr/lib
20+
rm -rf xdebug
21+
git clone git://github.com/xdebug/xdebug.git
22+
cd xdebug
23+
phpize
24+
./configure --enable-xdebug
25+
make
26+
make install
27+
28+
rm -rf /etc/php/7.0/apache2
29+
ln -s /etc/php/7.0/cli /etc/php/7.0/apache2
30+
31+
# Restart Apache
32+
service apache2 restart
33+
fi
34+
fi

0 commit comments

Comments
 (0)