Today it's easy for anyone to set up a powerful Weblog system on a Linux server. These advanced forum-like systems have an unlimited number of potential uses, ranging from online diaries to group collaboration. Slash, an open source application developed by OSDN, the publishers of this site, is a good tool for running such Weblog. This article walks users through the complexities of installing Slash.
Once you start using Weblog software, moving your database to a different program is a difficult process, so it helps to choose well before you start. Slash is not for everyone. In recent years, a large number of competitors have sprung up, many of which offer a product that's superior in many ways. Because of the difficultly of setting up and running a Slash-based Weblog, you should choose Slash if you need its unique advantages:
Slash may be impressive, but it is far from perfect. Here are some key disadvantages of Slash:
You need root access to begin installing Slash.
- Edit MySQL Configuration File
Add these two lines to the beginning of /usr/bin/safe_mysqld:
Then restart MySQL for the change to take effect:
Create a MySQL Database For Slash
Type the following commands to create a database for Slash to use. Make sure to replace "slashuser" and "slashpass" with a username and password of your choice.
mysql --user=root mysql
You'll get a MySQL prompt, at which you'll enter these commands:
> CREATE DATABASE slashdb;
> GRANT ALL PRIVILEGES ON slashdb.* TO slashuser@localhost IDENTIFIED BY 'slashpass';
If you've previously set a password on MySQL root (not system root), remove it now.
Expat is an XML parser which Slash uses to interpret RSS pages. Basically, it lets you insert the most recent posts of somebody else's Weblog into a block on yours. Whether or not you plan to use this functionality, you'll probably need the module installed. Download expat-1.9x.tar.gz, then use the following commands to compile and install it:
tar -zxvf expat-1.9x.tar.gz
Install Apache and mod_perl
Before you install Slash's Perl modules, Apache and mod_perl must be set up properly. First, download the latest version of Apache in the 1.3.x series, then download mod_perl 1.27. Run the following commands to set them up. Make sure to replace /usr/download/ with wherever you downloaded Apache and mod_perl to.
tar -zxvf apache_1.3.28.tar.gz
tar -zxvf mod_perl-1.27.tar.gz
perl Makefile.PL APACHE_SRC=/usr/download/apache_1.3.28/src DO_HTTPD=1 USE_APACI=1 PERL_MARK_WHERE=1 EVERYTHING=1 APACHE_PREFIX=/usr/local/apache
Note: Ignore any non-fatal errors during the "make test" step.
- Install Perl modules
CPAN stands for Comprehensive Perl Archive Network, and it's a database of a variety of tools, modules, etc. related to Perl. We're interested in Perl's own CPAN client, which will connect to that database to download and install Perl modules with relative ease. Start the CPAN module with the command:
perl -MCPAN -e shell
If this is the first time you've run it, it will ask you a series of questions. Just press Enter if you don't know the answer to any of them. If you're unsure of which mirrors you want to use, type "21, 27" when asked. When you get to then cpan> prompt, type the following commands. If it ever asks you if you want to stop the installation and install the required updates, choose Y:
conf make_install_arg UNINST=1
If the Net::Telnet module install fails, run these commands to force it to install:
force install Net::Telnet
This one's going to take a lot longer than the others. It's going to ask you a series of questions; the answers you should type are bolded.
PAN.pm: Going to build J/JW/JWIED/Msql-Mysql-modules-1.2216.tar.gz
Which drivers do you want to install?
1) MySQL only
2) mSQL only (either of mSQL 1 or mSQL 2)
3) MySQL and mSQL (either of mSQL 1 or mSQL 2)
4) mSQL 1 and mSQL 2
5) MySQL, mSQL 1 and mSQL 2
Enter the appropriate number:  1
Do you want to install the MysqlPerl emulation? You might keep your old
Mysql module (to be distinguished from DBD::mysql!) if you are concerned
about compatibility to existing applications! [n] y
Where is your MySQL installed? Please tell me the directory that
contains the subdir 'include'. [/usr] /usr
Which database should I use for testing the MySQL drivers? [test] slashdb
On which host is database slashdb running (hostname, ip address
or host:port) [localhost] localhost
User name for connecting to database slashdb? [undef] slashuser
Password for connecting to database slashdb? [undef] slashpass
Creating files for MySQL ..........................
A little while later, you'll be faced with a series of questions starting with:
What is the name of the Virtual User?
At this point, use these answers:
*just hit ENTER*
*just hit ENTER*
*just hit ENTER*
Alternatives to Slash
There are numerous alternative Weblog systems that perform well in areas where Slash does poorly, among them PHPnuke, GeekLog, and Scoop.
PHPnuke started out as a fork of thatware and has grown into the most popular choice for small Weblogs. PHPnuke has a large list of built-in features and more add-on modules than you can shake a stick at. It's ridiculously easy to install and use. The project itself has but a single developer, and he has made his priorities clear: features are important, and bugs are not. The result is very buggy code that's difficult to follow (much less modify) and an awful security track record.
The Geeklog project was started a little while after PHPnuke, and although it has matured over the last three years, its community of supporters remains relatively small. Unlike PHPnuke, Geeklog's team of developers put quality of code above features. Despite being just as easy to install and use as PHPnuke, it has a far cleaner codebase that makes code hacking a pleasure, and a security track record that would make your mother proud. Because of its small fan base, there are still relatively few add-ons (in comparison to PHPnuke), but more are added almost every week.
Scoop is a popular choice for community-oriented Weblogs, partially because it combines some of the unique features of Slash with some of the ease-of-use of PHP-based Weblogs. Like Slash, the Scoop code evolved to handle large databases and serve up pages efficiently, making it a good choice for large, popular Weblogs. Also like Slash, its installation is quite difficult and its security record is squeaky clean. Like PHPnuke, its Web-based administration and user interfaces are fairly easy to understand and use. What makes Scoop unique is its user-oriented story moderation system. When a user submits a story, other Weblog readers get to vote on it, to decide if it's good enough to be on the Weblog's front page, or to be on the Weblog at all. If you have the Linux knowledge to set it up, Scoop can be a good alternative to Slash for medium and large Weblogs that PHPnuke can't handle.
If you do not have sendmail installed, the Mail::Sendmail package install test may take five minutes or more until it times out. Do not break the install with Ctrl-C. Let it finish or Slash will not run, and you may cause the Email::Valid package error I referred to, as well as other problems. I suggest making sure sendmail is installed using a packaged binary release such as RPM or .DEB.
After Bundle::Slash installation completes, pay close attention to any problems it might have encountered. If, for example, it says at the end of the install it had problems installing Email::Valid, enter the command
install Email::Valid. If the install still errors out, force it to install by entering
force install Email::Valid.
It has been reported that DBD::mysql may error out in some cases, and may also affect DBIx::Password, causing this module not to install as well. Watch after the Mysql-modules package has been installed for all installation problem messages. Personally, I've never been able to reproduce this particular error, but it has been reported that forcing it to install via
force install 'module-name-here'will result in a working Slash.
If your system's hostname isn't set correctly, LWP (the set of Perl modules that provide an interface to the Web) may not install correctly. If this happens, you'll see the error during the "make test" phase of the installation. You can correct it by entering the command
hostname localhostat a bash command prompt, then attempting another installation.
Change the default shell for the user "nobody" from /sbin/nologin to /bin/bash.
- Install Slash itself
Download the latest copy of Slashcode and run the following commands to compile it and attach it to your Apache Web server:
tar -zxvf slash-2.2.6.tar.gz
echo 'Include /usr/local/slash/httpd/slash.conf' >> /usr/local/apache/conf/httpd.conf
- Create a new Slash site
First run these commands to begin creating your Slash site:
./install-slashsite -u virtslash
Now specify your site's hostname (for example, "www.slashdot.org") when asked, and accept the default answer for the other questions -- except for where you're asked to create an administrator account.
- Time to start Slash!
We're almost done. Now you just need to start Apache and Slash:
You should now be able to access your Slash site by pointing your browser to "http://localhost." To learn more about customizing and running your new Slash site, you should check out
The Slashcode FAQ. If you want an even more in-depth guide to everything there is to know about slash, check out the book Running Weblogs With Slash.
Sergey Tsalkov is a Webmaster, sysadmin-in-training, and Weblog fan who has been using Linux for four years.