Saturday, May 21, 2011

Netbeans Info

1) Netbeans Cache directory

~/.netbeans/7.0/var/cache

delete the directory contents to clear cache.
7.0 is netbeans version number.

2) ~/.netbeans/7.0/config/Preferences/org/netbeans/modules/utilities/RecentFilesHistory.properties

stores the recent files history . surprice?

3) Netbeans->Plugins->Installed

Deactivate unwanted Modules . Check for dependencies before deactivating.

4) In Netbeans->Options->Font & Colors->Syntax
Try Purisa Font for default. Its a kewl handwritten like font. But there's a small distinguishing cost for { and [ .

Tuesday, November 2, 2010

Installing netbeans in ubuntu

1) eg. netbeans-6.9.1-ml-php-linux.sh (netbeans with php pack)

2) eg. chmod +x netbeans-6.9.1-ml-php-linux.sh (set executable permission).

3) eg. sudo ./netbeans-6.9.1-ml-php-linux.sh (execute as root and Graphical Installation will commence)

To uninstall, run the uninstall.sh
sudo ./uninstall.sh

Installing latest jre in ubuntu

1) Copy the Linux self extracting binary file to /usr/java/
eg. jre-6u22-linux-i586.bin

2) set executable permission for all
eg. chmod a+x jre-6u22-linux-i586.bin

3) Run the self-extracting binary as root
eg. sudo ./jre-6u22-linux-i586.bin

4) set path for all users by appending to /etc/profile
eg. export PATH=$PATH:/usr/java/jre1.6.0_22/bin

5) create a symbolic link to the required plugin in the browser plugins directory
eg. /usr/lib/chromium-browser/plugins/ (plugin directory for chromium)
eg. sudo ln -sf /usr/java/jre1.6.0_22/lib/i386/libnpjp2.so (the plugin that works with chromium)

Sunday, October 31, 2010

Basic Local Name Based Virtual Hosting

Name based virtual hosting - shared IP - multiple hostnames on a single machine with a single IP address. The hostname is part of the request to the server. The server uses this information to determine which web site to show the user. This may fail if the user directly types the IP address directly to reach a webhost.

-create mysite.local.conf in /etc/apache2/sites-available

-(add the below to mysite.local.conf)


<virtualhost *:80>
ServerName mysite.local
DocumentRoot /home/user/www/mysite.local
</VirtualHost>


(apache actually looks for virtual hosts in /etc/apache2/sites-enabled. So create a symbolic link from here to mysite.local.conf with the same name)

sudo ln -s /etc/apache2/sites-available/mysite.local.conf mysite.local.conf

(add to /etc/hosts)
127.0.0.1 mysite.local

So now ,
http://example.local gets to page at /var/www
http://mysite.local gets to page at /home/user/www/mysite.local

Monday, October 18, 2010

Integrating phpMyAdmin into Apache

(edit apache configuration file)
gksudo gedit /etc/apache2/apache2.conf

(-add this line)
Include /etc/phpmyadmin/apache.conf

(restart apache)
sudo /etc/init.d/apache2 restart

(Fire up the browser and point to)
http://localhost/phpmyadmin/

Saturday, October 9, 2010

Directing http://example.local

DNS servers used are stored in /etc/resolv.conf

If the IP address is listed in the /etc/hosts file,the name servers are not used.

127.0.0.1 example.local
(add to /etc/hosts so that http://example.local reaches localhost)

Very Basic Local Hosting

For client-server access the socket needs three things to provide service or ask for service.

Service name (eg. www)
Protocol (eg. http)
Port no (eg. 80)

The service uses protocol and protocol uses port number to provide service at server end and to get service at client end. Services may have same protocol but not the same port number(eg. telnet and ftp)

/etc/protocols - file shows protocols supported by Linux
/etc/services - file shows services supported by Linux

/etc/apache2 - root directory of Apache Web server

/var/www - DocumentRoot(as configured in the file /etc/apache2/sites-available/default )