Last active
August 1, 2017 04:55
-
-
Save matthewpoer/5c6d362ed596bbcbbe62fe957a2c7f4e to your computer and use it in GitHub Desktop.
LAMP setup for SugarCRM 6.5 on Ubuntu 16.04
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
| #!/bin/bash | |
| # Set up LAMP stack tailored on Ubuntu 16.04 LTS to latest version of SugarCRM 6.5 | |
| # (as of 2017-07-23 that's 6.5.26; 6.5 is EoL as of 2017-07-15) | |
| # sources | |
| # https://developer.sugarcrm.com/2016/01/04/using-packer-to-create-consistent-sugar-hosting-environments/#more-12929 | |
| # https://launchpad.net/~ondrej/+archive/ubuntu/php/ | |
| # http://support.sugarcrm.com/Resources/Supported_Versions/ | |
| # Stack Setup | |
| echo "mysql-server-5.5 mysql-server/root_password password root" | debconf-set-selections | |
| echo "mysql-server-5.5 mysql-server/root_password_again password root" | debconf-set-selections | |
| add-apt-repository ppa:ondrej/php | |
| aptitude update && aptitude -y install \ | |
| apache2 \ | |
| curl \ | |
| libapache2-mod-php5.6 \ | |
| libphp-pclzip \ | |
| mysql-server \ | |
| perl \ | |
| php-apc \ | |
| php5 \ | |
| php5.6-curl \ | |
| php5.6-dev \ | |
| php5.6-gd \ | |
| php5.6-imap \ | |
| php5.6-mbstring \ | |
| php5.6-mysql \ | |
| php5.6-xdebug \ | |
| php5.6-xml \ | |
| php5.6-zip \ | |
| python-software-properties \ | |
| vim \ | |
| zip | |
| # Config. PHP | |
| sed -i 's/memory_limit = 128M/memory_limit = 512M/' /etc/php/5.6/apache2/php.ini | |
| sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 20M/' /etc/php/5.6/apache2/php.ini | |
| sed -i 's/;date.timezone =/date.timezone = UTC/' /etc/php/5.6/apache2/php.ini | |
| sed -i 's/;date.timezone =/date.timezone = UTC/' /etc/php/5.6/cli/php.ini | |
| # Config. Apache | |
| chown -R www-data /var/www/ | |
| a2enmod headers expires deflate rewrite | |
| # Allow login of www-data user (i.e. su www-data) | |
| sed -i 's;www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin;www-data:x:33:33:www-data:/var/www:/bin/bash;' /etc/passwd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment