PageRenderTime 95ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/docs/INSTALL.pod

https://github.com/scc/slash
Perl | 1774 lines | 1425 code | 331 blank | 18 comment | 94 complexity | 1bf6a9413075236fa35bcda4fdcaacb2 MD5 | raw file
Possible License(s): GPL-2.0

Large files files are truncated, but you can click here to view the full file

  1. #!perl -w
  2. # To check its syntax, run this document through perl.
  3. # To make it into plaintext at the standard location:
  4. # perldoc -tF docs/INSTALL.pod > INSTALL
  5. use Pod::Checker;
  6. podchecker(\*DATA);
  7. __END__
  8. =head1 NAME
  9. INSTALL - Slash Installation
  10. =head1 SYNOPSIS
  11. This document describes how to install Slash, versions 2.2 and
  12. pre-releases of 2.3 and 2.5. For instructions on installation or upgrade
  13. of previous versions of Slash, see the INSTALL document included with
  14. those distributions.
  15. These instructions have only been tested on Linux. Installation under
  16. BSD and other Unix OSes is doable, with minor glitches (see L<"BSD
  17. Systems"> below). Windows is not supported.
  18. Slash can always be downloaded from SourceForge.net, from the FTP site,
  19. and via CVS.
  20. http://sf.net/projects/slashcode/
  21. ftp://ftp.slashcode.com//pub/slashcode/
  22. http://cvs.slashcode.com/
  23. See the SourceForge.net page for patches and bug reports.
  24. =head2 Which version should I use?
  25. First of all: if you are using Slash 2.2.5 or before, including all 2.1.x,
  26. 2.0.x, and 1.x versions, you should upgrade to the latest version in
  27. the 2.2 tree, 2.2.6, as soon as possible. There are security issues
  28. with previous versions. You should not install previous versions.
  29. As of this writing (August 2006), our last official release (2.2.6) was
  30. long ago, and many features have been added since. All development has
  31. been in CVS. If you are installing a new Slash site, you don't want to
  32. use 2.2.6. And while you probably don't want to use the very latest
  33. CVS, you almost certainly do want to use the latest "R_" tag available
  34. in CVS. See L<"VERSIONS">, "CVS tags", below, for advice on choosing
  35. and maintaining a CVS installation.
  36. =head2 Read, then install
  37. We know you want to get right into the installation, but you must first
  38. read, carefully, these sections of this INSTALL file:
  39. =over 4
  40. =item *
  41. REQUIREMENTS, to make sure you have the right hardware and software
  42. =item *
  43. "CVS tags," in VERSIONS, to make sure you have the right version
  44. of this code
  45. =item *
  46. SECURITY NOTES, to keep your system safe
  47. =item *
  48. INSTALLATION (the longest section), to make sure you will be able to
  49. finish what you start
  50. =back
  51. And it's a good idea to at least skim:
  52. =over 4
  53. =item *
  54. INSTALLATION OPTIONS
  55. =item *
  56. TROUBLESHOOTING
  57. =back
  58. Read those sections before you begin actually performing the steps in
  59. L<"INSTALLATION">.
  60. This document also contains information on upgrading a Slash site
  61. (which can be tricky), and uninstalling (which is easy).
  62. =head2 Updates to this file
  63. This INSTALL file you are currently reading may not be the latest.
  64. Again, you probably don't want to upgrade your whole Slash checkout to
  65. the very latest CVS. But if you encounter problems, it might not be
  66. a bad idea to look over the very latest version of this INSTALL file,
  67. which you can find at:
  68. L<http:E<sol>E<sol>slashcode.cvs.sourceforge.netE<sol>*checkout*E<sol>slashcodeE<sol>slashE<sol>INSTALL>
  69. The version of this file that you are currently reading is:
  70. $Id$
  71. If there are more recent versions of this file, you can find a list of
  72. those changes at:
  73. L<http:E<sol>E<sol>slashcode.cvs.sourceforge.netE<sol>slashcodeE<sol>slashE<sol>INSTALL>
  74. =head1 INSTALLATION
  75. =head2 Installation Note
  76. All of the installation steps below should be executed as root. If this
  77. is a problem, then Slash is probably not for you (see "Non-Root" below,
  78. under "INSTALLATION OPTIONS"). Type carefully. Now's a good time to
  79. back up anything important.
  80. =head2 Installation Procedure
  81. There are eight steps to installation. Anything already done can be
  82. skipped -- but only if you have the correct version and configuration,
  83. particularly with Apache/mod_perl.
  84. =over 4
  85. =item 1.
  86. B<Install MySQL.>
  87. If it is already installed, doublecheck that its version is at least the
  88. minimum required (see L<"REQUIREMENTS">). If you have questions about
  89. the installation process, please refer to MySQL documentation.
  90. Slash requires that your MySQL server run in the GMT timezome. Find your
  91. global my.cnf file (probably C</etc/my.cnf> or C</etc/mysql/my.cnf>),
  92. locate the C<[mysqld_safe]> (or C<[safe_mysqld]>) group, and add this line
  93. to it:
  94. timezone = GMT
  95. Start MySQL (it must be running for the installation of Slash and some
  96. perl modules). Or, if it is already running, restart MySQL (if you have
  97. other services using MySQL, you should probably stop and start them --
  98. make sure they are timezone-agnostic!).
  99. Create a database to be used by Slash. Our default name is 'slash':
  100. CREATE DATABASE slash;
  101. Create a username/password that can access that database, and ensure
  102. that user has at least privileges to select, insert, update, delete,
  103. lock, create, drop, index and alter. For example, if your whole site
  104. (slashd daemon and apache) will run on the same machine as your mysql
  105. server, and you wanted to use the mysql username 'slash', you might:
  106. GRANT SELECT, INSERT, UPDATE, DELETE, LOCK TABLES, CREATE, DROP,
  107. INDEX, ALTER ON slash.* TO 'slash'@'localhost'
  108. IDENTIFIED BY (quoted password);
  109. GRANT PROCESS ON *.* TO 'slash'@'localhost' IDENTIFIED BY
  110. (quoted password);
  111. In this case, 'slash' would also be the name of your MySQL user as
  112. described in L<"Types of Users"> below. You'll have to give your MySQL
  113. user to DBIx::Password when you install and configure it, so don't
  114. forget it.
  115. =item 2.
  116. B<Install perl.>
  117. Perl is likely already installed on your machine; doublecheck that its
  118. version is at least the minimum required (see L<"REQUIREMENTS">).
  119. Also, check the "Libraries" (or "Debian libraries") section under
  120. L<"REQUIREMENTS">, below. You may need to install dev packages for not
  121. only perl but mysql and expat as well and now's a good time to take care
  122. of that.
  123. =item 3.
  124. B<Install Apache and mod_perl.>
  125. B<You MUST install mod_perl and Apache as directed here>. OK, that is
  126. not strictly true, but unless you really know what you're doing,
  127. just assume it's true. If you already have mod_perl installed,
  128. it is probably not configured properly to work with Slash and
  129. you will have to rebuild it.
  130. If you are using the provided httpd.conf file from the slash
  131. distribution, and find that Apache is giving you errors, chances
  132. are mod_perl is not installed correctly, and you need to build
  133. it from scratch. Not following this direction is one of the most
  134. common reasons we see for a Slash install not working.
  135. Of course, if you have your own Apache modules or build options,
  136. you will need to modify the instructions here appropriately.
  137. First, untar apache and mod_perl. Then, go to the mod_perl directory,
  138. and have mod_perl build and install apache for you:
  139. perl Makefile.PL APACHE_SRC=../where_you_have_apache/src \
  140. DO_HTTPD=1 USE_APACI=1 PERL_MARK_WHERE=1 EVERYTHING=1 \
  141. APACHE_PREFIX=/where_apache_will_be_installed
  142. make
  143. make test
  144. make install
  145. B<NOTE>: You may be unsuccessful with C<make test> if the perl modules
  146. are not yet installed. However, some perl modules will not install
  147. without Apache and mod_perl installed. If you wish, skip C<make test>,
  148. run C<make install>, install the perl modules in step 4, and then come
  149. back and run C<make test> here again to make sure everything is OK.
  150. B<NOTE>: If you know what you're doing, Slash will work with a DSO
  151. Apache. Be sure you're on the latest versions of Apache and
  152. mod_perl and remember PERL_MARK_WHERE=1 and EVERYTHING=1.
  153. B<NOTE>: See also "Other requirements" under L<"REQUIREMENTS">.
  154. B<Ubuntu NOTE>: In mid-2006 Ubuntu 6.x switched sh to point to dash
  155. instead of bash, which apparently breaks the above step (because dash's
  156. 'echo -E' isn't compliant enough for apache's 'configure'). We're looking
  157. into it, but for now apparently (temporarily) linking /bin/sh to /bin/bash
  158. during this step is a workaround.
  159. L<https:E<sol>E<sol>launchpad.netE<sol>ubuntuE<sol>+spec/dash-as-bin-sh>
  160. (Update: this appears to no longer be a problem, but if you encounter
  161. problems on Ubuntu, check where your /bin/sh points.)
  162. =item 4.
  163. B<Install the perl modules.>
  164. Slash is powerful and complex, and, rather than reinvent the wheel, it
  165. often relies on CPAN modules. Open-source code reuse has many advantages.
  166. One disadvantage is that installing all those modules can be tricky,
  167. as you may be about to find out.
  168. You could install each module in F<Bundle/Slash.pm> by hand, but this
  169. would be time-consuming. Instead, you'll want to install the bundle
  170. C<Bundle::Slash> using CPAN.
  171. =over 4
  172. B<IMPORTANT NOTES (read through these first! really!)>:
  173. =over 4
  174. =item B<Overall comment about CPAN module failure>
  175. It is possible that upon typing "install Bundle::Slash", you will have
  176. one or more modules fail to install on the first try. The rest of the
  177. modules will be successfully installed but some won't. In that case
  178. you will want to fix the problems and retype "install Bundle::Slash"
  179. to make sure everything proceeds smoothly. Once that command gives you
  180. just a long list of "Foo::Bar is up to date," you are done. Until that
  181. point, you are not done; you must resolve the errors.
  182. =item B<Old Version of Bundle::Slash>
  183. If you have previously installed Bundle::Slash, you will want
  184. to install it again, but you will need to delete the existing
  185. version. Go to your F<.cpan/Bundle> directory (usually
  186. F<~/.cpan/Bundle/>) and remove F<Slash.pm>.
  187. =item B<Overactive CPAN>
  188. With some versions of the CPAN module, the module will try to
  189. download and install the latest version of perl. Watch what
  190. the module is doing; if it begins to download an entire perl
  191. distribution, interrupt it (hit ctrl-C) until it stops, then try
  192. again with the CPAN module. This should not be an issue in the latest
  193. version of Bundle::Slash.
  194. =item B<Uninstalling Old Modules>
  195. Sometimes, you will be installing a newer version of a module that exists
  196. elsewhere on the system. You probably want to tell the CPAN module to
  197. automatically remove older files. To do that from the CPAN shell, type:
  198. cpan> o conf make_install_arg UNINST=1
  199. And if you want that to be CPAN's default from now on, add:
  200. cpan> o conf commit
  201. =item B<Automatically Installing Dependencies>
  202. Some of the modules in Bundle::Slash require other modules. We have
  203. not put some of those other modules in Bundle::Slash because, if those
  204. requirements change in the future, we don't want to make future Slash
  205. sites install more than they have to.
  206. If you see this:
  207. ---- Unsatisfied dependencies detected during [FOO/Bar-1.23.tar.gz] -----
  208. Foobar::Baz
  209. Shall I follow them and prepend them to the queue
  210. of modules we are processing right now? [yes]
  211. That's normal; just hit return.
  212. If it annoys you to have to do this, edit the C<prerequisites_policy>
  213. field of your CPAN/Config.pm file. Or, just do this to change it to
  214. automatically follow dependencies and commit the change:
  215. cpan> o conf prerequisites_policy follow
  216. cpan> o conf commit
  217. =item B<Data::JavaScript::Anon>
  218. There are bugs in versions earlier than 1.00 that break our JS. Unfortunately,
  219. CPAN seems to prefer version 0.9 even though 1.00 is available. You may
  220. have to install a better version in CPAN by hand:
  221. cpan> install A/AD/ADAMK/Data-JavaScript-Anon-1.00.tar.gz
  222. =item B<Additional Libraries>
  223. You must have certain libraries existing on your system before building,
  224. for Compress::Zlib, XML::Parser, DBI and DBD::mysql. See "Libraries"
  225. under L<"REQUIREMENTS">, below.
  226. =item B<BSD Systems>
  227. If running BSD, also install the BSD::Resource module. We have heard
  228. reports of minor problems running Slash on BSD, but you are welcome
  229. to try. See SLASH_PREFIX below, and after the install, doublecheck
  230. the init scripts. If you have to make changes to get it to work, send
  231. us patches or detailed bug reports please: we want to support the BSDs.
  232. =item B<DBIx::Password>
  233. When installing DBIx::Password, you will be asked for various
  234. information, the same information used to create the database
  235. and database user in Step 1. First, you'll be asked for a
  236. B<virtual user> name, which will be the identifier for all of
  237. this data. You can just use the name of your site,
  238. or any other alphanumeric string. This string will be your
  239. "DBIx::Password virtual user" as described in L<"Types of Users"> below --
  240. you will use this in other places, so don't forget it.
  241. Then you'll be asked for your DBI driver (mysql), the name of the database
  242. you CREATEd in Step 1, its machine (maybe 'localhost' or an IP number) and
  243. port, and then the MySQL user name you GRANTed privileges to in Step 1
  244. and its password.
  245. Some perl modules you can hit return for defaults and they'll work.
  246. This isn't one of them. If you don't understand what you're doing here,
  247. don't fake it -- that's a common reason for Slash installations failing.
  248. =item B<Documentation>
  249. To read the README for any module, before or after installing:
  250. cpan> readme MODULE
  251. To read the documentation of any of the modules, once they have been
  252. installed, type C<perldoc MODULE> at the command line.
  253. See L<perlmodinstall> for more information on installing perl modules.
  254. =back
  255. =back
  256. Now that you have read the above notes, you're ready to install the
  257. perl modules.
  258. To use the CPAN module, invoke the CPAN shell:
  259. perl -MCPAN -e shell
  260. (Or, you may have the program "cpan" already available, which
  261. does the same thing.)
  262. If this is the first time you've invoked CPAN, you will be asked to
  263. configure it. Note that CPAN works best if most or all of these helper
  264. programs are installed: bzip2 gzip tar unzip make curl lynx wget ncftpget
  265. ncftp ftp gpg. If your OS installation is very anemic and you lack most
  266. of them, you might ^C its questions, install the missing programs, and
  267. then re-invoke the CPAN shell to restart configuration.
  268. It's probably a good idea here to install the latest version of the CPAN
  269. module itself, along with all the helper modules it requires. This is
  270. an optional step but may make the rest of module installation easier:
  271. cpan> install Bundle::CPAN
  272. If you chose to do that, then afterwards, C<exit> the CPAN and reinvoke it.
  273. (The plain shell command "cpan" will probably now work.)
  274. Next, install some important networking modules. This is also optional
  275. but, if there are problems with these modules, you'll want to resolve
  276. them before moving on to the rest of the installation:
  277. cpan> install Bundle::LWP
  278. Make sure all those modules are installed and up to date before
  279. proceeding. Note that Net::Cmd has a history of being a little broken
  280. in its tests; if it fails on tests 8 and 9 of t/require, then it's OK;
  281. just do C<force install Net::Cmd> and repeat C<install Bundle::LWP>.
  282. On Mac OS X and possibly other operating systems, if LWP's live/https
  283. tests fail, C<install Net::SSL> manually and retry.
  284. Assuming you chose to install the LWP, then after it's been configured
  285. successfully, again, C<exit> the CPAN and reinvoke it.
  286. Finally, you must install Bundle::Slash:
  287. cpan> install Bundle::Slash
  288. This will be a long process. Several modules will ask to be configured
  289. during this process. Here are some tips:
  290. =over 4
  291. =item B<DBI>
  292. Don't worry about the threading warning. Slash doesn't use threads.
  293. =item B<DBIx::Password>
  294. See "DBIx::Password" under IMPORTANT NOTES above.
  295. =item B<Apache::Test> and B<Apache::Cookie>
  296. You will need C<httpd> and C<apxs> in your $PATH, and even if they
  297. are there, you will probably see the lengthy error that starts "Apache
  298. cannot spawn child processes as 'root'". This is because, ironically,
  299. Apache::Test's self-tests are a colossal pain to actually run (I take
  300. the option to skip them). And personally I just C<force install
  301. Apache::Cookie> which is lame but solves the problem.
  302. =item B<Template>
  303. The Template Toolkit is a complex install. Try accepting all the
  304. defaults and see if it works. It has 90 test scripts with over 2000
  305. tests, and installation will be halted if just 1 of these tests fails.
  306. Do a C<look Template> and try your best to resolve the issues.
  307. The F<README> includes a URL to the mailing list archives, where you
  308. may find help. If you're getting 100 errors, you need to fix them,
  309. but if you're down to 1 or 2 you can't fix, you might just make a note
  310. of what the failures were and just C<force install Template>.
  311. =item B<Other failures>
  312. We can't predict whether bugs will appear in CPAN modules in future.
  313. Often the bugs are not in the software proper, but in its too-strictly
  314. coded test suites, which don't allow for changed but still-legitimate
  315. output. When this happens, the module itself is fine but it will not
  316. install unless forced. As of October 2006, we've noticed the following
  317. module throw spurious errors, requiring a C<force install>:
  318. HTML::CalendarMonth 1.18
  319. =back
  320. If you have problems, feel free to re-run C<install Bundle::Slash>. It
  321. will safely skip anything already installed.
  322. Again: once you are able to do C<install Bundle::Slash> and see nothing
  323. but a long list of modules that are "up to date," you are done. Until you
  324. see that, you are not done with this step!
  325. If you wish to take full advantage of Slash, there are some plugins
  326. not installed and vars not turned on by default, which provide
  327. additional features, improve performance, or help in testing, which
  328. require additional perl modules and sometimes non-perl libraries.
  329. See the listing at the bottom of Bundle/Slash.pm, and see also the
  330. tips in plugins/Admin/README, plugins/HumanConf/INSTALL-NOTES, and
  331. plugins/Stats/README.
  332. =item 5.
  333. B<Install Slash.>
  334. Unpack the distribution, go to the new directory that
  335. creates, and type:
  336. make
  337. make install
  338. B<Note>: you will want the GNU versions of fileutils and make. Older
  339. versions of install, and make and cp from other systems, might not work.
  340. There are a few options to C<make> and C<make install> you may
  341. want to change.
  342. option default purpose
  343. ==========================================================
  344. SLASH_PREFIX /usr/local/slash Location for
  345. installed files
  346. INIT /etc or /etc/rc.d Location for init
  347. scripts
  348. USER nobody User to own files
  349. GROUP nobody Group to own files
  350. CP cp Name of or path to
  351. alternate 'cp'
  352. INSTALL install Name of or path to
  353. alternate 'install'
  354. (USER and GROUP can also be changed later on a per-site basis,
  355. in step 6, while running C<install-slashsite>.)
  356. So, for example, you might type (although the default SLASH_PREFIX
  357. is I<strongly> recommended):
  358. make SLASH_PREFIX=/home/slash
  359. make install SLASH_PREFIX=/home/slash
  360. When done, a configuration file for Apache will be created at
  361. F<$SLASH_PREFIX/httpd/slash.conf>. You can put its contents into your
  362. httpd.conf, or you can just C<Include> it in your httpd.conf. You
  363. must do one or the other!
  364. B<WARNING!>
  365. Please be aware that if you include F<$SLASH_PREFIX/slash.conf>
  366. or F<$SLASH_PREFIX/sites/sitename/sitename.conf> more than once,
  367. or if this file shares contents with directives in httpd.conf,
  368. that your Slash site WILL break. The directives in
  369. F<$SLASH_PREFIX/slash.conf> should be run only ONCE in any any
  370. site context. Read through F<$SLASH_PREFIX/slash.conf> to make
  371. sure it all looks proper.
  372. =item 6.
  373. B<Install your Slash site.>
  374. At this point, you may want to (re)read L<"DBIx::Password"> in L<"SECURITY
  375. NOTES"> at the end of this section, and consider the option of installing
  376. your site with a custom unix system user and group for added security.
  377. You will be prompted for user and group shortly.
  378. Go to your installation directory (by default, F</usr/local/slash>)
  379. and execute (where C<VIRTUAL_USER> is the name of the virtual
  380. user given in the DBIx::Password distribution):
  381. bin/install-slashsite -u VIRTUAL_USER
  382. The program will prompt for answers to several configuration questions.
  383. Then it will install your site.
  384. Another configuration file will be created at
  385. F<$SLASH_PREFIX/$SITENAME/$SITENAME.conf>, which will be C<Include>'d
  386. in F<$SLASH_PREFIX/httpd/slash.conf>. You'll want to add an C<Include>
  387. for the latter in your Apache's F<httpd.conf> if you haven't done so on
  388. a previous site install.
  389. If you are using virtual hosting by hostname, you may also need to add
  390. a NameVirtualHost.
  391. If you don't have your Slash site in the root of the web server
  392. (e.g., L<http:E<sol>E<sol>www.example.comE<sol>mysiteE<sol>> instead
  393. of the more usual L<http:E<sol>E<sol>www.example.comE<sol>>), you
  394. will need to adjust the rootdir, rdfimage, imagedir, absolutedir,
  395. and cookiepath variables, and you also need to change your Apache
  396. config appropriately. If you're planning on having sections with
  397. more than two dots in the hostname (e.g. your mainpage will be at
  398. L<http:E<sol>E<sol>division.company.comE<sol>> with a section at
  399. L<http:E<sol>E<sol>newprojects.division.company.comE<sol>>) you will
  400. also want to set the cookiedomain var (e.g. to .division.company.com).
  401. These are all in the vars table of your database.
  402. B<NOTE>: Read the message printed at the end of running install_slashsite.
  403. Failure to pay attention here is another common reason we see for Slash
  404. installations not working.
  405. B<Ubuntu NOTE>: Reported after installing on Kubuntu 7.10, a Slash install's
  406. idea of run-levels was not sufficient to start slashd at boot. The following
  407. makes sure that all the right run-levels are covered, and that rebuilding
  408. Slash won't mistakenly double-start the daemon:
  409. sudo update-rc.d -f slash remove
  410. sudo update-rc.d slash defaults
  411. sudo mv /etc/rc3.d/S*slash /etc/rc3.d/S99slash
  412. sudo mv /etc/rc6.d/K*slash /etc/rc6.d/K99slash
  413. =item 7.
  414. B<Start it up.>
  415. After installation of the site is done, you'll need to start Apache.
  416. Stop it if necessary, then start it:
  417. apachectl stop
  418. apachectl start
  419. Use the apachectl script under the APACHE_PREFIX you specified in step 3.
  420. Don't try its "restart" or "graceful" options, you'll need to do a full
  421. stop and start.
  422. Then run slashd. This should be done via the init script:
  423. /etc/init.d/slash start
  424. slashd is the daemon that runs routine maintenance on Slash sites,
  425. including sending out daily mailings, cleaning up the database,
  426. and updating stories. The init script above will start up an
  427. individual slashd daemon process for each installed site (and while
  428. running, they will spawn child processes, some of which may run for a
  429. long time or until you stop slashd with "slash stop").
  430. Now's a good time to (re)read the L<"SECURITY NOTES"> section at the
  431. end of this file.
  432. =item 8.
  433. B<Stay in touch.>
  434. For as long as you are running a Slash site, you should stay on our
  435. "slashcode-announce" mailing list, to receive notification of security
  436. issues (and, rarely, other major news of interest to Slash admins).
  437. You can sign up at:
  438. https://lists.sourceforge.net/lists/listinfo/slashcode-announce
  439. You may wish to subscribe to "slashcode-general", for discussion of
  440. running Slash sites. This list probably averages 1-2 emails a day,
  441. mostly on administration issues, and bugs and features in Slash.
  442. https://lists.sourceforge.net/lists/listinfo/slashcode-general
  443. You may also wish to create a user on slashcode.com and subscribe to
  444. its daily newsletter. If/when news is posted to that site, you'll be
  445. in the loop.
  446. If you want to register your new site, feel free to do so at
  447. L<http:E<sol>E<sol>slashcode.comE<sol>sites.pl>.
  448. =back
  449. =head1 INSTALLATION OPTIONS
  450. =head2 Multiple Servers
  451. You can, of course, have a separate database server from your Slash
  452. server. Further, you can have multiple web servers for one Slash site,
  453. and a good thing too because web server RAM/CPU will probably be your
  454. first bottleneck as your site grows.
  455. Slashdot has one primary server with all of the code (Apache, perl,
  456. etc.) in /usr/local. That server runs slashd and NFS. Our slashd writes
  457. directly to its /usr/local/slash. Each web server mounts /usr/local
  458. read-only over NFS. (Yes, NFS has a reputation for being flaky, but
  459. we've never had a problem with it, which we attribute both to good
  460. sysadmins and to only exporting our filesystem read-only.)
  461. Some notes:
  462. =over 4
  463. =item *
  464. Make sure the MySQL server allows the user to log in from each web
  465. server, and the slashd server.
  466. =item *
  467. Make sure, if you use the same httpd tree on all machines, that
  468. the httpd.conf is listening to the proper IP addresses. This can be
  469. done by putting all of the IP addresses in the conf file, or by having
  470. a separate Listen file on each machine. Similarly, make sure that
  471. each web server's logfiles are unique to each machine, not written to the
  472. NFS volume.
  473. =back
  474. =head2 Virtual Hosts
  475. Slash has support for virtual hosts, so you can have multiple
  476. Slash sites on one machine. Simply execute step 6 in the install
  477. process for each Slash site (after adding a new virtual user to
  478. DBIx::Password for each).
  479. =head2 SSL
  480. In Slash, there are two variables for the root URL of the site.
  481. B<absolutedir> is the full URL, including protocol, while B<rootdir>
  482. is the URL without protocol:
  483. absolutedir http://slashcode.com
  484. rootdir //slashcode.com
  485. B<absolutedir> is used only for creating external links to the site
  486. (such as in RSS files). B<rootdir> is used for internal links; that
  487. way, you can use the same HTML pages for SSL and non-SSL. You don't
  488. have to do anything special to the code or preferences to allow it to
  489. work with SSL by itself, SSL and non-SSL together, or non-SSL by itself.
  490. =head2 Non-Root
  491. It is theoretically possible to install and run everything here without
  492. root.
  493. It is not easy. If you don't know your flavor of unix intimately, we
  494. don't recommend trying this.
  495. Describing the process for a non-root install would take up significant
  496. space and time, having to account for differences in various systems,
  497. and all the workarounds necessary for it to work. We don't support it,
  498. and we're not going to document it.
  499. If you must have a non-root install, consult the various documentation
  500. for Apache, MySQL, and perl about running and installing without root
  501. access. Then, for Slash, you need to set the make variables PREFIX,
  502. SLASH_PREFIX, and INIT appropriately for your needs.
  503. B<Note>: Slash sites (or, more accurately, Apache + mod_perl and MySQL) take
  504. up a lot of system resources. It is I<not advisable> for anyone to
  505. run Slash on any system, without the permission of the administrator
  506. of that system.
  507. =head2 Memcached
  508. Memcached is not required, but Slash includes optimizations that move
  509. load from your (expensive) MySQL server to a (very cheap) memcached
  510. server or servers. If you are concerned about performance, this is one
  511. of the first options to install. You can probably install it
  512. using your operating system's package management, and/or see
  513. L<http:E<sol>E<sol>www.danga.comE<sol>memcachedE<sol>>.
  514. A 64 or 128 MB memcached instance should be plenty for moderate-sized
  515. Slash sites. Just set the vars 'memcached', 'memcached_keyprefix', and
  516. 'memcached_servers', and restart apache and slashd. That's it.
  517. (As of August 2006, Slashdot uses a total of 2 GB of memcached, but
  518. that's in small allocations spread across many servers because we like
  519. redundancy. Last I checked the 2 GB wasn't even half full.)
  520. =head2 Separate Image Server
  521. Those of you with infinite RAM will have no problems hosting as many Slash
  522. sites as you want on a single box running just Apache. Those whose RAM
  523. is limited may be able to keep your MaxClients down to a reasonable level
  524. to avoid going into swap, and still not lock clients out of your website,
  525. by using a separate webserver process to deliver your images.
  526. This is possible with any website, of course, not just a Slash site, but
  527. because Slash's httpd clients all have mod_perl, a lot of perl modules,
  528. and a lot of templates all compiled into RAM, they are especially heavy.
  529. While serving an image may take only a few milliseconds, which would you
  530. rather have tied up on your computer for those milliseconds, 25 MB of RAM
  531. or 5 MB?
  532. Slashdot, and some other Slash sites we're hosting, are currently using
  533. boa 0.94.14rc17 (L<http:E<sol>E<sol>www.boa.orgE<sol>>) for images.
  534. Boa is fast and has a small footprint. It's easy to build
  535. (C<./configure && make>) but you have to install it yourself by
  536. copying the binary and mkdir'ing a little tree wherever you want it.
  537. We did roughly this. Your mileage may vary. This sets up an alternate
  538. server just for images on port 8080, and sets Slash's imagedir var to
  539. point to it. Your apache will still serve images at the old URLs if
  540. anyone requests them, but nobody will, because your site's pages will
  541. all point to boa:
  542. # Install boa and set up its files.
  543. cd /usr/local/src/boa-0.94.14rc17
  544. ./configure && make
  545. mkdir /usr/local/boa
  546. mkdir /usr/local/boa/bin
  547. mkdir /usr/local/boa/htdocs
  548. cp -a src/{boa,boa_indexer,webindex.pl} /usr/local/boa/bin/
  549. ln -s /usr/local/slash/site/mysite/htdocs/images /usr/local/boa/htdocs/images.mysite.com
  550. touch /usr/local/boa/htdocs/favicon.ico
  551. # Set up and edit boa conf file.
  552. cp examples/boa.conf /usr/local/boa/
  553. # At this point we patched /usr/local/boa/boa.conf, changing
  554. # Port to 8080, ServerName to www.mysite.com, DocumentRoot to
  555. # /usr/local/boa/htdocs, and commenting out the DirectoryIndex,
  556. # DirectoryMaker, Alias and ScriptAlias directives.
  557. # Start boa.
  558. /usr/local/boa/bin/boa
  559. # In mysql client:
  560. # UPDATE vars SET value='//www.mysite.com:8080/images.mysite.com' WHERE name='imagedir';
  561. # INSERT IGNORE INTO story_dirty SELECT stoid FROM stories WHERE in_trash='no';
  562. # Restart apache, slashd; let slashd rewrite .shtml files both
  563. # recent and archived.
  564. You'll probably also want to create a script in your init.d and rcN.d
  565. directories so boa runs at startup along with apache.
  566. =head1 UPGRADING
  567. B<Some of these upgrade procedures are still in testing. Please read
  568. them entirely before beginning. We are not responsible for any loss of
  569. data or functionality.>
  570. =head2 Slash 1.0 -E<gt> Slash 2.2
  571. You've got a site running Slash 1.0, from 2001? We're so sorry to
  572. hear that.
  573. Please read the complete documentation of F<utils/slash1toslash2.2>.
  574. We believe it will convert your database from Slash 1.0 to a new Slash
  575. 2.2 database, but it hasn't been tested in some time. The program
  576. documentation (which can be read with F<perldoc>) details exactly what
  577. process it follows to do the conversion, so you can attempt to do it by
  578. hand if you prefer.
  579. =head2 Slash 2.0 -> Slash 2.2
  580. Slash 2.2 is a major upgrade from Slash 2.0. It takes a little bit
  581. of work to get it going.
  582. =over 4
  583. =item 1.
  584. BACK EVERYTHING UP ON THE EXISTING SITE.
  585. =item 2.
  586. Install Bundle::Slash. If you have done so previously, follow
  587. the instructions for removing the existing version of
  588. Bundle::Slash before proceeding.
  589. =item 3.
  590. Apply this patch to your installed Slash::Install module (probably
  591. easiest to hand-edit the file):
  592. --- Install.pm~ Wed May 9 15:02:34 2001
  593. +++ Install.pm Fri Sep 28 12:44:41 2001
  594. @@ -116,7 +116,7 @@
  595. sub writeTemplateFile {
  596. my($self, $filename, $template) = @_;
  597. open(FILE, '>' . $filename) or die "$! unable to open file $filename to write to";
  598. - for (keys %$template) {
  599. + for (qw(section description title page lang name template seclev)) {
  600. next if ($_ eq 'tpid');
  601. print FILE "__${_}__\n";
  602. $template->{$_} =~ s/\015\012/\n/g;
  603. =item 4.
  604. Run C<template-check> on your site, and make a note of every change
  605. you've made to the standard templates. You will need to make those
  606. changes again, manually, later.
  607. This is unfortunately unavoidable, because templates include code
  608. that changes significantly between releases. It is recommended
  609. that you compile your changes into a THEME so they may easily be
  610. updated and applied.
  611. =item 5.
  612. Stop Apache and slashd on the target machine(s).
  613. =item 6
  614. Install Slash.
  615. B<If installing on a different machine ...>
  616. =over 4
  617. =item 1
  618. Install slash 2.2 as normal. Do not yet run C<install-slashsite>.
  619. =item 2
  620. Make sure that from this machine, you can access not only the database
  621. used for this installation, but the one used for the old installation.
  622. You may wish to, instead of accessing that database directly if it
  623. on another machine, dumping it and adding it to your new database server
  624. under a different name.
  625. =item 3
  626. Add a virtual user to DBIx::Password for the old installation.
  627. =back
  628. B<If installing on the same machine ...>
  629. =over 4
  630. =item 1
  631. Create a new database for the new installation. You cannot
  632. use the same database for both installations.
  633. =item 2
  634. Add a new virtual user to DBIx::Password for the new database,
  635. and update (and flush) MySQL privileges appropriately. You cannot
  636. use the same virtual user for both installations.
  637. =item 3
  638. It is highly recommended that you move F</usr/local/slash>
  639. (or whatever your installation directory is) to a new location,
  640. such as F</usr/local/slash-old>, and install a clean slash 2.2
  641. installation. However, this is not necessary to do; you may install
  642. slash 2.2 on top of the slash 2.0 installation.
  643. The reason to not move anything is that you can keep any customizations
  644. done (images, additional scripts and plugins, static files, etc.).
  645. The reason to move it is so that everything is clean. It is highly
  646. recommended that you move it, and then manually copy back the pieces
  647. you want.
  648. =item 4
  649. In any event, either move the old directory, or don't, and
  650. then install slash 2.2 as normal. Do not yet run C<install-slashsite>.
  651. =back
  652. =item 7.
  653. If you have plugins or themes from the old installation to install,
  654. copy them over now. Warning: some plugins and themes might need to be
  655. ported first. You may wish to deal with them later if they are not
  656. yet ported to slash 2.2.
  657. =item 8.
  658. Run C<install-slashsite>. Use the new virtual user.
  659. =item 9.
  660. Copy over any files (images, FAQs, etc.) that need to be copied, if necessary.
  661. =item 10.
  662. Run update script, F<utils/slash2toslash2.2>. B<Read its instructions!>
  663. =item 11.
  664. Update templates.
  665. =item 12.
  666. Doublecheck Apache configs (httpd/slash.conf, site/sitename/sitename.conf).
  667. These configs have changed from the last version. Read the comments and set
  668. them up as desired.
  669. =item 13.
  670. Start Apache.
  671. =item 14.
  672. Start slashd.
  673. =back
  674. =head2 Slash 2.2.x -> Slash 2.2.y
  675. Read all of this section before doing any of it.
  676. The first thing to do is to, as per the instructions below under
  677. INSTALLATION, unpack the latest distribution and run make and make
  678. install with the proper arguments.
  679. =over 4
  680. =item Overwriting Changes
  681. This process will overwrite any customizations of your installed
  682. modules, or customizations of the installed scripts in
  683. /usr/local/slash/themes/ and /usr/local/slash/plugins/ (for themes
  684. and plugins that come with Slash). If you ran C<install-slashsite>
  685. with the default option of using symlinks, and made customizations
  686. to the originals instead of breaking the symlink and copying the file
  687. over, then this will overwrite your changes.
  688. If you did modify the original instead of a copy, then break the
  689. symlink, copy over the original (as modified), and then continue.
  690. The original will be copied over by the new version, and your modified
  691. copy will remain intact.
  692. =item Templates
  693. With every update, there are changes to templates. But most people
  694. will modify their templates. A relatively simple way to see what
  695. has changed is to use template-tool and template-check. This
  696. procedure should help most users deal with the integration of new
  697. templates into an existing site (it will only work with the slashcode
  698. theme, but a simple modification to the code of template-check
  699. can fix that).
  700. =over 4
  701. =item Dump
  702. Use template-tool to dump your templates into an empty directory.
  703. % mkdir templates
  704. % cd templates
  705. % template-tool -u VIRTUAL_USER -d
  706. (Defaults to current directory.)
  707. =item Compare
  708. Use template-check to compare installed templates in
  709. /usr/local/slash/themes/slashcode/ and /usr/local/slash/plugins/ against
  710. the templates that have been dumped.
  711. % template-check -u VIRTUAL_USER
  712. (Defaults to current directory.)
  713. This will use diff to show you the differences. You can either go
  714. into the templates with a text editor (in another window) and change
  715. the dumped ones by hand, edit them by hand in the Template Editor
  716. via the web browser, or take a note of every template you want to
  717. copy over your existing template.
  718. After each directory of templates is done, hit "q" to continue to
  719. the next plugin/theme.
  720. =item Sync
  721. If you made changes by hand via the web, you are done. Otherwise, take
  722. the list of templates to update, and pass the full filenames to
  723. template-tool (this will either be the templates you modified by hand
  724. in the dump directory, or the unmodified ones in the installation
  725. directories). You might need to put each filename in quotes because of
  726. the ";" character in the filenames. This will overwrite your existing
  727. template with the new template.
  728. % template-tool -u VIRTUAL_USER -s LIST
  729. =back
  730. =back
  731. =head2 Slash 2.2.6 -E<gt> Slash CVS
  732. Use the sql/mysql/upgrades file; see L<"VERSIONS">, "CVS tags", below.
  733. This file is human-readable and very long. You can upgrade a 2.2.6 to
  734. the latest CVS by methodically applying every step in this file, but
  735. it is tedious and requires an engaged human brain reading the comments
  736. (i.e., don't "mysql slash < upgrades", that will fail miserably).
  737. =head2 Slash CVS -E<gt> later Slash CVS
  738. Again, use the sql/mysql/upgrades file (and the caveat just mentioned
  739. still applies). Start from the CVS tag you left off at, and proceed
  740. to the CVS tag you upgraded to (which should be the end of the file).
  741. If you're not sure which tag you left off at, you might check the var
  742. 'cvs_tag_currentcode', which will contain the right value if you last
  743. updated after September 2005.
  744. In general, you should stop apache and slashd, do a "make install",
  745. apply the upgrades file a line at a time for each Slash site, run
  746. "template-tool -U -u virtusename" and "symlink-tool -U -u virtusername"
  747. for each Slash site, and then start slashd and apache back up.
  748. =head1 REQUIREMENTS
  749. =head2 Software Requirements
  750. Below, we list the main software components needed. The recommended
  751. version is given. Usually this is the version we have done extensive
  752. testing on, typically a version we have used on Slashdot for some time.
  753. In parentheses we include (but do not recommend or support) the earliest
  754. version we believe could work.
  755. =over 4
  756. =item Perl
  757. Version 5.8.7 (5.6.1).
  758. http://www.cpan.org/
  759. =item MySQL
  760. Version 5.0.22 (4.0.12).
  761. http://www.mysql.com/
  762. MySQL 3.23.x is no longer supported, as of CVS tag T_2_5_0_33
  763. (October 18, 2004). MySQL 4.0.x is not being actively updated by
  764. MySQL AB except for security issues (though as far as we know it still
  765. works fine), so we would recommend that you upgrade to at least 4.1.x.
  766. At some point in the future we will switch over to some syntaxes which
  767. have been recommended for some time which will break on 4.0.x, so you'll
  768. have to upgrade to at least 4.1.x eventually anyway. (You probably have
  769. until 2007 before we spring this on you.)
  770. Slashdot ran on 4.1.x for a long time with no problems, so we now
  771. recommend either that or 5.0.x. We have been testing on 5.0.x for months,
  772. and as of this writing (August 2006), Slashdot has been running on 5.0.18
  773. and 5.0.22 for some time with no problems. For what it's worth, we have
  774. found the MySQL upgrade process, even between major versions, to be about
  775. as painless as we could have imagined.
  776. =item Apache
  777. Version 1.3.34 (1.3.33).
  778. http://httpd.apache.org/
  779. Since most of Apache 1.3.x's recent releases included security fixes,
  780. we wouldn't recommend running an earlier version. Slash is not compatible
  781. with Apache 2.x and we have no plans to port to 2.x (though we aren't
  782. excluding the possibility).
  783. =item mod_perl
  784. Version 1.29.
  785. http://perl.apache.org/
  786. =item memcached
  787. Version 1.1.12 (1.1.11).
  788. See "Memcached" above.
  789. =item Sendmail or other mail transport agent
  790. Refer to your OS distribution.
  791. =item Perl module distributions
  792. The latest version of each perl module is recommended. To download and
  793. install them, use CPAN -- see L<"INSTALLATION">, item 4, "Install the
  794. perl modules."
  795. =item Libraries
  796. For Compress::Zlib, the zlib development library is required. For
  797. XML::Parser, the expat library is required. If they are not present
  798. on the system already, download and install them before installing
  799. the modules.
  800. http://www.gzip.org/zlib/
  801. http://sf.net/projects/expat/
  802. The current list of required perl modules can be found in the
  803. F<Bundle/Slash.pm> file. At its end we also list optional modules,
  804. which may be required depending on your setup.
  805. =item Debian libraries
  806. On Debian Linux, or Debian-based distributions like Ubuntu, the above
  807. libraries can be installed with:
  808. apt-get install zlib1g zlib1g-dev libexpat1 libexpat1-dev
  809. Also on Debian, as of the current writing (July 2006), you will want
  810. libperl-dev. DBD::mysql requires mysql_config and mysql.h; on Debian
  811. stable, try libmysqlclient12 (and -dev) for 4.0.x and/or libmysqlclient14
  812. (and -dev) for 4.1.x. On testing or unstable, try libmysqlclient15off
  813. and libmysqlclient15-dev.
  814. =back
  815. =head2 Hardware Requirements
  816. There are no specific hardware requirements.
  817. Slash is designed to work well on multi-machine setups, with one or
  818. more webheads that are separate from one or more MySQL DB machines.
  819. But for low-load sites (1-5 pages/sec or slower), it can probably be
  820. run OK on a single machine.
  821. Apache (with mod_perl) and MySQL both take up a lot of RAM. Running a
  822. complete system with 128MB might be possible, if you do some tuning of
  823. the configuration, but a practical minimum of 256MB is recommended, and
  824. you will be much happier with at least 1GB of RAM. See L<"INSTALLATION
  825. OPTIONS">, "Separate Image Server" for tips on saving some RAM.
  826. Disk space depends on how busy you expect the site to be. Slash keeps
  827. a small database -- even Slashdot's DB compresses down to a few GB.
  828. The disk files as installed are under 0.5 GB, and grow predictably as
  829. stories and comments are added (keep an eye on the F<site/foo/logs/>
  830. directory, too). A minimum of 1 GB of disk is recommended.
  831. Necessary processor speed is also dependent on how busy the site is.
  832. A Pentium II/400 equivalent is recommended, but obviously, the faster
  833. the better.
  834. For the curious, Slashdot (as of September 2001) runs on nine machines:
  835. nine webservers (each is Pentium III/600, 1GB RAM, 9GB hard drive), one
  836. NFS server (600MHz PIII, 1GB RAM), and three database servers
  837. (quad 600MHz PIII, 4GB RAM). One database server is
  838. live, one is a replicated backup, and a third is for doing live searches
  839. and performance-intensive SELECTs by daemons etc.
  840. However, this is certainly overkill for most sites (and possibly even
  841. overkill for Slashdot). slashcode.com runs on two web servers and one
  842. NFS/database server. Many sites can run fine on just one machine for
  843. everything (we use a minimum of two web server machines on every site
  844. for load balancing and redundancy).
  845. If you're concerned about performance, the F<bin/mechmonkey> script
  846. may help provide load vaguely similar to real user patterns, though
  847. it doesn't try simulating logged-in users. One more data point: my
  848. personal machine is a 2.4 GHz Athlon with 1.5 GB RAM and an IDE disk,
  849. and it easily handled the load when its Slash site got a mild Slashdotting
  850. (a link in a non-major story, about 10 pages/sec).
  851. =head1 VERSIONS
  852. Each version of slash has a code name, and the files on CVS for that
  853. version are tagged with that name. The current release is always
  854. MAIN. The versioning scheme is as Linux and perl are,
  855. revision.version.subversion. version is even for releases, and odd
  856. for development. The codename applies to the development version
  857. and subsequent release.
  858. For example, 1.0.11 is a normal release, while 1.1.0 is the first
  859. development release for what will be the next release (either 1.2
  860. or 2.0).
  861. The CVS repository is tagged with version numbers, so to get release
  862. 1.0.3, use tag "v1_0_3_0". The last number (in this case a zero) will
  863. be incremented during development ("v1_0_3_1", "v1_0_3_2", etc.) until
  864. the next release. Non-release versions are tagged with a T_ or R_
  865. prefix. We are currently developing 2.5.x, so our CVS tags are
  866. T_2_5_0_x and R_2_5_0_x (though there was no 2.4.0 release and to date
  867. has been no 2.5.0).
  868. =head2 Codenames
  869. =over 4
  870. =item v1.0
  871. beast
  872. =item v2.0
  873. bender
  874. =item v2.2
  875. fry
  876. =item v2.3
  877. (never released)
  878. =item v2.4
  879. (never released)
  880. =item v2.5
  881. leela
  882. =back
  883. =head2 Security note
  884. We are no longer releasing bugfixes, even for security, for the 1.0
  885. or 2.0 versions, and do not recommend their use. If we become aware
  886. of security issues in the 2.2 tree, we will release another version.
  887. For this reason, if you are using any version of Slash in 2.2.x or
  888. earlier, we recommend you upgrade at the very least to the latest version
  889. of 2.2, which as of this writing (August 2006) is 2.2.6.
  890. =head2 CVS tags
  891. Our development of 2.3/2.5 has gone on exceptionally long without a
  892. tarball release of either 2.3.0 or 2.5.0. Most Slash hosting sites are
  893. choosing to follow CVS instead of waiting, and we encourage this.
  894. Installation of the latest CVS (as of August 2006) is almost identical
  895. to the installation of 2.2.
  896. You probably do not want to use the
  897. very latest CVS, as the Slash developers are constantly updating it.
  898. If you wish to live on the edge, try a T_2_5_0_x tag ("Testing in 2.5.0
  899. branch" -- one or two of these are added every week, Slashdot uses them,
  900. but they may have bugs). If you are content with recent code that the
  901. developers believe is likely to be free of major bugs, look for a recent
  902. R_2_5_0_x cvs tag ("Release candidates for 2.5.0").
  903. To upgrade from 2.2.x to the CVS tree, you will need to follow the
  904. instructions in the sql/mysql/upgrades file. At the moment, these are
  905. just SQL commands you will need to issue, but read carefully because
  906. you may have to use judgement and issue command-line commands and so on.
  907. (We are working on a tool to automate this process.) Once you are
  908. upgraded to, or have installed, a given CVS tag, upgrading to later
  909. CVS tags is simply a matter of following along in that file -- we append
  910. as we go, and each T_* tag is clearly marked.
  911. =head1 TROUBLESHOOTING COMMON INSTALLATION PROBLEMS
  912. Here are some common errors reported by other site administrators.
  913. =over 4
  914. =item *
  915. Webpages show the error: "The server encountered an internal error or
  916. misconfiguration..."
  917. Check your Apache error logs for a more specific error.
  918. =item *
  919. "Can't locate Slash.pm in @INC..."
  920. One possibility is that you didn't actually C<make install> Slash
  921. in step 5, which would be a pretty serious omission.
  922. It's also possible that the apache or slashd process issuing this error
  923. doesn't have permissions to read Slash.pm, or is using a different version
  924. of perl than you expect with a different set of @INC directories than
  925. you expect. Try, at the command line:
  926. which perl
  927. head -1 /usr/local/slash/sbin/slashd
  928. perl -MSlash -le 'print $INC{"Slash.pm"}'
  929. and see if it emits the perl binaries you expect and the location of
  930. Slash.pm that you expect. Check file permissions and see "Multiple perls
  931. installed" below.
  932. =item *
  933. I installed Slash twice and it didn't work.
  934. Did you uninstall before reinstalling? See "UNINSTALLING" below.
  935. If you intend to reinstall with the same database and site name,
  936. steps 4 and 7 are not optional.
  937. =item *
  938. "Can't locate MIME/Types.pm in @INC..."
  939. This used to be required only for plugins/Blob and you probably didn't
  940. follow its README after you installed it. Now it's in Bundle::Slash; try
  941. reinstalling Bundle::Slash (and see "Old Version of Bundle::Slash" above).
  942. =item *
  943. DBD::mysql will not install.
  944. As of October 2006, its tests by default assume you have a running mysqld
  945. on localhost, with a database named 'test', accessible to the user
  946. 'root' with no password. If you don't have a database named 'test',
  947. create one with C<CREATE DATABASE test;>. If you don't run mysqld
  948. on the same machine as you're installing the module, or if you have a
  949. password for its 'root' user (good idea), almost all its tests will fail.
  950. You can either override the failures with
  951. cpan> force install DBD::mysql
  952. or (better) run proper tests by telling it the actual mysqld host, user,
  953. and password to connect to, with
  954. cpan> look DBD::mysql
  955. # perl Makefile.PL --usage
  956. # perl Makefile.PL --testmycustomargs=foobar
  957. # make && make test && make install
  958. =item *
  959. "Can't call method '(whatever)' on an undefined value at..."
  960. Slash can't connect to your database server. (This manifests as the
  961. variable $slashdb being undef. Which method happens to emit this error
  962. depends on which code path first tries to use $slashdb.)
  963. To start troubleshooting this, see "Database authentication issues" below.
  964. =item *
  965. I created a new author but s/he doesn't show up in authors.pl and can't
  966. post stories.
  967. For performance reasons, Slash aggressively caches the list of which
  968. users are authors. After you mark a user as an author and boost their
  969. seclev (maybe to 100) in users.pl, go back to the command line and run
  970. the refresh_authors.pl task by hand:
  971. # /usr/local/slash/bin/runtask -u yourvirtuser refresh_authors
  972. Then restart apache and slashd. That user will now be able to post
  973. stories. The authors.pl listing will update some time after the first
  974. story is actually posted.
  975. =item *
  976. Freshly-posted stories aren't showing up on the homepage.
  977. Are you sure slashd is running? If a story appears on /index.pl but not
  978. /index.shtml, and it's more than a few minutes old, check the output of
  979. 'ps' for slashd, and check slashd.log for errors.
  980. =item *
  981. "Use of uninitialized value in..."
  982. Just a harmless warning, ignore it. It helps us find errors, but you
  983. don't need to worry about it.
  984. =back
  985. Here are some other common reasons why Slash installations fail.
  986. =over 4
  987. =item *
  988. Failure to build mod_perl with PERL_MARK_WHERE=1 EVERYTHING=1.
  989. We emphasize this in the instructions for a reason. Go back and
  990. reread the Installation Procedure, step 3.
  991. =item *
  992. Perl module installation troubles.
  993. If you have a unix-like system with CPAN properly installed
  994. and no serious firewall issues, perl module installation will
  995. usually go pretty smoothly

Large files files are truncated, but you can click here to view the full file