Web

Quick Start Guide to Setting up Apache Tomcat on Linux

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.

Making Text in the HTML <PRE> Tag Wrap

After I installed Drupal and established this blog, I noticed that when I showed you a code snippet surrounded by a PRE tag the text in it would not wrap. Instead if it was wider than your screen you would have to scroll your browser horizontally. The solution was to use CSS to tell the browser to wrap text that is displayed within the PRE tag. In my stylesheet, I set the following for the PRE tag:

pre {
  white-space: pre-wrap;       /* css-3 */
  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
  white-space: -pre-wrap;      /* Opera 4-6 */
  white-space: -o-pre-wrap;    /* Opera 7 */

Summarizing The Number of Drupal Blog and Other Content Posts By User and Status

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;

Simply run that query through your MySQL command line prompt, or through a GUI utility such as phpMyAdmin. The output will look something like:

Setting Up Drupal To Serve Multiple Sites With One Codebase

About two weeks ago I had setup Drupal 4.7.4, MySQL 4.1.12, and Apache 2.0.52 on my RedHat Linux AS 4 server to serve my site, timarcher.com.

Now one of my friends would like to setup a site for himself. We wanted to leverage everything that I had already configured for timarcher.com and not have to setup another Drupal code base. The basic requirement was to use the same Drupal installation/code base, but allow my friend to have his own configuration, database, users, etc and allow his site to display entirely different content than my existing site.

The remainder of this post will detail the steps I took to get this to work, and assumes you already have a working Drupal installation.

Syndicate content
v2.0