Skip to content

Instantly share code, notes, and snippets.

@sndsgd
Last active August 29, 2015 14:02
Show Gist options
  • Save sndsgd/d63e6d7568be9f35cd32 to your computer and use it in GitHub Desktop.
Save sndsgd/d63e6d7568be9f35cd32 to your computer and use it in GitHub Desktop.
Ubuntu 14.04 setup
#!/bin/bash
if [ "$UID" -ne 0 ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
#############################################################################
# Install Packages ##########################################################
#############################################################################
apt-get install \
build-essential \
git \
zip \
php5 \
php5-cli \
php5-dev \
php5-mcrypt \
php5-json \
php5-curl \
php5-gd \
php5-memcached \
php5-mysqlnd \
php5-fpm \
nginx \
openjdk-7-jre \
openjdk-7-jre-headless \
openjdk-7-jre-lib
#############################################################################
# Install MariaDB ###########################################################
#############################################################################
# add the repository
apt-get install software-properties-common
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
add-apt-repository 'deb http://mirror.jmu.edu/pub/mariadb/repo/10.0/ubuntu trusty main'
# install
apt-get update
apt-get install mariadb-server
# add a config file
cat << 'EOF' > /etc/mysql/conf.d/srslygd.cnf
# MariaDB updates for SRSLYGD
# read by /etc/mysql/my.cnf
# change the sql mode to ANSI compatable
[mysqld]
sql-mode = ANSI
# utf8 support
# copied directly from /etc/mysql/conf.d/mariadb.conf
# set utf8 as the default charset on both client and server
[client]
default-character-set = utf8
[mysqld]
character-set-server = utf8
collation-server = utf8_general_ci
character_set_server = utf8
collation_server = utf8_general_ci
EOF
#############################################################################
# Composer PHP Package Manager ##############################################
#############################################################################
cd /tmp
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment