Monday, April 12, 2010

Using PUTools with Python for S60 Ver 2.0.0

Python for S60 developers installing PUTools should follow the original document up to "Getting started with push (Python Utility Shell)"

And before proceeding with "On the phone" section do the following

(i) On phone edit phpush.py as follows

[Original phpush.py - Line 1 to 13]

# phpush.py
#

import appuifw
import phcomm
import os
import sys
import glob
import code
import thread
import pushlib
import graphics
import e32

[Modified phpush.py]

# phpush.py
#
# The memory card of my phone is e: and so have Python & Python/libs
# directories on e: drive. Change the path according to your phone.
import sys
sys.path.append("e://Python//libs")
import appuifw
import phcomm
import os
import glob
import code
import thread
import pushlib
import graphics
import e32

(ii) On phone modify phcomm.py stored under e:/python/libs directory

[Original phcomm.py - Line 32]

import socket

[Modified phcomm.py]

import btsocket as socket

Monday, October 26, 2009

Using Cloud Computing

I am sure we all are using so call cloud computing solutions in our day to day activities / operations either knowingly or unknowingly. And it is equally true that the improvisation of Operating System or the platform running over our enormous hardware has helped us to improvise utilisation of available resources. Take an example most of my emails and personal document management is taken care by google apps and if I have to deploy my online application and want to purely concentrate on my business rather than worry about Infrastructure, hardware scoping, infrastructure management, high availability, up-scaling, etc. and most important CAPEX, it would make more sense in using offerings made by Amazon and others, as this will help me to concentrate more on my business operations & activities and let the service provider manage the Infrastructure. And yes, SaaS (Software as a Service), PaaS (Platform as a Service) & IaaS (Infrastructure as a Service) will be the focus and not just selling boxes or softwares.

Saturday, October 24, 2009

Cloud Computing

Everybody is busy talking ga ga about cloud computing ... I sometime wonder why .... cloud computing is just a repackaging & selling of mainframe technology. The same old technology with same old features like batch processing, multi functional, virtualisation, storage etc.

Thursday, October 1, 2009

Nginx (engine x) – Installation Guide on CentOS

1] Download source code of Nginx from the official site (http://nginx.net/)

To get stable version as per this tutorial dated is

$ wget http://sysoev.ru/nginx/nginx-0.7.61.tar.gz

or

To get development version as per this tutorial dated is

$ wget http://sysoev.ru/nginx/nginx-0.8.7.tar.gz

(Note : For production server use stable version only)


2] We store downloaded file under a directory, for example we will use 'download' directory

$ mkdir ~/download

$ cp nginx-0.6.36.tar.gz ~/download

$ cd download


3] Install required Nginx dependencies

pcre pcre-devel zlib zlib-devel openssl openssl-devel

so using default package manager of CentOS

$ sudo yum install pcre pcre-devel zlib zlib-devel openssl openssl-devel


4] Create required Nginx user and group ids

$ sudo /usr/sbin/groupadd nginx

$ sudo /usr/sbin/useradd –g nginx –s /bin/false nginx


5] Proceed with source installation of Nginx

$ cd ~/download

unzip the source file

$ tar -zxvf nginx-0.7.61.tar.gz

$ cd nginx-0.7.61


6] Configure Nginx source

$ ./configure \

--prefix=/usr/local/nginx \

--sbin-path=/usr/local/sbin \

--conf-path=/usr/local/nginx/nginx.conf \

--http-log-path=/var/log/nginx/access.log \

--error-log-path=/var/log/nginx/error.log \

--pid-path=/var/run/nginx/nginx.pid \

--lock-path=/var/lock/nginx.lock \

--user=nginx \

--group=nginx \

--http-client-body-temp-path=/var/tmp/nginx/client/ \

--http-proxy-temp-path=/var/tmp/nginx/proxy/ \

--http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ \

--with-http_ssl_module \

--with-http_realip_module \

--with-http_perl_module \

--with-http_flv_module \

--with-http_gzip_static_module \

--with-http_stub_status_module \

--with-md5-asm \

--with-md5=auto/lib/md5 \

--with-sha1-asm \

--with-sha1=auto/lib/sha1


7] Make and Install

$ make

$ sudo make install


8] Change ownerships before we proceed

$ sudo chown nginx:nginx –R /usr/local/nginx


9] Create following directories with required ownership to proceed

$ sudo mkdir -p /var/tmp/nginx /{client,proxy,fcgi}

$ sudo chown nginx:nginx -R /var/tmp/nginx


10] Start Nginx

$ sudo /usr/local/sbin/nginx

If we get no error while starting Nginx then lets check running process status by executing following command and getting similar output as below

$ ps aux | grep nginx

root 10009 0.0 0.0 5524 592 ? Ss 07:21 0:00 nginx: master process /usr/local/sbin/nginx

nginx 10010 0.0 0.0 5716 928 ? S 07:21 0:00 nginx: worker process


11] And we are ready to use Nginx

Open your browser and type ip address of your server or just type localhost.

http://localhost

http://127.0.0.1


Bingo!!!

12] Shutdown Nginx

$ sudo kill `cat /var/run/nginx/nginx.pid`

Friday, July 24, 2009

Telecom - Time to come

In next 3 - 5 years we will see a sea change in the role or service provided by Telecom operators. They will transform into ISPs, providing broadband / High speed data connectivity Over The Air to all the subscriber base. The mobile number portability will die an early death and IP Address portability will be default standard. Each subscriber will be assigned a unique IP address which will be means to communicate with him / her. All devices used by the subscriber will be NATed to the unique IP address. IPv6 seems to be the only viable option as of coming technology. And the IP assigning cost may be borne by the government. And the IP address will be issued along with the birth certificate.

Saturday, May 9, 2009

HowTo Configure Port Based Virtual Host on Apache2

1] Change to root user to make changes

$ su -

2] Modify apache config file

#
vi /etc/httpd/conf/httpd.conf

3] Locate the line which shows 'Listen 80' and add a line under it with the port number on which virtual host needs to run, in this example 8080.

Listen 8080

4] Then locate virtual host section in the config file which is usually at the end of the config file. And add new virtual host section as shown in the example below and save the file. Please m necessary changes in the below section as per your requirement.

# vhost

ServerAdmin webmaster@vhost.com
DocumentRoot /var/www/vhost
ServerName vhost.com
ErrorLog logs/vhost.com-error_log
CustomLog logs/vhost.com-access_log common


5] Above virtual host section we have defined html web page path as /var/www/vhost, so this directory has to exist along with the index.html page for apache to serve http request received on 8080.

6] Now check if apache config for errors

# /usr/sbin/apachectl -t

7] And if output say 'Syntax OK' then restart apache services

# service httpd restart

8] Now start your browser and open and bingo your Virtual Website is serving pages

http://ServerIP:8080

Replace ServerIP with the real ip address of your web server

Howto Disable SELINUX on CentOS 5.x / RHEL 5.x

1] Change to root user to make changes

$ su -

2] Check the status of SELINUX using following command

# sestatus
SELinux status: enabled

3] To disable SELINUX modify config file

# vi /etc/selinux/config

4] Search for the line 'SELINUX=enforcing' and modify this line as

SELINUX=disabled

5] Now save the file and reboot the system.

6] Once the system is restarted check the status of SELINUX run the command mentioned above in point 2 and now it should show SELINUX status as 'disabled'.