Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Sunday, April 4, 2010

What to do when you don't have locate tool

What to do when you want to find certain file(s) and you don't have the locate tool? Probably you are in Solaris, AIX, or other variants of UNIX that doesn't have the locate tool. Probably your Linux sysadmin just don't like the locate tool to be there?
May be you are in the support team and now that there is no fancy locate tool you still need to find where the file is located.

Someone at the mailing list asked about the question, so I will write it here so that everybody can benefit from it.

What we can do depends on the frequency of locating such files. If we are to mimic the slocate / mlocate (ubuntu) background process, this what I would suggest (assuming you have /root folder and have root equivalent access):

[sourcecode lang="shell"]<br /># find / -print &gt; /root/locations.txt &amp;<br />[1] 30851<br />[/sourcecode]



The number "30851" is the process number for the background process. You need to wait for a while until the background process completed. When it completes, it should display something like:

[sourcecode lang="shell"]<br />[1] Done        find / - print &gt; /root/locations.txt<br />[/sourcecode]


Whenever you want to search file name containing "tomcat-6.0", just run this command:

[sourcecode lang="shell"]<br /># grep "tomcat-6.0" /root/locations.txt<br />/home/dbaktiar/Downloads/apache-tomcat-6.0.24.zip<br />/home/dbaktiar/Downloads/apache-tomcat-6.0.26.tar.gz<br />[/sourcecode]


If you are using Ubuntu or sudo based tools, we can modify:

[sourcecode lang="shell"]<br /># sudo find / -print &gt; /root/locations.txt &amp;<br />[1] 30851<br />[/sourcecode]



Wait until the background process complete (you can do something else if the task take quite long).
Then to find files with "tomcat-6.0" string in its filename:

 

[sourcecode lang="shell"]<br /># sudo grep "tomcat" /root/locations.txt<br />[/sourcecode]


If you want to locate certain file(s) once you can run this (as suggested by Mr Budi Rahardjo):

[sourcecode lang="shell"]<br /># find . -name &lt;pattern&gt; -print<br />[/sourcecode]


Replace <pattern> with the full name or partial name of the file. When wespecify the name of the file, we can use wildcards, but don't forget to quote the name when needed.

Wednesday, March 17, 2010

Installation of Hudson in Karmic Koala (Ubuntu 9.10)

We are implementing Hudson continuous integration server heavily. Initially we are running all our Hudson jobs on a Windows box.

Hudson is an open source continuous integration tool. It gains popularity very fast and based on my experience in production, it is one of the most active open source project component I have been using. It is pretty common to get Hudson updates more than once a week.

With support from Debian community which setup the Hudson installer which updates easily through the apt tools, I became enticed to move to Ubuntu. I was following the instructions from the Hudson CI site.

These steps show how easy it is to deploy Hudson in an Ubuntu box.

[sourcecode lang="shell"]<br />$ wget -O - http://hudson-ci.org/debian/hudson-ci.org.key | sudo apt-key add -<br />[/sourcecode]


Add this entry to your /etc/apt/sources.list using your favorite editor.

[sourcecode lang="shell"]<br />$ sudo vi /etc/apt/sources.list<br />[/sourcecode]



Add this line at the end:

[sourcecode lang="shell"]<br />deb http://hudson-ci.org/debian binary/<br />[/sourcecode]


Then run the apt tool to update your Debian packages.

[sourcecode lang="shell"]<br />$ sudo apt-get update<br />$ sudo apt-get install hudson<br />[/sourcecode]


Upon finishing the whole thing, I popped out a browser and hit the URL: http://localhost:8080/, and YES! it works!

Thursday, September 18, 2008

Failed to install varnish in Ubuntu

Today I tried to install SCons on my VirtualBox Ubuntu. It gave an error because my previous installation of varnish on this Ubuntu failed, so every time I invoke the apt-get install, it will try to install the varnish again and repeat the same failure. The failure is revolved around the inavailability to the crti.o library.
It seems that I'm not alone. Somebody else had failed installing varnish on Ubuntu and had the same problem.


I found out that the cause of the problem is the lacking of libc6-dev in my Ubuntu installation.

The fix to this problem turned out to be just installing the Ubuntu package libc6-dev.

The varnish installation needs the SHMEM library related to the existence of the crti.o object file in the C library (seems that it is a kernel specific library).

$ sudo apt-get install libc6-dev

or

$ sudo aptitude install libc6-dev

The package manager will choose the most suitable c library for your Ubuntu kernel.

Voila, it works!

When the failed pending varnish installation has been cleared, the uninstall feature (apt-get remove varnish) back into action again! I could install/reinstall varnish again.

Friday, August 31, 2007

CentOS 5 Doesnot Support AMD Turion 64 X2

I tried to run the installer for CentOS 5 on my VirtualPC 2007. Until certain step it works, then suddenly it stops. This one remains me to first time running SuSE Linux on AMD K6 based processor long time ago. There were some buffer overrun which was not guarded by the Linux kernel.
After then we have to wait for the patch/fix.

Sunday, August 19, 2007

IBM become Solaris reseller for its x86 product!

IBM has offered Windows based solution, then Linux solution, Novell solution, and now it also offers Solaris solution. This is of course marked the true separation of Sun's hardware business and its Solaris operating system business (now earns mostly from support!), a path that Sun has chosen years ago. Jon Schwartz has stated in his blog that August 16th, 2007 was the milestone for the separation.
Actually Solaris has run on high end hardware other than Sun's, but still in the SPARC architecture circle (such as Fujitsu high end servers).
Now Solaris runs a business model pretty much similar to the RedHat Enterprise Linux (RHEL), competing head-to-head to it, and has the advantage of being positioned as high end operating system lowering down to earth, while RHEL was positioned (at least by community) as hacker operating system trying to go up to become high end platform.
As far as I can remember, Sun also run its StarOffice business under the same business model. So I think this business model is nothing new to Sun.
It will be most likely that other x86 based hardware major vendors (HP/Compaq, Dell, Fujitsu, etc) will join the bandwagon, but IBM has had the advantage of being one to catch the first wave. Now users will have other choice instead of using Windows, Linux, and Novell.