Linux Package Manager Cheat Sheet Reference Chart

Linux comes in many flavors or distros, and each distro handles software installation differently from one another. Most GNU/Linux distro uses a package management system to manage software updates/instalation/removal in order to help users administer their Linux systems.

However, many of these package management system has different interface and commands, as such users from Ubuntu (or Debian based) might only be familiar with ‘apt’ or dpkg while Fedora (Red Hat based) users might only familiar with yum and rpm, which may create confusion when users from either distro were to exchange environments.

Luckily, somebody was kind enough to provide these users with Linux Package Manager Cheat Sheet which act as a reference point whenever a user had to switch to another distro which uses package management that are not familiar with them.

The package management software listed are for: apt,dpkg,yum, rpm, pkg* (slackware based) and AIX-based lsl**.

[ Source ]

Bitcoin spending and transaction can be traceable

It seems that Bitcoin is only designed to eliminate the need for centralized issuer and central authority, but not anonymity, which is a common misconception among internet users as according to one of its developers (Jeff Garzik), transaction is recorded in public log and although the identity of the parties involved can’t be directly identified, the transaction can be easily traced and linked to other accounts through data mining and statistical analysis.

So it is harder to stay anonymous in transactions that involve large currency value.

bitcoinBitcoin is not anonymous

  • The Battle Is On – Silk Road vs Government, and Bitcoin Anonymity
  • How to optimize MySQL tables automatically using cron

    Busy websites which has a lot of insert/delete transactions may introduce fragmentation in MySQL tables. Fortunately, users and optimize mysql tables with ‘OPTIMIZE TABLE’ command, but how to execute it automatically?

    Here’s how:
    The mysql-client package in Ubuntu installation comes with a tool called mysqlcheck which is handy for optimizing table in mysql. This command can be executed from bash and can be executed using cron.

    to do that, just run this command.

    [bash]
    cron -e

    #in the crontab file– add this line
    59 23 * * * /usr/bin/mysqlcheck -o -v -u <mysql username> -h localhost <database_name> -p <password>
    [/bash]

    This will tell cron to execute mysqlcheck and optimize mysql table of the specified database exactly on 11:59pm, every day. You can change the setting to suit your need.

    How to change hostname in Ubuntu server

    Here’s how you can change hostname in Ubuntu server

    1. Edit /etc/hostname, and change the hostname
    2. Edit /etc/hosts file, and add the hostname to 127.0.0.1, or to any local machine ip
    3. run, “sudo server hostname stop”, and “sudo server hostname start”

    How to secure server from SYN-flood attack using iptables

    SYN-flood attack is commonly utilized as a mean to disrupt network communication and it is a form of (Distributed Denial-of-Service) DDOS attack. RFC4987 details common mitigation to deal with SYN-flood attack.

    However in this post, I’m going to share you the method that I use to reduce the risk of SYN-flood attack from my department computers, with iptables
    [bash]
    /sbin/iptables -N syn-flood
    /sbin/iptables -A syn-flood -m limit –limit 100/second –limit-burst 100 -j RETURN
    /sbin/iptables -A syn-flood -j LOG –log-prefix "SYN-flood attempt: "
    /sbin/iptables -A syn-flood -j DROP
    [/bash]

    RFC4987 suggests the use of SYN-cookie for added protection. You can enable SYN-cookie protection in Linux by running this command (as root):
    [bash]
    echo 1 > /proc/sys/net/ipv4/tcp_syncookies
    [/bash]

    hope that helps…

    Note: I’m not a full-time sysadmin as I’ve a different dayjob, but I was put incharged in securing part of my school’s computer network, so there.