Saturday, July 2, 2011

The know hows of Bitnami LAMP Stack (1.2-5)

It took me about ten days to figure out how to install Bitnami LAMPStack 1.2-5 on my Ubuntu machine!! I know it is lame! But still I admit, it really racked my brains off. Well, let's get to business!! For all of you who deleted the bitnami-lampstack-1.2-5-linux-installer.bin thinking that the file could be corrupt, you are wrong, you have to chmod it with 755 octals. You probably had this ")" missing error while installing the lampstack without issuing the chmod command! Solution:

First launch terminal, navigate to the directory where lampstack binary is located,and type in:
chmod 755 bitnami-lampstack-1.2-5-linux-installer.bin, and hit enter. 
Next, type in to begin installing the amp stack:
./bitnami-lampstack-1.2-5-linux-installer.bin

Another suggestion that I would like to make is that you install the stack in your home directory and not in the "opt" directory (default location provided by the amp stack), and don't forget the anonymous password used to access phpmyadmin (I am not sure if there is any way to recover or change the password. I once did forget the password, and I had to reinstall amp stack)

Now, open your web browser, and type in:
http://127.0.0.1:8080
You will now see a "Bitnami Welcome Page", this means that the Apache server is up and running.

If you are using IDE's to develop web pages, then create project containers in the location:
/home/yourusername/lampstack-1.2-5/apache2/htdocs
Or copy your php scripts to /home/yourusername/lampstack-1.2-5/apache2/htdocs directory.

Now to run your scripts- If you have written a script using gedit or any other text editor, copy it to /home/yourusername/lampstack-1.2-5/apache2/htdocs directory, then launch your web browser type in http://127.0.0.1:8080/filename.php. For example, you create a php file named as testphp.php and copied it to /home/yourusername/lampstack-1.2-5/apache2/htdocs directory, all you need to do is to open web browser and type http://127.0.0.1:8080/testphp.php!!

In case you are using an IDE, don't bother about the project container (as you did in Windows), type in http://127.0.0.1:8080/filename.php in your web browser, and that's it you are done!!

Enjoy your scripting. In case you have any questions in mind, please leave a comment, or you can email me nitinclix@gmail.com .

Saturday, May 7, 2011

Install Network Simulator 2.34.

Network Simulator is an awesome discrete event simulator targeted at network  research.NS provides support for simulation of TCP, routing, and multicast protocols over wired and wireless (local and satellite) networks.However, installation of this piece of software is always a bit of hassle. I will try and make it as simple as possible.

I will be using the "traditional" way to install the application on Ubuntu 10.10. The package ns-allinone-2.34 is a complete package, it contains Network AniMator (NAM), Xgraph and NS.

First download the package ns-allinone-2.34.tar.gz from here.

Copy the ns-allinone-2.34.tar.gz package to your home folder(In my case /home/neo). Extract the contents in your home folder.

Now install the dependencies. Goto terminal, and type in "$ sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.3" (without quotes) P.S : We are downgrading the gcc version to 4.3. NS2 works well with gcc 4.3.

Launch terminal, and access the ns-allinone-2.34 folder through "cd ns-allinone-2.34/".

Next edit the makefile.ini file. It is found in otcl-1.13 folder inside the ns-allinone-2.34 folder. Open the makefile.ini file, and look for a line which says CC= @CC@ and change it to CC= gcc-4.3. Save and close the makefile.

Begin the installation.Launch terminal. Access the ns-allinone-2.34 in your home folder and type in "./install" (without quotes).

Look for error messages. (If any, send them to my email id nitinclix@gmail.com")
If step 6 does not return any errors, then we need to add the path in .bashrc file located in your home folder. Navigate to your home folder, hit Ctrl and H simultaneously, look for the file .bashrc. Open it and append the following lines.

# LD_LIBRARY_PATH
OTCL_LIB=/home/neo/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/neo/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/neo/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/neo/ns-allinone-2.34/bin:/home/nao/ns-allinone-2.34/tcl8.4.18/unix:/home/neo/ns-allinone2.3/tk8.4.18/unix
NS=/home/neo/ns-allinone-2.34/ns-2.34/
NAM=/home/neo/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM

Here replace /home/neo with the path to your home folder.
 Type this command in terminal for the changes to take place instantly. "source ~/.bashrc"(without quotes)

That is it. Type in "ns" (without quotes) in the terminal, and if you see a % prompt, then ns2 is installed. Type in "nam" (without quotes), if the nam window shows up, then Network AniMator is installed.
Enjoy using NS2. Post your concerns here or email them to me: nitinclix@gmail.com.
And if you like my blog, you can choose to follow it.

Saturday, April 2, 2011

LAMP Stack and Eclipse!!

First of all INDIA has won the Cricket World Cup 2011. Kudos to the Young Indian Team who bled blue!!!

The other day I attended a workshop on Open Source programming and PHP programming. In Ubuntu 10.10 it is easy for you to make a AMP stack, and run your PHP programs, and connect the database with the PHP scripts of yours. Of-late, I have been hearing all sorts of complaints on blocked port addresses. So I thought I will make it easier for newbies in Linux to use the AMP stack. There are many a ways to install AMP stack, there's the "sudo su apt-get" thing, and there's this .deb files to install, but nothing beats BITNAMI LAMPSTACK installation, one can configure port numbers manually for MySQL and other stack applications!!!

Click here to download BITNAMI LAMP STACK!!
Click here to download Easy Eclipse!!

Now Easy Eclipse is a gem of an IDE.

Any issues during installation, do not hesitate to post in this blog!!
Happy web developing!!