Tag: Linux

SVN batch commands for adding or deleting multiple files (Linux)

Here are a few little hints that may help speed up your SVN workflow if you are using SVN in a Linux environment. I found the first one on Snipplr and used that to create the second one for myself.

  1. Deleting multiple missing files (ie. the ones with a “!” next to them):
    svn delete $( svn status | sed -e '/^!/!d' -e 's/^!//' )
  2. Adding multiple new files (ie. the ones with a “?” next to them):
    svn add $( svn status | sed -e '/^?/!d' -e 's/^?//' )
Bookmark and Share

3 Responses  |  add yours »

Another process using packaging system database in Adept Manager

I was upgrading Kubuntu today, when it told me something went wrong and so I stopped it. Then, when I went back to restart Adept Manager, I got the message:

Another process using packaging system database

I started looking around my running processes and attempting to kill whatever I thought might be causing the problem, but it wasn’t working. So, I followed my mantra: “When all else fails, reboot!” and did what no Linux person will ever admit doing. I rebooted the system.

To my chagrin, the error was still coming up, even after a Linux reboot. ;(

Then I learned of this command:

sudo dpkg --configure -a

which causes things to continue where they left off in the upgrade and I was back in business! No GUI this time, but at least I could get my stuff back up and running properly.

Bookmark and Share

6 Responses  |  add yours »

Yes, you can rsync between two local directories

I wanted to set up a cronjob to backup my photos from a Windows computer to my linux server. To do so I simply set Windows to share the photos directory, then mounted the directory in linux.

The rsync command seemed like the most logical way to sync the mounted directory with my backup directory. However, every piece of documentation I could find online showed examples of rsync communicating with an external server. I’m here to tell you that’s not entirely necessary and setting it up to synchronize 2 local directories works just as well.

rsync -vur --delete --exclude=*.db --exclude=*.info /mnt/photos/ /home/jgill/photos/

Bookmark and Share

6 Responses  |  add yours »

Getting Netgear WG511 802.11b/g wireless card to work in Linux

Three months ago I posted about getting my Netgear WG511 802.11 b/g wireless card to work in Linux. Well, this weekend I figured out a much, much simpler way, and wanted to update my documentation.

In my previous post I discussed that I had tried the Prism54 method without luck and resorted to the ndiswrapper. Then I proceeded to give lengthy instructions on what I had to do to get the ndiswrapper to work. The last thing I wrote was that you had to put the firmware in the /usr/lib/hotplug/firmware directory to get ndiswrapper to work.

What I didn’t realize is that ndiswrapper wasn’t working at all, and that putting that firmware into /usr/lib/hotplug/firmware was actually enabling Prism54 to work, and therefore was the only step necessary!!

So without further ado, if you want to get your WG511 card working, plug the isl3890 file into the /usr/lib/hotplug/firmware directory and reboot your computer.

There are 2 ways to do this, you can download the PCI driver from Prism54 or you can find the WG511DCB.arm file from Netgear and rename it isl3890. I would offer it for download here, but I don’t want to run into the same problems that Prism54.org have had with making these files publicly available. I actually found it by installing the old driver (I think v1.1) from the CD-ROM that came with the card and looking in C:Program FilesNETGEARWG511Driver, so you might try that first. Once you have this file, simply mkdir /usr/lib/hotplug/firmware if it doesn’t already exist and drop it in there (that’s it!).

Note: One word of caution. My wg511 card says on the BACK in small print on the right side above the MAC address that it is “v2.0″ but my co-worker’s wg511 says on the back that it is “v3.0″ and we cannot get it to work! If you have a v3.0 card and have it working please let me know

Bookmark and Share

9 Responses  |  add yours »

Apache (HTTPD) and Tomcat connector with mod_jk

I’ve spent the last few days trying to figure out how to get the mod_jk connector working so that I can use tomcat and httpd together. The problem, like most linux operations, is that it’s very poorly documented. Not only that, but the decent documentation you find is either outdated or is very specific to the writers desired configuration, and things don’t always work right when you try to revert those instructions back to a “default” configuration for your own use. I hope to document my finding before I forget them, and in a manner that is easy for anyone to understand.

First, you need to install 4 things: Apache, Tomcat, JDK, and Apache2-devel. As of this writing, the latest versions are Apache 2.0, Tomcat 5.5, J2EE SDK 1.4, and Apache2-devel is the development tool for Apache2 that will be needed to create the mod_jk connector. I was able to install Apache2 and Apache2-devel as RPMs in Mandriva (formerly Mandrake) LE 2005 (10.2). For instructions on how to install Tomcat and JDK, check out Integrating Tomcat and Apache on Red Hat Linux <–this site is an excellent resource, but after following it’s instructions to a “T”, I was never able to get things working. I’ll refer to this site often, and let you know what WAS useful from it. Hopefully if you are to the point where connecting Tomcat and Apache is important to you, you have already figured out enough about Linux that installing these 4 things isn’t too big of a problem for you.

The next thing you should do is build the mod_jk connector. The Apache website will try to convince you that you should just download a binary rather than build it from source, but I was much more successful building my own than using the binaries from Apache. Once again the Apache website’s documentation is a freaking mess! I’ll refer to it occasionally and let you know what WAS useful. To build the mod_jk connector, refer to section 4.3 on the Integrating Tomcat and Apache on Red Hat Linux page. These instructions are clear and precise so I won’t bother re-writing them here.* One thing I will mention that those instructions were unclear about, is that you need to be inside the CONN_SRC_HOME/jk/native/ directory in order to run ./buildconf.sh and ./configure, otherwise you will get errors. I also had to copy moc_jk.so to /usr/lib/apache2/ instead of where he put it.

Next you need to create a workers.properties file and place it in the /etc/httpd/conf directory. Using the Minimum workers.properties from Apache’s documentation worked for me. Just copy and paste everything in the blue box into your workers.properties file.

Next follow the instructions on the Apache website under the subsection titled Using Tomcat auto-configure. These instructions are written backwards, so remember that you need to do the second part before you even know how to do the first part because depending on your flavor of Linux, the mod_jk.conf file will end up in different places and with different names. I also added workersConfig=”/etc/httpd/conf/workers.properties” to my server.xml file to get this to work, like this:

<Listener className=”org.apache.jk.config.ApacheConfig” modJk=”/usr/lib/apache2/mod_jk.so” workersConfig=”/etc/httpd/conf/workers.properties” />

In tomcat’s default server.xml file, I put this <Listener> tag just between </Host> and </Engine> at the bottom of the document.

Next, copy the Simple configuration example into the bottom of your httpd.conf file. If you are indeed using Apache 2.0, be sure to remove the line “Add Module mod_jk.c”. If you are using Tomcat 5.x, change the /examples/ directories to /servlet-examples/ and /jsp-examples/ respectively, since they are now broken out like that instead of being lumped together.

Now restart both Apache and Tomcat and you should be good to go. The way I tested was by going to localhost:8080 and in the left hand side of the default tomcat screen there is a section titled “Examples”. Click on either JSP Examples or Servlet Examples and then choose an example listed there (preferably the “Hello World” examples, of course!). Now just replace localhost:8080 in your address bar with localhost (port 80) and you should see the exact same examples but without the static content (such as images). The configuration above assumes that your application’s static html files will be served from your Apache directory and dynamic files (servlets and jsp’s) will be served from your tomcat directory.

VUOLA!

*If for some reason a site goes down and a link is broken, please let me know! Even if you are reading this 3 years from now! A lot of my frustrations from getting this to work were broken links and I’d hate for this documentation to become one of those.

Bookmark and Share

15 Responses  |  add yours »

Search