Timothy E. Archer

System.out.println("Hello World!");

Search Results on node

I recently setup Apache Tomcat 6.0.10 and in this post I will share the steps that I went through to install it on my RedHat Linux AS 4 server.

The Basics – Download and Install The Software

  1. First make sure you have a Java Development Kit installed on your server. I have a write up on how to do this at http://timarcher.com/?q=node/59.
  2. Download the Tomcat binary distribution from http://tomcat.apache.org/download-60.cgi. I selected the tar.gz option under the Core section.
  3. Once you have downloaded your file, place it somewhere on your Linux box (I put mine in /root/tomcat). The name of the file I downloaded was apache-tomcat-6.0.10.tar.gz.
    continue reading…

I believe that every organization should have a NTP/time server if they have more than one computer on site. Having an NTP server will allow you to keep the times on all of your computers in sync. This helps when comparing the logs from various servers to trace through various events that happened. It’s nice to be assured that the event really happened at the time specified in the log file regardless of what server you’re on.

In this post I will show you how to setup your RedHat Linux AS 3 or 4 machine as an NTP server. You could then take all of your other servers and workstations and have them synchronize their time from your NTP server.
continue reading…

Within the enterprise applications that I design and develop, a requirement always comes up to integrate it in some way with an external, 3rd party system. For example, in writing an insurance policy management system, the carriers often want policy details FTP’ed to them. Logistics companies typically FTP EDI files around all day. And most recently at the University for which I work, we have integrated our systems to transmit financial aid data to the government, send information related to book store vouchers to our outsourced bookstore, and we have our student data geocoded to help us analyze what profile of students are enrolling. All of these external providers want the data to be FTP’ed to them.

To meet these requirements, I develop most of my data feeds in Java. Java makes it very easy to get data out of a database, package it up into a file, and FTP it off to its destination. Two of the libraries I find very useful to perform the FTP are the Jakarta Commons Net library for standard FTP transfers, and the JSch (Java Secure Channel) library to do SFTP transfers.

In this post I will show you how easy it is to use the Jakarta Commons Net library to perform FTP transfers. My next post will then show you how to use the JSch library to perform SFTP transfers.
continue reading…

Today I had a very simple need for my Drupal based blog. I needed to get the number of blog entries by user and publication status.

To accomplish this, I put together the query below which will dump out this information showing the username, publication status (0=unpublished, 1=published), and the count of blog posts for that username and publication status combination.

The query is:

SELECT users.name, node.status, count(*)
FROM node, users
WHERE type = 'blog'
AND   node.uid = users.uid
GROUP BY users.name, node.status
ORDER BY users.name, node.status;

continue reading…

When I setup my RedHat AS4 Linux server and connected it to the Internet, I soon saw in my logs that there were unauthorized people trying to login all day long. For the most part these attempted logins were from hacking scripts whose job is to try various common usernames and password until they find a combination that works. Frequently I would see entries in my /var/log/messages file that look like:

Apr  8 14:52:34 as1 sshd(pam_unix)[8217]: check pass; user unknown
Apr  8 14:52:34 as1 sshd(pam_unix)[8217]: authentication failure; logname= uid=0 euid=0 tty=NODEVssh ruser= rhost=111.111.111.111

While these scripts were never able to login, I did not like that fact that they were able to try to so easily.

My solution to stopping these hacking scripts from trying to login to my server was to just change the port that SSH listens on. It’s simply security through obscurity. I’m not here to argue on whether this will totally protect my server or not since I know there are multiple sides to the argument. You’ll find people who will suggest that I use public/private keys, firewalls, and VPN’s, and for an environment housing sensitive data I do agree with this. However, for my home server I was unwilling to spend any money. I wanted a solution that stopped my problem and took less than 5 minutes of effort.

Here’s how I did it on RedHat AS 4. continue reading…

Powered by WordPress Web Design by SRS Solutions © 2012 Timothy E. Archer Design by SRS Solutions