Netkiller Linux 手札

Debian/Ubuntu Cookbook

Neo Chan

 


中国广东省深圳市宝安区龙华镇
518109
+86 755 29812080
+86 755 29812080

文档出处
http://netkiller.8800.org/
http://netkiller.hikz.com/
http://netkiller.mefound.com

版权声明

你可以任意转载,转载请与作者联系,转载时请务必标明文章原始出处和作者信息及本声明。

文档最近一次更新于 {latest}

对初学Linux的爱好者忠告

玩Linux最忌reboot(重新启动)这是windows玩家坏习惯

Linux只要接上电源你就不要再想用reboot,shutdown,halt,poweroff命令,Linux系统和应用软件一般备有reload,reconfigure,restart/start/stop...不需要安装软件或配置服务器后使用reboot重新引导计算机

在Linux系统里SIGHUP信号被定义为刷新配置文件,有些程序没有提供reload参数,你可以给进程发送HUP信号,让它刷新配置文件,而不用restart.通过pkill,killall,kill 都可以发送HUP信号例如: pkill -HUP httpd


鸣谢

目录

自述
本文目的
内容简介
读者对象
写给读者
作者简介
联系作者
1. Introduction
Linux Installation
I. System
2. device information
3. System Information
4. time zone
to change system date/time
5. xinetd - replacement for inetd with many enhancements
6. Command
nohup - run a command immune to hangups, with output to a non-tty
lsof - list open files
7. Packages
Debian / Ubuntu apt-get
Update
Search
Installation
Remove
List of installed software packages
dpkg-reconfigure
tar - GNU tar / compress and decompress
tar examples
gzip
b2zip
Zip
8. console / terminal
serial console
console timeout
disable x window
9. Disk
show partition
Create Partition
Format Partition
ext3
ReiserFS
10. Command Shell
查找文件并删除
xargs
find and replace
to convert utf-8 from gb2312 code
php function check
II. Network
11. network tools
curl / w3m / lynx
nmap
tcpdump
rdesktop - A Remote Desktop Protocol client
12. ethernet
Interfaces
Mask
Gateway
sysctl
bonding
Ubuntu
13. DNS/Bind
bind9
Load Balancing
view
tools
14. Proxy Server
Socks 5
Apache Proxy
15. Squid - Internet Object Cache (WWW proxy cache)
debian/ubuntu 安装
Proxy Server
Squid作为反向代理Cache服务器(Reverse Proxy)
代理+反向代理
Squid 管理
禁止页面被Cache
Squid 实用案例
Squid Apache/Lighttpd 在同一台服务器上
用非 root 用户守护 Squid
16. News Group (innd)
User Authentication
17. NET SNMP (Simple Network Management Protocol)
安装SNMP
例出MBI
Cacti
III. Security
18. OpenSSH
maximum number of authentication
disable root SSH login
Automatic SSH / SSH without password
Putty
OpenSSH Tunnel
19. Firewall
iptables - administration tools for packet filtering and NAT
INPUT Rule Chains
OUTPUT Rule Chains
Forward
NAT
IPV6
ulogd - The Netfilter Userspace Logging Daemon
ufw - program for managing a netfilter firewall
DHCP
Samba
Firewall GUI Tools
Shorewall Tools
20. ip tunnel
ipv4
21. OpenVPN (openvpn - Virtual Private Network daemon)
Ubuntu/Debian 环境安装
OpenVPN GUI for Windows
源码安装
22. FreeRADIUS
ldap
mysql
WAP2 Enterprise
23. Kerberos
CentOS 安装
Install by apt-get
生成kerberos的本地数据库
24. Email
IV. File Transfer
25. wget - retrieves files from the web
26. axel - A light download accelerator - Console version
27. ncftp
batch command
28. ProFTPD + MySQL / OpenLDAP 用户认证
Proftpd + MySQL
Proftpd + OpenLDAP
29. Pure-FTPd + LDAP + MySQL + PGSQL + Virtual-Users + Quota
30. rsync - fast remote file copy program (like rcp)
install with source
install with aptitude
upload
download
mirror
rsync examples
backup to a central backup server with 7 day incremental
backup to a spare disk
mirroring vger CVS tree
automated backup at home
Fancy footwork with remote file lists
31. tsync
32. Unison File Synchronizer
local
remote
config
33. csync2
server
node
test
Advanced Configuration
V. Web Application
34. Lighttpd and fastcgi
quick install with aptitude
php fastcgi
to compile and then install lighttpd
compress module
shell script
simple-vhost
redirect
rewrite
alias.url
PHP
php fastcgi
Python
Perl
Installing lighttpd and FastCGI for Catalyst
35. LAMP
Compile and then install Apache
Apache 安装与配置
PHP
Quick install apache with aptitude
command
rewrite module
PHP module
deflate module
ssl module
VirtualHost
~userdir module - /public_html
XAMPP for Linux
PHP 5
Mod Perl
36. Tomcat 安装与配置
tomcat
mod_jk
mod_proxy_ajp
RewriteEngine 连接 Tomcat
Testing file
Script 1
Shell Script 2
37. Application Service
Zope
JBoss - JBoss Enterprise Middleware
38. Web Server Optimization
ulimit
Apache 调优
worker
Tomcat
deflate
测试 gzip,deflate 模块
Apache Log
跟踪用户的cookie
Zend Optimizer
eaccelerator
Memcached
khttpd
39. Web Analysis
综合测试
awstats
webalizer
VI. Database
40. PostgreSQL
Install
Postgres 配置
Backup / Restore
PostgreSQL 实用实例参考
41. MySQL
Installation
Replication
Master
Slave
Testing
MySQL CLuster
Management node (MGM node)
Data node
SQL node
Starting
Shutdown
Testing
The Slow Query Log
42. OpenLDAP server (slapd)
Installation
基本操作
Add
Search
Modify
Delete
Search
Active Directory
Replication
Primary
Secondary
Backup and Restore
VII. Storage And Backup/Restore
43. Samba
install
share
test
user
smbfs
Security consideration
44. Network Storage - Openfiler
Accounts
Volumes
RAID
iSCSI
Quota
Shares
45. Amanda: Open Source Backup
46. inotify
inotify-tools
Incron - cron-like daemon which handles filesystem events
47. Distributed Filesystem
DRBD (Distributed Replicated Block Device)
disk and partition
Installation
configure
Starting
Using
Coda
VIII. Cluster
49. Linux Virtual Server
环境配置
VS/NAT
VS/TUN
VS/DR
配置文件
ipvsadm script
debug
ipvsadm monitor
50. keepalived
安装
test
51. heartbeat+ldirectord
52. Assistant
Webmin
logwatch
awstats
webalizer
Cacti
nulog
Zenoss
Nagios
BIG BROTHER
Ganglia
53. Open Source Distributed Computing
Boinc (berkeley 分布式计算平台)
54. Multimedia
ImageMagick
How to add metadata to digital pictures from the command line
broadcast streaming
gnump3d - A streaming server for MP3 and OGG files
icecast2 - Ogg Vorbis and MP3 streaming media server
shoutcast
PeerCast
55. Voice over IP
Gnu Gatekeeper
Gnu Gatekeeper Install
Gnu Gatekeeper Configure
Gnu Gatekeeper Test
Asterisk (OpenSource Linux PBX that supports both SIP and H.323)
OpenSER SIP Server
56. 案例
大型网站架设指南
基于LVS的集群邮件系统
A. 附录
CentOS / Redhat 有用的命令
57. 历史记录

表格清单

1.1. Linux partition
44.1. Volume Group Management

范例清单

12.1. bonding example
21.1. server.conf
21.2. client.conf
21.3. server.ovpn
21.4. client.ovpn
21.5. openvpn.conf
30.1. examples
30.2. backup to a central backup server with 7 day incremental
30.3. backup to a spare disk
30.4. mirroring vger CVS tree
30.5. automated backup at home
30.6. Fancy footwork with remote file lists
33.1. /etc/csync2.cfg
34.1. /etc/init.d/lighttpd
34.2. fastcgi.conf
35.1. index.php
35.2. mod_perl.conf
36.1. /etc/rc.d/init.d/www
38.1. /etc/init.d/memcached
42.1. base-dn.ldif
42.2. ou.ldif
50.1. keepalived.conf
52.1. cacti config.php
52.2. config.php