Jaime Frutos Morales's blog

13/11/2009

Upcoming book: ModSecurity 2.5 by Magnus Mischel

Filed under: Books, SysAdmin — acidborg @ 21:01

I’m pleased to have been chosen to review an upcoming book called “ModSecurity 2.5” by Magnus Mischel. It’s going to be published this month by Packt Publishing.

ModSecurity 2.5 book

As I explained in my previous post (Installing ModSecurity for Apache in Ubuntu Server 9.04), ModSecurity is a web application firewall that can work either embedded or as a reverse proxy. It provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis.

I’m looking forward to reading the book and reviewing it, because I think ModSecurity is a great tool and very useful if you work in web-based environments.

09/11/2009

How to create and manage a Git repository

Filed under: SysAdmin — acidborg @ 15:05

Description: “Git is a free distributed revision control, or software source code management project with an emphasis on being fast. Git was initially designed and developed by Linus Torvalds for Linux kernel development. Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.”

All the documentation about Git could be found here.

Installation:

  • Ubuntu & Debian: apt-get install git-core
  • Fedora: yum install git

Configuration:
Git searches for its configuration files using this order (if one file is found, the rest are ignored):

  • .git/config : Repository-specific configuration settings
  • ~/.gitconfig : User-specific configuration settings
  • /etc/gitconfig : System-wide configuration settings

You can edit them directly or using the git config command. Examples:

git config --global user.name "Jaime Frutos Morales"
git config --global user.email "acidborg@gmail.com"

You can see all your current configuration settings using git config -l .

Creating a repository:

  • To create a repository in your current directory: git init

It will create a directory called .git in your current directory which contains the repository.

Adding and removing files:

  • To add a file or directory to your repository: git add file_name
  • To add all the files and subdirectories of your current directory to the repository: git add .
  • To remove a file from the repository: git rm file_name
  • To commit changes to the repository: git commit . In Git, adding a file to the repository and committing it are different actions, so after adding files to your repository, you have to commit them to save the changes. You will be asked to enter a short description of the commit in order to track the changes on the repository.
  • To see the status of your repository (files added, removed, committed, etc): git status

Viewing commits:

  • To list all the commits made to the repository: git log
  • To see the details of a specific commit knowing its ID (the sequence of letters and numbers after the commit word): git show commit_id
  • To list the changes made by the last commit: git show
  • To list a short description of all commits: git show-branch
  • To show the differences in files between two commits: git diff commit_id1 \ commit_id2

26/10/2009

How to upgrade from Ubuntu 9.04 (Jaunty) to Ubuntu 9.10 (Karmic)

Filed under: SysAdmin, Ubuntu — acidborg @ 15:03
  1. Replace “jaunty” for “karmic” in /etc/apt/sources.list : sed -i 's/jaunty/karmic/g' /etc/apt/sources.list
  2. Run the following commands: apt-get update && apt-get dist-upgrade
  3. Reboot with this command: shutdown -r now

20/10/2009

BASH 3 startup files

Filed under: Shell scripting, SysAdmin — acidborg @ 17:54

Before explaining the Bourne Again SHell (BASH) 3 default startup files order, here are some needed definitions:

  • Login shell: its first character of argument zero is a - or it’s started with the -l option.
  • Interactive shell: it’s started without non-option arguments and without the -c option and its standard input and error are both connected to terminals. It can be started with the -i option.

Now that we know the differences between them, let’s explain the default startup process for each kind of shell in BASH 3:

  • Login shell:
    1. It reads and executes /etc/profile (if it exists)
    2. It reads one (and only one) of the following files and executes it. The order of checking is:
      1. ~/.bash_profile
      2. ~/.bash_login
      3. ~/.profile
  • Interactive shell:
    1. It reads and executes /etc/bash.bashrc (if it exists)
    2. It reads and executes ~/.bashrc (if it exists)

Additionally, login shells reads and executes ~/.bash_logout (if it exists) on exit.

15/10/2009

World of Goo

Filed under: Linux — acidborg @ 19:27

I’d like to recommend a cross-platform (GNU/Linux, Windows, Mac) game called World of Goo. It’s very funny and addictive. It’s its first birthday this week, so you can buy it paying as much as you want. I like this kind of initiatives and I support them too.

Believe me, it’s worth buying it.

« Newer PostsOlder Posts »

Blog at WordPress.com.