Your SlideShare is downloading. ×
  • Like
Linux Administration for Developers
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Linux Administration for Developers


Linux administration background needed for Open Source developers. specifically those using RubyOnRails

Linux administration background needed for Open Source developers. specifically those using RubyOnRails

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads


Total Views
On SlideShare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. Linux Administration for Developers by Mahmoud Said
  • 2. Outline● Why● Linux Basics● Servers● WTF● More monitoring tools 2
  • 3. Why● Free● Hosting Open Source web apps● Developing Open Source apps● Robustness● Development by Community 3
  • 4. WhyAdmin Common Knowledge Developer 4
  • 5. Linux Basics 5
  • 6. Filesystem“Everything is a file” ● Regular files ● Directories ● Symbolic links ● Hard links ● Devices ● Sockets 6
  • 7. Filesystem - Filenames● Case sensitive● Can contain any character except “/”● Extensions are only used for user convenience● Examples: README .bashrc index.html My World conf.old database.yml.bak 7
  • 8. Filesystem – File pathes● Sequence with nested directories ending with or without a file● Relative: config/database.yml● Absolute: /etc/nginx/nginx.conf● Special pathes: ~/ #home of current user / # root .. # parent directory 8
  • 9. Shells● Interface to execute user commands● Hide the details of the OS● Text based Commands● Can be scripted 9
  • 10. Famous Shells● sh The Bourne shell (obsolete) Traditional, basic shell found on Unix systems, by Steve Bourne.● csh The C shell (obsolete) Once popular shell with a C-like syntax● bash The Bourne Again shell (most popular) An improved implementation of sh with lots of added features. 10
  • 11. Scripting● Commands to the shell can be scripted● The script can be passed to the interpreter, or it can be executed by specifying the interpreter at the beginningbash #!/bin/bash./ echo “bash script...”ruby setup.rb #!/usr/bin/ruby./setup.rb puts “ruby script...” 11
  • 12. Common bash commandspwd cat findls less sortcp more wccd vim aliasman nano echomkdir tail lnmv head chmodrm grep chownrmdir crontab 12
  • 13. Bash Keyboard commands● TAB # auto completion● CTRL+R # search commands history● CTRL+D # exit the current shell● CTRL+P # previous command (also “up”)● CTRL+N # next command (also “down”)● CTRL+L # clear screen 13
  • 14. Standard I/O & piping● Redirect output to a file using “>”● Append output to a file using “>>”● Obrain input from a file using “<”● Redirect output as input to another process (piping) “|” 14
  • 15. Servers 15
  • 16. ssh access● Using password● Public/private key pair ssh user@ -p5022 ( default 22) 16
  • 17. Important paths/usr/local/project Root directory (capistrano convension)/var/log/ all important logs/etc/ system configuration files/etc/init.d/ startup scripts 17
  • 18. Uploading/Downloading files● scp scr_file● wget 18
  • 19. Server Anatomy Web server MemcacheApplication server Indexer Database 19
  • 20. WTF!! 20
  • 21. WTF● Something wrong● Too few details● Admin/dev related 21
  • 22. Identifying the problem● Browser/Firebug● Isolating the request● Logs – Application logs – Web server logs – Other logs● Rails console 22
  • 23. System status● System load/CPU (top)● IO (iotop)● Memory (free -m, top)● Check processes (ps aux | grep ruby)● …. 23
  • 24. Monitoring Tools 24
  • 25.● Multiple technologies● Performance analysis● Server monitoring● Traces of errors & slow requests 25
  • 26. Thank You 26