Skip to content
Browse files

Finish up 1.0.8 docs.

  • Loading branch information...
1 parent 928c34a commit 79c0aed9ba0edc69e9abff36075071c9d17a64e5 @pudge pudge committed Aug 18, 2000
Showing with 1,268 additions and 798 deletions.
  1. +2 −1 Bundle/README
  2. +2 −1 Bundle/Slash.pm
  3. +251 −269 INSTALL
  4. +54 −58 README
  5. +251 −269 docs/INSTALL
  6. +553 −105 docs/INSTALL.html
  7. +8 −2 docs/INSTALL.pod
  8. +54 −58 docs/README
  9. +88 −30 docs/README.html
  10. +5 −5 docs/README.pod
View
3 Bundle/README
@@ -1,2 +1,3 @@
This is a Bundle file for Slash, the code that runs Slashdot. See
-http://slashcode.com/ for more information.
+http://slashcode.com/ or http://www.sourceforge.net/projects/slashcode/
+for more information.
View
3 Bundle/Slash.pm
@@ -1,6 +1,6 @@
package Bundle::Slash;
-$Bundle::Slash::VERSION = '1.0.7';
+$Bundle::Slash::VERSION = '1.0.8';
1;
@@ -10,6 +10,7 @@ __END__
Bundle::Slash - A bundle to install all modules used for Slash
+
=head1 SYNOPSIS
C<perl -MCPAN -e 'install "Bundle::Slash"'>
View
520 INSTALL
@@ -2,23 +2,23 @@ NAME
INSTALL - Slash Installation
SOFTWARE REQUIREMENTS
- Whatever versions listed are the versions recommended. You may
- try a newer version, and it should work, but it is not
- guaranteed (of course, nothing in here is guaranteed anyway :).
- Don't try to use anything older than these listed versions.
+ Whatever versions listed are the versions recommended. You may try a
+ newer version, and it should work, but it is not guaranteed (of course,
+ nothing in here is guaranteed anyway :). Don't try to use anything older
+ than these listed versions.
- This document is still evolving, so there may be unintended
- omissions or various steps may be over- or under-explained. It's
- assumed that you have some working experience with some form of
- Unix, Apache, SQL database, and perl.
+ This document is still evolving, so there may be unintended omissions or
+ various steps may be over- or under-explained. It's assumed that you
+ have some working experience with some form of Unix, Apache, SQL
+ database, and perl.
- Note: This page looks best in a browser (the HTML version of it
- is in the docs/ directory). You can print it out, but some of
- the ASCII illustrations may get munged in printing; however, the
- directions will certainly appear good enough to read.
+ Note: This page looks best in a browser (the HTML version of it is in
+ the docs/ directory). You can print it out, but some of the ASCII
+ illustrations may get munged in printing; however, the directions will
+ certainly appear good enough to read.
- See the Slash web site, with support, docs, latest downloads,
- and more, at http://slashcode.com/.
+ See the Slash web site, with support, docs, latest downloads, and more,
+ at http://slashcode.com/.
Database, webserver, etc.
@@ -107,11 +107,11 @@ SOFTWARE REQUIREMENTS
Storable-0.6.9
http://search.cpan.org/search?dist=Storable
- Note: IPC::Shareable is only needed for the troll speed
- limit feature, which is off by default (settable via the
- `use_ipc' variable in slashdotrc.pl). Also, on all of our
- test systems, some of the tests in `make test' failed, but
- the module seems to work fine for our purposes regardless.
+ Note: IPC::Shareable is only needed for the troll speed limit
+ feature, which is off by default (settable via the `use_ipc'
+ variable in slashdotrc.pl). Also, on all of our test systems, some
+ of the tests in `make test' failed, but the module seems to work
+ fine for our purposes regardless.
Slash Code
@@ -141,34 +141,33 @@ SOFTWARE REQUIREMENTS
You can get the Slash code in these locations:
- FTP ftp://ftp.slashdot.org//pub/slash/
+ FTP
+ ftp://ftp.slashdot.org//pub/slash/
HTTP, CVS
- http://sourceforge.net/project/?group_id=4421
+ http://sourceforge.net/projects/slashcode/
- The CVS repository is tagged with versions, so to get
- release 1.0.3, get tag "v1_0_3_0". The last number will be
- incremented during development ("v1_0_3_1", "v1_0_3_2",
- etc.) until the next release. Sometimes, a release may be
- tagged with a last number of something other than "0".
- Exactly what tag a given release is based on is in README.
+ The CVS repository is tagged with versions, so to get release 1.0.3,
+ get tag "v1_0_3_0". The last number will be incremented during
+ development ("v1_0_3_1", "v1_0_3_2", etc.) until the next release.
+ Sometimes, a release may be tagged with a last number of something
+ other than "0". Exactly what tag a given release is based on is in
+ README.
- There is a separate development branch of Slash. Its branch
- is "bender". Primarily small changes and bugfixes will go
- into the MAIN branch, with major changes going into the
- development branch.
+ There is a separate development branch of Slash. Its branch is
+ "bender". Primarily small changes and bugfixes will go into the MAIN
+ branch, with major changes going into the development branch.
Hardware Requirements
- None. Whatever it takes to run the above software and handle
- the traffic you may be getting. You could probably do it on
- a 486 with 32MB and 250MB hard drive space, but we wouldn't
- recommend it. Minimum setup would probably be some sort of
- Pentium 133 or higher, 128MB, and 1GB HD. I'd shoot for at
- least a Pentium II/200+ MHz, 256MB, 2GB. Consider also that
- the httpd machine might be different from the mysql machine,
- you can keep the number of httpds real low, etc. Do what
- works.
+ None. Whatever it takes to run the above software and handle the
+ traffic you may be getting. You could probably do it on a 486 with
+ 32MB and 250MB hard drive space, but we wouldn't recommend it.
+ Minimum setup would probably be some sort of Pentium 133 or higher,
+ 128MB, and 1GB HD. I'd shoot for at least a Pentium II/200+ MHz,
+ 256MB, 2GB. Consider also that the httpd machine might be different
+ from the mysql machine, you can keep the number of httpds real low,
+ etc. Do what works.
PRE-INSTALLATION THOUGHTS
The are several configurations recommended, depending on scale.
@@ -190,8 +189,8 @@ PRE-INSTALLATION THOUGHTS
+-----------------+ +-----------+
|_________________ DBI __________________|
- db separate on one server, slashdot code and apache on another,
- exported to web servers
+ db separate on one server, slashdot code and apache on another, exported
+ to web servers
server 1 server2 server 3 .. n
+-----------+ +-----------------+ +-----------+
| slash db | | | | |
@@ -200,97 +199,99 @@ PRE-INSTALLATION THOUGHTS
+-----------+ +-----------------+ +-----------+
|______ DBI _________|_______________________________________|
- There are many ways this can be done. The key is to think about
- how the site will be put together before starting the
- installation.
+ There are many ways this can be done. The key is to think about how the
+ site will be put together before starting the installation.
+
+ Note: If your site is going to be very busy, you may wish to consider
+ having a separate images server. For instance, Slashdot has
+ images.slashdot.org, which handles all the images. Just set the imagedir
+ variable in slashdotrc.pl appropriately, like
+ `http://images.example.com'.
INSTALLATION AND SETUP
Perform these tasks as root.
1. Create the group "slash".
- 2. Create the user "slash" with slashdot gid. Note: if using
- multiple webservers, and using NFS, make sure that this
- user:group is created with the same UID and GID on all
- involved systems.
+ 2. Create the user "slash" with slashdot gid. Note: if using multiple
+ webservers, and using NFS, make sure that this user:group is created
+ with the same UID and GID on all involved systems.
- Note: For security's sake, you may wish to add the web
- server user (e.g., "nobody") to the "slash" group, and then
- set your permissions so that all the files are writable by
- user and group and not world, to keep other users on the
- system from modifying the files.
+ Note: For security's sake, you may wish to add the web server user
+ (e.g., "nobody") to the "slash" group, and then set your permissions
+ so that all the files are writable by user and group and not world,
+ to keep other users on the system from modifying the files.
- 3. Unpack the slash code tarball in the slash user's home
- directory. This will place everything where it should
- belong.
+ 3. Unpack the slash code tarball in the slash user's home directory.
+ This will place everything where it should belong.
4. chown everything in this tree as slash:slash (i.e., `chown -R
- slash:slash /home/slash'). chmod the main directory to be
- readable and executable by all (i.e., `chmod a+rx
- /home/slash').
+ slash:slash /home/slash'). chmod the main directory to be readable
+ and executable by all (i.e., `chmod a+rx /home/slash').
5. Create the directory apache will be installed into (i.e.,
- /usr/local/apache). The default install uses a separate
- directory for apache logs, which should also be created as
- /usr/local/apache_logs. Alternatively, change httpd.conf to
- point to a different location. See the section below on
- installing perl modules for more information about the
- default installation.
-
- Multiple slash instances can run under virtual hosts on the
- same httpd. See vhost.httpd.conf for an example of how this
- works. Pay special attention to the configuration section
- under the text "# MAIN SLASHCODE SPECIFIC STUFF STARTS HERE
- #".
-
- For virtual hosts, you should create a separate account and
- Slash installation for each virtual host, so repeat the
- instructions relating to creation of accounts for each
- virtual host.
-
- 6. Install MySQL. Please refer to MySQL documentation for
- compilation and/or installation notes for any questions with
- this. Find the script that runs mysql (probably safe_mysqld)
- and add this to the beginning of it:
+ /usr/local/apache). The default install uses a separate directory
+ for apache logs, which should also be created as
+ /usr/local/apache_logs. Alternatively, change httpd.conf to point to
+ a different location. See the section below on installing perl
+ modules for more information about the default installation.
+
+ Multiple slash instances can run under virtual hosts on the same
+ httpd. See vhost.httpd.conf for an example of how this works. Pay
+ special attention to the configuration section under the text "#
+ MAIN SLASHCODE SPECIFIC STUFF STARTS HERE #".
+
+ For virtual hosts, you should create a separate account and Slash
+ installation for each virtual host, so repeat the instructions
+ relating to creation of accounts for each virtual host.
+
+ 6. Install MySQL. Please refer to MySQL documentation for compilation
+ and/or installation notes for any questions with this. Find the
+ script that runs mysql (probably safe_mysqld) and add this to the
+ beginning of it:
TZ=GMT
export TZ
+ Note: For slashd (see utils/slashd, which starts slashd), mod_perl
+ (see httpd/httpd.conf), and MySQL, we set all processes to run in
+ GMT. Then it is easy to convert dates to whatever the user's local
+ time is. If you have date problems, check that all of these are
+ properly set to run in GMT.
+
7. Create the slash mysql user and database.
mysql mysql < sql/slashdb_create.sql
- This will create both the slash db user and slash db. If you
- are using virtual hosts, or want to otherwise change the db
- user or db name, edit this script before running it to use
- the proper db user and db name. This script creates the user
- slash with the password "changethis". Immediately change the
- password for slash in mysql:
+ This will create both the slash db user and slash db. If you are
+ using virtual hosts, or want to otherwise change the db user or db
+ name, edit this script before running it to use the proper db user
+ and db name. This script creates the user slash with the password
+ "changethis". Immediately change the password for slash in mysql:
mysql mysql
update user set Password = password('newpassword') where User = 'slash';
flush privileges;
- Note: The slash db user is created with several privileges
- such as drop and create table, so it's up to you to modify
- those privileges to something more restrictive if you feel
- uncomfortable with these settings. We'd suggest you don't
- let other users on the database have access to this user.
-
- 8. Run the slash schema creation script and load sample slash db
- data dump. This dump has minimal data for the system to
- work. This data is needed in the database for the site to
- work at all. It has a very plain, basic design, that has a
- lot of HTML comments in each block to give an idea of how
- the site works. Other data in this dump is tables that the
- system needs to do things such as time conversion for user
- date format strings. Please refer to the database schema and
- database schema documentation to understand how the database
+ Note: The slash db user is created with several privileges such as
+ drop and create table, so it's up to you to modify those privileges
+ to something more restrictive if you feel uncomfortable with these
+ settings. We'd suggest you don't let other users on the database
+ have access to this user.
+
+ 8. Run the slash schema creation script and load sample slash db data
+ dump. This dump has minimal data for the system to work. This data
+ is needed in the database for the site to work at all. It has a very
+ plain, basic design, that has a lot of HTML comments in each block
+ to give an idea of how the site works. Other data in this dump is
+ tables that the system needs to do things such as time conversion
+ for user date format strings. Please refer to the database schema
+ and database schema documentation to understand how the database
schema works.
- Replace `HOSTNAME' (or `HOSTNAME:PORT') below with the
- server's hostname (this is the name you will call the server
- in the browser, used for default links in the HTML).
+ Replace `HOSTNAME' (or `HOSTNAME:PORT') below with the server's
+ hostname (this is the name you will call the server in the browser,
+ used for default links in the HTML).
cd sql
mysql -uslash -pnewpassword slash < slashschema_create.sql
@@ -300,18 +301,17 @@ INSTALLATION AND SETUP
9. Install perl.
- On Slashdot and Slashcode, we have all of the modules
- installed in the Apache directory, so that we can NFS mount
- that one directory on several machines, and they all have
- the same modules and configuration. If you want to do that,
- when the configuration process asks where you want to put
- perl modules (both system and local) have it put them in the
- directory tree you'll install apache in (i.e.,
- /usr/local/apache/lib). Otherwise, the default installation
- directories are usually fine.
+ On Slashdot and Slashcode, we have all of the modules installed in
+ the Apache directory, so that we can NFS mount that one directory on
+ several machines, and they all have the same modules and
+ configuration. If you want to do that, when the configuration
+ process asks where you want to put perl modules (both system and
+ local) have it put them in the directory tree you'll install apache
+ in (i.e., /usr/local/apache/lib). Otherwise, the default
+ installation directories are usually fine.
- 10. Untar apache and mod_perl. Build mod_perl. Have its build
- process build and install apache for you:
+ 10. Untar apache and mod_perl. Build mod_perl. Have its build process
+ build and install apache for you:
perl Makefile.PL APACHE_SRC=/where_you_have_the_source DO_HTTPD=1 \
USE_APACI=1 PERL_MARK_WHERE=1 EVERYTHING=1 \
@@ -322,106 +322,97 @@ INSTALLATION AND SETUP
This will install both mod_perl and apache.
- You MUST install mod_perl and Apache as directed here. OK,
- that is not strictly true, but it is mostly true. If you
- already have mod_perl installed, chances are it is not
- configured properly to work with Slash and you must rebuild
- it. If you are using the provided httpd.conf file from the
- slash distribution, and Apache is giving you errors, chances
- are mod_perl is not installed correctly, and you need to
- build it from scratch.
-
- 11. Install the listed perl modules in the order listed in the
- section on "Perl Modules". You can use CPAN if you want, or
- ftp, untar and do it yourself. Use whichever does the job.
-
- Note that the module versions Slash has been tested with are
- given; use other versions at your own risk. We actually
- think that the current version of each module as of this
- note will work, so if you are brave, go ahead and install
- the latest.
-
- You can get the files via FTP yourself from CPAN and then
- install each by hand, or, if you can get the CPAN module
- running, you can use that. There are several ways to use the
- CPAN shell to install modules. You can install each one
- individually:
+ You MUST install mod_perl and Apache as directed here. OK, that is
+ not strictly true, but it is mostly true. If you already have
+ mod_perl installed, chances are it is not configured properly to
+ work with Slash and you must rebuild it. If you are using the
+ provided httpd.conf file from the slash distribution, and Apache is
+ giving you errors, chances are mod_perl is not installed correctly,
+ and you need to build it from scratch.
+
+ 11. Install the listed perl modules in the order listed in the section
+ on "Perl Modules". You can use CPAN if you want, or ftp, untar and
+ do it yourself. Use whichever does the job.
+
+ Note that the module versions Slash has been tested with are given;
+ use other versions at your own risk. We actually think that the
+ current version of each module as of this note will work, so if you
+ are brave, go ahead and install the latest.
+
+ You can get the files via FTP yourself from CPAN and then install
+ each by hand, or, if you can get the CPAN module running, you can
+ use that. There are several ways to use the CPAN shell to install
+ modules. You can install each one individually:
perl -MCPAN -e shell
# some configuration / initialization stuff
> install DBI
- Or, you can install all of them at once using the
- Bundle::Slash module. This method is the easiest, but if
- something does not work right, it can be more of a pain to
- track it down.
+ Or, you can install all of them at once using the Bundle::Slash
+ module. This method is the easiest, but if something does not work
+ right, it can be more of a pain to track it down.
cd /home/slash
perl -MCPAN -e "install 'Bundle::Slash'"
- You may also want to use CPAN shell to install
- Bundle::libnet, Bundle::LWP, Bundle::DBI,
- Bundle::DBD::mysql, and then the rest of the modules. See
- the manpage the perlmodinstall manpage for more information
- about using CPAN and installing modules.
+ You may also want to use CPAN shell to install Bundle::libnet,
+ Bundle::LWP, Bundle::DBI, Bundle::DBD::mysql, and then the rest of
+ the modules. See the manpage the perlmodinstall manpage for more
+ information about using CPAN and installing modules.
- Note: Compress::Zlib is now required, and it won't install
- properly if the zlib development headers are not available.
- See the documentation for Compress::Zlib for more
- information.
+ Note: Compress::Zlib is now required, and it won't install properly
+ if the zlib development headers are not available. See the
+ documentation for Compress::Zlib for more information.
- Note: File::Spec is now required, but a version beyond what
- comes with perl 5.00503 is required. Use `make install
- UNINST=1` to remove the version that comes with perl while
- installing the new version. Even if using the CPAN shell you
- can do this:
+ Note: File::Spec is now required, but a version beyond what comes
+ with perl 5.00503 is required. Use `make install UNINST=1` to remove
+ the version that comes with perl while installing the new version.
+ Even if using the CPAN shell you can do this:
cpan> test File::Spec # download, make, and test
cpan> look File::Spec # opens shell to proper dir
% make install UNINST=1 # install from shell
12. Copy the slash httpd.conf from the untarred slash code tarball's
- directory httpd (i.e., /home/slash/httpd/httpd.conf) to
- apache's conf directory. Take time to look over the file to
- make sure that it matches your site's specific setup.
- Similarly edit /home/slash/slashdotrc.pl.
+ directory httpd (i.e., /home/slash/httpd/httpd.conf) to apache's
+ conf directory. Take time to look over the file to make sure that it
+ matches your site's specific setup. Similarly edit
+ /home/slash/slashdotrc.pl.
- For httpd.conf, pay close attention to directories and to
- the number of servers and the max clients and requests. The
- defaults are similar to Slashdot's defaults, but most sites
- will not need 20 servers with over 100 maximum requests per
- child process.
+ For httpd.conf, pay close attention to directories and to the number
+ of servers and the max clients and requests. The defaults are
+ similar to Slashdot's defaults, but most sites will not need 20
+ servers with over 100 maximum requests per child process.
In slashdotrc.pl, make sure you have reasonable defaults for
- everything. If you are upgrading, then you will likely want
- to make a copy of your old slashdotrc.pl and copy those
- values into the new file, since it is subject to change
- significantly from one release to the next.
+ everything. If you are upgrading, then you will likely want to make
+ a copy of your old slashdotrc.pl and copy those values into the new
+ file, since it is subject to change significantly from one release
+ to the next.
- If your web server is inside a firewall, you may wish to set
- the rootdir variable to "" (it is below the other variables,
- toward the bottom), so all links will be relative to /.
+ If your web server is inside a firewall, you may wish to set the
+ rootdir variable to "" (it is below the other variables, toward the
+ bottom), so all links will be relative to /.
- If you are doing virtual hosting for multple Slash sites,
- see the instructions at the bottom of slashdotrc.pl and the
- sample configuration at the bottom of httpd.conf.
+ If you are doing virtual hosting for multple Slash sites, see the
+ instructions at the bottom of slashdotrc.pl and the sample
+ configuration at the bottom of httpd.conf.
- 13. Create /etc/apache.listen (where `MY.IP.ADD.RESS' is the IP
- address Apache will be listening on):
+ 13. Create /etc/apache.listen (where `MY.IP.ADD.RESS' is the IP address
+ Apache will be listening on):
echo "Listen MY.IP.ADD.RESS:80" > /etc/apache.listen
14. Start apache.
- 15. Copy the slashd startup script from the Slash source directory
- (i.e. /home/slash/utils) slashd into the init.d directory
- (/etc/init.d on Debian). Chown it to the slash user (i.e.,
- `chown slash:slash /etc/init.d/slashd') and then chmod it
- u+s and g+s (i.e., `chmod u+s /etc/init.d/slashd', `chmod
- g+s /etc/init.d/slashd') Create all the links to this file
- for the various run levels. Note: this script is a startup
- script, and is not the same script as the slashd in the same
- directory as Slash.pm.
+ 15. Copy the slashd startup script from the Slash source directory (i.e.
+ /home/slash/utils) slashd into the init.d directory (/etc/init.d on
+ Debian). Chown it to the slash user (i.e., `chown slash:slash
+ /etc/init.d/slashd') and then chmod it u+s and g+s (i.e., `chmod u+s
+ /etc/init.d/slashd', `chmod g+s /etc/init.d/slashd') Create all the
+ links to this file for the various run levels. Note: this script is
+ a startup script, and is not the same script as the slashd in the
+ same directory as Slash.pm.
16. Start slashd with the startup script (i.e., `/etc/init.d/slashd
start').
@@ -430,13 +421,11 @@ INSTALLATION AND SETUP
http://whateveryoursiteiscalled.com/admin.pl
- The admin user/password is God/pete (you'll need to change
- this).
+ The admin user/password is God/pete (you'll need to change this).
- This page allows you to approve submissions to be run as
- stories, add new stories, edit stories, edit the blocks of
- html, code, and variables that control the look and feel of
- the site.
+ This page allows you to approve submissions to be run as stories,
+ add new stories, edit stories, edit the blocks of html, code, and
+ variables that control the look and feel of the site.
The system has 7 users:
@@ -448,11 +437,10 @@ INSTALLATION AND SETUP
user3
user4
- The passwords are all "change". As that implies, you should
- change it. It's clear text, so simply change it via the
- database, although you can use the server administration,
- too. If you do not change all your passwords, you almost
- certainly will get haX0rD.
+ The passwords are all "change". As that implies, you should change
+ it. It's clear text, so simply change it via the database, although
+ you can use the server administration, too. If you do not change all
+ your passwords, you almost certainly will get haX0rD.
mysql -uslash -pslashpass slash
@@ -471,19 +459,19 @@ INSTALLATION AND SETUP
Running Slash on Multiple Servers
- 1. Make sure that each of those servers has an EXACT copy of the
- entire apache tree (modules and all).
+ 1. Make sure that each of those servers has an EXACT copy of the entire
+ apache tree (modules and all).
- 2. Either remote copy recursively, or simply export the entire
- apache tree via NFS (read-only) to the servers you intend to
- be the web servers.
+ 2. Either remote copy recursively, or simply export the entire apache
+ tree via NFS (read-only) to the servers you intend to be the web
+ servers.
- 3. Make sure that whatever box is running slashd has all of its
- code and static documents exported to those web servers as
- well (read-only).
+ 3. Make sure that whatever box is running slashd has all of its code
+ and static documents exported to those web servers as well
+ (read-only).
- 4. Make sure that the slash user in mysql can access the database
- from any host that has the code on it:
+ 4. Make sure that the slash user in mysql can access the database from
+ any host that has the code on it:
mysql mysql
insert into user values
@@ -498,28 +486,27 @@ INSTALLATION AND SETUP
Database Upgrades From Previous Versions
- Slash is data. When we release a new version, it often has
- updates to the database, too. As such, updates can be difficult.
+ Slash is data. When we release a new version, it often has updates to
+ the database, too. As such, updates can be difficult.
- We have provided upgrade scripts from previous versions of
- slash. Each script upgrades from the version immediately
- preceding it, so 0.9.2 users, to upgrade to 0.9.5, would need to
- run the 0.9.3 scripts, then the 0.9.4 scripts, then the 0.9.5
- scripts.
+ We have provided upgrade scripts from previous versions of slash. Each
+ script upgrades from the version immediately preceding it, so 0.9.2
+ users, to upgrade to 0.9.5, would need to run the 0.9.3 scripts, then
+ the 0.9.4 scripts, then the 0.9.5 scripts.
- The scripts are stored in sql/updates/x.x.x/, where x.x.x is the
- version to upgrade to. The .sql scripts can be run like so:
+ The scripts are stored in sql/updates/x.x.x/, where x.x.x is the version
+ to upgrade to. The .sql scripts can be run like so:
mysql -uslash -pslashpass slash < updatescript.sql
- The Perl scripts should be run, however, from the main slash
- directory, so all of the libraries can be found:
+ The Perl scripts should be run, however, from the main slash directory,
+ so all of the libraries can be found:
cd /home/slash
./sql/updates/0.9.5/updatescript.pl
- You may also at some point choose to reinitialize the database
- from scratch. For that, you can do something like this:
+ You may also at some point choose to reinitialize the database from
+ scratch. For that, you can do something like this:
mysql mysql
mysql> drop database slash;
@@ -535,35 +522,33 @@ INSTALLATION AND SETUP
If you have already installed slash-0.9.2, you may use the
alter_database.sql script to update the database, then run
- blocks_update.pl (make sure you change the connect string) if
- you don't want to start your database over from scratch.
- However, the blocks table contains a lot of updated data in
- slash-0.9.3 that must be fixed in order for slash-0.9.3 to work
- at all: global variables in the blocks (like $rootdir and
- $fg[2]) must be changed to the new style ($I{rootdir} and
- $I{fg}[2]}). You can do this by hand, or use the dumped data in
+ blocks_update.pl (make sure you change the connect string) if you don't
+ want to start your database over from scratch. However, the blocks table
+ contains a lot of updated data in slash-0.9.3 that must be fixed in
+ order for slash-0.9.3 to work at all: global variables in the blocks
+ (like $rootdir and $fg[2]) must be changed to the new style ($I{rootdir}
+ and $I{fg}[2]}). You can do this by hand, or use the dumped data in
slashblocks_dump.sql.
Upgrade 0.9.3 -> 0.9.4
- The tables blocks and sectionblocks needed to be fixed to make
- it so that they had a 1:1 correlation on every record for the
- admin interface to be able to work correctly. There was a bad
- mismatch between the two tables. We've added processes to help
- upgrade for those that have put a lot of work into customizing
- their sites and don't want to lose any of their work. First,
- back up the blocks table by doing a dump, or simply back up
- individual blocks by doing the following:
+ The tables blocks and sectionblocks needed to be fixed to make it so
+ that they had a 1:1 correlation on every record for the admin interface
+ to be able to work correctly. There was a bad mismatch between the two
+ tables. We've added processes to help upgrade for those that have put a
+ lot of work into customizing their sites and don't want to lose any of
+ their work. First, back up the blocks table by doing a dump, or simply
+ back up individual blocks by doing the following:
1. Check to see that your block has an entry in both blocks and
- sectionblocks in the case the admin.pl didn't get it in
- there properly:
+ sectionblocks in the case the admin.pl didn't get it in there
+ properly:
select count(*) from blocks where bid = 'myownblock';
select count(*) from sectionblocks where bid = 'myownblock';
- 2. If there's only one of the bids in either record, you can insert
- an entry by hand for that record as shown here.
+ 2. If there's only one of the bids in either record, you can insert an
+ entry by hand for that record as shown here.
If it is blocks that it's missing from, for a static block:
@@ -577,53 +562,50 @@ INSTALLATION AND SETUP
insert into sectionblocks values ('','myownblock',0,'',0,NULL,NULL,0);
- If there are more than one record for a bid in
- sectionblocks, delete one of them (probably the one without
- a section).
+ If there are more than one record for a bid in sectionblocks, delete
+ one of them (probably the one without a section).
3. If you want to back up a specific block, try something like:
select * from blocks where bid = 'myownblock' into outfile '/tmp/blocks.myownblock.txt';
select * from sectionblocks where bid = 'myownblock' into outfile '/tmp/blocks.myownblock.txt';
4. Run the sql script blocks_fix.sql. This script makes sure every
- record has a match in each table, and also modifies the bid
- column in sectionblocks to be the same as it is in blocks,
- as well as some other fixes to some of the blocks:
+ record has a match in each table, and also modifies the bid column
+ in sectionblocks to be the same as it is in blocks, as well as some
+ other fixes to some of the blocks:
mysql -uslash -pslashpass < blocks_fix.sql
- Keep note of any errors you might see. On a new 0.9.3
- distribution, untouched, unmodified data, this worked
- without incident.
+ Keep note of any errors you might see. On a new 0.9.3 distribution,
+ untouched, unmodified data, this worked without incident.
- 5. Run the sql script blocks_alter.sql. This script drops the
- existing primary key on sectionblocks, which is a
- combination of bid and section, and creates a new primary
- key on bid (which prevents duplicates of the same bid).
+ 5. Run the sql script blocks_alter.sql. This script drops the existing
+ primary key on sectionblocks, which is a combination of bid and
+ section, and creates a new primary key on bid (which prevents
+ duplicates of the same bid).
mysql -uslash -pslashpass < blocks_alter.sql
- If this gives you an error, it is most likely due to the
- fact that there are duplicate bids in sectionblocks.
- Identify those records and delete the extra one, then retry
- this script. All block ids (bid) must be unique.
+ If this gives you an error, it is most likely due to the fact that
+ there are duplicate bids in sectionblocks. Identify those records
+ and delete the extra one, then retry this script. All block ids
+ (bid) must be unique.
- 6. If you deleted any of the blocks that you backed up as show in
- step 3, you can restore those blocks this way:
+ 6. If you deleted any of the blocks that you backed up as show in step
+ 3, you can restore those blocks this way:
load data infile '/tmp/blocks.myownblock.txt' INTO TABLE blocks;
load data infile '/tmp/sectionblocks.myownblock.txt' INTO TABLE sectionblocks;
Upgrade 0.9.4 -> 0.9.5
- Just run the scripts in the sql/updates/0.9.5/ directory. The
- scripts blocks_backup.sql and fix_matchname.pl will update the
- data and structure of the database, and everyone should run
- them. The script blocks_update.sql should only be run by people
- who want some of their blocks data changed. Examine the script
- and CHANGES and determine if you want to run the script, or
- whatever.
+ Just run the scripts in the sql/updates/0.9.5/ directory. The scripts
+ blocks_backup.sql and fix_matchname.pl will update the data and
+ structure of the database, and everyone should run them. The script
+ blocks_update.sql should only be run by people who want some of their
+ blocks data changed. Examine the script and CHANGES and determine if you
+ want to run the script, or whatever.
Other Upgrades
@@ -638,5 +620,5 @@ INSTALLATION AND SETUP
1.0.5 -> 1.0.6 sql/updates/1.0.6/
AUTHOR
- Patrick Galbraith and Chris Nandor. Last Modified July 10, 2000.
+ Patrick Galbraith and Chris Nandor. Last Modified August 18, 2000.
View
112 README
@@ -2,72 +2,69 @@ NAME
README - Slashdot Readme
DESCRIPTION
- This is the README file for Slash, release 1.0.7. Please read
- all documentation carefully. The various documents explain the
- database schema, the various fields in the database, and some of
- the reasoning behind the design of the schema, installation and
- setup.
-
- Please see INSTALL for database upgrade instructions. Code
- upgrading is simple: use the new code in the new distribution,
- and make sure that you have the new values and configurations in
- your copies of slashdotrc.pl and httpd.conf. If you neglect to
- upgrade these last two, your site likely will not work.
-
- Also, double-check every line of CHANGES to see if anything has
- changed to affect your site (like a change from Mail::Sender to
- Mail::Sendmail, for example).
-
- Note: This page looks best in a browser (the HTML version of it
- is in the docs/ directory). You can print it out, but some of
- the ASCII illustrations may get munged in printing, but the
- directions will certainly appear good enough to read.
+ This is the README file for Slash, release 1.0.8. Please read all
+ documentation carefully. The various documents explain the database
+ schema, the various fields in the database, and some of the reasoning
+ behind the design of the schema, installation and setup.
+
+ Please see INSTALL for database upgrade instructions. Code upgrading is
+ simple: use the new code in the new distribution, and make sure that you
+ have the new values and configurations in your copies of slashdotrc.pl
+ and httpd.conf. If you neglect to upgrade these last two, your site
+ likely will not work.
+
+ Also, double-check every line of CHANGES to see if anything has changed
+ to affect your site (like a change from Mail::Sender to Mail::Sendmail,
+ for example).
+
+ Note: This page looks best in a browser (the HTML version of it is in
+ the docs/ directory). You can print it out, but some of the ASCII
+ illustrations may get munged in printing, but the directions will
+ certainly appear good enough to read.
We have a preliminary Getting Started document at
- public_html/getting_started.shtml. If this is your first time
- with Slash, or you have questions or problems getting started,
- look here first.
+ public_html/getting_started.shtml. If this is your first time with
+ Slash, or you have questions or problems getting started, look here
+ first.
- See the Slash web site, with support, docs, latest downloads,
- FAQs, and more, at <URL:http://slashcode.com/>.
+ See the Slash web site, with support, docs, latest downloads, FAQs, and
+ more, at <URL:http://slashcode.com/>.
- This release is tagged in CVS as v1_0_7_0. See the SourceForge
- site at http://sourceforge.net/projects/slashcode/ for CVS, bug
- reporting, patch submissions, and downloads.
+ This release is tagged in CVS as v1_0_8_0. See the SourceForge site at
+ <http://sourceforge.net/projects/slashcode/> for CVS, bug reporting,
+ patch submissions, and downloads.
What is Slash?
- Maybe this is a dumb question, but why not get this answered?
- Slash is a database-driven news and message board, using
- mod_perl and MySQL. It has been programmed, more so recently, to
- use persistance for a good deal of its variables to increase
- speed and efficiency. Slash has all the features and more that
- you'd ever want in a bulletin-board/message-board system. You
- can customize it to anything you want, give it any appearance
- that you want. This can mostly be done via data. Slash is a
- database beast in the true sense. The Slash code is distributed
- under the GNU General Public License (see COPYING).
+ Maybe this is a dumb question, but why not get this answered? Slash is a
+ database-driven news and message board, using mod_perl and MySQL. It has
+ been programmed, more so recently, to use persistance for a good deal of
+ its variables to increase speed and efficiency. Slash has all the
+ features and more that you'd ever want in a bulletin-board/message-board
+ system. You can customize it to anything you want, give it any
+ appearance that you want. This can mostly be done via data. Slash is a
+ database beast in the true sense. The Slash code is distributed under
+ the GNU General Public License (see COPYING).
Hardware/Software
- The live Slashdot used five separate servers for its high hit
- count. This is not a target number for all Slash sites. You can
- run all of Slash on one server, or throw it on 20 servers. The
- more load you want it to handle, the more hardware you'll want.
- Slash consists of three main parts: database, codebase, and web
- server. How those are divvied up amongst servers is up to your
- own creative planning. Slash runs on Linux but is not Linux
- specific. Whatever runs Apache/mod_perl and MySQL will run
- Slash. Slash does have some MySQL-specific SQL statements
- contained within, but it's not entirely impossible to run it on
- another RDBMS with some modifications.
+ The live Slashdot used five separate servers for its high hit count.
+ This is not a target number for all Slash sites. You can run all of
+ Slash on one server, or throw it on 20 servers. The more load you want
+ it to handle, the more hardware you'll want. Slash consists of three
+ main parts: database, codebase, and web server. How those are divvied up
+ amongst servers is up to your own creative planning. Slash runs on Linux
+ but is not Linux specific. Whatever runs Apache/mod_perl and MySQL will
+ run Slash. Slash does have some MySQL-specific SQL statements contained
+ within, but it's not entirely impossible to run it on another RDBMS with
+ some modifications.
Documentation
- Please read the various documents that come with the Slash code
- (in docs/). There's a lot of information that can give you a
- better idea of what the code does, how to install the code, and
- other information on the database schema.
+ Please read the various documents that come with the Slash code (in
+ docs/). There's a lot of information that can give you a better idea of
+ what the code does, how to install the code, and other information on
+ the database schema.
README
this document (POD, HTML and plaintext)
@@ -76,17 +73,16 @@ DESCRIPTION
how to install (POD, HTML and plaintext)
slasherd.fig
- the ERD diagram of the Slash database schema (use xfig to
- read it)
+ the ERD diagram of the Slash database schema (use xfig to read it)
slashtables.html/sdw/ps
- a description of all the tables and columns of the database
- schema (HTML, StarOffice, and PostScript)
+ a description of all the tables and columns of the database schema
+ (HTML, StarOffice, and PostScript)
Installation
See INSTALL.
AUTHOR
- Patrick Galbraith and Chris Nandor. Last Modified July 12, 2000.
+ Patrick Galbraith and Chris Nandor. Last Modified August 18, 2000.
View
520 docs/INSTALL
@@ -2,23 +2,23 @@ NAME
INSTALL - Slash Installation
SOFTWARE REQUIREMENTS
- Whatever versions listed are the versions recommended. You may
- try a newer version, and it should work, but it is not
- guaranteed (of course, nothing in here is guaranteed anyway :).
- Don't try to use anything older than these listed versions.
+ Whatever versions listed are the versions recommended. You may try a
+ newer version, and it should work, but it is not guaranteed (of course,
+ nothing in here is guaranteed anyway :). Don't try to use anything older
+ than these listed versions.
- This document is still evolving, so there may be unintended
- omissions or various steps may be over- or under-explained. It's
- assumed that you have some working experience with some form of
- Unix, Apache, SQL database, and perl.
+ This document is still evolving, so there may be unintended omissions or
+ various steps may be over- or under-explained. It's assumed that you
+ have some working experience with some form of Unix, Apache, SQL
+ database, and perl.
- Note: This page looks best in a browser (the HTML version of it
- is in the docs/ directory). You can print it out, but some of
- the ASCII illustrations may get munged in printing; however, the
- directions will certainly appear good enough to read.
+ Note: This page looks best in a browser (the HTML version of it is in
+ the docs/ directory). You can print it out, but some of the ASCII
+ illustrations may get munged in printing; however, the directions will
+ certainly appear good enough to read.
- See the Slash web site, with support, docs, latest downloads,
- and more, at http://slashcode.com/.
+ See the Slash web site, with support, docs, latest downloads, and more,
+ at http://slashcode.com/.
Database, webserver, etc.
@@ -107,11 +107,11 @@ SOFTWARE REQUIREMENTS
Storable-0.6.9
http://search.cpan.org/search?dist=Storable
- Note: IPC::Shareable is only needed for the troll speed
- limit feature, which is off by default (settable via the
- `use_ipc' variable in slashdotrc.pl). Also, on all of our
- test systems, some of the tests in `make test' failed, but
- the module seems to work fine for our purposes regardless.
+ Note: IPC::Shareable is only needed for the troll speed limit
+ feature, which is off by default (settable via the `use_ipc'
+ variable in slashdotrc.pl). Also, on all of our test systems, some
+ of the tests in `make test' failed, but the module seems to work
+ fine for our purposes regardless.
Slash Code
@@ -141,34 +141,33 @@ SOFTWARE REQUIREMENTS
You can get the Slash code in these locations:
- FTP ftp://ftp.slashdot.org//pub/slash/
+ FTP
+ ftp://ftp.slashdot.org//pub/slash/
HTTP, CVS
- http://sourceforge.net/project/?group_id=4421
+ http://sourceforge.net/projects/slashcode/
- The CVS repository is tagged with versions, so to get
- release 1.0.3, get tag "v1_0_3_0". The last number will be
- incremented during development ("v1_0_3_1", "v1_0_3_2",
- etc.) until the next release. Sometimes, a release may be
- tagged with a last number of something other than "0".
- Exactly what tag a given release is based on is in README.
+ The CVS repository is tagged with versions, so to get release 1.0.3,
+ get tag "v1_0_3_0". The last number will be incremented during
+ development ("v1_0_3_1", "v1_0_3_2", etc.) until the next release.
+ Sometimes, a release may be tagged with a last number of something
+ other than "0". Exactly what tag a given release is based on is in
+ README.
- There is a separate development branch of Slash. Its branch
- is "bender". Primarily small changes and bugfixes will go
- into the MAIN branch, with major changes going into the
- development branch.
+ There is a separate development branch of Slash. Its branch is
+ "bender". Primarily small changes and bugfixes will go into the MAIN
+ branch, with major changes going into the development branch.
Hardware Requirements
- None. Whatever it takes to run the above software and handle
- the traffic you may be getting. You could probably do it on
- a 486 with 32MB and 250MB hard drive space, but we wouldn't
- recommend it. Minimum setup would probably be some sort of
- Pentium 133 or higher, 128MB, and 1GB HD. I'd shoot for at
- least a Pentium II/200+ MHz, 256MB, 2GB. Consider also that
- the httpd machine might be different from the mysql machine,
- you can keep the number of httpds real low, etc. Do what
- works.
+ None. Whatever it takes to run the above software and handle the
+ traffic you may be getting. You could probably do it on a 486 with
+ 32MB and 250MB hard drive space, but we wouldn't recommend it.
+ Minimum setup would probably be some sort of Pentium 133 or higher,
+ 128MB, and 1GB HD. I'd shoot for at least a Pentium II/200+ MHz,
+ 256MB, 2GB. Consider also that the httpd machine might be different
+ from the mysql machine, you can keep the number of httpds real low,
+ etc. Do what works.
PRE-INSTALLATION THOUGHTS
The are several configurations recommended, depending on scale.
@@ -190,8 +189,8 @@ PRE-INSTALLATION THOUGHTS
+-----------------+ +-----------+
|_________________ DBI __________________|
- db separate on one server, slashdot code and apache on another,
- exported to web servers
+ db separate on one server, slashdot code and apache on another, exported
+ to web servers
server 1 server2 server 3 .. n
+-----------+ +-----------------+ +-----------+
| slash db | | | | |
@@ -200,97 +199,99 @@ PRE-INSTALLATION THOUGHTS
+-----------+ +-----------------+ +-----------+
|______ DBI _________|_______________________________________|
- There are many ways this can be done. The key is to think about
- how the site will be put together before starting the
- installation.
+ There are many ways this can be done. The key is to think about how the
+ site will be put together before starting the installation.
+
+ Note: If your site is going to be very busy, you may wish to consider
+ having a separate images server. For instance, Slashdot has
+ images.slashdot.org, which handles all the images. Just set the imagedir
+ variable in slashdotrc.pl appropriately, like
+ `http://images.example.com'.
INSTALLATION AND SETUP
Perform these tasks as root.
1. Create the group "slash".
- 2. Create the user "slash" with slashdot gid. Note: if using
- multiple webservers, and using NFS, make sure that this
- user:group is created with the same UID and GID on all
- involved systems.
+ 2. Create the user "slash" with slashdot gid. Note: if using multiple
+ webservers, and using NFS, make sure that this user:group is created
+ with the same UID and GID on all involved systems.
- Note: For security's sake, you may wish to add the web
- server user (e.g., "nobody") to the "slash" group, and then
- set your permissions so that all the files are writable by
- user and group and not world, to keep other users on the
- system from modifying the files.
+ Note: For security's sake, you may wish to add the web server user
+ (e.g., "nobody") to the "slash" group, and then set your permissions
+ so that all the files are writable by user and group and not world,
+ to keep other users on the system from modifying the files.
- 3. Unpack the slash code tarball in the slash user's home
- directory. This will place everything where it should
- belong.
+ 3. Unpack the slash code tarball in the slash user's home directory.
+ This will place everything where it should belong.
4. chown everything in this tree as slash:slash (i.e., `chown -R
- slash:slash /home/slash'). chmod the main directory to be
- readable and executable by all (i.e., `chmod a+rx
- /home/slash').
+ slash:slash /home/slash'). chmod the main directory to be readable
+ and executable by all (i.e., `chmod a+rx /home/slash').
5. Create the directory apache will be installed into (i.e.,
- /usr/local/apache). The default install uses a separate
- directory for apache logs, which should also be created as
- /usr/local/apache_logs. Alternatively, change httpd.conf to
- point to a different location. See the section below on
- installing perl modules for more information about the
- default installation.
-
- Multiple slash instances can run under virtual hosts on the
- same httpd. See vhost.httpd.conf for an example of how this
- works. Pay special attention to the configuration section
- under the text "# MAIN SLASHCODE SPECIFIC STUFF STARTS HERE
- #".
-
- For virtual hosts, you should create a separate account and
- Slash installation for each virtual host, so repeat the
- instructions relating to creation of accounts for each
- virtual host.
-
- 6. Install MySQL. Please refer to MySQL documentation for
- compilation and/or installation notes for any questions with
- this. Find the script that runs mysql (probably safe_mysqld)
- and add this to the beginning of it:
+ /usr/local/apache). The default install uses a separate directory
+ for apache logs, which should also be created as
+ /usr/local/apache_logs. Alternatively, change httpd.conf to point to
+ a different location. See the section below on installing perl
+ modules for more information about the default installation.
+
+ Multiple slash instances can run under virtual hosts on the same
+ httpd. See vhost.httpd.conf for an example of how this works. Pay
+ special attention to the configuration section under the text "#
+ MAIN SLASHCODE SPECIFIC STUFF STARTS HERE #".
+
+ For virtual hosts, you should create a separate account and Slash
+ installation for each virtual host, so repeat the instructions
+ relating to creation of accounts for each virtual host.
+
+ 6. Install MySQL. Please refer to MySQL documentation for compilation
+ and/or installation notes for any questions with this. Find the
+ script that runs mysql (probably safe_mysqld) and add this to the
+ beginning of it:
TZ=GMT
export TZ
+ Note: For slashd (see utils/slashd, which starts slashd), mod_perl
+ (see httpd/httpd.conf), and MySQL, we set all processes to run in
+ GMT. Then it is easy to convert dates to whatever the user's local
+ time is. If you have date problems, check that all of these are
+ properly set to run in GMT.
+
7. Create the slash mysql user and database.
mysql mysql < sql/slashdb_create.sql
- This will create both the slash db user and slash db. If you
- are using virtual hosts, or want to otherwise change the db
- user or db name, edit this script before running it to use
- the proper db user and db name. This script creates the user
- slash with the password "changethis". Immediately change the
- password for slash in mysql:
+ This will create both the slash db user and slash db. If you are
+ using virtual hosts, or want to otherwise change the db user or db
+ name, edit this script before running it to use the proper db user
+ and db name. This script creates the user slash with the password
+ "changethis". Immediately change the password for slash in mysql:
mysql mysql
update user set Password = password('newpassword') where User = 'slash';
flush privileges;
- Note: The slash db user is created with several privileges
- such as drop and create table, so it's up to you to modify
- those privileges to something more restrictive if you feel
- uncomfortable with these settings. We'd suggest you don't
- let other users on the database have access to this user.
-
- 8. Run the slash schema creation script and load sample slash db
- data dump. This dump has minimal data for the system to
- work. This data is needed in the database for the site to
- work at all. It has a very plain, basic design, that has a
- lot of HTML comments in each block to give an idea of how
- the site works. Other data in this dump is tables that the
- system needs to do things such as time conversion for user
- date format strings. Please refer to the database schema and
- database schema documentation to understand how the database
+ Note: The slash db user is created with several privileges such as
+ drop and create table, so it's up to you to modify those privileges
+ to something more restrictive if you feel uncomfortable with these
+ settings. We'd suggest you don't let other users on the database
+ have access to this user.
+
+ 8. Run the slash schema creation script and load sample slash db data
+ dump. This dump has minimal data for the system to work. This data
+ is needed in the database for the site to work at all. It has a very
+ plain, basic design, that has a lot of HTML comments in each block
+ to give an idea of how the site works. Other data in this dump is
+ tables that the system needs to do things such as time conversion
+ for user date format strings. Please refer to the database schema
+ and database schema documentation to understand how the database
schema works.
- Replace `HOSTNAME' (or `HOSTNAME:PORT') below with the
- server's hostname (this is the name you will call the server
- in the browser, used for default links in the HTML).
+ Replace `HOSTNAME' (or `HOSTNAME:PORT') below with the server's
+ hostname (this is the name you will call the server in the browser,
+ used for default links in the HTML).
cd sql
mysql -uslash -pnewpassword slash < slashschema_create.sql
@@ -300,18 +301,17 @@ INSTALLATION AND SETUP
9. Install perl.
- On Slashdot and Slashcode, we have all of the modules
- installed in the Apache directory, so that we can NFS mount
- that one directory on several machines, and they all have
- the same modules and configuration. If you want to do that,
- when the configuration process asks where you want to put
- perl modules (both system and local) have it put them in the
- directory tree you'll install apache in (i.e.,
- /usr/local/apache/lib). Otherwise, the default installation
- directories are usually fine.
+ On Slashdot and Slashcode, we have all of the modules installed in
+ the Apache directory, so that we can NFS mount that one directory on
+ several machines, and they all have the same modules and
+ configuration. If you want to do that, when the configuration
+ process asks where you want to put perl modules (both system and
+ local) have it put them in the directory tree you'll install apache
+ in (i.e., /usr/local/apache/lib). Otherwise, the default
+ installation directories are usually fine.
- 10. Untar apache and mod_perl. Build mod_perl. Have its build
- process build and install apache for you:
+ 10. Untar apache and mod_perl. Build mod_perl. Have its build process
+ build and install apache for you:
perl Makefile.PL APACHE_SRC=/where_you_have_the_source DO_HTTPD=1 \
USE_APACI=1 PERL_MARK_WHERE=1 EVERYTHING=1 \
@@ -322,106 +322,97 @@ INSTALLATION AND SETUP
This will install both mod_perl and apache.
- You MUST install mod_perl and Apache as directed here. OK,
- that is not strictly true, but it is mostly true. If you
- already have mod_perl installed, chances are it is not
- configured properly to work with Slash and you must rebuild
- it. If you are using the provided httpd.conf file from the
- slash distribution, and Apache is giving you errors, chances
- are mod_perl is not installed correctly, and you need to
- build it from scratch.
-
- 11. Install the listed perl modules in the order listed in the
- section on "Perl Modules". You can use CPAN if you want, or
- ftp, untar and do it yourself. Use whichever does the job.
-
- Note that the module versions Slash has been tested with are
- given; use other versions at your own risk. We actually
- think that the current version of each module as of this
- note will work, so if you are brave, go ahead and install
- the latest.
-
- You can get the files via FTP yourself from CPAN and then
- install each by hand, or, if you can get the CPAN module
- running, you can use that. There are several ways to use the
- CPAN shell to install modules. You can install each one
- individually:
+ You MUST install mod_perl and Apache as directed here. OK, that is
+ not strictly true, but it is mostly true. If you already have
+ mod_perl installed, chances are it is not configured properly to
+ work with Slash and you must rebuild it. If you are using the
+ provided httpd.conf file from the slash distribution, and Apache is
+ giving you errors, chances are mod_perl is not installed correctly,
+ and you need to build it from scratch.
+
+ 11. Install the listed perl modules in the order listed in the section
+ on "Perl Modules". You can use CPAN if you want, or ftp, untar and
+ do it yourself. Use whichever does the job.
+
+ Note that the module versions Slash has been tested with are given;
+ use other versions at your own risk. We actually think that the
+ current version of each module as of this note will work, so if you
+ are brave, go ahead and install the latest.
+
+ You can get the files via FTP yourself from CPAN and then install
+ each by hand, or, if you can get the CPAN module running, you can
+ use that. There are several ways to use the CPAN shell to install
+ modules. You can install each one individually:
perl -MCPAN -e shell
# some configuration / initialization stuff
> install DBI
- Or, you can install all of them at once using the
- Bundle::Slash module. This method is the easiest, but if
- something does not work right, it can be more of a pain to
- track it down.
+ Or, you can install all of them at once using the Bundle::Slash
+ module. This method is the easiest, but if something does not work
+ right, it can be more of a pain to track it down.
cd /home/slash
perl -MCPAN -e "install 'Bundle::Slash'"
- You may also want to use CPAN shell to install
- Bundle::libnet, Bundle::LWP, Bundle::DBI,
- Bundle::DBD::mysql, and then the rest of the modules. See
- the manpage the perlmodinstall manpage for more information
- about using CPAN and installing modules.
+ You may also want to use CPAN shell to install Bundle::libnet,
+ Bundle::LWP, Bundle::DBI, Bundle::DBD::mysql, and then the rest of
+ the modules. See the manpage the perlmodinstall manpage for more
+ information about using CPAN and installing modules.
- Note: Compress::Zlib is now required, and it won't install
- properly if the zlib development headers are not available.
- See the documentation for Compress::Zlib for more
- information.
+ Note: Compress::Zlib is now required, and it won't install properly
+ if the zlib development headers are not available. See the
+ documentation for Compress::Zlib for more information.
- Note: File::Spec is now required, but a version beyond what
- comes with perl 5.00503 is required. Use `make install
- UNINST=1` to remove the version that comes with perl while
- installing the new version. Even if using the CPAN shell you
- can do this:
+ Note: File::Spec is now required, but a version beyond what comes
+ with perl 5.00503 is required. Use `make install UNINST=1` to remove
+ the version that comes with perl while installing the new version.
+ Even if using the CPAN shell you can do this:
cpan> test File::Spec # download, make, and test
cpan> look File::Spec # opens shell to proper dir
% make install UNINST=1 # install from shell
12. Copy the slash httpd.conf from the untarred slash code tarball's
- directory httpd (i.e., /home/slash/httpd/httpd.conf) to
- apache's conf directory. Take time to look over the file to
- make sure that it matches your site's specific setup.
- Similarly edit /home/slash/slashdotrc.pl.
+ directory httpd (i.e., /home/slash/httpd/httpd.conf) to apache's
+ conf directory. Take time to look over the file to make sure that it
+ matches your site's specific setup. Similarly edit
+ /home/slash/slashdotrc.pl.
- For httpd.conf, pay close attention to directories and to
- the number of servers and the max clients and requests. The
- defaults are similar to Slashdot's defaults, but most sites
- will not need 20 servers with over 100 maximum requests per
- child process.
+ For httpd.conf, pay close attention to directories and to the number
+ of servers and the max clients and requests. The defaults are
+ similar to Slashdot's defaults, but most sites will not need 20
+ servers with over 100 maximum requests per child process.
In slashdotrc.pl, make sure you have reasonable defaults for
- everything. If you are upgrading, then you will likely want
- to make a copy of your old slashdotrc.pl and copy those
- values into the new file, since it is subject to change
- significantly from one release to the next.
+ everything. If you are upgrading, then you will likely want to make
+ a copy of your old slashdotrc.pl and copy those values into the new
+ file, since it is subject to change significantly from one release
+ to the next.
- If your web server is inside a firewall, you may wish to set
- the rootdir variable to "" (it is below the other variables,
- toward the bottom), so all links will be relative to /.
+ If your web server is inside a firewall, you may wish to set the
+ rootdir variable to "" (it is below the other variables, toward the
+ bottom), so all links will be relative to /.
- If you are doing virtual hosting for multple Slash sites,
- see the instructions at the bottom of slashdotrc.pl and the
- sample configuration at the bottom of httpd.conf.
+ If you are doing virtual hosting for multple Slash sites, see the
+ instructions at the bottom of slashdotrc.pl and the sample
+ configuration at the bottom of httpd.conf.
- 13. Create /etc/apache.listen (where `MY.IP.ADD.RESS' is the IP
- address Apache will be listening on):
+ 13. Create /etc/apache.listen (where `MY.IP.ADD.RESS' is the IP address
+ Apache will be listening on):
echo "Listen MY.IP.ADD.RESS:80" > /etc/apache.listen
14. Start apache.
- 15. Copy the slashd startup script from the Slash source directory
- (i.e. /home/slash/utils) slashd into the init.d directory
- (/etc/init.d on Debian). Chown it to the slash user (i.e.,
- `chown slash:slash /etc/init.d/slashd') and then chmod it
- u+s and g+s (i.e., `chmod u+s /etc/init.d/slashd', `chmod
- g+s /etc/init.d/slashd') Create all the links to this file
- for the various run levels. Note: this script is a startup
- script, and is not the same script as the slashd in the same
- directory as Slash.pm.
+ 15. Copy the slashd startup script from the Slash source directory (i.e.
+ /home/slash/utils) slashd into the init.d directory (/etc/init.d on
+ Debian). Chown it to the slash user (i.e., `chown slash:slash
+ /etc/init.d/slashd') and then chmod it u+s and g+s (i.e., `chmod u+s
+ /etc/init.d/slashd', `chmod g+s /etc/init.d/slashd') Create all the
+ links to this file for the various run levels. Note: this script is
+ a startup script, and is not the same script as the slashd in the
+ same directory as Slash.pm.
16. Start slashd with the startup script (i.e., `/etc/init.d/slashd
start').
@@ -430,13 +421,11 @@ INSTALLATION AND SETUP
http://whateveryoursiteiscalled.com/admin.pl
- The admin user/password is God/pete (you'll need to change
- this).
+ The admin user/password is God/pete (you'll need to change this).
- This page allows you to approve submissions to be run as
- stories, add new stories, edit stories, edit the blocks of
- html, code, and variables that control the look and feel of
- the site.
+ This page allows you to approve submissions to be run as stories,
+ add new stories, edit stories, edit the blocks of html, code, and
+ variables that control the look and feel of the site.
The system has 7 users:
@@ -448,11 +437,10 @@ INSTALLATION AND SETUP
user3
user4
- The passwords are all "change". As that implies, you should
- change it. It's clear text, so simply change it via the
- database, although you can use the server administration,
- too. If you do not change all your passwords, you almost
- certainly will get haX0rD.
+ The passwords are all "change". As that implies, you should change
+ it. It's clear text, so simply change it via the database, although
+ you can use the server administration, too. If you do not change all
+ your passwords, you almost certainly will get haX0rD.
mysql -uslash -pslashpass slash
@@ -471,19 +459,19 @@ INSTALLATION AND SETUP
Running Slash on Multiple Servers
- 1. Make sure that each of those servers has an EXACT copy of the
- entire apache tree (modules and all).
+ 1. Make sure that each of those servers has an EXACT copy of the entire
+ apache tree (modules and all).
- 2. Either remote copy recursively, or simply export the entire
- apache tree via NFS (read-only) to the servers you intend to
- be the web servers.
+ 2. Either remote copy recursively, or simply export the entire apache
+ tree via NFS (read-only) to the servers you intend to be the web
+ servers.
- 3. Make sure that whatever box is running slashd has all of its
- code and static documents exported to those web servers as
- well (read-only).
+ 3. Make sure that whatever box is running slashd has all of its code
+ and static documents exported to those web servers as well
+ (read-only).
- 4. Make sure that the slash user in mysql can access the database
- from any host that has the code on it:
+ 4. Make sure that the slash user in mysql can access the database from
+ any host that has the code on it:
mysql mysql
insert into user values
@@ -498,28 +486,27 @@ INSTALLATION AND SETUP
Database Upgrades From Previous Versions
- Slash is data. When we release a new version, it often has
- updates to the database, too. As such, updates can be difficult.
+ Slash is data. When we release a new version, it often has updates to
+ the database, too. As such, updates can be difficult.
- We have provided upgrade scripts from previous versions of
- slash. Each script upgrades from the version immediately
- preceding it, so 0.9.2 users, to upgrade to 0.9.5, would need to
- run the 0.9.3 scripts, then the 0.9.4 scripts, then the 0.9.5
- scripts.
+ We have provided upgrade scripts from previous versions of slash. Each
+ script upgrades from the version immediately preceding it, so 0.9.2
+ users, to upgrade to 0.9.5, would need to run the 0.9.3 scripts, then
+ the 0.9.4 scripts, then the 0.9.5 scripts.
- The scripts are stored in sql/updates/x.x.x/, where x.x.x is the
- version to upgrade to. The .sql scripts can be run like so:
+ The scripts are stored in sql/updates/x.x.x/, where x.x.x is the version
+ to upgrade to. The .sql scripts can be run like so:
mysql -uslash -pslashpass slash < updatescript.sql
- The Perl scripts should be run, however, from the main slash
- directory, so all of the libraries can be found:
+ The Perl scripts should be run, however, from the main slash directory,
+ so all of the libraries can be found:
cd /home/slash
./sql/updates/0.9.5/updatescript.pl
- You may also at some point choose to reinitialize the database
- from scratch. For that, you can do something like this:
+ You may also at some point choose to reinitialize the database from
+ scratch. For that, you can do something like this:
mysql mysql
mysql> drop database slash;
@@ -535,35 +522,33 @@ INSTALLATION AND SETUP
If you have already installed slash-0.9.2, you may use the
alter_database.sql script to update the database, then run
- blocks_update.pl (make sure you change the connect string) if
- you don't want to start your database over from scratch.
- However, the blocks table contains a lot of updated data in
- slash-0.9.3 that must be fixed in order for slash-0.9.3 to work
- at all: global variables in the blocks (like $rootdir and
- $fg[2]) must be changed to the new style ($I{rootdir} and
- $I{fg}[2]}). You can do this by hand, or use the dumped data in
+ blocks_update.pl (make sure you change the connect string) if you don't
+ want to start your database over from scratch. However, the blocks table
+ contains a lot of updated data in slash-0.9.3 that must be fixed in
+ order for slash-0.9.3 to work at all: global variables in the blocks
+ (like $rootdir and $fg[2]) must be changed to the new style ($I{rootdir}
+ and $I{fg}[2]}). You can do this by hand, or use the dumped data in
slashblocks_dump.sql.
Upgrade 0.9.3 -> 0.9.4
- The tables blocks and sectionblocks needed to be fixed to make
- it so that they had a 1:1 correlation on every record for the
- admin interface to be able to work correctly. There was a bad
- mismatch between the two tables. We've added processes to help
- upgrade for those that have put a lot of work into customizing
- their sites and don't want to lose any of their work. First,
- back up the blocks table by doing a dump, or simply back up
- individual blocks by doing the following:
+ The tables blocks and sectionblocks needed to be fixed to make it so
+ that they had a 1:1 correlation on every record for the admin interface
+ to be able to work correctly. There was a bad mismatch between the two
+ tables. We've added processes to help upgrade for those that have put a
+ lot of work into customizing their sites and don't want to lose any of
+ their work. First, back up the blocks table by doing a dump, or simply
+ back up individual blocks by doing the following:
1. Check to see that your block has an entry in both blocks and
- sectionblocks in the case the admin.pl didn't get it in
- there properly:
+ sectionblocks in the case the admin.pl didn't get it in there
+ properly:
select count(*) from blocks where bid = 'myownblock';
select count(*) from sectionblocks where bid = 'myownblock';
- 2. If there's only one of the bids in either record, you can insert
- an entry by hand for that record as shown here.
+ 2. If there's only one of the bids in either record, you can insert an
+ entry by hand for that record as shown here.
If it is blocks that it's missing from, for a static block:
@@ -577,53 +562,50 @@ INSTALLATION AND SETUP
insert into sectionblocks values ('','myownblock',0,'',0,NULL,NULL,0);
- If there are more than one record for a bid in
- sectionblocks, delete one of them (probably the one without
- a section).
+ If there are more than one record for a bid in sectionblocks, delete
+ one of them (probably the one without a section).
3. If you want to back up a specific block, try something like:
select * from blocks where bid = 'myownblock' into outfile '/tmp/blocks.myownblock.txt';
select * from sectionblocks where bid = 'myownblock' into outfile '/tmp/blocks.myownblock.txt';
4. Run the sql script blocks_fix.sql. This script makes sure every
- record has a match in each table, and also modifies the bid
- column in sectionblocks to be the same as it is in blocks,
- as well as some other fixes to some of the blocks:
+ record has a match in each table, and also modifies the bid column
+ in sectionblocks to be the same as it is in blocks, as well as some
+ other fixes to some of the blocks:
mysql -uslash -pslashpass < blocks_fix.sql
- Keep note of any errors you might see. On a new 0.9.3
- distribution, untouched, unmodified data, this worked
- without incident.
+ Keep note of any errors you might see. On a new 0.9.3 distribution,
+ untouched, unmodified data, this worked without incident.
- 5. Run the sql script blocks_alter.sql. This script drops the
- existing primary key on sectionblocks, which is a
- combination of bid and section, and creates a new primary
- key on bid (which prevents duplicates of the same bid).
+ 5. Run the sql script blocks_alter.sql. This script drops the existing
+ primary key on sectionblocks, which is a combination of bid and
+ section, and creates a new primary key on bid (which prevents
+ duplicates of the same bid).
mysql -uslash -pslashpass < blocks_alter.sql
- If this gives you an error, it is most likely due to the
- fact that there are duplicate bids in sectionblocks.
- Identify those records and delete the extra one, then retry
- this script. All block ids (bid) must be unique.
+ If this gives you an error, it is most likely due to the fact that
+ there are duplicate bids in sectionblocks. Identify those records
+ and delete the extra one, then retry this script. All block ids
+ (bid) must be unique.
- 6. If you deleted any of the blocks that you backed up as show in
- step 3, you can restore those blocks this way:
+ 6. If you deleted any of the blocks that you backed up as show in step
+ 3, you can restore those blocks this way:
load data infile '/tmp/blocks.myownblock.txt' INTO TABLE blocks;
load data infile '/tmp/sectionblocks.myownblock.txt' INTO TABLE sectionblocks;
Upgrade 0.9.4 -> 0.9.5
- Just run the scripts in the sql/updates/0.9.5/ directory. The
- scripts blocks_backup.sql and fix_matchname.pl will update the
- data and structure of the database, and everyone should run
- them. The script blocks_update.sql should only be run by people
- who want some of their blocks data changed. Examine the script
- and CHANGES and determine if you want to run the script, or
- whatever.
+ Just run the scripts in the sql/updates/0.9.5/ directory. The scripts
+ blocks_backup.sql and fix_matchname.pl will update the data and
+ structure of the database, and everyone should run them. The script
+ blocks_update.sql should only be run by people who want some of their
+ blocks data changed. Examine the script and CHANGES and determine if you
+ want to run the script, or whatever.
Other Upgrades
@@ -638,5 +620,5 @@ INSTALLATION AND SETUP
1.0.5 -> 1.0.6 sql/updates/1.0.6/
AUTHOR
- Patrick Galbraith and Chris Nandor. Last Modified July 10, 2000.
+ Patrick Galbraith and Chris Nandor. Last Modified August 18, 2000.
View
658 docs/INSTALL.html
@@ -1,10 +1,11 @@
-<HTML>
-<HEAD>
-<TITLE>INSTALL - Slash Installation</TITLE>
-<LINK REV="made" HREF="mailto:patrick.galbraith@andover.net">
-</HEAD>
+ <HTML>
+ <HEAD>
+ <TITLE>INSTALL - Slash Installation
-<BODY>
+</TITLE>
+ </HEAD>
+
+ <BODY>
<!-- INDEX BEGIN -->
@@ -26,9 +27,9 @@
<LI><A HREF="#Running_Slash_on_Multiple_Server">Running Slash on Multiple Servers</A>
<LI><A HREF="#Database_Upgrades_From_Previous_">Database Upgrades From Previous Versions</A>
- <LI><A HREF="#Upgrade_0_9_2_0_9_3">Upgrade 0.9.2 -&gt; 0.9.3</A>
- <LI><A HREF="#Upgrade_0_9_3_0_9_4">Upgrade 0.9.3 -&gt; 0.9.4</A>
- <LI><A HREF="#Upgrade_0_9_4_0_9_5">Upgrade 0.9.4 -&gt; 0.9.5</A>
+ <LI><A HREF="#Upgrade_0_9_2_0_9_3">Upgrade 0.9.2 -> 0.9.3</A>
+ <LI><A HREF="#Upgrade_0_9_3_0_9_4">Upgrade 0.9.3 -> 0.9.4</A>
+ <LI><A HREF="#Upgrade_0_9_4_0_9_5">Upgrade 0.9.4 -> 0.9.5</A>
<LI><A HREF="#Other_Upgrades">Other Upgrades</A>
</UL>
@@ -38,162 +39,287 @@
<HR>
<P>
-<H1><A NAME="NAME">NAME</A></H1>
-<P>
+<H1><A NAME="NAME">NAME
+
+</A></H1>
INSTALL - Slash Installation
+
<P>
-<HR>
-<H1><A NAME="SOFTWARE_REQUIREMENTS">SOFTWARE REQUIREMENTS</A></H1>
+
<P>
+<HR>
+<H1><A NAME="SOFTWARE_REQUIREMENTS">SOFTWARE REQUIREMENTS
+
+</A></H1>
Whatever versions listed are the versions recommended. You may try a newer
version, and it should work, but it is not guaranteed (of course, nothing
in here is guaranteed anyway :). Don't try to use anything older than these
listed versions.
+
<P>
+
This document is still evolving, so there may be unintended omissions or
various steps may be over- or under-explained. It's assumed that you have
some working experience with some form of Unix, Apache, SQL database, and
perl.
+
<P>
+
<STRONG>Note</STRONG>: This page looks best in a browser (the HTML version of it is in the <EM>docs/</EM> directory). You can print it out, but some of the ASCII illustrations may
get munged in printing; however, the directions will certainly appear good
enough to read.
+
<P>
+
See the Slash web site, with support, docs, latest downloads, and more, at
<A HREF="http://slashcode.com/.">http://slashcode.com/.</A>
+
+<P>
+
<P>
<HR>
-<H2><A NAME="Database_webserver_etc_">Database, webserver, etc.</A></H2>
+<H2><A NAME="Database_webserver_etc_">Database, webserver, etc.
+
+</A></H2>
<DL>
-<DT><STRONG><A NAME="item_MySQL">MySQL</A></STRONG><DD>
-<P>
+<DT><STRONG><A NAME="item_MySQL">MySQL
+
+</A></STRONG><DD>
<PRE> version 3.22.25
<A HREF="http://www.mysql.com/">http://www.mysql.com/</A>
</PRE>
-<DT><STRONG><A NAME="item_mod_perl">mod_perl</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_mod_perl">mod_perl
+
+</A></STRONG><DD>
<PRE> version 1.21
<A HREF="http://perl.apache.org/">http://perl.apache.org/</A>
<A HREF="http://www.perl.com/CPAN/">http://www.perl.com/CPAN/</A>
</PRE>
-<DT><STRONG><A NAME="item_perl">perl</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_perl">perl
+
+</A></STRONG><DD>
<PRE> version 5.005_03 (non-threaded)
<A HREF="http://www.perl.com/CPAN/">http://www.perl.com/CPAN/</A>
</PRE>
-<DT><STRONG><A NAME="item_Apache">Apache</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_Apache">Apache
+
+</A></STRONG><DD>
<PRE> version 1.3.6
<A HREF="http://apache.org/">http://apache.org/</A>
</PRE>
-<DT><STRONG><A NAME="item_Sendmail">Sendmail or other mail transport daemon</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_Sendmail">Sendmail or other mail transport daemon
+
+</A></STRONG><DD>
Refer to your OS distribution.
-<DT><STRONG><A NAME="item_NFS">NFS server (for nfs configuration)</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_NFS">NFS server (for nfs configuration)
+
+</A></STRONG><DD>
Refer to your OS distribution.
+
+<P>
+
</DL>
<P>
<HR>
-<H2><A NAME="Perl_modules">Perl modules</A></H2>
+<H2><A NAME="Perl_modules">Perl modules
+
+</A></H2>
<DL>
-<DT><STRONG><A NAME="item_DBI">DBI-1.14</A></STRONG><DD>
-<P>
+<DT><STRONG><A NAME="item_DBI">DBI-1.14
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=DBI">http://search.cpan.org/search?dist=DBI</A>
</PRE>
-<DT><STRONG><A NAME="item_Data">Data-ShowTable-3.3</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_Data">Data-ShowTable-3.3
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=Data-ShowTable">http://search.cpan.org/search?dist=Data-ShowTable</A>
</PRE>
-<DT><STRONG><A NAME="item_TimeDate">TimeDate-1.08</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_TimeDate">TimeDate-1.08
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=TimeDate">http://search.cpan.org/search?dist=TimeDate</A>
</PRE>
-<DT><STRONG><A NAME="item_Msql">Msql-Mysql-modules-1.2209</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_Msql">Msql-Mysql-modules-1.2209
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=Msql-Mysql-modules">http://search.cpan.org/search?dist=Msql-Mysql-modules</A>
</PRE>
-<DT><STRONG><A NAME="item_ApacheDBI">ApacheDBI-0.87</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_ApacheDBI">ApacheDBI-0.87
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=ApacheDBI">http://search.cpan.org/search?dist=ApacheDBI</A>
</PRE>
-<DT><STRONG><A NAME="item_Apache">Apache-DBILogConfig-0.01</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_Apache">Apache-DBILogConfig-0.01
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=Apache-DBILogConfig">http://search.cpan.org/search?dist=Apache-DBILogConfig</A>
</PRE>
-<DT><STRONG><A NAME="item_Apache">Apache-DBILogger-0.93</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_Apache">Apache-DBILogger-0.93
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=Apache-DBILogger">http://search.cpan.org/search?dist=Apache-DBILogger</A>
</PRE>
-<DT><STRONG><A NAME="item_libnet">libnet-1.0607</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_libnet">libnet-1.0607
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=libnet">http://search.cpan.org/search?dist=libnet</A>
</PRE>
-<DT><STRONG><A NAME="item_HTML">HTML-Parser-2.25</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_HTML">HTML-Parser-2.25
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=HTML-Parser">http://search.cpan.org/search?dist=HTML-Parser</A>
</PRE>
-<DT><STRONG><A NAME="item_XML">XML-Parser-2.27</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_XML">XML-Parser-2.27
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=XML-Parser">http://search.cpan.org/search?dist=XML-Parser</A>
</PRE>
-<DT><STRONG><A NAME="item_MIME">MIME-Base64-2.11</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_MIME">MIME-Base64-2.11
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=MIME-Base64">http://search.cpan.org/search?dist=MIME-Base64</A>
</PRE>
-<DT><STRONG><A NAME="item_Digest">Digest-MD5-2.09</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_Digest">Digest-MD5-2.09
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=Digest-MD5">http://search.cpan.org/search?dist=Digest-MD5</A>
</PRE>
-<DT><STRONG><A NAME="item_URI">URI-1.04</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_URI">URI-1.04
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=URI">http://search.cpan.org/search?dist=URI</A>
</PRE>
-<DT><STRONG><A NAME="item_libwww">libwww-perl-5.47</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_libwww">libwww-perl-5.47
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=libwww-perl">http://search.cpan.org/search?dist=libwww-perl</A>
</PRE>
-<DT><STRONG><A NAME="item_DateManip">DateManip-5.35</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_DateManip">DateManip-5.35
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=DateManip">http://search.cpan.org/search?dist=DateManip</A>
</PRE>
-<DT><STRONG><A NAME="item_File">File-Spec-0.8</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_File">File-Spec-0.8
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=File-Spec-0.8">http://search.cpan.org/search?dist=File-Spec-0.8</A>
</PRE>
-<DT><STRONG><A NAME="item_Mail">Mail-Sendmail-0.77</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_Mail">Mail-Sendmail-0.77
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=Mail-Sendmail">http://search.cpan.org/search?dist=Mail-Sendmail</A>
</PRE>
-<DT><STRONG><A NAME="item_Compress">Compress-Zlib-1.08</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_Compress">Compress-Zlib-1.08
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=Compress-Zlib">http://search.cpan.org/search?dist=Compress-Zlib</A>
</PRE>
-<DT><STRONG><A NAME="item_Image">Image-Size-2.901</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_Image">Image-Size-2.901
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=Image-Size">http://search.cpan.org/search?dist=Image-Size</A>
</PRE>
-<DT><STRONG><A NAME="item_Storable">Storable-0.6.9</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_Storable">Storable-0.6.9
+
+</A></STRONG><DD>
<PRE> <A HREF="http://search.cpan.org/search?dist=Storable">http://search.cpan.org/search?dist=Storable</A>
</PRE>
+
<P>
+
<STRONG>Note</STRONG>: IPC::Shareable is only needed for the troll speed limit feature, which is
off by default (settable via the <CODE>use_ipc</CODE>
variable in <EM>slashdotrc.pl</EM>). Also, on all of our test systems, some of the tests in <CODE>make test</CODE> failed, but the module seems to work fine for our purposes regardless.
+
+<P>
+
</DL>
<P>
<HR>
-<H2><A NAME="Slash_Code">Slash Code</A></H2>
-<P>
+<H2><A NAME="Slash_Code">Slash Code
+
+</A></H2>
<PRE> Bundle/Slash.pm
Slash.pm
slashd
@@ -218,32 +344,50 @@
public_html/404.pl
public_html/imagesize.pm
</PRE>
+
<P>
+
You can get the Slash code in these locations:
-<DL>
-<DT><STRONG><A NAME="item_FTP">FTP</A></STRONG><DD>
+
<P>
+
+<DL>
+<DT><STRONG><A NAME="item_FTP">FTP
+
+</A></STRONG><DD>
<PRE> <A HREF="ftp://ftp.slashdot.org//pub/slash/">ftp://ftp.slashdot.org//pub/slash/</A>
</PRE>
-<DT><STRONG><A NAME="item_HTTP">HTTP, CVS</A></STRONG><DD>
+
<P>
-<PRE> <A HREF="http://sourceforge.net/project/?group_id=4421">http://sourceforge.net/project/?group_id=4421</A>
+
+<DT><STRONG><A NAME="item_HTTP">HTTP, CVS
+
+</A></STRONG><DD>
+<PRE> <A HREF="http://sourceforge.net/projects/slashcode/">http://sourceforge.net/projects/slashcode/</A>
</PRE>
+
<P>
+
The CVS repository is tagged with versions, so to get release 1.0.3, get
tag ``v1_0_3_0''. The last number will be incremented during development
(``v1_0_3_1'', ``v1_0_3_2'', etc.) until the next release. Sometimes, a
release may be tagged with a last number of something other than ``0''.
Exactly what tag a given release is based on is in <EM>README</EM>.
+
<P>
+
There is a separate development branch of Slash. Its branch is ``bender''.
Primarily small changes and bugfixes will go into the MAIN branch, with
major changes going into the development branch.
-<H2><A NAME="Hardware_Requirements">Hardware Requirements</A></H2>
+
<P>
+
+<H2><A NAME="Hardware_Requirements">Hardware Requirements
+
+</A></H2>
None. Whatever it takes to run the above software and handle the traffic
you may be getting. You could probably do it on a 486 with 32MB and 250MB
hard drive space, but we wouldn't recommend it. Minimum setup would
@@ -252,25 +396,37 @@
the httpd machine might be different from the mysql machine, you can keep
the number of httpds real low, etc. Do what works.
+
+<P>
+
</DL>
<P>
<HR>
-<H1><A NAME="PRE_INSTALLATION_THOUGHTS">PRE-INSTALLATION THOUGHTS</A></H1>
-<P>
+<H1><A NAME="PRE_INSTALLATION_THOUGHTS">PRE-INSTALLATION THOUGHTS
+
+</A></H1>
The are several configurations recommended, depending on scale.
-<DL>
-<DT><STRONG><A NAME="item_Single">Single server (all on one box)</A></STRONG><DD>
+
<P>
+
+<DL>
+<DT><STRONG><A NAME="item_Single">Single server (all on one box)
+
+</A></STRONG><DD>
<PRE> Server 1
+-------------------+
| slash db |
| apache/mod-perl |
| slash code |
+-------------------+
</PRE>
-<DT><STRONG><A NAME="item_db">db and code on one server, and external webserver</A></STRONG><DD>
+
<P>
+
+<DT><STRONG><A NAME="item_db">db and code on one server, and external webserver
+
+</A></STRONG><DD>
<PRE> server 1 server 2 .. n
+-----------------+ +-----------+
| slash db | | |
@@ -279,9 +435,13 @@
+-----------------+ +-----------+
|_________________ DBI __________________|
</PRE>
-<DT><STRONG>db separate on one server, slashdot code and apache on another,
-exported to web servers</STRONG><DD>
+
<P>
+
+<DT><STRONG>db separate on one server, slashdot code and apache on another,
+exported to web servers
+
+</A></STRONG><DD>
<PRE> server 1 server2 server 3 .. n
+-----------+ +-----------------+ +-----------+
| slash db | | | | |
@@ -290,98 +450,168 @@
+-----------+ +-----------------+ +-----------+
|______ DBI _________|_______________________________________|
</PRE>
-</DL>
+
<P>
+
+</DL>
There are many ways this can be done. The key is to think about how the
site will be put together before starting the installation.
+
<P>
-<HR>
-<H1><A NAME="INSTALLATION_AND_SETUP">INSTALLATION AND SETUP</A></H1>
+
+<STRONG>Note</STRONG>: If your site is going to be very busy, you may wish to consider having a
+separate images server. For instance, Slashdot has images.slashdot.org,
+which handles all the images. Just set the imagedir variable in
+slashdotrc.pl appropriately, like
+<CODE>http://images.example.com</CODE>.
+
+
+<P>
+
<P>
+<HR>
+<H1><A NAME="INSTALLATION_AND_SETUP">INSTALLATION AND SETUP
+
+</A></H1>
Perform these tasks as root.
-<OL>
-<LI>
+
<P>
+
+<OL>
+<LI><STRONG><A NAME="item_">
+
+</A></STRONG>
Create the group ``slash''.
-<LI>
+
<P>
+
+<LI><STRONG><A NAME="item_">
+
+</A></STRONG>
Create the user ``slash'' with slashdot gid. <STRONG>Note</STRONG>: if using multiple webservers, and using NFS, make sure that this
user:group is created with the same UID and GID on all involved systems.
+
<P>
+
<STRONG>Note</STRONG>: For security's sake, you may wish to add the web server user (e.g.,
``nobody'') to the ``slash'' group, and then set your permissions so that
all the files are writable by user and group and not world, to keep other
users on the system from modifying the files.
-<LI>
+
<P>
+
+<LI><STRONG><A NAME="item_">
+
+</A></STRONG>
Unpack the slash code tarball in the slash user's home directory. This will
place everything where it should belong.
-<LI>
+
<P>
+
+<LI><STRONG><A NAME="item_">
+
+</A></STRONG>
chown everything in this tree as slash:slash (i.e., <CODE>chown -R
slash:slash /home/slash</CODE>). chmod the main directory to be readable and executable by all (i.e., <CODE>chmod a+rx /home/slash</CODE>).
-<LI>
+
<P>
+
+<LI><STRONG><A NAME="item_">
+
+</A></STRONG>
Create the directory apache will be installed into (i.e.,
<EM>/usr/local/apache</EM>). The default install uses a separate directory for apache logs, which
should also be created as
<EM>/usr/local/apache_logs</EM>. Alternatively, change <EM>httpd.conf</EM> to point to a different location. See the section below on installing perl
modules for more information about the default installation.
+
<P>
+
Multiple slash instances can run under virtual hosts on the same httpd. See <EM>vhost.httpd.conf</EM> for an example of how this works. Pay special attention to the
configuration section under the text ``# MAIN SLASHCODE SPECIFIC STUFF
STARTS HERE #''.
+
<P>
+
For virtual hosts, you should create a separate account and Slash
installation for each virtual host, so repeat the instructions relating to
creation of accounts for each virtual host.
-<LI>
+
<P>
+
+<LI><STRONG><A NAME="item_">
+
+</A></STRONG>
Install MySQL. Please refer to MySQL documentation for compilation and/or
installation notes for any questions with this. Find the script that runs
mysql (probably <EM>safe_mysqld</EM>) and add this to the beginning of it:
+
<P>
+
<PRE> TZ=GMT
export TZ
</PRE>
-<LI>
+
<P>
+
+<STRONG>Note</STRONG>: For slashd (see <EM>utils/slashd</EM>, which starts slashd), mod_perl (see <EM>httpd/httpd.conf</EM>), and MySQL, we set all processes to run in GMT. Then it is easy to
+convert dates to whatever the user's local time is. If you have date
+problems, check that all of these are properly set to run in GMT.
+
+
+<P>
+
+<LI><STRONG><A NAME="item_">
+
+</A></STRONG>
Create the slash mysql user and database.
+
<P>
+
<PRE> mysql mysql &lt; sql/slashdb_create.sql
</PRE>
+
<P>
+
This will create both the slash db user and slash db. If you are using
virtual hosts, or want to otherwise change the db user or db name, edit
this script before running it to use the proper db user and db name. This
script creates the user slash with the password ``changethis''. Immediately
change the password for slash in mysql:
+
<P>
+
<PRE> mysql mysql
update user set Password = password('newpassword') where User = 'slash';
flush privileges;
</PRE>
+
<P>
+
<STRONG>Note</STRONG>: The slash db user is created with several privileges such as drop and
create table, so it's up to you to modify those privileges to something
more restrictive if you feel uncomfortable with these settings. We'd
suggest you don't let other users on the database have access to this user.
-<LI>
+
<P>
+
+<LI><STRONG><A NAME="item_">
+
+</A></STRONG>
Run the slash schema creation script and load sample slash db data dump.
This dump has minimal data for the system to work. This data is needed in
the database for the site to work at all. It has a very plain, basic
@@ -391,176 +621,262 @@
refer to the database schema and database schema documentation to
understand how the database schema works.
+
<P>
+
Replace <CODE>HOSTNAME</CODE> (or <CODE>HOSTNAME:PORT</CODE>) below with the server's hostname (this is the name you will call the
server in the browser, used for default links in the HTML).
+
<P>
+
<PRE> cd sql
mysql -uslash -pnewpassword slash &lt; slashschema_create.sql
./predata_dump.pl HOSTNAME
mysql -uslash -pnewpassword slash &lt; slashdata_dump.sql
mysql -uslash -pnewpassword slash &lt; slashdata_prep.sql
</PRE>
-<LI>
+
<P>
+
+<LI><STRONG><A NAME="item_">
+
+</A></STRONG>
Install perl.
+
<P>
+
On Slashdot and Slashcode, we have all of the modules installed in the
Apache directory, so that we can NFS mount that one directory on several
machines, and they all have the same modules and configuration. If you want
to do that, when the configuration process asks where you want to put perl
modules (both system and local) have it put them in the directory tree
you'll install apache in (i.e., <EM>/usr/local/apache/lib</EM>). Otherwise, the default installation directories are usually fine.
-<LI>
+
<P>
+
+<LI><STRONG><A NAME="item_">
+
+</A<