Hard disk are getting bigger and bigger. Network interface card (NIC) and switch are getting cheaper and cheaper. It usually means more services can squeeze into a server. Combining multiple network interface into 1 big pipe would be a big plus for services that is bandwidth hungry. e.g. file server, email server & etc
Combining 2 or more network interface have a few advantages. One of them is load balancing. Load balancing enables the network interface card to share the load among the 2 or more network interface card defined. It serves as redundancy as well. But load balancing does not makes full use of the 2 or more network interface, it is meant to share network traffic load.
To fully utilize 2 or more network interface links, link aggregation should be used. Link aggregation is a method to combine 2 or more network interface to become a bigger pipe. It is also a way to combine 2 or more interface to use the same IP address. Using link aggregation can also create redundancy, if one of the link fails, the other links will take over.
This post is using FreeBSD as a server because FreeBSD have all the ports (software packages) you will need and server administration on it is made to ease systems administration daily task.Without further ado, below are the steps to configure 2 (or more) network interfaces to work as 1 big trunk or round robin :
2009-06-29
2009-06-27
How to check hard disk transfer speed or timing
Storage are getting cheaper and cheaper. Almost a year ago, a 250 GB 2.5" portable hard disk would cost 120 bucks. But now, it only cost 100 bucks for a 500 GB hard disk. Size are getting bigger and bigger with the same monetary value but does the hard disk spins fast enough to fetch the big "gigabytes" in time? Of cause, given "enough" time, any rate of spin could fetch any size of data. Files are getting larger and larger, especially audio & video files. Fetching the files in an reasonable time is crucial.
Before we proceed to check out the command on how to check hard disk transfer speed or read timings, we will need to familiarize our self with hard disk naming convention. Here is a simple guide on how to identify hard disk naming convention in /dev (where device node are store) :
Before we proceed to check out the command on how to check hard disk transfer speed or read timings, we will need to familiarize our self with hard disk naming convention. Here is a simple guide on how to identify hard disk naming convention in /dev (where device node are store) :
2009-06-26
Mozilla Firefox - common keyboard shortcut keys
Firefox have all the bells & whistles to make our internet life happy. Tabs, plugins, portability and keyboard shortcuts. Firefox keyboard shortcuts make browsing addictive, especially to system administrator, which our hands are on the keyboard most of the time. We could use mouse to browse it but wouldn't you think by keeping your hands on the keyboard would increase productivity? :)
Below are the list of keyboard shortcuts plus a few combination of mouse clicks which commonly used in Firefox. There are of cause other shortcuts available but this post only attempt to introduce you with the efficiency of using keyboard shortcuts (almost mouse-less) rather then trying to exhaust your brain memory in crunching the full list of keyboard shortcuts. You can print the below list of Firefox keyboard shortcut keys out and act as a Cheat Sheet. It can be useful in getting familiar initially using the keyboard shortcut keys. Here are the list :
Below are the list of keyboard shortcuts plus a few combination of mouse clicks which commonly used in Firefox. There are of cause other shortcuts available but this post only attempt to introduce you with the efficiency of using keyboard shortcuts (almost mouse-less) rather then trying to exhaust your brain memory in crunching the full list of keyboard shortcuts. You can print the below list of Firefox keyboard shortcut keys out and act as a Cheat Sheet. It can be useful in getting familiar initially using the keyboard shortcut keys. Here are the list :
2009-06-23
WordPress - plugin upgrade requesting "Connection Information"
This common error happens normally after a WordPress version upgrade. Upon upgrade of plugins, which normally we click on the "upgrade automatically" link on the plugins page, it prompt for "connection information" (with another line of "To performed the requested action, connection information is required.") with "hostname", "username", "password" & "Connection Type" required.
This issue is caused by certain wordpress essentials files or directory are not accessible by WordPress.
This issue is caused by certain wordpress essentials files or directory are not accessible by WordPress.
2009-06-21
PostgreSQL - How to reset user name "postgres" password
PostgreSQL is an open source RDBMS (Relational DataBase Management System) that is not only feature rich, fast and light but also easy to use. Its documentation available at its website is a superb way of learning as well. Browsing the documentation and you will find that its way of explaining is no "bullshit" approach, short and concise.
After the initial installation, one might forget to set the password after running the initial script to setup the database. After a while, naturally, we all forget the password. Below are the steps to reset the password for user name "postgres" :
After the initial installation, one might forget to set the password after running the initial script to setup the database. After a while, naturally, we all forget the password. Below are the steps to reset the password for user name "postgres" :
Nokia E71 and E63 tips - shell or command line access using ssh (secure shell)
The Nokia E71 & E63 is a versatile phone for people that needs the business suite of application, e.g. email, messenger, documents & spreadsheet, camera and most importantly, the symbian platform. The symbian platform is widely used on mobile phones. Symbian's platform also have a wide variety of applications.
For *NIX system administration, shell access to the command line (using ssh) of the servers are part of our life. Having to own Nokia E71 or E63 is one of the best thing as Putty is available on symbian platform. Putty is a symbian application that can connect to server using shell access or command line by ssh, which take advantage of the built-in QWERTY keyboard on Nokia E71 & E63. Putty also allow to use public key authentication, if the private key is installed on the phone or the memory card (mmc). It also allow to configure ssh (secure shell) client to connect to other ports then the default port 22.
For *NIX system administration, shell access to the command line (using ssh) of the servers are part of our life. Having to own Nokia E71 or E63 is one of the best thing as Putty is available on symbian platform. Putty is a symbian application that can connect to server using shell access or command line by ssh, which take advantage of the built-in QWERTY keyboard on Nokia E71 & E63. Putty also allow to use public key authentication, if the private key is installed on the phone or the memory card (mmc). It also allow to configure ssh (secure shell) client to connect to other ports then the default port 22.
2009-06-19
Nagios - Error "Error: Could not open command file '/var/spool/nagios/rw/nagios.cmd' for update"
After an upgrade of Nagios, Nagios re-schedule function for next service check is not working. The Nagios web interface complained "Error: Could not open command file '/var/spool/nagios/rw/nagios.cmd' for update". Its problem lies on the webserver was unable to access the file to update the schedule.
2009-06-18
sudo - How to create another root (equivalent) account on linux or freebsd
The usual root account are meant for critical task, such as single user mode related operation. It hails the power of the system, as well the power of destruction (try "rm -rf /" :p). That's the reason why a lot of company have a policy to seal the root account or make some red tape so that one will give up requesting to use it. But sealing the root account will make daily routine system administration task difficult to execute.
No worries, sudo is the tool to clone another account with root privilege or control the access of critical command of a linux or BSD box. Every command that runs through sudo will be log to /var/log/auth.log.
No worries, sudo is the tool to clone another account with root privilege or control the access of critical command of a linux or BSD box. Every command that runs through sudo will be log to /var/log/auth.log.
2009-06-17
Wordpress - missing tool bar from visual editor after upgrading wordpress
WordPress 2.8 is available for upgrade from either the Dashboard (by 1 click upgrade) or manually download it from wordpress.org and install it through command line. If you are using the first option, which upgrade through the Dashboard, you might noticed that after the upgrade, the Visual Editor might stop working or the tool bar is missing from the Visual Editor. Google it will bring you to wordpress.org and recommand you to do some tedious troubleshooting steps.
This blog have just upgraded and encounter the same problem. After following the recommendations, step 3 of it works, which is removing the current wp-includes and wp-admin folder then replace it with the latest version of it by downloading latest.tar.gz from wordpress.org and extract from it.
Ciao !!!
This blog have just upgraded and encounter the same problem. After following the recommendations, step 3 of it works, which is removing the current wp-includes and wp-admin folder then replace it with the latest version of it by downloading latest.tar.gz from wordpress.org and extract from it.
Ciao !!!
2009-05-24
Ubuntu - How to add or create hard disk partition and make it automatically mount
In Ubuntu, adding or managing new partition or hard disk should use UUID (Universally Unique Identifier) of the device rather then using the device node name. e.g. /dev/sda2, /dev/hda3, /dev/sda5 and etc. IMHO its advantage compare to the conventional way of mounting device, using /dev/sda or /dev/hda are :
This post will list 2 ways to get the UUIDs in order to make the new partition or hard disk automatically mount under Linux (or particularly Ubuntu), the command line and the GUI (Graphical User Interface) programs provided by Ubuntu.
- UUID is unique when it comes to device node naming. e.g. multiple USB device plug in and out can generate different /dev/sda nodes.
- UUID have been used by ubuntu by default to assign partition or hard disk in /etc/fstab.
- UUID have 25616 of combination and it takes a very long time to exhaust it even though if we were to generate it fast enough. e.g. generating 1 trillion a nano second would take 10 years to exhaust it.
- using UUID will list the partition or hard disk to appear in the 'File Browser' (aka Nautilus) under 'Places'.
This post will list 2 ways to get the UUIDs in order to make the new partition or hard disk automatically mount under Linux (or particularly Ubuntu), the command line and the GUI (Graphical User Interface) programs provided by Ubuntu.
2009-05-22
Start multiple command line screen session to run interactive jobs
As an BSD & Linux administrator, the command line is where we live. We eat, live & shit at the same place, command line screen. Some times, we can only afford to open a single terminal screen. It's kind of hard for us to be efficient as most of the time we multitask on a few bunch of screens.
Or, we need to run an interactive program over a long period of time which we want the result when it ends. Instead passing the program to run in the background which hides the result, the screen command is at disposal.
And most importantly, when combine with ssh (secure shell) it is uncomparablely fast and secure.
Screen is capable to detach from command line session and yet the program runs interactively in the background. The ability to switch from multiple screen will definitely help out when using the console session. Screen can even start in a few "screen session" in order to manage your task into separate groups. Screen also supports hot key (the meta control key with the combination of alphabet or digit) for common task.
Part I will guide any first time screen user on how to start a multiple screen command line to run multiple screen session. Proceed to Part II for a more advanced experience.
Or, we need to run an interactive program over a long period of time which we want the result when it ends. Instead passing the program to run in the background which hides the result, the screen command is at disposal.
And most importantly, when combine with ssh (secure shell) it is uncomparablely fast and secure.
Screen is capable to detach from command line session and yet the program runs interactively in the background. The ability to switch from multiple screen will definitely help out when using the console session. Screen can even start in a few "screen session" in order to manage your task into separate groups. Screen also supports hot key (the meta control key with the combination of alphabet or digit) for common task.
Part I will guide any first time screen user on how to start a multiple screen command line to run multiple screen session. Proceed to Part II for a more advanced experience.
2009-05-20
MySQL - Common commands of database user account management
SQL database are used to store various kind of data in order for future retrieval. But data stored in SQL database is not only for future retrieval, it is also stored in such a way for faster (repeated) retrieval, structured manner in data organization, interchangeable between applications and most importantly, it provides a mean to store and search for really huge data by using SQL statement, query.
There are a lot of database currently available, e.g. PostgreSQL & MySQL. MySQL is one of the most popular database among open source database, same as PostgreSQL. Due to the hip of LAMP (which denotes Linux, Apache, MySQL, PHP), MySQL have made known to the mass audience. No doubts its performance and usability are, both MySQL & PostgreSQL, in par.
This post will not attempt to compare both excellent databases, rather, it will try to list out a few common uses of MySQL database in tips & shortcut way. Below are the list of common usage of MySQL permission and privileges :
There are a lot of database currently available, e.g. PostgreSQL & MySQL. MySQL is one of the most popular database among open source database, same as PostgreSQL. Due to the hip of LAMP (which denotes Linux, Apache, MySQL, PHP), MySQL have made known to the mass audience. No doubts its performance and usability are, both MySQL & PostgreSQL, in par.
This post will not attempt to compare both excellent databases, rather, it will try to list out a few common uses of MySQL database in tips & shortcut way. Below are the list of common usage of MySQL permission and privileges :
2009-05-19
ssh - error "Host key verification failed" when trying to connect or copy a file to ssh server
The below error was display while trying to ssh or scp to a ssh server :
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: POSSIBLE DNS SPOOFING DETECTED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ The RSA host key for domain-name.com has changed, and the key for the according IP address xxx.xxx.xxx.xxx is unknown. This could either mean that DNS SPOOFING is happening or the IP address for the host and its host key have changed at the same time. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed. The fingerprint for the RSA key sent by the remote host is 00:00:00:00:00:00:00:00:00:00:00:00:. Please contact your system administrator. Add correct host key in ~/.ssh/known_hosts to get rid of this message. Offending key in ~/.ssh/known_hosts:xx RSA host key for domain-name.com has changed and you have requested strict checking.Host key verification failed.lost connection
2009-05-13
Nokia E71 and E63 tips and short cut keys
Nokia E71 and E63 are great phones, operating on Symbian S60 series operating systems. Its keyboard is easy to type, the LCD is sharp, the keys position are great and most importantly, the battery last long enough, approximately 5-7 days for an average user like me. The phone also comes with a lot of practical applications, e.g. word processor, spreadsheet, simple note pad, email client and etc.
The phone's operating systems is also able to upgrade from a normal PC or laptop with USB connectivity. The last upgrade my phone had have significantly improve the responsiveness and also some functionality. e.g. typing the phone book entry on the Home Screen will directly search for it (rather the usually need to access the phone book before able to search), press shift twice will activate the secondary input language and others.
But this post is about tips and shortcut keys available on the phone, below are some of it discovered along using the phone all this while :
The phone's operating systems is also able to upgrade from a normal PC or laptop with USB connectivity. The last upgrade my phone had have significantly improve the responsiveness and also some functionality. e.g. typing the phone book entry on the Home Screen will directly search for it (rather the usually need to access the phone book before able to search), press shift twice will activate the secondary input language and others.
But this post is about tips and shortcut keys available on the phone, below are some of it discovered along using the phone all this while :
2009-05-12
OpenOffice crashes after fail to recover documents
When launching openoffice, it starts to recover some files which previously did not save properly. After it recovers, it just display a message saying it needed to close due to some unexpected error. After retrying to start a few more times, the result is still the same. Reset the profile by using the below instructions :
2009-05-08
How to check user's information and profile
Other then digging /etc/passwd, there are other ways to check a user's profile on the server. "finger" can also do the same job.
e.g.
Arrivederci !!!
e.g.
finger username
Arrivederci !!!
mkdir - make a whole set of directory, automatically if it does not exists
When organizing files, we often need to make a whole set of directories in order organize the files properly into directories. Most of the time, we will need to make a bunch of sub directories.
e.g.
"cd /directory" then "mkdir leve1", then "cd /directory/level1" then "mkdir level2", then "cd /directory/level1/level2" then "mkdir level3" and etc... In fact, there is a parameter for mkdir to create the whole set of directory, automatically.
e.g.
"cd /directory" then "mkdir leve1", then "cd /directory/level1" then "mkdir level2", then "cd /directory/level1/level2" then "mkdir level3" and etc... In fact, there is a parameter for mkdir to create the whole set of directory, automatically.
2009-05-07
How to display route table or default gateway
Route table are part of the area to troubleshoot when a connection have problem. Route table can the the most frequent problem to look at after assigning an IP address. Other times, it is mainly for adding additional routes when wireless & wired connection are both in use. This post will attempt to list out a few ways to display route table and also how to assign default route aka default gateway in Linux & FreeBSD.
How to cd back to the previous directory
In Linux & FreeBSD, often we need to cd to a directory then ls to find out the files in that directory. Then only to find out we need to go back to the previous directory and do something else, and we will need to type "cd /very/long/directory/name/and/it/is/just/so/not/cool/to/do/".
2009-05-06
How to make grep highlight the keyword
By default, grep does not highlight the keyword or the search term. Making grep highlighting the search term can make the visibility of the keyword more obvious if it hide in between the words.
Subscribe to:
Posts (Atom)














