Category: Linux

Configure Linux As a router

Configure Linux As a router

Configure Linux As A Router: 1. Enable Ip Forwarding in sysctl.conf net.ipv4.ip_forward=1 Configure Firewall, assuming eth0 as WAN Interface, eth1 is LAN Interface : iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables...

Configuring a Dynamic DNS Server

Configuring a Dynamic DNS Server

Dynamic Dns : dnssec-keygen -a HMAC-MD5 -b 128 -n USER DYNAMIC_DNS_KEY cat Kdynamic_dns_key*.private key :sdflkjdfskdlfsjdfj

Passwordless SSH

Passwordless SSH

1. Create a key using putty gen. 2. Paste the content into .ssh/authorized_keys file . 3. You should be able to login without password. In linux you can generate the key using : ssh-keygen...

IO Redirection In Linux

IO Redirection In Linux

Open a File for reading and associate with Standard Input (STDIN) < file Use the current input stream as Standard Input for the program until “token” is seen. This is used in scripting: <<...

Installing A Custom Repo

Installing A Custom Repo

To install PHP 5.2.5 which is the latest version in the repos  you can make use of a RPM repository maintained by Remi. He has a repository for many distros. Follow  the steps to...

RPM Uninstall error–multiple matches

RPM Uninstall error–multiple matches

Sometimes when trying to uninstall an rpm package, you might get an error that says “Package xyz specifies multiple packages”. rpm -e unixODBC error: "unixODBC" specifies multiple packages In that case you can issue...

Export MySQL data to csv using php script

Export MySQL data to csv using php script

Here is a little php script that you can use to export MySQL data to CSV  : #!/usr/bin/php -q <?php include ‘config/config.php’; include ‘config/opendb.php’; $sql = "SQL Query goes here"; $rsSearchResults = mysql_query($sql); $out...