Last active
March 12, 2021 23:08
-
-
Save Faryshta/6597fa6f5df51e15d81e537a8d24cb81 to your computer and use it in GitHub Desktop.
Ubuntu 14.04 PHP7 (Install from Source)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install Dependencies | |
apt-get install --reinstall make; | |
apt-get update; | |
apt-get install --yes \ | |
git \ | |
bison \ | |
autoconf \ | |
libltdl-dev \ | |
libbz2-dev \ | |
libxml2-dev \ | |
libxslt1-dev \ | |
libpspell-dev \ | |
libenchant-dev \ | |
libmcrypt-dev \ | |
libpng-dev \ | |
libjpeg8-dev \ | |
libfreetype6-dev \ | |
libmysqlclient-dev \ | |
libcurl4-openssl-dev; | |
mkdir --parents /usr/local/php7; | |
mkdir --parents /etc/php7/conf.d; | |
mkdir --parents /etc/php7/cli/conf.d; | |
mkdir --parents /etc/php7/fpm/conf.d; | |
mkdir --parents --mode=777 /var/log/php7; | |
## Clone PHP7 source code from github | |
git clone https://github.com/php/php-src /usr/local/src/php7 --branch=master --depth=1; | |
cd /usr/local/src/php7; | |
## Configure the options for compilation | |
./buildconf --force; | |
./configure --prefix=/usr/local/php7 \ | |
\ | |
--with-bz2 \ | |
--with-zlib \ | |
--enable-zip \ | |
\ | |
--with-openssl \ | |
\ | |
--with-curl \ | |
--enable-ftp \ | |
--with-mysqli=mysqlnd \ | |
--with-pdo-mysql=mysqlnd \ | |
--enable-sockets \ | |
--enable-pcntl \ | |
\ | |
--with-pspell \ | |
--with-enchant \ | |
--with-gettext \ | |
\ | |
--with-gd \ | |
--enable-exif \ | |
--with-jpeg-dir \ | |
--with-png-dir \ | |
--with-freetype-dir \ | |
\ | |
--with-xsl \ | |
--enable-bcmath \ | |
--enable-mbstring \ | |
--enable-calendar \ | |
\ | |
--enable-sysvmsg \ | |
--enable-sysvsem \ | |
--enable-sysvshm \ | |
\ | |
--enable-soap \ | |
--with-xmlrpc \ | |
--enable-intl \ | |
\ | |
--with-config-file-path=/etc/php7/cli \ | |
--with-config-file-scan-dir=/etc/php7/cli/conf.d; | |
## Compile source code | |
make && make install && make clean; | |
## Symbolic link to use in the bash terminal | |
ln --symbolic /usr/local/php7/bin/php /usr/bin/php7 | |
## Virtual server command example | |
## php7 -S localhost:8000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
necessário php5.6 antes de git checkout 4.0
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for doctrine/collections v1.4.0 -> satisfiable by doctrine/collections[v1.4.0].
- doctrine/collections v1.4.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
Problem 2
- Installation request for doctrine/common v2.7.3 -> satisfiable by doctrine/common[v2.7.3].
- doctrine/common v2.7.3 requires php ~5.6|~7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
Problem 3
- Installation request for phpdocumentor/reflection-docblock 3.3.2 -> satisfiable by phpdocumentor/reflection-docblock[3.3.2].
- phpdocumentor/reflection-docblock 3.3.2 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
Problem 4
- doctrine/collections v1.4.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
- doctrine/orm v2.5.14 requires doctrine/collections ~1.2 -> satisfiable by doctrine/collections[v1.4.0].
- Installation request for doctrine/orm v2.5.14 -> satisfiable by doctrine/orm[v2.5.14].