Created
November 27, 2015 19:54
-
-
Save stevefurley/1335a743770549f0f6d8 to your computer and use it in GitHub Desktop.
Setup wordpress database php 5 etc on codio
This file contains 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 | |
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