Download PDF

hastywittedmarriedInternet και Εφαρμογές Web

8 Δεκ 2013 (πριν από 3 χρόνια και 4 μήνες)

125 εμφανίσεις

Linux Servers
Ali Nadalizadeh
Ahmad Darki
Ashkan Yousefpour
AUT’s 5th Linux Festival
Thursday, June 6, 13
Presentation Layout
Theoretical Overview on Linux Servers
Slide Presentation
Web Server Installation
Server Management and Monitoring
Thursday, June 6, 13
What’s a Server?
In computing, a server is
any combination of
hardware or software designed to provide
services to clients
When used alone, the term typically refers to a
computer which may be running a server
operating system, but is also used to refer to
any software or dedicated hardware capable of
providing services.
Thursday, June 6, 13
Advanced Networking Capabilities
Automation Capabilities
Tight System Security
Resource Management Capabilities
Thursday, June 6, 13
What do I need?
You need to be friend with Linux
Terminal Commands
Editing Config files
Reading Log Files
Willpower to read and try
HOW-TO(s), Manuals and Forums
Thursday, June 6, 13
What do I need?
Have Networking Knowledge
Concepts (IP, Port, Interface, Firewall, etc)
Network Configuration
Network Troubleshooting
Security and Auditing
Permissions and Access Control
Never trust your theoretical knowledge
Constantly monitoring for malicious activities
Thursday, June 6, 13
Typical Server Scenarios
Web Server
Internet Gateway
Domain Controller Server
E-Mail Server
Load Balancing Servers
Thursday, June 6, 13
Web Server
Serving Dynamic Web Pages Involves:
Serving Static Files
Apache, NGINX
Server Side Programming Language
PHP, Ruby, Python, J2EE, ...
Database Server
MySQL, PostgreSQL, Oracle
Thursday, June 6, 13
Shared Web Servers
Administration Portal
CPanel, ISPConfig, Webmin, PHPMyAdmin, ...
File Transfer
Notes on File and Process Permissions
SuPHP, Apache-itk, FASTCGI, Jailing Concept
Thursday, June 6, 13
Internet Gateway
Linux as a Router
Netfilter / iptables / traffic shaping
(Layer 3 to 5 in OSI)
Caching Proxy Server (Squid, Traffic Server, ...)
Bandwith Control
Thursday, June 6, 13
Domain Controller
Freeware reimplementation of SMB/CIFS protocol
Acts as File / Printer sharing server
Can act as Primary Domain Controller (PDC)
Version 3 can join Active Directory as a member
Version 4 promises Active Directory Server feature
Thursday, June 6, 13
Domain Controller
For *nix Systems
User Authentication
Network Information Service (NIS)
PAM (Pluggable Authentication Module)
File Sharing
NFS (Network File System)
AFS (Andrew File System)
Any other Virtual FS
Thursday, June 6, 13
Email Server
Mail Transportation Agent (MTA)
Mail Access Server (POP3, IMAP)
Dovecot, Courier, Webmail
Thursday, June 6, 13
Web Server Setup
Ahmad Darki / Ashkan Yousefpour
AUT’s 5th Linux Festival
Thursday, June 6, 13
Server Management
and Monitoring
Ali Nadalizadeh
AUT’s 5th Linux Festival
Thursday, June 6, 13
Remote Management
Secure Shell Server (OpenSSH Server)
apt-get install openssh-server
Key Exchange
File Transfer (SCP)
Port Forwarding

Web-based Terminals
Thursday, June 6, 13
System Monitoring
System Load
13:02:15 up 11 days, 19:28, 1 user, load average: 0.88, 0.98, 0.95
Disk Space
[root@cl-t169-402cl ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 290G 89G 187G 33% /
free -m
Thursday, June 6, 13
System Monitoring
Network Usage / Quota
vnstat (general and timed reports)
munin (graphical charts)
Network Bandwidth
[root@cl-t169-402cl ~]# vnstat -l
Monitoring eth0... (press CTRL-C to stop)
rx: 1.29 Mbit/s 2301 p/s tx: 42.10 Mbit/s 3769 p/s
Thursday, June 6, 13
System Monitoring
Process Monitoring
grep, pstree
top - Constant Process Monitoring
htop - Supports Multicore
iotop - Disk Input/Output stats
iftop - Network transfer activity
Thursday, June 6, 13
High Load Servers
Too much load on the server?
Software Optimization
database queries, code, cache
Changing Server Softwares
nginx, fastcgi, ...
Changing Internal Server Architecture
varnish, squid, nginx mixtures
Distributed / Load Balancing Architecture
dns, server based, resource based
Thursday, June 6, 13
Log files
Analyzing logs
less, tail, head
grep, grep -v
Live Monitoring
tail -f /var/log/syslog
Thursday, June 6, 13
Log files
System Logs
Application Log Files
Service Logfiles
Thursday, June 6, 13
Analyzing Logs
Using Helper Tools
Using Shell Utilities
Extract number of accesses from an IP
cat /var/log/nginx/access.log | grep | wc
Thursday, June 6, 13
Thursday, June 6, 13