Amazon Links

Wednesday, February 16, 2011

Configuring Squid on Ubuntu 10.10

I recently upgraded my box to Ubuntu 10.10 and ran into problems with starting squid (Version 2.7.STABLE9-2ubuntu5).

I finally debugged and fixed the problem. The steps are as follows:-
  • Getting squid.conf right
The default user (and group) for running squid is 'squid'. This is not present in configuration.

I also ran into problems with configuration of file.The default location is /var/run/ , where an non root user cannot create file. So i moved it to /var/run/squid directory.

The changes to /etc/squid/squid.conf are listed below.
cache_effective_user squid cache_effective_group squid pid_filename /var/run/squid/
  • Fixing the file permissions and create directories
We need to set the file permissions for squid configuration, log folders to squid:squid and also create the directory /var/run/squid
The shell commands are:-
sudo chown squid:squid /etc/squid/squid.conf sudo mkdir /var/run/squid sudo chown -R squid:squid /var/run/squid sudo chown -R squid:squid /var/log/squid
  • Starting squid.
The squid on ubuntu 10.10 is triggered using service command. Start squid and check logs in /var/log/squid
sudo service squid start

You should see the squid running....

Squid: The Definitive GuideUbuntu 10.10 Essentials

Friday, April 11, 2008

Making your Project IDE Independent

Every wondered about getting to build your project within ide and still maintain an single build system.

As a java developer, you would always use some ide like eclipse, intellij, netbeans...etc. And still would like to have an ability to build at command line. Most people have started thinking of 'ant' by now. But ant doesn't solve all the problem. Ant based build systems have the following problems.
  1. Ant build would not coexist with ide incremental build support
  2. Dependency in ant cannot be imported into ide.
Let us now welcome maven, I am not going to fight about the difference of ant and Maven. But just look at how good the interaction of Maven is with the ide. For the sack of illustration, I would look at my favourite ide, eclipse

We have two important eclipse plugin for maven available :-
  1. Maven eclipse IDE plugin
  2. Eclipse Maven Plugin (Google Summer contest)

Maven IDE Plugin M2Eclipse

This is a mature stable plugin with basic Maven support. This provides basic integration for Maven and allows uses to run maven targets from eclipse

Google Maven Plugin. q4e

This Maven Plugin was originally started as a google summer code project and is now adopted by Eclipe foundation. This would be the foundation for official eclipse plugin for maven. This is still under quite a lot of active development, but still contain quite rich interaction of Maven. The last release was 0.5.0 which contains quite a few good features. This is worth a look once.

Coming back to eclipse Maven interaction, what makes maven an excellent tools is that maven seamlessly integrates into the ide. An Maven based build system can run from command line and using the ide without any major change.

The Maven dependency are seamlessly added to eclipse project, and hence the enduser need to only define its maven dependency, without touching eclipse dependency definition. As a result, when the project is build from command line, the dependencies would continue to be present. This single point configuration of dependency makes development and build management exceptionally easy.

Important distinction that i want to make is using maven goal eclipse:eclipse for building eclipse project definition from maven pom.xml file. This approach doesn't create since point configuration, since you would modify eclipse project files at some point and that would lead to pom.xml and project files getting out of sync.

Maven plugins are available for major ides, so same can be repeated for other environments.
Try it your self and see the difference.

Saturday, December 15, 2007

Eclipse Bangalore Camp: Mylyn Presentation

I was presenting at the Eclipse Bangalore Camp last week. i talked about Mylyn at this presentation. i am user of mylyn for long, and totally love it.

Mylyn,an eclipse plugin is lying the foundation for the next generation IDE. i would say Task focussed IDE, is a fundamental shift in the way ppl are going to use eclipse.

I would recommended any one doing serious development in eclipse to look at mylyn. This can revolutionize the way you work !.

So friends, go and get plugged in ..

Sunday, November 25, 2007

Upgrading to Ubuntu 7.10 (Hard disk based upgrade)

I had installed 7.06 and used for around 4 months. It was the first time have used on Linux outside the fedora world. I found it great and had reviewed it earlier. It was my time to catch on the Ubuntu 7.10 band wagon and i did it just 2 days after the release. Since then i have been testing my way in this Ubuntu land.

Today, i am sharing the iso image based upgrading, using my hard disk to upgrade. The steps for the upgrade are as follows:-

  1. Download the Ubuntu alternate CD
  2. i downloaded the ubuntu-7.10-alternate-i386.iso image

  3. Keep the iso on your unused partition

  4. When i say unused partition, i mean any disk partition which would not change during the upgrade process. In my case, i used my windows partition which i mounted read only (ntfs) in Ubuntu 7.06.

  5. Back up all necessary data.

  6. Mount the iso image.

  7. I kept the iso image on my windows partitions and mounted the iso image from the same.

    >mount -o loop ubuntu-7.10-alternate-i386.iso /ubuntugutsy

  8. Run the cdromupgrade script from the mounted iso

  9. >sudo /ubuntugutsy/cdromupgrade

    When running the cdrom upgrade, the system would ask for permissions to download latest updates from the Internet. i would recommended you to download the same.

    In case of using latest updates, the upgrade process to handle to additions problems. Firstly, it would handle packages which may not be included in the cdrom but are upgraded in 7.10 repository . At the same time, it would also install latest version (if any) of software available on cdrom also. This would make your life easier later on.

  10. Go through the upgrade and enjoy the new Ubuntu 7.10.