Skip to content

Instantly share code, notes, and snippets.

@stevefurley
Created November 27, 2015 19:54
Show Gist options
  • Save stevefurley/1335a743770549f0f6d8 to your computer and use it in GitHub Desktop.
Save stevefurley/1335a743770549f0f6d8 to your computer and use it in GitHub Desktop.
Setup wordpress database php 5 etc on codio
#! /bin/bash
echo "Installing stuff"
parts install php5 php5-apache2 php5-pdo-mysql php5-gd mysql composer
echo "starting things"
echo "parts stop apache2 mysql ; parts start apache2 mysql" > ~/startup.sh
chmod +x ~/startup.sh
~/startup.sh
pass=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1)
mysql -u root -e"create database codio; create user codio@localhost identified by '$pass'; grant usage on *.* to codio@localhost; grant all privileges on codio.* to codio@localhost"
echo "=============================="
echo "db credentials are as follows:"
echo ""
echo "user: codio"
echo "pass: $pass"
echo "db: codio"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment