Skip to content

Instantly share code, notes, and snippets.

@oliveira-andre
Last active February 20, 2019 14:18
Show Gist options
  • Select an option

  • Save oliveira-andre/41454faabe8ffb75560749aea4e791f5 to your computer and use it in GitHub Desktop.

Select an option

Save oliveira-andre/41454faabe8ffb75560749aea4e791f5 to your computer and use it in GitHub Desktop.
ubuntu_18_04_installing_cakephp.sh
#!/bin/sh
sudo su
echo "Installing and Reloading APACHE2"
apt install apache2
systemctl reload apache2.service
echo "adding the repository and installing php"
add-apt-repository -y ppa:ondrej/php
apt-get update
apt-get install -y php7.1 libapache2-mod-php7.1 php7.1-mcrypt php7.1-cli php7.1-xml php7.1-zip php7.1-mysql php7.1-gd php7.1-imagick php7.1-recode php7.1-tidy php7.1-xmlrpc php7.1-intl php7.1-mbstring
puts "configuring..."
echo "file_uploads = On" > /etc/php/7.1/apache2/php.ini
echo "allow_url_fopen = On" > /etc/php/7.1/apache2/php.ini
echo "memory_limit = 256M" > /etc/php/7.1/apache2/php.ini
echo "upload_max_filesize = 100M" > /etc/php/7.1/apache2/php.ini
echo "max_execution_time = 360" > /etc/php/7.1/apache2/php.ini
echo "date.timezone = America/Chicago" > /etc/php/7.1/apache2/php.ini
echo "restarting..."
systemctl restart apache2.service
echo "instaling composer"
php -v
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
php -r "readfile('https://getcomposer.org/installer');" | php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment