Sysadmin

How to install Hamachi for linux as a service

Instructions on how to install Hamachi on Ubuntu and the configuration needed to run it as a system service.

Full article:

  • Read more
  • Explaining Logical Volume Manager (LVM)

    "I'll try to show you, plain and simple, as less pain as possible howto setup and use LVM on your system. Since the official manuals and HOWTOs are *very* long, I'll make it quick and simple."

    Automated Backups With rdiff-backup

    "This tutorial describes how to do automated server backups with the tool rdiff-backup. rdiff-backup lets you make backups over a network using SSH so that the data transfer is encrypted. The use of SSH makes rdiff-backup very secure because noone can read the data that is being transferred. rdiff-backup makes incremental backups, thus saving bandwidth."

    Mac OS X Packet Sniffing

    A useful article about packet sniffing on Mac OS X from the AppleTalk Australia forum. I've reproduced it here in case it is ever deleted from the original site.

    The original article is at: Network Administration and Packet Sniffing, by Nevets_Anderson.

    Linux Shell Scripting Tutorial

    Chapter 1: Quick Introduction to Linux
    Chapter 2: Getting started with Shell Programming
    Chapter 3: Shells (bash) structured Language Constructs
    Chapter 4: Advanced Shell Scripting Commands
    Chapter 5: Essential Utilities for Power User

    Web servers

    A list of web servers:

    How to restore a hacked Linux server

    Overview of steps:

    • Don’t panic. Keep your calm and develop a plan of actions
    • Disconnect the system from the network
    • Discover the method used to compromise the system
    • Stop all the attacker scripts and remove his files
    • Restore not affected services
    • Fix the problem that caused the compromise
    • Restore the affected services
    • Monitor the system

    Full article: How to restore a hacked Linux server

    Secure Your Apache With mod_security

    "This article shows how to install and configure mod_security. mod_security is an Apache module (for Apache 1 and 2) that provides intrusion detection and prevention for web applications. It aims at shielding web applications from known and unknown attacks, such as SQL injection attacks, cross-site scripting, path traversal attacks, etc."

    Full article: Secure Your Apache With mod_security

    Installing bootable Linux on USB keydrive

    "In this article you will learn how to turn a blank CD and an inexpensive USB keydrive into a powerful, portable, take-along operating system complete with modern applications like Firefox, a Web server, and multimedia tools. All this can be done using free Open Source Linux software."

    Full article: A Closer Look at Damn Small Linux

    Displaying categories in a Drupal block

    PHP code to display up to 30 categores.

    <?php
    if (user_access('access content')) 
    {
    	$result = db_query("SELECT d.tid, d.name, \ 
    			COUNT(*) AS count FROM \
    			{term_data} d INNER JOIN {term_node} \
    			USING (tid) INNER JOIN {node} n USING (nid) \
    			WHERE n.status = 1 GROUP BY d.tid, d.name \
    			ORDER BY count DESC, d.name LIMIT 30");
    	$items = array();
    	while ($category = db_fetch_object($result))
    	{
    		$items[] = l($category->name .' ('. $category->count .')',
    				'taxonomy/term/'. $category->tid);
    	}
    	return theme('item_list', $items);
    }
    ?>
    

    SSH tricks

    "SSH (secure shell) is a program enabling secure access to remote filesystems. Not everyone is aware of other powerful SSH capabilities, such as passwordless login, automatic execution of commands on a remote system or even mounting a remote folder using SSH! In this article we’ll cover these features and much more."

    Full article: SSH tricks

    OS X and Linux Command line reference

    SS64.com is a useful site with:

    Incremental backups on the Mac using rsync and ssh

    Instructions for setting up secure incremental backups to a remote server: How to Backup your Mac incrementally over SSH (from Pete Freitag's Homepage).

    20 ways to secure Apache

    These steps are from Pete Freitag's Homepage.

    1. First, make sure you've installed latest security patches.
    2. Hide the Apache Version number, and other sensitive information.
    3. Make sure apache is running under its own user account and group.
    4. Ensure that files outside the web root are not served.
    5. Turn off directory browsing.
    6. Turn off server side includes.
    7. Turn off CGI execution.
    8. Don't allow apache to follow symbolic links.
    9. Turn off multiple Options.
    10. Turn off support for .htaccess files.

    Subversion crib sheet

    Creating the repository

    Create the repository:

    #sudo svnadmin create /usr/local/svn/newrepos

    Don't forget to set the appropriate permissions for your organisation. For example, read, write and execute access for the development group, no accesses for "world". Alternatively, you can create an subversion user and set the umask

    #sudo svn import mytree file:///usr/local/svn/newrepos/some/project \
        -m "Initial import"
    

    http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.reposadmin.projects.chooselayout
    http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.tour.other.import
    http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.serverconfig.svnserve.sshauth

    Syndicate content