Skip to content

Instantly share code, notes, and snippets.

@malev
Created February 12, 2015 22:05
Show Gist options
  • Save malev/551417a9e04fc8a0f642 to your computer and use it in GitHub Desktop.
Save malev/551417a9e04fc8a0f642 to your computer and use it in GitHub Desktop.
SugarCRM recipe
apt-get update
apt-get install -y mysql-server
apt-get install -y apache2 libapache2-mod-php5 php-apc php5-mysql php5-imap php5-curl php5-gd php5-memcached curl python cron
curl -SL "http://switch.dl.sourceforge.net/project/sugarcrm/1%20-%20SugarCRM%206.5.X/SugarCommunityEdition-6.5.X/SugarCE-6.5.20.zip"|python -c "import zipfile,sys,StringIO;zipfile.ZipFile(StringIO.StringIO(sys.stdin.read())).extractall('/var/www/')"
rm -rf /var/www/html && mv /var/www/SugarCE-Full-6.5.20 /var/www/html
sed -i 's/^upload_max_filesize = 2M$/upload_max_filesize = 10M/' /etc/php5/apache2/php.ini
chown www-data:www-data -R /var/www/html
chmod -R 0755 /var/www/html/cache
rm /var/www/html/index.html
echo 'date.timezone = UTC' >> /etc/php5/apache2/php.ini
mkdir -p /etc/service/apache2
cat <<EOF >/root/crons.conf
* * * * * cd /var/www; php -f cron.php > /dev/null 2>&1
EOF
cat <<EOF >/etc/service/apache2/run
#!/bin/sh
/usr/sbin/apache2ctl -D FOREGROUND
EOF
crontab /root/crons.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment