|
If you're already accustomed to the lengthy process involved with most software installations, PHP-Nuke is going to be a bit of a disappointment. It's mainly copying files and is not terribly exciting or time-consuming. Once you've gotten the prerequisites in place, download whatever version of PHP-Nuke you plan to use. I'm using v7.3 for this book; given that a new version comes out every few months you can pretty much rest assured that a newer version will be available as you're reading this. But the installation procedure won't change much. Start by decompressing the PHP-Nuke package you downloaded. Ideally, you'll decompress this right onto your Web server. You don't have to, though: You can decompress it on your desktop PC or whatever and use a File Transfer Protocol (FTP) client to copy the files up to your Web server, if necessary. Where do the files go? Well, if you want your PHP-Nuke site to be accessible from the root of your Web site (for example, www.mysite.com), put the files in the root (under Apache, it's called the docroot). If you want your files to go in a subdirectory (such as www.mysite.com/phpnuke), create the subdirectory and put the files in it. Next, you'll need to create a database for PHP-Nuke to use. MySQL comes with a command-line tool called mysqladmin; to create a database, you just run something like mysqladmin create nuke from a command line on your server. Next, you'll need to build the initial database structure. PHP-Nuke's download package has a subfolder named sql that contains a SQL script; importing that into your newly created database sets up the structure. Running mysql nuke < nuke.sql does the trick. Again, you run that from the command line on your Web server. If you're not using MySQL as your database server, then you're on your own, but other open-source database servers work more or less the same way. Almost done. Now you need to open the config.php file, which is located right in the root of the PHP-Nuke Web site, in a text file editor. There are a few lines you'll need to edit, since these tell PHP-Nuke where it can find the database, which contains most of the other configuration information. The lines you need to change are right near the top of the file: $dbhost = "localhost"; $dbuname = "root"; $dbpass = ""; $dbname = "nuke"; $prefix = "nuke"; $user_prefix = "nuke"; $dbtype = "MySQL"; $sitekey = "SdFk*fa28367-dm56w69.3a2fDS+e9"; $gfx_chk = 0; $subscription_url = ""; Under no circumstances should you mess with anything else in the config.php file. Seriously, no good can come of it. Here's what the previous configuration lines are asking for:
The Gfx_chk parameter is interesting. To prevent automated Web software from creating a zillion user accounts on your Web site, PHP-Nuke implements a graphical check routine. This requires users to type in a series of digits that they read off a graphic. Automated software would have a difficult time "reading" the graphic, especially since it's partially obscured with gridlines, so this simple check helps prevent automated signups and logins. But the little graphic thing can also be a pain for regular users, so you need to decide whether you want to use it. Set the Gfx_chk parameter to meet your preferences:
Okay, next you just need to chmod some files, run a sudo command, download three quantum registers into the oscillating diode array…just kidding. You're finished. You should be able to access your new Web site by using your Web browser. |
|