17 August, 2011

setup lamp server on debian/ubuntu || the easiest & the best way


The LAMP server is the commonly abbreated for Linux Apache MySql PHP server. This is a platform where web pages can be build/test/run using linux.

So setting up your LAMP server includes installing all those above said packages and configuring them to work together.

You can use either terminal or synaptic package manager to install these packages [and should have a working internet connection]. Anyway we may have to use the terminal for configuring them. So better move with the Terminal [Applications > Accessories > Terminal] itself.

1. Install Apache server

------------------------------
Below command will install apache server in your system


$ sudo apt-get install apache2

when the installation finishes, test weather it's working by pointing your web browser[firefox / chrome . . . ] to the following web address.
http://localhost/  

You should see a folder entitled apache2-default/. Open it and you will see a message saying something like > "It works!"

2. Install PHP

- - - - - - - - - - - - -

copy-paste the command given below onto a terminal and hit the enter key.


$sudo apt-get install php5 libapache2-mod-php5

While PHP installation finishes, restart the apache web server to make it compatible with apache using the following command.


$ sudo /etc/init.d/apache2 restart

testing PHP

To ensure there are no issues with PHP let's give it a quick test run.

Step 1. In the terminal copy/paste the following line:



$ sudo gedit /var/www/test.php

This will open up a file called test.php.

Add the following line into the test.php, save and close the file.


  <?php
      phpinfo();
  ?>


Now open you're web browser and type the following into the web address:



http://localhost/test.php


Note : You can change the location of the Document root [by default it is /var/www/] by reading this article.

Install MySQL
- - - - - - - - - - - - - - 

open up the Terminal and then copy/paste this line:


sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql


install phpmyadmin
-------------------------

 

sudo apt-get install phpmyadmin

Now just restart Apache and you are all set!



sudo /etc/init.d/apache2 restart


That's enough! your LAMP server  is ready, and now you can can move up with your pretty codes >>
Read rest of entry

31 January, 2011

Convert videos to 3gp, Mp4, Mp3 formats with Mobile media converter in Ubuntu

I have been searching for a cool media converter for my ubuntu box to convert my favourite videos into mobile formats like mp4 and 3gp etc... last week. I ended up with the one called Mobile Media Converter. Here i share my experience with this application. 

The Mobile Media Converter is a free video and audio converter for converting between popular desktop media formats like MP3, wma, ogg, wav, MPEG video, AVI, wmv, flv, mov and commonly used mobile devices/phones formats like AMR and 3GP video. Also iPod/iPhone and PSP compatible MP4 video are supported. Moreover, you can remove and add new formats  or devices through the internet.

The Mobile Media Converter has integrated a Youtube downloader which can be used to download flash videos and convert to any other formats. You can trim your clips for ringtone creation or any other purpose and crop your videos for removing up/down black bars or other unwanted parts of the image. Additionally, embedded subtitles can be encoded onto the video for watching  movies or shows with subtitles on devices that does not supports them.
 
You can download the this application from here. After downloading the debian package, open it with Synaptic or Ubuntu Software Center to complete the installation







Read rest of entry

05 October, 2010

apt package manager : options & tricks

APT package manager in Debian systems can be used to download and install packages from online repositories. The APT commands (apt-get, apt-cache, and so on) can be used to install packages locally. However, it’s normally used for working with online software.

sudo apt-get update
Consults /etc/apt/sources.list and updates the database of available packages. Be sure to run this command whenever sources.list is changed.

apt-cache search <keyword>
Case-insensitive search of the package database for the keyword given. The package names and descriptions are returned where that keyword is found.

sudo apt-get install <package>

Download and install the given package name as found in the package database.

sudo apt-get -d install <package>
Download the package only, placing it in /var/cache/apt/archives.

apt-cache show <package>

Display information about the software from the named package.

sudo apt-get upgrade


Check updates for all installed packages and then prompt to download and install them.

sudo apt-get dist-upgrade

Updates the entire system to a new release, even if it means removing packages. (Are you on nuts to do this?)

sudo apt-get autoclean

Can be run anytime to delete partially downloaded packages, or packages no longer installed.

sudo apt-get clean


Removes all cached packages from /var/cache/apt/archives to free up disk space.

sudo apt-get --purge remove <package>

Remove the named package and all its configuration files. Remove the --purge keyword to keep config files.

sudo apt-get -f install

Do a sanity check for broken packages. This tries to fix any “unmet dependency” messages.

apt-config -V


Print version information of installed APT utilities.

sudo apt-key list


List gpg keys that APT knows about. 

apt-cache stats 

Print statistics on all packages installed.

apt-cache depends


Print dependencies for a package (whether it’s installed or not). 

apt-cache pkgnames 

List all packages installed on the system.
Read rest of entry

24 September, 2010

How to install finch in Ubuntu 10.04


Finch is a text/console-based, modular instant messaging client capable of using AIM/ICQ, Yahoo!, MSN, IRC, Jabber, Napster, Zephyr, Gadu-Gadu, Bonjour, Groupwise, Sametime, SILC, and SIMPLE all at once. Terminal acts as the GUI for the finch... And you might fell in love with it only if you are comfortable with the bash terminal also...

Installing finch in Ubuntu 10.04

take the gnome terminal and type in as follows :

$ sudo apt-get install finch


You can install it also using the Synaptic Package manager also.





Read rest of entry

10 September, 2010

How to install NetBeans IDE 6.9.1 in Ubuntu 10.04


How to install java runtime environment in Ubuntu
NetBeans IDE is an open-source, fast and feature full tool for developing Java software. It runs on any operating system where a Java Virtual Machine is available. NetBeans helps to develop java applications and projects with ease and good user friendly environment. Here is the right mechanism to install NetBeans IDE in Ubuntu. You should have to install a Java Virtual Machine in the computer before installing NetBeans.

Install Java Runtime Environment in Ubuntu 10.04

1.Open the terminal and add the following repository

   $ sudo add-apt-repository "deb http://archive.canonical.com/ lucid  partner"    

2. Update the apt:

$ sudo apt-get update

3. Now install Sun Java packages using command: 

$ sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts



Install NetBeans IDE 6.9.1 in Ubuntu 10.04

Download the latest version of the NetBeans IDE binaries from the link here. The versions available from synaptic or apt-get is usually out-of-date from the version available directly from NetBeans. So the best way to get the latest version is to download the binaries directly from the NetBeans website and execute it in your machine.

><      Download the binary corresponding to Java SE.


><       After the download is complete, take the  terminal and change to the directory where the file is downloaded, usually that may be in your Downloads folder.

$ cd  /home/your_username/Downloads


><      Now install the NetBeans IDE using the shell command as follows. Change the filename with the one corresponding to the file downloaded on to your machine.

$ sudo sh  ./netbeans-6.9.1-ml-javase-linux.sh

><       The terminal will initialize the NetBeans installer in Graphical mode after executing the above command. When installation is completed you can start creating your java application by taking the NetBeans IDE from Applications > Programming > NetBeans


Read rest of entry

26 April, 2010

Internet access and package installation behind a proxy server in Ubuntu

When there is a proxy server in between your system and server you have to specify the proxy address in all the applications that is intended to access internet such as firefox, bittorrent... Proxy servers are mainly deployed for subnets, for example a network inside a college is connected to internet using a proxy server (not technically, since there are gateways,routers...) to sensor and restrict the students internet activities, protect from unauthorized access... 

If you have to run any application behind a proxy server, you have to specify the proxy server address and the port number to the application that need access the internet. This is because the default port numbers used by the transport  layer protocols are changed by the proxy server. Squid is one among the important proxy programs that is prefered by network administrators. In the following cases please replace the proxy address and port number with the corresponding feilds applicable to you.

Setting Proxy address in Mozilla  firefox

Click on edit --> Preferences.

Select the Network tab under the advanced tab. Click on the Settings button. In the Network settings window select the manual configuration. Then enter the HTTP proxy and port on the current window. Save the settings...When you start browsing the firefox will automatically ask for authentication. Then you have to specify the username and password in the proxy server. 






Setting Proxy in Synaptic package manager


If you are using synaptic package manager as the package installer, You have to do some configuration before using apt package manager.
Click on the Settings --> Preferences
Choose the network tab and select manual proxy configuration. Set HTTP proxy and FTP proxy. Then enter their port numbers also. Click on the authentication button to set username and password.




Setting proxy for APT package manager
APT is a command line utility for installing packages. Probably many people are addicted to terminal do the following . . .

If you have no authentication for the proxy server then use the following command line. 

export http_proxy=http://192.168.0.2:3128
export ftp_proxy=http://192.168.0.2:3128


If you have username and password the use

export http_proxy=http://username:password@192.168.0.2:3128/
export ftp_proxy=http://username:password@192.168.0.2:3128/
Read rest of entry
 

Terminal Diary | techblog Copyright © 2009 Gadget Blog is Designed by jintu jacob Powered by Blogger