Skip to content

Instantly share code, notes, and snippets.

@agutoli
Last active Jan 29, 2019
Embed
What would you like to do?
Install phpbrew php5.3.29 at Ubuntu 14.04
#!/bin/bash
# ========================================================================
# Distributor ID: Ubuntu
# Description: Ubuntu 14.04.5 LTS
# Release: 14.04
# Codename: trusty
# ========================================================================
# PHP 5.3.29-Ubuntu/14.04-SergeyD/14.4 (cli) (built: Sep 6 2017 15:48:58)
# Copyright (c) 1997-2014 The PHP Group
# Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies
# ========================================================================
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
sudo -i add-apt-repository -y ppa:sergey-dryabzhinsky/php-modules
sudo -i add-apt-repository -y ppa:sergey-dryabzhinsky/php53
sudo -i apt-get update
sudo -i apt-get install -y \
apache2 \
libapache2-mod-php53 \
php53-dev \
php53-pear \
php53-mod-curl \
php53-mod-mysql \
php53-mod-xcache \
php53-mod-memcache \
php53-mod-apc
sudo -i pear install channel://pear.php.net/Text_LanguageDetect-0.3.0
# DISABLE modules
sudo -i a2dismod mpm_event
sudo -i a2dismod mpm_worker
sudo -i service apache2 restart
# ENABLE modules
sudo -i a2enmod mpm_prefork
sudo -i a2enmod php53
# add a index with phpinfo
sudo -i rm /var/www/html/index.html
sudo -i echo "<?php phpinfo(); ?>" > /var/www/html/index.php
sudo -i service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment