nax3t / aws-cloud9-instructions

Instructions for setting up an AWS account and using Cloud9
63 stars 30 forks source link

Getting started with Cloud9 on Amazon Web Services (AWS)

Check node and npm

MongoDB Instructions

(skip this section and see below for MySQL Instructions if coming from MySQL course)

[mongodb-org-3.6]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.6/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc
sudo mv mongodb-org-3.6.repo /etc/yum.repos.d
sudo yum install -y mongodb-org
mkdir data
echo 'mongod --dbpath=data --nojournal' > mongod
chmod a+x mongod

That's it! You're all set :)

MySQL Instructions

CREATE database test;
USE test;
CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20));
INSERT INTO pet (name, owner, species) VALUES('Loki', 'Ian', 'Dog');                                                                                                                                                    
SELECT * FROM pet;

Result:

+------+-------+---------+
| name | owner | species |
+------+-------+---------+
| Loki | Ian   | Dog     |
+------+-------+---------+