Skip to content

Instantly share code, notes, and snippets.

@AdamLawicki
AdamLawicki / gist:3d308e8c28edca748542
Created October 17, 2015 23:13
Connect to SSH for AWS
$ chmod 400 my-key-pair.pem
@AdamLawicki
AdamLawicki / gist:2904c93fe154fbf3ae7d
Created October 17, 2015 23:35
Updating AWS instance software
[ec2-user ~]$ sudo yum update -y
@AdamLawicki
AdamLawicki / gist:768c8d626938d4bc7364
Created October 17, 2015 23:39
Install Apache web server, MySQL, and PHP software packages at the same time for AWS
[ec2-user ~]$ sudo yum install -y httpd24 php56 mysql55-server php56-mysqlnd
@AdamLawicki
AdamLawicki / gist:f3f39f5fc73d00d52ffe
Created October 17, 2015 23:40
Start Apache web server
[ec2-user ~]$ sudo service httpd start
Starting httpd: [ OK ]
@AdamLawicki
AdamLawicki / gist:395fb8fa8ec4a48f2c5d
Created October 17, 2015 23:41
chkconfig for each boot was
[ec2-user ~]$ sudo chkconfig httpd on
[ec2-user ~]$ chkconfig --list httpd
httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
@AdamLawicki
AdamLawicki / gist:fb21a4d6de8c2d7b4a13
Created October 18, 2015 19:42
Add www group to your instance
[ec2-user ~]$ sudo groupadd www
@AdamLawicki
AdamLawicki / gist:ad09fb6bc2c30027d182
Created October 18, 2015 19:43
Add your user to www group
[ec2-user ~]$ sudo usermod -a -G www ec2-user
[ec2-user ~]$ exit
[ec2-user ~]$ groups
ec2-user wheel www