Archive for the ‘LINUX’ Category

Feb
10
2010

Ubuntu: Where to find Apache Error log?

Location where the Apache error log entries can be found in Ubuntu

user@server:~# less /var/log/apache2/error.log

  • Share/Save/Bookmark
Feb
05
2010

MySQL: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’

Reason why this error might occur:

i) Incomplete MySQL implementation
ii) MySQL setting mis-configuration

Solution:

root@myserver:/# vi /etc/mysql/my.cnf

Comment out the below line in my.cnf file to make MySQL listen on ALL interfaces
#bind-address = 127.0.0.1

root@myserver:/# netstat -tap | grep mysql
tcp 0 0 *:mysql *:* LISTEN 17785/mysqld

Note that above line which indicates MySQL listening on all interfaces.

  • Share/Save/Bookmark
Feb
03
2010

SSL Error: Revocation information for the security certificate for this site is not available.

SSL Error: Revocation information for the security certificate for this site is not available. Do you want to proceed?

Solutions:
i) Install the root CA under Trusted Certificate Authority or,
ii) Add an exception to the browser filter not to check certificate revocation or,
iii) Programatically handle the SSL stream when request is made from the server

  • Share/Save/Bookmark
Feb
01
2010

Choosing version control system (VCS): Git vs Subversion

Git

- Distributed repository system (adaptive work flow models)
- Source control taxonomy: DAG storage
- URI to git directory is where the repository is stored and it always has branches and tags
- Repository root folder contains a .git directory which maintains file history
- Scalability
- Faster, Efficient branching and merging
- License: Copyleft

Subversion (SVN)

- Centralized repository system
- Source control taxonomy: Delta storage
- URI to a subversion depository most commonly adopts /trunks, /branches and /tags directories
- Each folder maintains a .svn directory to store the file history
- Not efficient in scaling
- Not efficient in branching and merging
- License: Copyfree

  • Share/Save/Bookmark
Dec
27
2009

Linux: Determining IP information for eth0… failed

When setting up a workstation to connect to internet, you may come across a message
Determining IP information for eth0… failed

The above error message basically means that eth0 i.e your network interface card is not setup correctly.

Some of the commands that can come handy in troubleshooting where the error lies are listed below

$ dmesg | grep eth0
(displays information about the ethernet controller card, mac address etc.)

$ cat /etc/sysconfig/network(displays the network settings)
NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=192.168.122.1

$ cat /etc/sysconfig/network-scripts/ifcfp-eth0

$ ifconfig eth0 down (to down the nic)
$ ifconfig eth0 up (to start the nic)
$ netstat -rn (display kernel routing IP table)
$ cat ifcfg-eth0 (eth0 configuration settings)
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:16:18:33:B3:CF
ONBOOT=yes

$ service network restart (restart the network settings)

$ ping -c4 google.ca(to check if the internet connection works)

$ traceroute google.ca (to check how the IP navigation path is set)

Refer Red Hat linux 5 configure network article for additional info

  • Share/Save/Bookmark
Dec
05
2009

Virtual World: with VMWare Player

VMWare Player is a free software available from VMWare Inc. enabling the creation
of guest OS within an existing OS

Notes for a beginner …
* VMWare Player and VMWare Server are available for free
* A .vmdk file is the virtual hard drive for the guest OS
* A .nvram file stores the BIOS settings of the virtual machine
* A .vmx file stores the configuration settings for the virtual machine. All you
need is a text editor to edit the VMWare configuration settings.
* A .vmsd file stores information about VMWare snapshots.
(more…)

  • Share/Save/Bookmark
Dec
03
2009

Ubuntu: How to check if a software is installed in ubuntu?

Command used to check if a particular software is installed in Ubuntu or not

$ dpkg-query -s firefox

This is the equivalent of “rpm -qa firefox” in RedHat/CentOS

  • Share/Save/Bookmark
Nov
10
2009

Query string limit in GET data and Size limit in POST Data

RFC 2616 – Section 3 states:

“Servers should be cautious about depending on URI lengths above 255 bytes because some older client or proxy implementations may not properly support these lengths.”

Different browser agents support different URI length acceptance. In addition, servers too play a role in accepting/denying URI’s over certain length which may either truncate the URI or may give lengthy URI message indications.

It is always advisable to rely on shorter URI’s and to post data when more field sets are to be transferred across web pages.

POST data too has its limit. In this case, it is the size of the data which is controlled by the server settings.

Some interesting discussions:

Limit on query string GET URL parameters

  • Share/Save/Bookmark
Oct
08
2009

PHP: Parse URL encoded GET data

<?php
// To build back the URI and to extract the passed parameters, you can use parse_url, parse_string function
$extract_string = parse_url($pass_string);
echo "<h2>Extracted URI (using parse_url)</h2><br />";
echo "<pre>";
var_dump($extract_string);
echo "</pre>";

// To decode the query string use parse_str function
parse_str($extract_string["query"], $extract_query);
echo "<h2>Extracted Query String (using parse_str)</h2><br />";
echo "<pre>";
var_dump($extract_query);
echo "</pre>"; 

?>
  • Share/Save/Bookmark
Oct
07
2009

Minimum Hardware Requirements for Linux Install

As indicated by Red Hat …

CPU - Pentium type, 200 MHz for text mode
Hard disk space – 475 MB
Memory - 64 MB for text mode

  • Share/Save/Bookmark