Skip to content

Instantly share code, notes, and snippets.

@artnic
artnic / install-apache-php-mysql-wp-amazon-ami.sh
Created April 21, 2017 14:55
This script install Apache + PHP + MySQL + Wordpress to given URL. It creates the database and do all the stuff necessary to run wordpress. If you don't want a wordpress installation, just skip the latter lines of this file
#!/bin/sh
# This is how I install apache + php + mysql + wordpress to get up and running in less than 1 minute
# this works for an Amazon AMI instance. Other distros migh need changes to this script
# You can put this script to run when creating an instance at AWS Console. Once machine is up, everything is set up
_SITE_URL_='site.example.com' # note that there's no protocol in the URL here
_DB_ROOT_PASS_='ReallyStrongDatabaseRootPassword'
_DB_USER_='MySQLUserAllowedToAccessFromOutside'
_DB_USERPASS_='CreatedMySQLUsersPassword'
@artnic
artnic / aws-grant-access.sh
Created October 27, 2015 13:39
Updates AWS Security Group adding or updating your current IP address therefore allowing you to access sg restricted stuff
#!/bin/bash
# By Ed Wiget;
# Modified by Rafael Cintra (artnic)
# This run via cron whenever my ip address changes in order to update aws security group
# Or you can put it before accessing anything restricted
# 20131120 - original script
# 20150325 - artnic custom; pointing to bitsforest ;)