SlideShare une entreprise Scribd logo
1  sur  58
Web 3
You know what?
That course name
isn’t good enough.
Web 3000


Let’s do some damage.
Today’s Agenda!


• WTF: Syllabus reviewed and expectations set.
• LOL: Chat it up. Ask me anything.
• OMG: Do something you [probably] don’t know how to do.
WTF
LOL
OMG
Today’s Impossible Thing
     Build your own server from scratch.
            No GoDaddy allowed.
Amazon Web Services
AWS vocab!

• EC2 = Elastic Cloud Computing. Basically a computer in
  the cloud.

• S3 = Simple Storage Service. Basically a hard drive in the
  cloud.

• Everything Else = We’ll deal with it on a case by case basis.
Step 1
Sign up for Amazon and log into the portal.
Step 2: Click EC2
Step 3: Security Groups
(wait, wtf is a
security group)
Step 4: Make a group like this
Make sure to click
“Apply Rule Changes”
Step 6
Click Instances. I’m not giving you a screenshot for this one. C’mon.
Step...
 wait what step are we on?
• Launch an instance by clicking the “Launch Instance”
  button

 • Name your instance.
 • Create a new “Key Pair”. Name it whatever and download
   it.

 • Set the server to “Ubuntu Server 12.04 LTS”, 64-bit (my
   preference)
Steps 37 through 152

• Click “Edit Details” on the next screen.
• Click “Security Groups”
 • Remember when we made that security group? Yeah,
   click that.

• Save, Launch.
Copy your whatever.amazonaws.com
Connect to your server
        We need to open Terminal.app for this.
Windows users - Putty and WinSCP - http://bit.ly/1YXodh
Fix your key pair.
chmod 0600 ~/Downloads/yourKey.pem
Log into the box
ssh ubuntu@whatever.amazonaws.com -i ~/Downloads/yourKey.pem
Breaking that down
• ssh = log into the server but on the command line. Think
  FTP.

• ubuntu@whatever.amazonaws.com =
  username@address.com

 • ubuntu is automatic default username for a new EC2
   Ubuntu server.

• -i ~/Downloads/yourKey.pem = identity file argument
You are now remotely in.
  Your command line is connected to your EC2 server.
 Until you disconnect (Ctrl+D) you are on that machine.
Pro Tip: Update!
               sudo apt-get update
              sudo apt-get upgrade

Always do this whenever you launch a new instance.
apt-get
An Ubuntu “package manager”. Install stuff on your server super fast.
Let’s install Apache.
                      Apache is web server software.
It’s like Finder for the WWW. It’s the engine behind > 100 million web
                                   sites.
Type this
   sudo apt-get install apache2
(then click Enter when prompted)
(that’s it)
What you just did:
• sudo = super user “do”. sudo means that the computer is
  your bitch.

 • You need permission to sudo. In this case Amazon pre-
   configured it.

• apt-get = the command line program to run, our package
  manager

• install = what we want the program to do. Bet you can
  guess this one.
Install some more stuff
• sudo apt-get install mysql-server mysql-client
• sudo apt-get install mongodb
• sudo apt-get install php5 php5-dev libapache2-mod-
  php5 php5-curl php5-gd php5-idn php-pear php5-
  imagick php5-imap php5-mcrypt php5-memcache php5-
  ps php5-pspell php5-recode php5-snmp php5-tidy
  php5-xmlrpc php5-xsl php5-common

• (steal that last one: http://www.giantflyingsaucer.com/
Having fun yet?
Don’t know the
      name of a package?
Google “apt-get install [name of thing you’re trying to install]”
                   That’s about all I know.
Let’s test out your server.
Go to
http://whatever.amazonaws.com
Yaaaaaaaaaayyyyy!
Now let’s set up SFTP.
First we need credentials.
                 sudo useradd -m [username]
                   sudo passwd [username]

           -m creates a home directory for that user.
You’ll need to enter the password twice. It won’t show up on the
                             screen.
Give yourself sudo access.
          sudo visudo
vi
A Command Line Text Editor
Add your username under root
Save and Quit
     Ctrl+O
     Ctrl+X
Test it out
     su yourName
   (enter password)
        sudo ls
(enter password again)
Edit SSHD settings
• sudo vi /etc/ssh/sshd_config
 • Type “i” to begin editing. (i as in insert)
 • Set port from 22 to 30000. This is for security.
  • PermitRootLogin should be no
  • PasswordAuthentication should be yes
 • Hit ESC.
 • Type “:wq” to save and quit.
Restart SSH
sudo /etc/init.d/ssh restart
(aside)
          You can restart lots of services with this.
Whenever you change a config file you probably need a restart.

                       For example:
One last thing...
Set up the WWW directory so we can edit it.
Create a group
        sudo groupadd webadmin
sudo usermod -a -G webadmin [yourname]
   sudo usermod -a -G webadmin root
Edit the WWW directory
   sudo chown -R root:webadmin /var/www
        sudo chmod -R 775 /var/www
Log In!
Holy Wow
You did it. You built a server from scratch.
       (Specifically a LAMP stack.)
Linux Commands
•   ls = list files

•   ls -la = list files a little bit more organized

•   cd /path/to/directory = change directory

    •   Use tab to autocomplete.

•   mkdir dir = make a directory

•   chmod permissions dirOrFile = change the read/write permissions. complicated.

•   chown user:group dirOrFile = change the owner of a file. also complicated

•   Ctrl+D or Ctrl+C usually quits something. I always forget which is which.

•   Apple+T creates new tabs. Useful for having one remote connection and one local.
Common vi Commands
• i = insert. once in insert mode type as normal.
 • (aside: Larry Tessler invented Word Processing because
   he hated vi)

• ESC = done inserting
• :q! = quit without saving
• :wq = save and quit
Advanced Tinkerings
• Ruby is a very popular platform these days. Perhaps install
  that?

• Or perhaps you want an all JavaScript solution. NodeJS +
  MongoDB.

• I know some of you are Django and Python nuts. Go on...
  Google it. You know you want to.

• Linux geek and hate Ubuntu? That’s fine. Use another
  flavor. You won’t hurt my feelings.
For next week
• Terminate your server and rebuild it from scratch. Practice
  makes perfect.

 • If you screw up you can always terminate and restart. If
   that even costs you a penny I’d be shocked.

• Build and deploy a small web site that takes some part of
  this deck and translates it into HTML, CSS and JavaScript.
  Hit me with your best shot.
Questions?

Contenu connexe

Tendances

Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationJohn Lynch
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster WebsiteRayed Alrashed
 
Virtual Infrastructure
Virtual InfrastructureVirtual Infrastructure
Virtual InfrastructureBryan McLellan
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packerfrastel
 
Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeAnsible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeSarah Z
 
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...LumoSpark
 
Dockerizing WordPress
Dockerizing WordPressDockerizing WordPress
Dockerizing WordPressdotCloud
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to AnsibleCédric Delgehier
 
A Introduction of Packer
A Introduction of PackerA Introduction of Packer
A Introduction of PackerFreyr Lin
 
Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10Maurício Linhares
 
Introduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsIntroduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsDerek Anderson
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with AnsibleRayed Alrashed
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...Tom Croucher
 
OpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid CloudOpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid CloudIsaac Christoffersen
 

Tendances (20)

Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster Website
 
Virtual Infrastructure
Virtual InfrastructureVirtual Infrastructure
Virtual Infrastructure
 
Cialug August 2021
Cialug August 2021Cialug August 2021
Cialug August 2021
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
 
Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeAnsible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less Coffee
 
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...
How to turn any dynamic website into a static site | 24.01.2018 | Artem Danil...
 
Dockerizing WordPress
Dockerizing WordPressDockerizing WordPress
Dockerizing WordPress
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible
 
A Introduction of Packer
A Introduction of PackerA Introduction of Packer
A Introduction of Packer
 
Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10
 
Hadoop on ec2
Hadoop on ec2Hadoop on ec2
Hadoop on ec2
 
Ansible intro
Ansible introAnsible intro
Ansible intro
 
Introduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsIntroduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCats
 
Start using vagrant now!
Start using vagrant now!Start using vagrant now!
Start using vagrant now!
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
 
Test driven infrastructure
Test driven infrastructureTest driven infrastructure
Test driven infrastructure
 
A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...A language for the Internet: Why JavaScript and Node.js is right for Internet...
A language for the Internet: Why JavaScript and Node.js is right for Internet...
 
OpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid CloudOpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid Cloud
 
CFML Sessions For Dummies
CFML Sessions For DummiesCFML Sessions For Dummies
CFML Sessions For Dummies
 

Similaire à Web 3, Week 1: Amazon Web Services for Beginners

Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil CholewińskiPilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil CholewińskiPilot
 
Improving your shell usage - 2010
Improving your shell usage - 2010Improving your shell usage - 2010
Improving your shell usage - 2010Chris Sinjakli
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)Soshi Nemoto
 
Hosting a Rails App
Hosting a Rails AppHosting a Rails App
Hosting a Rails AppJosh Schramm
 
WordPress CLI in-depth
WordPress CLI in-depthWordPress CLI in-depth
WordPress CLI in-depthSanjay Willie
 
Setting Up a Cloud Server - Part 1 - Transcript.pdf
Setting Up a Cloud Server - Part 1 - Transcript.pdfSetting Up a Cloud Server - Part 1 - Transcript.pdf
Setting Up a Cloud Server - Part 1 - Transcript.pdfShaiAlmog1
 
Deploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeDeploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeWO Community
 
Tutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingTutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingBeni Krisbiantoro
 
A Docker-based Development Environment Even I Can Understand
A Docker-based Development Environment Even I Can UnderstandA Docker-based Development Environment Even I Can Understand
A Docker-based Development Environment Even I Can UnderstandJeremy Gimbel
 
Ubuntu Practice and Configuration
Ubuntu Practice and ConfigurationUbuntu Practice and Configuration
Ubuntu Practice and ConfigurationManoj Sahu
 
How to deploy node to production
How to deploy node to productionHow to deploy node to production
How to deploy node to productionSean Hess
 
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)Japheth Thomson
 
Automating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and AnsibleAutomating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and AnsibleBrian Hogan
 
DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)Soshi Nemoto
 
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidMatthew Johnson
 
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMPHow To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMPMatt Dunlap
 
Word press, the automated way
Word press, the automated wayWord press, the automated way
Word press, the automated wayMichaël Perrin
 
Installing Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu InstanceInstalling Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu Instancekamarul kawnayeen
 

Similaire à Web 3, Week 1: Amazon Web Services for Beginners (20)

Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil CholewińskiPilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
 
Improving your shell usage - 2010
Improving your shell usage - 2010Improving your shell usage - 2010
Improving your shell usage - 2010
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)
 
Hosting a Rails App
Hosting a Rails AppHosting a Rails App
Hosting a Rails App
 
WordPress CLI in-depth
WordPress CLI in-depthWordPress CLI in-depth
WordPress CLI in-depth
 
Setting Up a Cloud Server - Part 1 - Transcript.pdf
Setting Up a Cloud Server - Part 1 - Transcript.pdfSetting Up a Cloud Server - Part 1 - Transcript.pdf
Setting Up a Cloud Server - Part 1 - Transcript.pdf
 
Deploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeDeploying to Ubuntu on Linode
Deploying to Ubuntu on Linode
 
Tutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingTutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk Webhosting
 
Sun raysetup
Sun raysetupSun raysetup
Sun raysetup
 
A Docker-based Development Environment Even I Can Understand
A Docker-based Development Environment Even I Can UnderstandA Docker-based Development Environment Even I Can Understand
A Docker-based Development Environment Even I Can Understand
 
Ubuntu Practice and Configuration
Ubuntu Practice and ConfigurationUbuntu Practice and Configuration
Ubuntu Practice and Configuration
 
How to deploy node to production
How to deploy node to productionHow to deploy node to production
How to deploy node to production
 
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)
Migrating a Site Quickly with SSH and WP-CLI (It's not as scary as you think!)
 
Automating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and AnsibleAutomating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and Ansible
 
DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)
 
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue Kid
 
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMPHow To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
 
Word press, the automated way
Word press, the automated wayWord press, the automated way
Word press, the automated way
 
Installing Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu InstanceInstalling Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu Instance
 
instaling
instalinginstaling
instaling
 

Dernier

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Dernier (20)

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

Web 3, Week 1: Amazon Web Services for Beginners

  • 4. Web 3000 Let’s do some damage.
  • 5. Today’s Agenda! • WTF: Syllabus reviewed and expectations set. • LOL: Chat it up. Ask me anything. • OMG: Do something you [probably] don’t know how to do.
  • 6. WTF
  • 7. LOL
  • 8. OMG
  • 9. Today’s Impossible Thing Build your own server from scratch. No GoDaddy allowed.
  • 11. AWS vocab! • EC2 = Elastic Cloud Computing. Basically a computer in the cloud. • S3 = Simple Storage Service. Basically a hard drive in the cloud. • Everything Else = We’ll deal with it on a case by case basis.
  • 12. Step 1 Sign up for Amazon and log into the portal.
  • 15. (wait, wtf is a security group)
  • 16. Step 4: Make a group like this
  • 17. Make sure to click “Apply Rule Changes”
  • 18. Step 6 Click Instances. I’m not giving you a screenshot for this one. C’mon.
  • 19. Step... wait what step are we on? • Launch an instance by clicking the “Launch Instance” button • Name your instance. • Create a new “Key Pair”. Name it whatever and download it. • Set the server to “Ubuntu Server 12.04 LTS”, 64-bit (my preference)
  • 20. Steps 37 through 152 • Click “Edit Details” on the next screen. • Click “Security Groups” • Remember when we made that security group? Yeah, click that. • Save, Launch.
  • 22. Connect to your server We need to open Terminal.app for this. Windows users - Putty and WinSCP - http://bit.ly/1YXodh
  • 23. Fix your key pair. chmod 0600 ~/Downloads/yourKey.pem
  • 24. Log into the box ssh ubuntu@whatever.amazonaws.com -i ~/Downloads/yourKey.pem
  • 25. Breaking that down • ssh = log into the server but on the command line. Think FTP. • ubuntu@whatever.amazonaws.com = username@address.com • ubuntu is automatic default username for a new EC2 Ubuntu server. • -i ~/Downloads/yourKey.pem = identity file argument
  • 26. You are now remotely in. Your command line is connected to your EC2 server. Until you disconnect (Ctrl+D) you are on that machine.
  • 27. Pro Tip: Update! sudo apt-get update sudo apt-get upgrade Always do this whenever you launch a new instance.
  • 28. apt-get An Ubuntu “package manager”. Install stuff on your server super fast.
  • 29. Let’s install Apache. Apache is web server software. It’s like Finder for the WWW. It’s the engine behind > 100 million web sites.
  • 30. Type this sudo apt-get install apache2 (then click Enter when prompted)
  • 32. What you just did: • sudo = super user “do”. sudo means that the computer is your bitch. • You need permission to sudo. In this case Amazon pre- configured it. • apt-get = the command line program to run, our package manager • install = what we want the program to do. Bet you can guess this one.
  • 33. Install some more stuff • sudo apt-get install mysql-server mysql-client • sudo apt-get install mongodb • sudo apt-get install php5 php5-dev libapache2-mod- php5 php5-curl php5-gd php5-idn php-pear php5- imagick php5-imap php5-mcrypt php5-memcache php5- ps php5-pspell php5-recode php5-snmp php5-tidy php5-xmlrpc php5-xsl php5-common • (steal that last one: http://www.giantflyingsaucer.com/
  • 35. Don’t know the name of a package? Google “apt-get install [name of thing you’re trying to install]” That’s about all I know.
  • 36. Let’s test out your server.
  • 39. Now let’s set up SFTP.
  • 40. First we need credentials. sudo useradd -m [username] sudo passwd [username] -m creates a home directory for that user. You’ll need to enter the password twice. It won’t show up on the screen.
  • 41. Give yourself sudo access. sudo visudo
  • 42. vi A Command Line Text Editor
  • 43. Add your username under root
  • 44. Save and Quit Ctrl+O Ctrl+X
  • 45. Test it out su yourName (enter password) sudo ls (enter password again)
  • 46. Edit SSHD settings • sudo vi /etc/ssh/sshd_config • Type “i” to begin editing. (i as in insert) • Set port from 22 to 30000. This is for security. • PermitRootLogin should be no • PasswordAuthentication should be yes • Hit ESC. • Type “:wq” to save and quit.
  • 48. (aside) You can restart lots of services with this. Whenever you change a config file you probably need a restart. For example:
  • 49. One last thing... Set up the WWW directory so we can edit it.
  • 50. Create a group sudo groupadd webadmin sudo usermod -a -G webadmin [yourname] sudo usermod -a -G webadmin root
  • 51. Edit the WWW directory sudo chown -R root:webadmin /var/www sudo chmod -R 775 /var/www
  • 53. Holy Wow You did it. You built a server from scratch. (Specifically a LAMP stack.)
  • 54. Linux Commands • ls = list files • ls -la = list files a little bit more organized • cd /path/to/directory = change directory • Use tab to autocomplete. • mkdir dir = make a directory • chmod permissions dirOrFile = change the read/write permissions. complicated. • chown user:group dirOrFile = change the owner of a file. also complicated • Ctrl+D or Ctrl+C usually quits something. I always forget which is which. • Apple+T creates new tabs. Useful for having one remote connection and one local.
  • 55. Common vi Commands • i = insert. once in insert mode type as normal. • (aside: Larry Tessler invented Word Processing because he hated vi) • ESC = done inserting • :q! = quit without saving • :wq = save and quit
  • 56. Advanced Tinkerings • Ruby is a very popular platform these days. Perhaps install that? • Or perhaps you want an all JavaScript solution. NodeJS + MongoDB. • I know some of you are Django and Python nuts. Go on... Google it. You know you want to. • Linux geek and hate Ubuntu? That’s fine. Use another flavor. You won’t hurt my feelings.
  • 57. For next week • Terminate your server and rebuild it from scratch. Practice makes perfect. • If you screw up you can always terminate and restart. If that even costs you a penny I’d be shocked. • Build and deploy a small web site that takes some part of this deck and translates it into HTML, CSS and JavaScript. Hit me with your best shot.

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n