Wednesday, March 18, 2009
Command of the day
ps aux | grep http | awk '{print $2}' | xargs kill
Wednesday, March 11, 2009
Install FreeTDS on Ubuntu
I've been struggling to install FreeTDS on Ubuntu. Fortunately, google is still the best friend. I found the link below and manged to install it.
http://ubuntuforums.org/showthread.php?p=6823026
I copied the posting here as well. Thanks for Mahalie for the post.
-----------------------------------------------------------------------------------------------
After a lot of doc reading at PHP.net, FreeTDS and here and trying and then backing out of several attempts to get my Ubuntu Lamp on Dapper Drake LTS to connect via ODBC to a Microsoft SQL Server on our corporate network I found a step-by-step tutorial that worked for me here:http://benlinus.blogspot.com/2007/08...module-in.html
Here is how I did it - already running working LAMP with PHP5.
add the following line:
To confirm if MSSQL support is available, create a new php file and execute phpinfo() function.
To test my connection tried code from PHP.net using MSSQL_CONNECT
If you don't have errors, it's working. If you have 'cannot open default DB' then make sure your permissions for the user is set property on the MS SQL server and that their default database is the one you are pointing at.
Here is how I did it - already running working LAMP with PHP5.
Code:
sudo apt-get install freetds-dev sudo apt-get source php5 cd php5-5.1.2/ext/mssql sudo apt-get install php5-dev sudo phpize sudo ./configure --with-mssql sudo make cd modules cp mssql.so /usr/lib/php5/20051025 sudo vi /etc/php5/apache2/php.ini
Code:
extension = mssql.so
Code:
sudo /etc/init.d/apache2 restart
To test my connection tried code from PHP.net using MSSQL_CONNECT
PHP Code:
// Server in the this format: \ or
// , when using a non default port number
$server = 'DBSERVERNAME.corp.DOMAIN.com';
$link = mssql_connect($server, 'UserName', 'UserPassword');
if(!$link)
{
die('Something went wrong while connecting to MSSQL');
}
?>
Test
Monday, February 9, 2009
Yahoo Messenger
I'm installing a firewall, and discover that users need to treat Yahoo Messenger differently for a specified group. Therefore I need to know which ports are being used by YM.
Here are list of the ports:
- Messages: 5050, 80, 23 and any port
- Voice: 5000 and 5001
- Webcam: 5100
Sunday, December 28, 2008
MPLS VPN
MPLS VPN is a solution to solve duplicate customer address range in the provider routing table. By having this solution, a service provider will be able to provide a connectivity for several customers which are connected each other with privete IP(s).
Data plane on this solution is a bit different with MPLS unicast. The PE (provider edge) has another table called VRF (Virtual Routing and Forwarding). The PE also add two labels (instead of one label) into the header. The outer label is being used to deliver the packet to the next router, while the inner label is being used to identify which VRF is related to the packet.
One of the challange to implement VPN is overlapping IP address. This problem is solved by using RD (route distinguisher) by taking advantage of MP-BGP. The RD will add 64-bit RD to the 32-bit IP-v4 prefix. Then MPLS will your RT (route target) to decide which packet is correlated to which VRF.
Thursday, December 25, 2008
MPLS Unicast IP
MPLS is a protocol that forward packet based on Label instead of IP address. There are several MPLS application, and one of them is MPLS Unicast IP. A router with MPLS Unicast IP is actually forwarding a packet to the same path as a router with IP routing. The difference is only that the MPLS router forwards the packet based on Label. Then why it is important to know what MPLS Unicast IP is? It is important since many of the application is using MPLS unicast IP forwarding as part of the MPLS network.
MPLS has something called Control Plane and Data Plane. The Data Plane are the data structured used by the MPLS in operation. FIB, LFIB, LIB are the tables that we are talking about. FIB contains information to map IP address and network interface of where a packet destined to an IP address will be forwarded. LFIB contains information to map label and network interface of where a packet with a label will be forwarded. And the LIB is actualy a library of LFIB, which map all labels and ports including the ones which are not currently being used to forward packet. LIB contains only the best map, so that there is only network interface mapped to a label on it.
Now, how the LIB feeds the LFIB and FIB?
In simple words, the MPLS routers distribute routing information using EIGRP, OSPF or other routing procotol. From this protocol, the MPLS router will know where is the best route to delivere a packet. The router will pick up the best route, find the related label on the LIB and then update the LFIB.
Monday, October 27, 2008
How-To Change Time Zone in Linux
I was looking for how-to change time-zone in my linux box.
Fortunately, I found the website below:
Steps
- Logged in as root, check which timezone your machine is currently using by executing `date`. You'll see something like
Mon 17 Jan 2005 12:15:08 PM PST, PST in this case is the current timezone. - Change to the directory
/usr/share/zoneinfohere you will find a list of time zone regions. Choose the most appropriate region, if you live in Canada or the US this directory is the "America" directory. - If you wish, backup the previous timezone configuration by copying it to a different location. Such as
mv /etc/localtime /etc/localtime-old
- Create a symbolic link from the appropiate timezone to /etc/localtime. Example:
ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
- If you have the utility rdate, update the current system time by executing
/usr/bin/rdate -s time-a.nist.gov
- Set the ZONE entry in the file
/etc/sysconfig/clockfile (e.g. "America/Los_Angeles") - Set the hardware clock by executing:
/sbin/hwclock --systohc
Friday, October 24, 2008
Line is up, Protocol is Down
I've got several questions from some friends of what it means by the status when it shows "Line is up, Protocol is Down". From google, I found two websites explaining about the meaning of the statis, i,e:
Basically, this status will be appear when one of the conditions below met:
- Local or remote router misconfigured
- Keep-alives not being sent by remote router
- Leased-line or other carrier service problems, such as noisy lines or faulty switch
- Timing problem on cable, possibly caused by the CSU/DSU not being set correctly.
- Failed local or remote CSU/DSU.
- Router failure.
Subscribe to:
Posts (Atom)