Archive for 2008

Friday, December 19th, 2008

[…]

Friday, November 21st, 2008

If you are new to Linux, chances are you will meet a stupid person perhaps in a forum or chat room that can trick you into using commands that will harm your files or even your entire operating system. To avoid this dangerous scenario from happening, I have here a list of deadly Linux commands […]

Thursday, November 6th, 2008

If you want to work with zip files in Ubuntu command line interface, you will need these commands: zip and unzip.
Zip
To install zip if you don’t already have it, do this
sudo apt-get install zip
The simplest way to create a zip file (archive) is
zip myzipfile.zip file1 file2 file3 …
Where myzipfile.zip is the file (zip archive) you […]

Monday, November 3rd, 2008

1. Checking for cacti location and see db setting.
monitor# pwd
/usr/local/share/cacti/include
see setting dbnya.
monitor# cat db-settings.php
<?php
/* make sure these values refect your actual database/host/user/password */
$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cacti”;
$database_password = “cacti”;
$database_port = “3306″;
?>
2. Enter database with information taken from db-settings.php information.
monitor# mysql -ucacti -p
Enter password:
Welcome to the MySQL monitor.  Commands end […]

Friday, October 31st, 2008

 Control Character Commands
^ h
Backspace.
^ d
End text input, EOF for mail, write
(also acts as logout command).
^ w
Delete last word typed.
^ u
Delete (undo) last line typed.
^ r
Repeat last line typed.
^ s
Stop the screen from scrolling
(sometimes takes a while to be effective).
^ q
Unlock terminal screen, continue scrolling.
^ c
Interrupt running program ([Del] in System V).
^ z
Suspend running program, and […]

Tuesday, October 28th, 2008

A query is considered as slow if it takes more than “long_query_time” seconds to execute. By default, the value of this variable is set to “1″.
1). Identifying MySQL slow queries
************************************
First let’s check on the mysql server if we have slow query logging enabled:
mysqladmin var |grep log_slow_queries | log_slow_queries | OFF
2) . Activate the logging of […]

Tuesday, October 28th, 2008

With FreeBSD 5.4 and above the booting procedure is slightly changed. Under ilder version of FreeBSD use boot -s option at Ok prompt.
However, with version FreeBSD 5.4+ you don’t have to type any command. Here is the procedure to boot FreeBSD into a single user mode to reset root password.
In this tip I will explain […]

Tuesday, October 21st, 2008

This tutorial will explain how to upgrade Ubuntu Server from Feisty to Hardy
Step 1: Feisty to Gusty Upgrade
first be sure your feisty up-to-date
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

if everything ok, ready for upgrade to gusty.
nano /etc/apt/source.list

all change “feisty” to “gutsy”
save and exit (ctrl-x, yes)
sudo apt-get update
sudo apt-get dist-upgrade
(one package doesn’t upgrade : mailscanner
but this […]

Wednesday, October 8th, 2008

It is possible to create network alias or assign 2 ip address to a single NIC under FreeBSD operating system.
Sample setup:
=> lnc0 - IP : 192.168.1.1/255.255.255.0
=>lnc0 alias - IP : 192.168.1.5/255.255.255.255
Note: Netmask must be diffrent otherwise you will get an error ifconfig: ioctl (SIOCAIFADDR): File exists
Set ip alias using ifconfig command line utility
Login as the […]

Wednesday, August 27th, 2008

MySQL server and client uses a file called my.cnf. You need to open /etc/my.cnf (Global mysqld configuration file) to specify new port.
Open /etc/my.cnf file:
# vi /etc/my.cnf
Set new port 5123:
port=5123
Here is is my sample /etc/my.cnf file:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
port=5123
old_passwords=1
bind = 10.10.29.66
key_buffer = 500M
table_cache = 4000
sort_buffer_size = 3M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
max_connections = 400
query_cache_type = 1
query_cache_limit = 1M
query_cache_size […]