diff --git a/README.md b/README.md index 324167003..34784f04f 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ VVV is a [10up](http://10up.com) creation and [transitioned](http://10up.com/blo * **Version**: 1.3.x-working * **Latest Stable**: [1.3.0](https://github.com/varying-vagrant-vagrants/vvv/tree/1.3.0) * **Web**: [https://varyingvagrantvagrants.org/](https://varyingvagrantvagrants.org/) -* **Contributors**: [@jeremyfelt](https://github.com/jeremyfelt), [@carldanley](https://github.com/carldanley), [@ericmann](https://github.com/ericmann), [@lkwdwrd](https://github.com/lkwdwrd), [@TheLastCicada](https://github.com/TheLastCicada), [@tddewey](https://github.com/tddewey), [@johnpbloch](https://github.com/johnpbloch), [@kadamwhite](https://github.com/kadamwhite), [@scribu](https://github.com/scribu), [@danielbachhuber](https://github.com/danielbachhuber), [@tollmanz](https://github.com/tollmanz), [@mbijon](https://github.com/mbijon), [@markjaquith](https://github.com/markjaquith), [@curtismchale](https://github.com/curtismchale), [@Mamaduka](https://github.com/mamaduka), [@lgedeon](https://github.com/lgedeon), [@pmgarman](https://github.com/pmgarman), [@westonruter](https://github.com/westonruter), [@petemall](https://github.com/petemall), [@cmmarslender](https://github.com/cmmarslender), [@mintindeed](https://github.com/mintindeed), [@mboynes](https://github.com/mboynes), [@aaronjorbin](https://github.com/aaronjorbin), [@tobiasbg](https://github.com/tobiasbg), [@simonwheatley](https://github.com/simonwheatley), [@ocean90](https://github.com/ocean90), [@lvnilesh](https://github.com/lvnilesh), [@alexw23](https://github.com/alexw23), [@zamoose](https://github.com/zamoose), [@leewillis77](https://github.com/leewillis77), [@imichaeli](https://github.com/imichaeli), [@andrezrv](https://github.com/andrezrv), [@cadwell](https://github.com/cadwell), [@cfoellmann](https://github.com/cfoellmann), [@westi](https://github.com/westi), [@ryanduff](https://github.com/ryanduff), [@selinerdominik](https://github.com/selinerdominik), [@ericandrewlewis](https://github.com/ericandrewlewis), [@vDevices](https://github.com/vDevices), [@sunnyratilal](https://github.com/sunnyratilal), [@enejb](https://github.com/enejb), [@salcode](https://github.com/salcode), [@mattbanks](https://github.com/mattbanks), [@aaroncampbell](https://github.com/aaroncampbell), [@tnorthcutt](https://github.com/tnorthcutt), [@neilpie](https://github.com/neilpie), [@francescolaffi](https://github.com/francescolaffi), [@itsananderson](https://github.com/itsananderson), [@foolswis](https://github.com/foolswis), [@lloydde](https://github.com/lloydde), [@jmbarlow](https://github.com/jmbarlow), [@nacin](https://github.com/nacin), [@thewebists](https://github.com/thewebists), [@iparr](https://github.com/iparr), [@chrishepner](https://github.com/chrishepner), [@miya0001](https://github.com/miya0001), [@iamntz](https://github.com/iamntz), [@mirmillo](https://github.com/mirmillo), [@garyjones](https://github.com/garyjones), [@teraphy](https://github.com/teraphy), [@DrewAPicture](https://github.com/DrewAPicture), [@jjeaton](https://github.com/jjeaton), [@ntwb](https://github.com/ntwb), [@bradp](https://github.com/bradp), [@jb510](https://github.com/jb510), [@pbearne](https://github.com/pbearne), [@robneu](https://github.com/robneu), [@hubdotcom](https://github.com/hubdotcom), [@michaelbeil](https://github.com/michaelbeil), [@EHLOVader](https://github.com/EHLOVader), [@HongPong](https://github.com/HongPong), [@twisty7867](https://github.com/twisty7867), [@khromov](https://github.com/khromov), [@amchoukir](https://github.com/amchoukir), [@grantnorwood](https://github.com/grantnorwood), [@MatthewEppelsheimer](https://github.com/MatthewEppelsheimer), [@cristovaov](https://github.com/cristovaov), [@coreymckrill](https://github.com/coreymckrill), [@jonathanbardo](https://github.com/jonathanbardo), [@rasmusbe](https://github.com/rasmusbe), [@eriktrom](https://github.com/eriktrom), [@f4bsch](https://github.com/f4bsch) +* **Contributors**: [@jeremyfelt](https://github.com/jeremyfelt), [@carldanley](https://github.com/carldanley), [@ericmann](https://github.com/ericmann), [@lkwdwrd](https://github.com/lkwdwrd), [@TheLastCicada](https://github.com/TheLastCicada), [@tddewey](https://github.com/tddewey), [@johnpbloch](https://github.com/johnpbloch), [@kadamwhite](https://github.com/kadamwhite), [@scribu](https://github.com/scribu), [@danielbachhuber](https://github.com/danielbachhuber), [@tollmanz](https://github.com/tollmanz), [@mbijon](https://github.com/mbijon), [@markjaquith](https://github.com/markjaquith), [@curtismchale](https://github.com/curtismchale), [@Mamaduka](https://github.com/mamaduka), [@lgedeon](https://github.com/lgedeon), [@pmgarman](https://github.com/pmgarman), [@westonruter](https://github.com/westonruter), [@petemall](https://github.com/petemall), [@cmmarslender](https://github.com/cmmarslender), [@mintindeed](https://github.com/mintindeed), [@mboynes](https://github.com/mboynes), [@aaronjorbin](https://github.com/aaronjorbin), [@tobiasbg](https://github.com/tobiasbg), [@simonwheatley](https://github.com/simonwheatley), [@ocean90](https://github.com/ocean90), [@lvnilesh](https://github.com/lvnilesh), [@alexw23](https://github.com/alexw23), [@zamoose](https://github.com/zamoose), [@leewillis77](https://github.com/leewillis77), [@imichaeli](https://github.com/imichaeli), [@andrezrv](https://github.com/andrezrv), [@cadwell](https://github.com/cadwell), [@cfoellmann](https://github.com/cfoellmann), [@westi](https://github.com/westi), [@ryanduff](https://github.com/ryanduff), [@selinerdominik](https://github.com/selinerdominik), [@ericandrewlewis](https://github.com/ericandrewlewis), [@vDevices](https://github.com/vDevices), [@sunnyratilal](https://github.com/sunnyratilal), [@enejb](https://github.com/enejb), [@salcode](https://github.com/salcode), [@mattbanks](https://github.com/mattbanks), [@aaroncampbell](https://github.com/aaroncampbell), [@tnorthcutt](https://github.com/tnorthcutt), [@neilpie](https://github.com/neilpie), [@francescolaffi](https://github.com/francescolaffi), [@itsananderson](https://github.com/itsananderson), [@foolswis](https://github.com/foolswis), [@lloydde](https://github.com/lloydde), [@jmbarlow](https://github.com/jmbarlow), [@nacin](https://github.com/nacin), [@thewebists](https://github.com/thewebists), [@iparr](https://github.com/iparr), [@chrishepner](https://github.com/chrishepner), [@miya0001](https://github.com/miya0001), [@iamntz](https://github.com/iamntz), [@mirmillo](https://github.com/mirmillo), [@garyjones](https://github.com/garyjones), [@teraphy](https://github.com/teraphy), [@DrewAPicture](https://github.com/DrewAPicture), [@jjeaton](https://github.com/jjeaton), [@ntwb](https://github.com/ntwb), [@bradp](https://github.com/bradp), [@jb510](https://github.com/jb510), [@pbearne](https://github.com/pbearne), [@robneu](https://github.com/robneu), [@hubdotcom](https://github.com/hubdotcom), [@michaelbeil](https://github.com/michaelbeil), [@EHLOVader](https://github.com/EHLOVader), [@HongPong](https://github.com/HongPong), [@twisty7867](https://github.com/twisty7867), [@khromov](https://github.com/khromov), [@amchoukir](https://github.com/amchoukir), [@grantnorwood](https://github.com/grantnorwood), [@MatthewEppelsheimer](https://github.com/MatthewEppelsheimer), [@cristovaov](https://github.com/cristovaov), [@coreymckrill](https://github.com/coreymckrill), [@jonathanbardo](https://github.com/jonathanbardo), [@rasmusbe](https://github.com/rasmusbe), [@eriktrom](https://github.com/eriktrom), [@f4bsch](https://github.com/f4bsch), [@LoreleiAurora](https://github.com/LoreleiAurora) * **Contributing**: Contributions are more than welcome. Please see our current [contributing guidelines](https://github.com/Varying-Vagrant-Vagrants/VVV/blob/master/CONTRIBUTING.md). Thanks! @@ -161,7 +161,7 @@ A bunch of stuff! 1. [WP-CLI](http://wp-cli.org/) (master branch) 1. [nginx](http://nginx.org/) ([mainline](http://nginx.com/blog/nginx-1-6-1-7-released/) version) 1. [mysql](https://www.mysql.com/) 5.5.x -1. [php-fpm](http://php-fpm.org/) 5.5.x +1. [php-fpm](http://php-fpm.org/) 7.0.x 1. [memcached](http://memcached.org/) 1. PHP [memcache extension](https://pecl.php.net/package/memcache) 1. PHP [xdebug extension](https://pecl.php.net/package/xdebug/) diff --git a/config/apt-source-append.list b/config/apt-source-append.list index 6567c6458..fc17745dc 100644 --- a/config/apt-source-append.list +++ b/config/apt-source-append.list @@ -8,3 +8,7 @@ deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx # Provides Node.js deb http://ppa.launchpad.net/chris-lea/node.js/ubuntu trusty main deb-src http://ppa.launchpad.net/chris-lea/node.js/ubuntu trusty main + +# Provides PHP7 +deb http://ppa.launchpad.net/ondrej/php/ubuntu trusty main +deb-src http://ppa.launchpad.net/ondrej/php/ubuntu trusty main diff --git a/config/homebin/xdebug_off b/config/homebin/xdebug_off index bfea75823..67cc61f73 100755 --- a/config/homebin/xdebug_off +++ b/config/homebin/xdebug_off @@ -1,4 +1,4 @@ #!/bin/bash -sudo php5dismod xdebug -sudo service php5-fpm restart +sudo phpdismod xdebug +sudo service php7.0-fpm restart diff --git a/config/homebin/xdebug_on b/config/homebin/xdebug_on index d28a0324f..1e391f41a 100755 --- a/config/homebin/xdebug_on +++ b/config/homebin/xdebug_on @@ -1,4 +1,4 @@ #!/bin/bash -sudo php5enmod xdebug -sudo service php5-fpm restart +sudo phpenmod xdebug +sudo service php7.0-fpm restart diff --git a/config/init/vvv-start.conf b/config/init/vvv-start.conf index 0ed7583d8..9117f217e 100644 --- a/config/init/vvv-start.conf +++ b/config/init/vvv-start.conf @@ -6,7 +6,7 @@ start on runlevel [2345] script service nginx start -service php5-fpm start +service php7.0-fpm start service memcached start service mysql start service mailcatcher start diff --git a/config/nginx-config/nginx-wp-common.conf b/config/nginx-config/nginx-wp-common.conf index 68936243c..adfbce4d9 100644 --- a/config/nginx-config/nginx-wp-common.conf +++ b/config/nginx-config/nginx-wp-common.conf @@ -73,7 +73,7 @@ location ~ \.php$ { # We define it here to be sure that it exists. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - # Use the upstream for php5-fpm that we defined in nginx.conf + # Use the upstream for php7-fpm that we defined in nginx.conf fastcgi_pass php; # And get to serving the file! diff --git a/config/nginx-config/nginx.conf b/config/nginx-config/nginx.conf index 1dfe0024d..156ffbb0e 100644 --- a/config/nginx-config/nginx.conf +++ b/config/nginx-config/nginx.conf @@ -87,7 +87,7 @@ http { # Upstream to abstract backend connection(s) for PHP. upstream php { - server unix:/var/run/php5-fpm.sock; + server unix:/var/run/php7-fpm.sock; } # If the requested body size is more than the buffer size, the entire body is diff --git a/config/nginx-config/sites/default.conf b/config/nginx-config/sites/default.conf index 45f7cd919..fa06d10c2 100644 --- a/config/nginx-config/sites/default.conf +++ b/config/nginx-config/sites/default.conf @@ -64,7 +64,7 @@ server { fastcgi_index index.php; } - # PHP FPM status page that we defined in php5-fpm-config/www.conf + # PHP FPM status page that we defined in php7-fpm-config/www.conf location /php-status { include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; diff --git a/config/php5-fpm-config/mailcatcher.ini b/config/php7-fpm-config/mailcatcher.ini similarity index 100% rename from config/php5-fpm-config/mailcatcher.ini rename to config/php7-fpm-config/mailcatcher.ini diff --git a/config/php5-fpm-config/opcache.ini b/config/php7-fpm-config/opcache.ini similarity index 100% rename from config/php5-fpm-config/opcache.ini rename to config/php7-fpm-config/opcache.ini diff --git a/config/php5-fpm-config/php-custom.ini b/config/php7-fpm-config/php-custom.ini similarity index 100% rename from config/php5-fpm-config/php-custom.ini rename to config/php7-fpm-config/php-custom.ini diff --git a/config/php5-fpm-config/php5-fpm.conf b/config/php7-fpm-config/php7-fpm.conf similarity index 97% rename from config/php5-fpm-config/php5-fpm.conf rename to config/php7-fpm-config/php7-fpm.conf index b45313080..2aeb2ec36 100644 --- a/config/php5-fpm-config/php5-fpm.conf +++ b/config/php7-fpm-config/php7-fpm.conf @@ -12,7 +12,7 @@ ; Relative path can also be used. They will be prefixed by: ; - the global prefix if it's been set (-p argument) ; - /usr otherwise -;include=/etc/php5/fpm/*.conf +;include=/etc/php/7.0/fpm/*.conf ;;;;;;;;;;;;;;;;;; ; Global Options ; @@ -22,14 +22,14 @@ ; Pid file ; Note: the default prefix is /var ; Default Value: none -pid = /var/run/php5-fpm.pid +pid = /var/run/php7-fpm.pid ; Error log file ; If it's set to "syslog", log is sent to syslogd instead of being written ; in a local file. ; Note: the default prefix is /var ; Default Value: log/php-fpm.log -error_log = /var/log/php5-fpm.log +error_log = /var/log/php7-fpm.log ; syslog_facility is used to specify what type of program is logging the ; message. This lets syslogd specify that messages from different facilities @@ -126,4 +126,4 @@ error_log = /var/log/php5-fpm.log ; To configure the pools it is recommended to have one .conf file per ; pool in the following directory: -include=/etc/php5/fpm/pool.d/*.conf +include=/etc/php/7.0/fpm/pool.d/*.conf diff --git a/config/php5-fpm-config/www.conf b/config/php7-fpm-config/www.conf similarity index 99% rename from config/php5-fpm-config/www.conf rename to config/php7-fpm-config/www.conf index f29c71c2c..7c232f10c 100644 --- a/config/php5-fpm-config/www.conf +++ b/config/php7-fpm-config/www.conf @@ -30,7 +30,7 @@ group = www-data ; specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. -listen = /var/run/php5-fpm.sock +listen = /var/run/php7-fpm.sock ; Set listen(2) backlog. A value of '-1' means unlimited. ; Default Value: 128 (-1 on FreeBSD and OpenBSD) @@ -347,7 +347,7 @@ catch_workers_output = yes ; exectute php code. ; Note: set an empty value to allow all extensions. ; Default Value: .php -;security.limit_extensions = .php .php3 .php4 .php5 +;security.limit_extensions = .php .php3 .php4 .php5 .php7 ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from ; the current environment. diff --git a/config/php5-fpm-config/xdebug.ini b/config/php7-fpm-config/xdebug.ini similarity index 100% rename from config/php5-fpm-config/xdebug.ini rename to config/php7-fpm-config/xdebug.ini diff --git a/provision/provision.sh b/provision/provision.sh index 5932fc180..c34dfd8ff 100755 --- a/provision/provision.sh +++ b/provision/provision.sh @@ -27,25 +27,26 @@ apt_package_check_list=( # PHP5 # - # Our base packages for php5. As long as php5-fpm and php5-cli are - # installed, there is no need to install the general php5 package, which + # Our base packages for php7.0. As long as php7.0-fpm and php7.0-cli are + # installed, there is no need to install the general php7.0 package, which # can sometimes install apache as a requirement. - php5-fpm - php5-cli + php7.0-fpm + php7.0-cli # Common and dev packages for php - php5-common - php5-dev + php7.0-common + php7.0-dev # Extra PHP modules that we find useful - php5-memcache - php5-imagick - php5-mcrypt - php5-mysql - php5-imap - php5-curl + php-memcache + php-imagick + php7.0-mbstring + php7.0-mcrypt + php7.0-mysql + php7.0-imap + php7.0-curl php-pear - php5-gd + php7.0-gd # nginx is installed as the default web server nginx @@ -210,10 +211,14 @@ package_install() { echo "Applying Nginx signing key..." wget --quiet "http://nginx.org/keys/nginx_signing.key" -O- | apt-key add - - # Apply the nodejs assigning key + # Apply the nodejs signing key apt-key adv --quiet --keyserver "hkp://keyserver.ubuntu.com:80" --recv-key C7917B12 2>&1 | grep "gpg:" apt-key export C7917B12 | apt-key add - + # Apply the PHP signing key + apt-key adv --quiet --keyserver "hkp://keyserver.ubuntu.com:80" --recv-key E5267A6C 2>&1 | grep "gpg:" + apt-key export E5267A6C | apt-key add - + # Update all of the package references before installing anything echo "Running apt-get update..." apt-get update -y @@ -222,6 +227,10 @@ package_install() { echo "Installing apt-get packages..." apt-get install -y ${apt_package_install_list[@]} + # Remove unnecessary packages + echo "Removing unnecessary packages..." + apt-get autoremove -y + # Clean up apt caches apt-get clean fi @@ -236,7 +245,7 @@ tools_install() { # xdebug # - # XDebug 2.2.3 is provided with the Ubuntu install by default. The PECL + # XDebug 2.4.0 is provided with the Ubuntu install by default. The PECL # installation allows us to use a later version. Not specifying a version # will load the latest stable. pecl install xdebug @@ -345,21 +354,21 @@ nginx_setup() { phpfpm_setup() { # Copy php-fpm configuration from local - cp "/srv/config/php5-fpm-config/php5-fpm.conf" "/etc/php5/fpm/php5-fpm.conf" - cp "/srv/config/php5-fpm-config/www.conf" "/etc/php5/fpm/pool.d/www.conf" - cp "/srv/config/php5-fpm-config/php-custom.ini" "/etc/php5/fpm/conf.d/php-custom.ini" - cp "/srv/config/php5-fpm-config/opcache.ini" "/etc/php5/fpm/conf.d/opcache.ini" - cp "/srv/config/php5-fpm-config/xdebug.ini" "/etc/php5/mods-available/xdebug.ini" + cp "/srv/config/php7-fpm-config/php7-fpm.conf" "/etc/php/7.0/fpm/php-fpm.conf" + cp "/srv/config/php7-fpm-config/www.conf" "/etc/php/7.0/fpm/pool.d/www.conf" + cp "/srv/config/php7-fpm-config/php-custom.ini" "/etc/php/7.0/fpm/conf.d/php-custom.ini" + cp "/srv/config/php7-fpm-config/opcache.ini" "/etc/php/7.0/fpm/conf.d/opcache.ini" + cp "/srv/config/php7-fpm-config/xdebug.ini" "/etc/php/7.0/mods-available/xdebug.ini" # Find the path to Xdebug and prepend it to xdebug.ini XDEBUG_PATH=$( find /usr -name 'xdebug.so' | head -1 ) - sed -i "1izend_extension=\"$XDEBUG_PATH\"" "/etc/php5/mods-available/xdebug.ini" + sed -i "1izend_extension=\"$XDEBUG_PATH\"" "/etc/php/7.0/mods-available/xdebug.ini" - echo " * Copied /srv/config/php5-fpm-config/php5-fpm.conf to /etc/php5/fpm/php5-fpm.conf" - echo " * Copied /srv/config/php5-fpm-config/www.conf to /etc/php5/fpm/pool.d/www.conf" - echo " * Copied /srv/config/php5-fpm-config/php-custom.ini to /etc/php5/fpm/conf.d/php-custom.ini" - echo " * Copied /srv/config/php5-fpm-config/opcache.ini to /etc/php5/fpm/conf.d/opcache.ini" - echo " * Copied /srv/config/php5-fpm-config/xdebug.ini to /etc/php5/mods-available/xdebug.ini" + echo " * Copied /srv/config/php7-fpm-config/php7-fpm.conf to /etc/php/7.0/fpm/php-fpm.conf" + echo " * Copied /srv/config/php7-fpm-config/www.conf to /etc/php/7.0/fpm/pool.d/www.conf" + echo " * Copied /srv/config/php7-fpm-config/php-custom.ini to /etc/php/7.0/fpm/conf.d/php-custom.ini" + echo " * Copied /srv/config/php7-fpm-config/opcache.ini to /etc/php/7.0/fpm/conf.d/opcache.ini" + echo " * Copied /srv/config/php7-fpm-config/xdebug.ini to /etc/php/7.0/mods-available/xdebug.ini" # Copy memcached configuration from local cp "/srv/config/memcached-config/memcached.conf" "/etc/memcached.conf" @@ -462,11 +471,11 @@ mailcatcher_setup() { echo " * Copied /srv/config/init/mailcatcher.conf to /etc/init/mailcatcher.conf" fi - if [[ -f "/etc/php5/mods-available/mailcatcher.ini" ]]; then - echo " *" Mailcatcher php5 fpm already configured. + if [[ -f "/etc/php/7.0/mods-available/mailcatcher.ini" ]]; then + echo " *" Mailcatcher php7 fpm already configured. else - cp "/srv/config/php5-fpm-config/mailcatcher.ini" "/etc/php5/mods-available/mailcatcher.ini" - echo " * Copied /srv/config/php5-fpm-config/mailcatcher.ini to /etc/php5/mods-available/mailcatcher.ini" + cp "/srv/config/php7-fpm-config/mailcatcher.ini" "/etc/php/7.0/mods-available/mailcatcher.ini" + echo " * Copied /srv/config/php7-fpm-config/mailcatcher.ini to /etc/php/7.0/mods-available/mailcatcher.ini" fi } @@ -480,15 +489,15 @@ services_restart() { service mailcatcher restart # Disable PHP Xdebug module by default - php5dismod xdebug + phpdismod xdebug # Enable PHP mcrypt module by default - php5enmod mcrypt + phpenmod mcrypt # Enable PHP mailcatcher sendmail settings by default - php5enmod mailcatcher + phpenmod mailcatcher - service php5-fpm restart + service php7.0-fpm restart # Add the vagrant user to the www-data group so that it has better access # to PHP and Nginx related files.