Posts

Showing posts from March, 2012

[Ebook] Linux Routing

Image
Linux Routing explains and demonstrates routing solutions for common network types, namely LANs, WANs, and VPNs, using various types of hardware, and then explores the inner workings of the daemons and commands used for routing in Linux.The second half of the book revolves around specialized issues. These include building micro-kernels that provide additional routing speed and security; how routing is handled in a list of popular Linux distributions; security issues; traffic monitoring and control; and finally a variety of hardware and software   packages   available to those running or wanting to run Linux routers.Whether you need routing for a small, subnetted network or a larger scale project, Linux Routing will help you to understand the complexities that come with setting up dynamic routing for complex network configurations on a Linux box. Along the way you'll learn about some of the more popular protocols available and when they are best used, how to configure key routing

Quản trị hệ thống và 8 điều cần nhớ

Image
Tự nhiên "thu lượm" được mấy quy tắc cũng tương đối đúng, post lên đây để ghi nhớ vậy: "1.  Không bước lên nếu không có đường lùi:  Đừng làm thao tác gì mà chúng ta không thể phục hồi, kể cả việc xoá file tạm (tốt nhất là đừng dùng lệnh xoá, hãy dùng lệnh move). 2.  Luôn kiểm tra dữ liệu sao lưu , đừng mù quáng cho rằng nó vẫn ổn. Hệ thống sao lưu tự động có thể bị lỗi vào một ngày xấu trời nào đó. Phải đảm bảo rằng  luôn có thể phục hồi  dữ liệu từ bản sao lưu. 3.  Ghi chép  lại các công việc đã làm, kể cả những việc không thể quên, vì chúng ta vẫn sẽ quên thôi. 4. Nếu làm 1 công việc đến lần thứ 2,  hãy viết script . 5. Luôn nhớ: Chúng ta đang làm việc phục vụ người khác,  chúng ta không phải là chủ của hệ thống , nên đừng đùa giỡn với hệ thống. Đừng đem hệ thống ra làm chuột bạch thí nghiệm. 6.  Kiểm tra bản sao lưu dữ liệu . 7.  Bác học cũng không ngừng học.  Những kiến thức mới sẽ giúp công việc chúng ta nhẹ nhàng hơn, và giúp hệ thống hoạt động ổn định và an t

Cháu yêu (Phần 4)

Image
Sơn Tây, 18/03/2012 ... Video

Hài

Cháu yêu (Phần 3)

Image

[Ebook] LDAP System Administration (O'Reilly)

Image
By Gerald Carter Publisher: O'Reilly Media Released: March 2003 Pages: 310 Practically platform independent, this book uses the widely available, open source OpenLDAP 2 directory server as a premise for examples, showing you how to use it to help you manage your configuration information effectively and securely. OpenLDAP 2 ships with most Linux® distributions and Mac OS® X, and can be easily downloaded for most Unix-based systems. After introducing the workings of a directory service and the LDAP protocol, all aspects of building and installing OpenLDAP, plus key ancillary packages like SASL and OpenSSL, this book discusses: Configuration and access control Distributed directories; replication and referral Using OpenLDAP to replace NIS Using OpenLDAP to manage email configurations Using LDAP for abstraction with FTP and HTTP servers, Samba, and Radius Interoperating with different LDAP servers, including Active Directory Programming using Net::LDAP

[Ebook] Essential SNMP, Second Edition (O'Reilly)

Image
Simple Network Management Protocol (SNMP) provides a “simple” set of operations that allows you to more easily monitor and manage network devices like routers, switches, servers, printers, and more. The information you can monitor with SNMP is wide-ranging–from standard items, like the amount of traffic flowing into an interface, to far more esoteric items, like the air temperature inside a router. In spite of its name, though, SNMP is not especially simple to learn. O’Reilly has answered the call for help with a practical introduction that shows how to install, configure, and manage SNMP. Written for network and system administrators, the book introduces the basics of SNMP and then offers a technical background on how to use it effectively.  Essential SNMP  explores both commercial and open source packages, and elements like OIDs, MIBs, community strings, and traps are covered in depth. The book contains five new chapters and various updates throughout. Other new topics includ

[Ebook] Bash Cookbook (O'Reilly)

Image
The key to mastering any Unix system, especially Linux and Mac OS X, is a thorough knowledge of shell scripting. Scripting is a way to harness and customize the power of any Unix system, and it’s an essential skill for any Unix users, including system administrators and professional OS X developers. But beneath this simple promise lies a treacherous ocean of variations in Unix commands and standards. bash Cookbook  teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell — the bash shell — and cygwin or other popular Unix emulation packages. Packed full of useful scripts, along with examples that explain how to create better scripts, this new cookbook gives professionals and power users everything they need to automate routine tasks and enable them to truly manage their systems — rather than have their systems manage the

Thay đổi thư mục mysql

Image
Vì lý do nào đấy bạn phải thay đổi datadir của mysql, dưới đây là giải pháp cho vấn đề đấy: Bạn thực hiện các bước sau: 1. Sửa file my.cnf #nano  -w /etc/my.cnf  Sửa hoặc thêm các dòng sau: pid-file = /newpath/mysql/mysqld.pid  socket = /var/lib/mysql/mysql.soc k datadir = /newpath/mysql 2. Copy data sang partition mới #rsync -vrplogDtH /var/lib/mysql/ /newpath/mysql/  #rsync -vrplogDtH /var/lib/mysql/ /newpath/mysql/ 3. Quan trọng, tạo mysql.sock mới cho mysql #ln -s /backup/mysql/mysql.sock /var/lib/mysql/mysql.sock  #rm -rf /tmp/mysql.sock  #ln -s /backup/mysql/mysql.sock /tmp/mysql.sock 4. Kết thúc #killall -9 mysqld  #service mysql start Goodluck. (Theo NhanHoa.com )

Secure /tmp

Image
1. #nano /etc/fstab replace “ defaults ” in front of  /tmp, /dev/shm  to nosuid,noexec,rw Save the file and remount the partitions: 2. Remount Partitions: #mount -o remount /tmp #mount -o remount /dev/shm 3. To secure /var/tmp, rename the existing /var/tmp and create a symlink a.  #umount /var/tmp b.  #mv /var/tmp /var/tmp_bak # ln -s /tmp /var/tmp Đối với VPS OpenVZ, bạn thực hiện các bước sau: 1. Mount partition /tmp #mount -t tmpfs -o noexec,nosuid tmpfs /tmp Kiểm tra lại partition đã mount # cat /proc/mounts /dev/simfs / simfs rw,usrquota,grpquota 0 0 proc /proc proc rw 0 0 sysfs /sys sysfs rw 0 0 none /dev tmpfs rw 0 0 none /dev/pts devpts rw 0 0 none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0 tmpfs /tmp tmpfs rw,nosuid,noexec 0 0 2. Sửa lại fstab # nano /etc/fstab Thêm: tmpfs      /tmp      tmpfs      noexec,nosuid      0     0 3. To secure /var/tmp, rename the existing /var/tmp and create a symlink a.  #umount /var/tmp b.  #mv /var/tmp /

[Ebook] SELinux by Example: Using Security Enhanced Linux ()

Image
SELinux: Bring World-Class Security to Any Linux Environment! SELinux offers Linux/UNIX integrators, administrators, and developers a state-of-the-art platform for building and maintaining highly secure solutions. Now that SELinux is included in the Linux 2.6 kernel—and delivered by default in Fedora Core, Red Hat Enterprise Linux, and other major distributions—it’s easier than ever to take advantage  of its benefits. SELinux by Example is the first complete, hands-on guide to using SELinux in production environments. Authored by three leading SELinux researchers and developers, it illuminates every facet of working with SELinux, from its architecture and security object model to its policy language. The book thoroughly explains SELinux sample policies— including the powerful new Reference Policy—showing how to quickly adapt them to your unique environment. It also contains a comprehensive SELinux policy language reference and covers exciting new features in Fedora Core

[Ebook] Squid Proxy Server 3.1: Beginner’s Guide (Packt)

Image
Squid  Proxy  Server enables you to cache your  web  content and return it quickly on subsequent requests. System administrators often struggle with delays and too much bandwidth being used, but Squid solves these problems by handling requests locally. By deploying Squid in accelerator mode, requests are handled faster than on normal  web  servers making your site perform quicker than everyone else’s! Squid Proxy Server 3.1  Beginner ’s Guide  will help you to install and configure Squid so that it is optimized to enhance the performance of your  network . The Squid Proxy Server reduces the amount of effort that you will have to put in, saving your time to get the most out of your  network . Whether you only run one site, or are in charge of a whole  network , Squid is an invaluable tool that improves performance immeasurably. Caching and performance optimization usually requires a lot of work on the developer’s part, but Squid does all that for you. This book will show you how t

[Ebook] Apache Security (O'Reilly)

Image
With more than 67% of web servers running Apache, it is by far the most widely used web server platform in the world. Apache has evolved into a powerful system that easily rivals other HTTP servers in terms of functionality, efficiency, and speed. Despite these impressive capabilities, though, Apache is only a beneficial tool if it's a secure one. To be sure, administrators installing and configuring Apache still need a sure-fire way to secure it--whether it's running a huge e-commerce operation, corporate intranet, or just a small hobby site. Our new guide,  Apache Security , gives administrators and webmasters just what they crave--a comprehensive security source for Apache. Successfully combining Apache administration and web security topics,  Apache Security  speaks to nearly everyone in the field. What's more, it offers a concise introduction to the theory of securing Apache, as well as a broad perspective on server security in general. But this book

[O'Reilly] Using Samba (3rd third Edition O'Reilly Book)

Image
This book, which has been officially adopted by the Samba Team and is under the GNU Free Documentation License (FDL), is a comprehensive guide to Samba administration. The 2nd edition focuses on Samba 2.2 and covers the most important features of 3.0, which was under development as this book went to print. Samba is a cross-platform triumph: it turns a Unix or Linux system into a file and print server for Microsoft Windows network clients. Samba is so robust, flexible, fast, and secure that many people are choosing it over Windows NT/2000/XP for their file and print services. Samba is also free software, licensed under the GNU General Public License. This book will help you make file and print sharing as robust, powerful, and efficient as possible. The authors delve into the internals of the Windows activities and protocols to an unprecedented degree, explaining the strengths and weaknesses of each feature in Windows domains and in Samba itself. Using Samba  takes you from bas

Cài đặt thời gian trong Linux bằng lệnh

Image
Cú pháp:  date --set="chuỗi lệnh " Ví dụ bạn muốn cài đặt thời gian là: 10h00 ngày 2 tháng 3 năm 2012 - Đầy đủ :  # date -s "2 MAR 2012 10:00:00"  (hoặc:  # date --set "2 MAR 2012 10:00:00" ) - Cài đặt ngày/tháng/năm: # date +%Y%m%d -s "20120302" - Cài đặt giờ/phút/giây: # date +%T -s "10:00:00"