Archive

Archive for the ‘Linux’ Category

How to Use Tor Project Anonymous IP with Curl PHP on Linux

June 15th, 2010 1 comment

This article explains how to utilize Tor project in our own PHP application using Curl Library.

Tor is free software and an open network that helps you defend against a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security known as traffic analysis.

We start by installing and configuring Tor and the necessary software then we create a simple application that fetch a website address anonymously.

Read more…

  • Share/Bookmark

Setup Kannel SMS Gateway on Ubuntu

May 5th, 2010 9 comments

This are the required steps to setup Kannel as an SMS Gateway on Ubuntu. Here we use a simple GSM modem attached to USB port 0, using Enfora modem. You can use other standard AT command modems actually.

Enable the SMS Box

Edit file /etc/default/kannel , uncomment the START_SMSBOX line to enable the SMS Box

sudo vi /etc/default/kannel

START_WAPBOX=1
START_SMSBOX=1

 

Add kannel user to dialout group

This will enable kannel user (user who run kannel process as) to use the /dev/ttyUSB0 device that is necessary when we are using USB GMS modems.

Read more…

  • Share/Bookmark

Show the List of Installed Packages on Ubuntu or Debian

The command we need to use to list the packages currently installed in Ubuntu or Debian is dpkg –get-selections. For example:

# dpkg --get-selections
acpi                                            install
acpi-support-base                               install
acpid                                           install
adduser                                         install
apache2                                         install
apache2-mpm-prefork                             install
apache2-utils                                   install
apache2.2-common                                install
apt                                             install
apt-utils                                       install
aptitude                                        install
autoconf                                        install
automake                                        install
automake1.4                                     install
autotools-dev                                   install
avahi-daemon                                    install
bacula-common                                   install
bacula-fd                                       install
base-files                                      install
base-passwd                                     install
bash                                            install
bind9-host                                      install
binutils                                        install

…

 

It will return a long list showing all the installed packages. To filter to specific list of packages, for example we only need to show java packages, combine it with grep, for example:

# dpkg --get-selections|grep java
java-common                                     install
java-gcj-compat                                 install
java-gcj-compat-headless                        install
libbcel-java                                    install
liblog4j1.2-java                                install
liblog4j1.2-java-gcj                            install
libmx4j-java                                    install
libpg-java                                      install
libregexp-java                                  install
sun-java6-bin                                   install
sun-java6-jdk                                   install
sun-java6-jre                                   install

We can find the locations of the files within a package from the list by using the dpkg -L command, such as:

# dpkg -L sun-java6-jdk|more
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/sun-java6-jdk
/usr/share/doc/sun-java6-jdk/changelog.Debian.gz
/usr/share/doc/sun-java6-jdk/copyright
/usr/share/doc/sun-java6-jdk/README.alternatives
/usr/share/doc/sun-java6-jdk/README.html
/usr/share/menu
/usr/share/menu/sun-java6-jdk
/usr/share/applications
/usr/share/applications/sun-java6-jconsole.desktop
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/sun-java6-jdk
/usr/share/doc-base
/usr/share/doc-base/sun-java6-jdk-readme
/usr/lib
/usr/lib/jvm
/usr/lib/jvm/java-6-sun-1.6.0.12
/usr/lib/jvm/java-6-sun-1.6.0.12/include
/usr/lib/jvm/java-6-sun-1.6.0.12/include/linux
/usr/lib/jvm/java-6-sun-1.6.0.12/include/linux/jni_md.h
/usr/lib/jvm/java-6-sun-1.6.0.12/include/linux/jawt_md.h
/usr/lib/jvm/java-6-sun-1.6.0.12/include/jni.h
/usr/lib/jvm/java-6-sun-1.6.0.12/include/jdwpTransport.h

…

  • Share/Bookmark
Categories: Linux Tags: , , , ,

BASH Redirection

Quick reference

In BASH terminology, there are 3 file descriptors, stdin, stdout and stderr (std means standard).

Basically you can:

  1. redirect stdout to a file
  2. redirect stderr to a file
  3. redirect stdout to a stderr
  4. redirect stderr to a stdout
  5. redirect stderr and stdout to a file
  6. redirect stderr and stdout to stdout
  7. redirect stderr and stdout to stderr

Next, 1 represents stdout and 2 means stderr.

A little note for seeing this things: with the less command you can view both stdout (which will remain on the buffer) and the stderr that will be printed on the screen, but erased as you try to ‘browse’ the buffer.

Read more…

  • Share/Bookmark
Categories: Linux Tags: , , , ,

Beautiful Firefox Desktop Wallpaper to Jazz Up your Computer

Feeling bored with your plain old desktop wallpaper? Then this list is worth to take a look. Listed here are the most beautiful Firefox-themed desktop wallpaper that you can download and set it as your desktop wallpaper. It will make your computer, in Indonesian term “Firefox banget!”.

Firefox on Flames xD

Read more…

  • Share/Bookmark

MySQL Backup to Email

Image representing MySQL as depicted in CrunchBase

Image via CrunchBase

This simple PHP script can be used to backup MySQL databases and then send the zipped backup file to email addresses. The backup file can then be restored by any MySQL front end program like the mysql command line, Navicat MySQL, or phpMyAdmin.

The logic of the script is really simple:

  1. initialization
  2. create backup sql file
  3. zip the file
  4. send email

Read more…

  • Share/Bookmark
Categories: Linux, MySQL, PHP, Windows Tags: , ,

Instalasi SQL Ledger di Windows

Persyaratan

  • Windows 2000, Windows XP, Windows Server 2000 atau Windows Server 2003
  • WinZip
  • mengerti DOS commands prompt, i.e. CD, DIR, MKDIR, COPY, REN

Langkah-langkah

  • Instal Apache HTTP Server 2.0.55 (alternatif Apache melalui XAMPP)
  • Instal ActivePerl 5.6.1
  • Instal DBD-Pg and DBI
  • Instal PostgreSQL 8.0.4 (Part 1)
  • Instal PostgreSQL 8.0.4 (Part 2)
  • Instal SQL-Ledger 2.8.17
  • Updating HTTPD.CONF
  • Set Administrator Password dan membuat Dataset

Read more…

  • Share/Bookmark

Perl connection to PostgreSQL

Modul Perl yang diperlukan

Agar program Perl bisa connect ke Posgres diperlukan modul tambahan Perl sebagai berikut:

  1. DBI
  2. DBD::Pg

Instalasi Modul di Linux

Untuk sistem operasi Linux, installasi modul sangat mudah dilakukan, yaitu dengan menggunakan program RPM, Yum, dan sebagainya.

Read more…

  • Share/Bookmark
This site uses a Hackadelic PlugIn, Hackadelic SEO Table Of Contents 1.6.0.