Forked from alexandr-parkhomenko/PHPBrew on Ubuntu
Created
September 24, 2018 17:27
-
-
Save INDIAN2020/d47f35bacb891eb22a7738e8514cd5de to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # Default extension package | |
| sudo apt-get install libxml2-dev libbz2-dev libmcrypt-dev libreadline-dev libxslt1-dev autoconf -y | |
| # Default extension package (18.04) | |
| sudo apt-get install libssl-dev | |
| # +apxs2 | |
| sudo apt-get install apache2-dev -y | |
| # +gd (14.04) | |
| sudo apt-get install -y libfreetype6 libfreetype6-dev libpng12-0 libpng12-dev libjpeg-dev libjpeg8-dev libjpeg8 libgd-dev libgd3 libwebp-dev | |
| # +gd (18.04) | |
| sudo apt-get install -y libfreetype6 libfreetype6-dev libpng-dev libjpeg-dev libjpeg8-dev libjpeg8 libgd-dev libgd3 libwebp-dev | |
| # +opcache | |
| sudo apt-get install libcurl3-openssl-dev -y | |
| # +intl | |
| sudo apt-get install re2c libicu-dev -y | |
| # Reset permission (14.04) | |
| sudo chmod oga+rw -R /etc/apache2 /usr/sbin/a2enmod /var/lib/apache2/module/ | |
| # Reset permission (18.04) | |
| sudo chmod oga+rw -R /etc/apache2 /usr/sbin/a2enmod /usr/lib/apache2/modules/ | |
| #install new php version | |
| # we use version 7.0.8 only as example, it can be any supported version | |
| phpbrew install 7.0.8 +default +apxs2 +intl +dbs +fpm | |
| phpbrew use php-7.0.8 | |
| phpbrew ext install gd -- --with-jpeg-dir=/usr/lib --with-freetype-dir=/usr/lib --with-webp-dir=/usr/lib --with-xpm-dir=/usr/lib | |
| phpbrew ext install opcache | |
| phpbrew ext install xdebug | |
| phpbrew ext install soap | |
| phpbrew ext install iconv | |
| # LDAP (14.04) | |
| sudo ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/ | |
| phpbrew ext install ldap | |
| # Restore permissions (14.04) | |
| sudo find /etc/apache2 /var/lib/apache2/module -type f -exec chmod 644 {} \; | |
| sudo find /etc/apache2 /var/lib/apache2/module /usr/sbin/a2enmod -type d -exec chmod 755 {} \; | |
| # Restore permissions (18.04) | |
| sudo find /etc/apache2 /usr/lib/apache2/modules -type f -exec chmod 644 {} \; | |
| sudo find /etc/apache2 /usr/lib/apache2/modules /usr/sbin/a2enmod -type d -exec chmod 755 {} \; | |
| # Prepare apache module | |
| sudo rm /etc/apache2/mods-enabled/php7.load | |
| sudo cp /etc/apache2/mods-available/php5.conf /etc/apache2/mods-available/php7.conf | |
| #Activate php7 apache module | |
| sudo a2enmod php7 | |
| # NGINX virtual host sample | |
| server { | |
| listen 80; | |
| server_name security.oro-v2-0.loc; | |
| root /home/alex/public_html/oro/security/2.0/application/crm/web; | |
| error_log /var/log/nginx/orocrm_error.log; | |
| access_log /var/log/nginx/orocrm_access.log; | |
| location / { | |
| try_files $uri /app.php$is_args$args; | |
| } | |
| location ~ ^/(app|app_dev|config|install)\.php(/|$) { | |
| fastcgi_pass unix:/home/alex/.phpbrew/php/php-7.1.4/var/run/php-fpm.sock; | |
| fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
| include fastcgi_params; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| fastcgi_param HTTPS off; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment