How to DISABLE ipv6 in CentOS5 System

echo “NETWORKING_IPV6=no” >> /etc/sysconfig/network
echo “alias ipv6 off” >> /etc/modprobe.conf
echo “alias net-pf-10 off” >> /etc/modprobe.conf
reboot

# ifconfig

eth1      Link encap:Ethernet  HWaddr 00:1C:F0:BB:A7:28
inet addr:10.10.10.11  Bcast:10.10.10.255  Mask:255.255.255.0
inet6 addr: fe80::21c:f0ff:febb:a728/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:470449435 errors:1 dropped:0 overruns:0 frame:0
TX packets:464084402 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2563674692 (2.3 GiB)  TX bytes:2243518951 (2.0 GiB)
Interrupt:225 Base address:0×2800

Don’t really need of ipv6 to be run on your server. Want to disable it ?

Read more…



Scripting a MySQL InnoDB Engine Conversion

0) Backup your database.
You should probably be doing this already.  Now’s a good time to make sure that your backups ran.

1) Create the script.
You’ll need the correct permissions to query the database. Here’s the command.  Be sure to change <DATABASE_NAME> as it fits.

# mysql -p -e "show tables in <DATABASE_NAME>;" | \
tail --lines=+2 | \
xargs -i echo "ALTER TABLE {} ENGINE=INNODB;" > alter_table.sql

2) Run the script.

# mysql --database=<DATABASE_NAME> -p < alter_table.sql

3) Verify it by running this command in mysql:

mysql> show table status;

Read more…



Simple MySQL Backup with auto 3 days old file deletion

/usr/local/bin/mysql.backup.sh

#!/bin/bash
NOW=$(date +"%m-%d-%Y")
OLD=$(date +"%m-%d-%Y" --date="3 days ago")
PROJECT="project_name"
LOCATION="/home/backup"
FILE="$PROJECT.$NOW.sql"
FILE2="$FILE.gz"
FILEOLD="$PROJECT.$OLD.sql.gz"
EMAIL="youremail@domain.com"
$SQLUSER="username"
$SQLPASS="password"
$SQLNAME="database_name"
cd $LOCATION ; \
rm -f $FILEOLD ; \
mysqldump -u $SQLUSER --password=$SQLPASS $SQLNAME > \
$LOCATION/$FILE ; \
gzip $LOCATION/$FILE ; \
echo "Backup location is in $LOCATION/$FILE2" | \
mail -s "[$PROJECT] MySQL Backup" $EMAIL

Then you can put it on your cron (background process)

Below cron will execute the script on Saturday at 12AM:

0 0 * * 6 /usr/local/bin/mysql.backup.sh

Good luck!



How To Getting Yesterdays or Tomorrows day with shell date command

When invoked without arguments, the date command displays the current date and time. Depending on the options specified, date will set the date and time or print it in a user defined way. I’ve seen many people writing a perl script for calculating yesterday or tomorrow. Computer loves numbers but we love relative terms like 2 days ago. Luckily GNU date command is designed to handle relative date calculation. Read more…



How to format date for display or to use in a shell script

Q. How do I format date to display on screen on for my scripts as per my requirements?

A. You need to use standard date command to format date or time for output or to use in a shell script.

Syntax to specify format
date +FORMAT Read more…



Setting up DomainKeys on Centos

This is a quick walk through on how to set up domain keys on Centos 5 using sendmail. It should also be very similar for Redhat or Fedora.

Domainkeys is a method mostly used by yahoo to verify that the sender of an email is valid. I did notice that gmail changes the domainkeys header line to a pass value but I don’t know if they block/accept mail based on that. Read more…



BlackBerry Bold 9700 (Onyx) Features

Features: Voice-Activated Dialing, MMS Enabled, Global Ready, Video Recording, Color Screen, Bluetooth Enabled, GPS, Calendar, Email Access, Internet Browser, Wi-Fi Capable, SMS-Text Messaging, 3G Data Capable, QWERTY Keyboard, Speakerphone
Camera: 3 Megapixels & Up
Available Features
• Trackpad navigation
• Bright, hi-resolution screen
• Full QWERTY keyboard
• 3G technology
• Wi-Fi® and Bluetooth® enabled
• 256MB flash memory
• 3.2 MP digital camera with video camera
• Multimedia player
• Wireless email
• Organizer
• Browser
• Phone
• SMS/MMS 
Display
• High resolution 480×360 pixel
color display
• Transmissive TFT LCD
• Supports over 65,000 colors
• 2.44″ (diagonally measured)

Camera & Video Recording
• 3.2 MP Camera
• Auto Focus, Image Stabilization
• Flash
• 2X digital zoom

Video camera recording:
Normal Mode (480 x 352 pixel),
MMS Mode (176 x 144 pixel)
Maps & GPS
• Includes BlackBerry Maps
• Integrated GPS with A-GPS
Data Input & Navigation
• 35 key backlit QWERTY keyboard
• Dedicated Keys: Send, End, VAD (User Customizable), Camera (User Customizable), 2 x Volume/Zoom
• Trackpad – Located on front face of device, ESC Key to the right, Menu to the left
• Intuitive icons and menus
Voice Input & Output
• Integrated speaker and microphone
• Hands-free headset capable
• Bluetooth headset capable
• Integrated Hands-Free Speakerphone
• Rating for hearing aids (PDF): M3, T3 (in cellular bands only)
Media Player
• Video format support: XviD partially supported, H.263, H.264, WMV3, MPEG4, Sorenson Spark & On2 VP6 (Flash support)
• Audio format support: .3gp, MP3, WMA9 (.wma/.asf), WMA9 Pro / WMA 10, MIDI, AMR-NB, Professional AAC/AAC+/eAAC+
Ringtones & Notifications
• Tone, vibrate, on-screen or LED indicator
• Notification options are user configurable
• 32 Polyphonic Ringtones – MIDI, SP-MDI, MP3, WAV
Bluetooth
• Bluetooth® v2.1
• Mono/Stereo Headset
• Handsfree
• Serial Port Profile
• Bluetooth Stereo Audio (A2DP/AVCRP)
• Bluetooth SIM Access Profile supported
Security
• Password protection
• Screen lock
• Sleep mode
• Optional support for S/MIME
Wi-Fi
802.11 b/g
• UMA support
• Planned Wi-Fi Certifications: WPA, WPA2, WMM, WMM Power Save, Wi-Fi Protected Setup, Cisco CCX
Wireless Networks
3G (HSDPA) compatible
UMTS: 2100/1900/850/800 MHz (Bands 1,2,5/6), 2100/1700/900 MHz (Bands 1,4,8)
GSM: 1900/1800/900/850 MHz
Quad-band support: GSM 850; GSM



Tips: Hemat Biaya saat Roaming International

Ada kekhawatiran para pengguna BlackBerry akan besarnya biaya roaming penggunaan GPRS saat berada di luar negeri, sehingga mereka tidak mengaktifkan layanan BlackBerry saat berada di luar negeri.

Tentunya solusi ini akhirnya malah merugikan karena aneh jika pengguna BlackBerry tidak update dengan informasi penting, dan sebaliknya karena ketidaktahuan akan biaya roaming seseorang selalu mengaktifkan layanan BlackBerry hampir tiap detik email, chatting, etc selalu masuk.

Kemudian yang terjadi setelah tiba di Indonesia kaget dengan tagihan bulanan yang fantastis, untuk menghindari 2 hal diatas. Berikut saat ketika kita melakukan perjalanan keluar negeri:

1. Ketika kita tiba di suatu negara namun tidak mendapatkan network roaming partner di area tersebut, maka segera lakukan change network secara manual / update location network dengan cara masuk ke menu Options – Mobile Network – Network Selection Mode – Change from Automatic ke Manual – Scan Available for Network – Pilih Roaming Partner Operator Anda – Save.

2. Matikan layanan pada saat yg tidak tepat (tidur, mandi, makan malam, meeting, etc) dengan masuk ke menu Options – Mobile Network – Data Service change from On to Off atau Off When Roaming, atau bisa juga dari Manage Connections -Mobile Network Options – Data Services set ke : Off When Roaming. Sebagai informasi dengan mematikan layanan data service kita tetap dapat menerima Call, SMS dan MMS.

3. Jika anda pengguna layanan BlackBerry Internet Service (BIS) dan anda ingin layanan data tetap aktif sementara email account yg dipush ke handheld lebih dari 1 bahkan sampai 10 email account (apalagi jika email account tersebut tergabung dalam mailing list seperti yahoogroups), maka untuk sementara email2 yg kurang penting sebaiknya di nonaktifkan dengan cara login di blackberry webclient [operator_anda].blackberry.com pada menu email account lakukan delete email tersebut, lakukan add email account ketika kembali di Indonesia.

4. Non aktifkan semua layanan instant messaging terutama FaceBook. aktifkan layanan tersebut pada saat dibutuhkan.

5. Aktifkan koneksi WiFi ketika anda berada di area Free WiFi, tentunya fasilitas ini dapat dinikmati pada handheld yg ada feature Wifi seperti 8320, 8810, 8820, 9000, 8900, 8220 etc. Caranya Manage Connections – Setup Wifi – ikuti step2 berikutnya.

Source: Indosat Mobile


Facebook Emoticons (Key ALT usage)

Facebook symbols are not part of facebook but can be inserted into your facebook name, chat window, messages, status, comments etc..

♪ = Musical note
♫ = Big musical note
♥ = Black heart
☺= Smile face
☻ = Black smile face Read more…



Setup a transparent proxy with 3 easy steps

First, Squid server installed (use up2date squid) and configured by adding following directives to file:
# vi /etc/squid/squid.conf

Read more…