KEMBAR78
Intro to Linux - Skillswap | PDF
Linux

 @twombh Tom Buckley-Houston
Thanks | Evening | Future

●   @PMStudioUK
●   @iamdanw            Next Skillswap:
    @garybristow
                         Progressive
●


●   @spyou
●   @amias              Enhancement
●   @jmoverley



     Drinks in the Watershed afterwards
Linux for web developers




Dev environment:               Historical/Architectural:
●
  Everything apart from PS     ●
                                 60% websites, 25% mobile
●
  Wine, GIMP                   ●
                                 Google, Facebook, etc
●
  Java apps: Aptana/Netbeans   ●
                                 Linux descended from UNIX,
●
  Better LAMP                    computer science, ARPANET,
●
  General daily usage            etc. More of a direct lineage
●
  Philosophical reasons          than Windows.
Computing Eden


       ●
           1960s America, UNIX,
           C, ARPANET
       ●
           MIT, Bell Labs.
       ●
           Dennis Ritchie, Brian
           Kernighan, Ken
           Thompson.
The UNIX Way
“Write programs that do one thing and do it well.
Write programs to work together. Write programs
to handle text streams, because that is a universal
                    interface.”

●
    The human dimension.
●
    Command Line Interface - CLI.
●
    Analogy to modern web standards; REST, W3C,
    etc.
Richard Stallman
        ●   Early 1980s
        ●   GNU: GNU's Not Unix!
        ●   Almost made a kernel
        ●   The GPL
        ●   Free as in speech, not free
            as in beer.
        ●   Free to do whatever you
            want as long as that
            doesn't restrict someone
            else doing the same. (eg;
            Red Hat)
Compulsory XKCD
Linus Torvalds

       ●
           1991, doing a
           masters in Computer
           Science at Helsinki.
       ●
           MINIX but better
           license.
       ●
           The Linux Kernel.
LAMP Hello World

●
    You've got a server out there somewhere.
●
    SSH and SSH keys.
●   `ssh tom@myserver.com'
●
    `aptitude update' Compare with Windows
●   `aptitude install apache2 mysql5-server
    php5 apache2-mod-php php5-mysql'
●   `curl localhost' “It Works!”
Apache's Vhosts
Quick way in a local environment: Just   Proper way in production environment: Lots
shive loads of definitions in the same   of files that you can individually turn on and
                                         off.
file.
                                         `nano /etc/apache2/sites-available/website'
`nano /etc/apache2/conf.d/vhosts'
                                         NameVirtualHost *:80
                                         <VirtualHost *:80>
<VirtualHost *:80>
                                           ServerName myserver.com
  ServerName myserver.com
                                           DocumentRoot /var/www/website
  DocumentRoot /var/www/website          </VirtualHost>
</VirtualHost>
                                         `sudo a2ensite website'
                                         Creates a symbolic link from;
`sudo service apache2 restart'
                                         /etc/apache2/sites-enabled/website
                                         `sudo service apache2 restart'
Uploading your project
            without FTP!


●   `scp -r myproject/* tom@myserver.com:/var/www/website'
●   `rsync -rv myproject/* tom@myserver.com:/var/www/website'
●   `git push'

Intro to Linux - Skillswap

  • 1.
    Linux @twombh TomBuckley-Houston
  • 2.
    Thanks | Evening| Future ● @PMStudioUK ● @iamdanw Next Skillswap: @garybristow Progressive ● ● @spyou ● @amias Enhancement ● @jmoverley Drinks in the Watershed afterwards
  • 3.
    Linux for webdevelopers Dev environment: Historical/Architectural: ● Everything apart from PS ● 60% websites, 25% mobile ● Wine, GIMP ● Google, Facebook, etc ● Java apps: Aptana/Netbeans ● Linux descended from UNIX, ● Better LAMP computer science, ARPANET, ● General daily usage etc. More of a direct lineage ● Philosophical reasons than Windows.
  • 4.
    Computing Eden ● 1960s America, UNIX, C, ARPANET ● MIT, Bell Labs. ● Dennis Ritchie, Brian Kernighan, Ken Thompson.
  • 5.
    The UNIX Way “Writeprograms that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.” ● The human dimension. ● Command Line Interface - CLI. ● Analogy to modern web standards; REST, W3C, etc.
  • 6.
    Richard Stallman ● Early 1980s ● GNU: GNU's Not Unix! ● Almost made a kernel ● The GPL ● Free as in speech, not free as in beer. ● Free to do whatever you want as long as that doesn't restrict someone else doing the same. (eg; Red Hat)
  • 7.
  • 8.
    Linus Torvalds ● 1991, doing a masters in Computer Science at Helsinki. ● MINIX but better license. ● The Linux Kernel.
  • 9.
    LAMP Hello World ● You've got a server out there somewhere. ● SSH and SSH keys. ● `ssh tom@myserver.com' ● `aptitude update' Compare with Windows ● `aptitude install apache2 mysql5-server php5 apache2-mod-php php5-mysql' ● `curl localhost' “It Works!”
  • 10.
    Apache's Vhosts Quick wayin a local environment: Just Proper way in production environment: Lots shive loads of definitions in the same of files that you can individually turn on and off. file. `nano /etc/apache2/sites-available/website' `nano /etc/apache2/conf.d/vhosts' NameVirtualHost *:80 <VirtualHost *:80> <VirtualHost *:80> ServerName myserver.com ServerName myserver.com DocumentRoot /var/www/website DocumentRoot /var/www/website </VirtualHost> </VirtualHost> `sudo a2ensite website' Creates a symbolic link from; `sudo service apache2 restart' /etc/apache2/sites-enabled/website `sudo service apache2 restart'
  • 11.
    Uploading your project without FTP! ● `scp -r myproject/* tom@myserver.com:/var/www/website' ● `rsync -rv myproject/* tom@myserver.com:/var/www/website' ● `git push'