At the Forge - Slash

One of the oldest and most full-featured Web community systems is also among the hardest to install. Reuven gets you started as a Slash Webmaster with advice on mod_perl and other prerequisites.
Retrieving a Tagged Version from CVS

At this point, you need to download and install the Slash code itself. The InstallSlash instructions walk you through the download and installation process for the latest packaged version (2.2.6), which is on SourceForge. However, as I indicated above, a great deal of development has happened in the two years since 2.2.6 was released, and those improvements are available only in the CVS version. You can retrieve the latest version from CVS and save it in a directory named slash with the following command:

cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:
↪/cvsroot/slashcode co -r T_2_3_0_148 slash

At the same time, checking out the latest CVS version from SourceForge has its own pitfalls, because you run the risk of installing code recently checked in but not tested. The best solution is to use a tagged version. As experienced CVS developers know, each file in CVS has its own revision number, such as 1.5 or 2.8 or 3.1.1.2. These revision numbers reflect the revision of the individual file and have nothing to do with the overall project. Thus, although a software project might be released to the public as version 2.0, the individual files almost certainly do not have revision numbers of 2.0. To assign a collective name (or number) to the current state of all files in a project, you must use tags, sometimes known as symbolic revisions. Assuming that you have write privileges, you can tag all of the files in the current directory release-2-0 with the following:

cvs tag release-2-0

Tags cannot contain certain characters, including periods and commas. This is why we needed to use a hyphen rather than a period to indicate release 2.0 of our software. This raises the question of which tag you can or should retrieve. In the case of Slash, the code is moving slowly toward the 2.3.0 release, and the developers have standardized on tags that look like T_2_3_0_XXX, where T stands for tested and XXX is incremented with each new tag. As of this writing, the latest tag is T_2_3_0_148; it can be retrieved with:

cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:
↪/cvsroot/slashcode co -r T_2_3_0_148 slash

This command creates a directory named slash and puts all of the Slash-related code, libraries and documentation into it. Particularly helpful is the INSTALL file, which is an up-to-date version of the directions designed to work with the CVS version you just checked out. I followed the directions in this file, typing make install to install all of the Slash components. A message from the installation procedure indicates what command to add to the end of the Apache configuration file. This ensures that Apache includes the appropriate Perl modules at startup, reducing mod_perl's memory footprint and execution time significantly.

One of the nice things about Slash is that it can handle multiple sites easily using the same code. That is, if you decide you want to have separate on-line communities for Perl, Python, Tcl and Ruby, Slash can handle this for you. Each community needs its own hostname, but they can be totally distinct from one another. In other words, installing a Slash site is a separate procedure from installing the Slash software. Once the software is installed, in /usr/local/slash by default, you can create a new site by running:

/usr/local/slash/bin/install-slashsite -u USER

Here, USER is the same virtual user you created back when you installed DBIx::Password. By default, this user is virtslash. install-slashsite asks several more questions, including the administrator user name and password, and then tells you to stop and start Apache with the apachectl program, typically installed in /usr/local/apache/sbin. You should not use apachectl's restart command. Especially when working with mod_perl, you should always stop Apache, pause a few seconds to allow the processes to exit completely, and then start it again.

When I tried to run install-slashsite, I discovered that at least one CPAN module (LWP::Parallel::UserAgent) was missing. It did not take too long to install it, but I was frustrated to discover that neither Bundle::Slash nor make install noticed or fixed this.

A Simple Slash Site

Your Slash site now is ready for use. On my machine, named chaim-weizmann on my private home network, I was able to view my site by going to http://chaim-weizmann.

Of course, a newly installed Slash site is not very exciting. If you log in using the administrator user name and password you gave to install-slashsite, you are given a number of options and menus that provide a fair amount of control over the system. Many of the menus are hard to find, and it takes some time before a new Slash administrator will understand where different changes are made, either on the Web site or in the on-disk templates and programs. A good introduction to Slash-site maintenance, slashguide.pod, is in the docs directory that comes with the CVS version of Slash.

But, if you are at all familiar with the original Slashdot site, you should be able to start posting stories and soliciting comments right away. While logged in as the site administrator, click on the New link at the top of the home page. Enter a topic, title, department, intro copy (displayed on the home page) and extended copy (displayed on the individual story page). You even can set up a poll or link a story to an existing poll. Once the story is approved, it is visible to the entire world. Visitors to the site optionally can be allowed to comment and even can act as moderators. Indeed, the community moderation and meta-moderation of Slash stories is one of the most intriguing ideas that Slash has brought to the table.

Figure 1. Enter the text here...

Figure 2. ...and it appears like this.

______________________

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState