From RNWiki
Revision as of 04:00, 13 September 2009 by Montego (talk | contribs)
Jump to: navigation, search

Home>New Installations

Welcome to RavenNuke™! These instructions are strictly for new installations of this popular Content Management System (CMS). Please be sure to follow every step in the order listed. This is vital to the successful setup of your site.

In summary, this page will walk you through the following steps:

  • Set up of an empty RavenNuke™ database
  • Preparation and installation of the files
  • Installation of the RavenNuke™ tables
  • Configuration of the main site settings
  • Configuration of NukeSentinel™, the flag-ship security tool
  • Configuration of add-ons (if desired)

Do not be intimidated by the length of these instructions. We have tried to provide as thorough of instructions as possible as we have all sorts of experience levels of webmasters and so have incorporated many lessons learned over the years in support of the RavenNuke™ community.

With that said, let us get cracking!

Prepare/Install the Database

Due to the varied and diverse control panels and host setups that are out there we are not able to provide step-by-step instructions, with example screen captures, for every possible one. Therefore, you are required to manually create the database that will hold all of the tables needed for this application. In summary, you must:

  1. Create a new database using whatever method your host has provided for you to do this.
  2. Create a database username and password with the permissions required to create tables and access your database (e.g., select, insert, update, delete, create, etc.).
  3. Associate the username you just created with the database that you just created.

The above steps are usually accomplished through a combination of a control panel, such as cPanel, and/or a tool such as phpMyAdmin.

Make sure that you take note of the complete database name as well as the username and password; this information will be necessary in the next step for allowing RavenNuke™ to connect to your database, complete the installation process, and to run your site.

Example of a cPanel Setup (Detailed Steps):

If your host provides cPanel, here is an example that walks you through the setup of a new database. Your screens may not look exactly like this, but the functionality should be the same.

For this example, we will assume that your site name is ravensite.com and your host username is raven. That means that your database name and database username will automatically be prefaced by raven_. This is an important point to remember. Let us get started.

First, log into your cPanel account. Depending on individual hosts, here again, there could be several ways. One very common way is to use your site url like this: http://www.ravensite.com/cpanel. You will be prompted for your host userid/pass to login to cPanel. After getting logged in, you should see somewhere on your screen an image like this. Notice, I have highlighted the MySQL image, as that is what you need to select.

CPanel-1.png

After you select the MySQL image, you will be presented a screen with database and user information for your MySQL setup. We are interested in the following area of this screen which is highlighted. Here you type in the name of your database and click Add Db.

CPanel-2.png

Now you need to create a username and password that will have access permissions to the database. Down towards the bottom of the screen you will see an image like this. Add a username and a password. Note that most hosts limit the username to 7 characters, so be warned. Then click Add User.

CPanel-3.png

You are almost done :). Only one step left. You have created a database, a username, and a password. But, because you could have many databases and users, you need to tell MySQL which database to associate with which user. In the previous step, where you added/created the database, is where you also will do this association. Scroll back up towards the top and find this area again. Note that a different area is now highlighted. You must select the username and the database name from their respective drop down boxes and then click Add User to Db.

CPanel-4.png

For this example, let us assume that you created the following from the steps above.

  • Database Name = nukedb (Your database name will probably be raven_nukedb as mentioned above)
  • Database Username = nukeusr' (Your database username will probably be raven_nukeusr as mentioned above)
  • Database User Name Password = nukepass

This information must be remembered for use in the next step as you will add it to a file called config.php.

Prepare/Install the Files

You have hopefully downloaded the RavenNuke™ distribution and now there are several ways in which to install the files.

For Advanced/Experienced Web Masters: If you have SSH access to your remote host, you should be able to FTP the archive to your server and unpack it directly on your server. Just note that the html directory inside the archive is the same as your web server root directory, usually public_html. If you have a WAMP or LAMP environment installed locally on your PC, again, just get the contents of the html directory within the archive into wherever you wish to run the RavenNuke™ site from. The rest of these instructions will still be beneficial to you so that you know what files to edit in order to get this working.

For the Rest of Us: Unpack the distribution archive into some directory on your PC and continue on with these instructions. In summary, this is what you are going to do (with the files under the html directory):

  1. Modify the config.php file with the proper settings, including the database information from the previous step.
  2. Modify the rnconfig.php file to configure any special error reporting/logging needs that you have as well as any add-ons (may be done later too).
  3. If not already on the remote server, FTP all the files under the html directory to your remote server.
  4. Verify files on the remote server.

Modify config.php File

You now need to edit the config.php file and supply the MySQL settings with the database name, username, and user password that you created in the previous step, along with a few other settings.

Right now, the config.php should look like this starting at or near line 59 (Note that the line numbering may change from release to release):

 $dbhost = 'localhost';
 $dbuname = 'rnuser';
 $dbpass = 'rnuser';
 $dbname = 'ravennuke';
 $prefix = 'nuke';
 $user_prefix = 'nuke';
 $dbtype = 'MySQL';
 $sitekey = 'SdFk*fa2rnv21076v28367-dm56w69.3a2fDS+e9';
 $gfx_chk = 7;
 $subscription_url = '';
 $admin_file = 'admin';
 $tipath = 'images/topics/';
 $display_errors = false;

Each of these configuration options are defined below in more detail. Change these to your desired settings or as stated (required).

$dbhost
This is the MySQL server name as defined by your host. The most common is localhost so there should be no need to change this. Some hosts require a domain name. Check with your host to be sure, or if you are unable to connect to the database in the next step.
$dbuname
Database username from previous step (nukeusr). Some hosts require that you prefix the username with your control panel username. In other words, if your database username is "nukeusr" and your control panel username is raven, then the $dbuname would be raven_nukeusr and not just nukeusr. This is host specific.
$dbpass
Database password from previous step (nukepass).
$dbname
Database name from previous step (nukedb). Some hosts require that you prefix the database name with your control panel username. In other words, if your database name is "nukedb" and your control panel username is raven, then the $dbname would be raven_nukedb and not just nukedb. This is host specific.
$prefix
The prefix is added to all the tables in your database from previous step. There really is no reason to change this unless you want to or need to, to avoid a naming clash or for a small measure of added security (but it could break some add-ons that you add later if you change this). The SQL installer used in the next step will take care of prefixing your tables with this value.
$user_prefix
This should ALWAYS be the same as the $prefix setting unless you are serving up more than one nuke site from the same database. This allows you to use certain tables across several nuke sites. This is an advanced feature and not one to take lightly, so know what you are doing if you change this.
$dbtype
Do not change this setting as we support ONLY the MySQL database.
$sitekey
This key is used in the creation of the graphics check for sign-ons. CHANGE it from its default value for security sake. You only need to change a few of the characters, but you can change as many as you like.
$gfx_chk
This configures when the graphic security code is displayed for the various login screens. In order for this to work, you need to have GD extension installed with FreeType support (check with your host if you are unsure and/or experience issues with the security code):
0: No check
1: Administrators login only
2: Users login only
3: New users registration only
4: Both, users login and new users registration only
5: Administrators and users login only
6: Administrators and new users registration only
7: Everywhere on all login options (Admins and Users)
NOTE: If you are not sure set this value to 0
$subscription_url
If you manage subscriptions on your site, you must write here the url of the subscription information/renewal page. This will be sent by email if set.
$admin_file
This is the administration panel filename; it is admin by default for admin.php. If you rename the actual filename (i.e., admin.php), you MUST change this $admin_file value to the new filename (without the extension .php). For example, by default the $admin_file is set to "admin" and the actual filename is "admin.php". If you change the actual admin.php filename to raven.php, then you must also change $admin_file to "raven". Be aware that third party add-ons normally expect this to be "admin", so changing it can break most older version add-ons, so change at your own risk (NukeSentinel™ already provides adequate enough security of admin.php, so we do not see any need to change this.
$tipath
Path to where the topic images are stored. This should not need to be changed.
$display_errors
Debug control to see PHP generated errors. When set to false, even though the errors are not displayed on the screen, they will be written to the web server error log depending on the $error_reporting setting in rnconfig.php (discussed later on in this page).
false: Do not show errors
true: See all errors ( as defined in rnconfig.php ) - Note: Setting this to TRUE should only be done while testing/debugging your scripts. It should NEVER be set to TRUE in a production environment as it can expose information that could compromise your site.

This should do it for the config.php file.

Be sure the save the file!

In addition to the above, honorable mention should be given to the following additional settings:

$AllowableHTML
This array controls what HTML will be allowed to be entered into the various pages. The version that is in RavenNuke™ allows for more granular control of which HTML tags and attributes are allowed. The first array element is for the HTML tag itself, but then each tag may have additional attributes defined as arrays themselves. Be careful what you add, though, as you do not want to open yourself up to a XSS attack.
$CensorList
This array controls how words get censored. The words in this list will be replaced by asterisks.

Modify rnconfig.php File

NOTE TO RNTEAM: We should have a Wiki page within our Administration manual which covers each and every configuration option. We would then just point to it as the settings in this file are not required to be changed in order to have a fully functional RavenNuke™ installation.

There are additional settings within the rnconfig.php file. These may be optional for your setup until a later time, but it is good to still read through what each of these are. Since the contents of the rnconfig.php file have grown quite a bit, rather than replicating those here, what follows are explanations for each variable that you can configure within this file:

$error_reporting
Depending upon what you are needing / trying to debug, set this value based on the instructions above it in the file. It comes with a default of show all errors, but no notices (of course, ONLY if $display_errors in config.php is set to "TRUE".
$loglevel
This controls the level of logging to the rnlogs/dblog file. The default setting $loglevel = 0 will not generate any log entries. $loglevel = 1 will generate entries only for SQL errors. $loglevel = 2 will generate entries for all SQL queries. To ensure proper logging occurs (and no PHP errors are thrown) make sure the dblog file is write-able by the web server. For most hosting environments, this means permissions of "666" on *nix systems. If you elect to utilize the logging feature, we strongly recommend that you regularly review the dblog file to check for errors, or if using a log level of '2', it can grow quite large very fast, so you will need to "prune" this file regularly.
$modGFXChk
Each of the modules named in this array have had a captcha applied to them to help fight spam (note that we did not say "stop"!). This array allows one to set when to present the captcha, or not at all. The comments in the rnconfig.php file should be explanatory enough on how to set this.
$advanced_editor
The nukeWYSIWYG editor (FCK 2.6.4) is now fully integrated into key modules and admin functions within RavenNuke™. The editor turned on by default. To turn it off system-wide, change the "1" to "0". Also, as stated in the comments, one can turn this on/off by module, by simply adding this line towards the top of the module´s index.php script and setting it to "0" or "1" as desired.
$uploadpath
This is use to override the default uploads/ folder used for storing files uploaded through nukeWYSIWYG via FCKeditor's filemanager. This should have a slash at the beginning and a slash at the end (e.g. '/files/') and is relative to the URL without subdirectories
$bypassNukeSentinelInvalidIPCheck and $bypassInstallationFolderCheck
When you try to access your site after completing the installation steps, the system checks to see if your IP is 127.0.0.1 (localhost) and also checks to see if you have removed or renamed the INSTALLATION folder to keep anyone from reinstalling and overwriting your database and setup. In order to make testing and debugging easier, these two settings were added to the rnconfig.php file to allow you to override these two safety checks. Of course you should only set them to TRUE in your testing environment and not in production. In Production, $display_errors, $bypassNukeSentinelInvalidIPCheck, and $bypassInstallationFolderCheck should be set to false.
TegoNuke(tm) ShortLinks
The next four TegoNuke(tm) ShortLinks options are used to control that add-on feature. This feature may be used if you desire to have shortened internal links such as "downloads.html" or "forums.html" rather than the full" modules.php?name=Forums" link. In the past, this has been known as "GoogleTap" or "GT-NExtGEn". Please see the RavenNuke_README.txt file within the Distro directory AddOnFiles/TegoNuke/ShortLinks for more information as to what this feature is and how to control it with these settings. There are several steps documented in this readme file -- such as copying settings from the ShortLinks.htaccess file to your main htaccess file -- that must be completed for ShortLinks to work properly. If you attempt to use ShortLinks without completing these steps you will get errors on your site.
$forceLowerCaseUserName
This setting is used on new registrations ONLY. If set to true, the system will force to lowercase the entered username. If set to false, it will work as normally, in that the username will not be "touched".
nf_CONVERTENCODING
For nukeFEED™ - Some sites may use non-UTF-8 databases created with multi-byte languages. If you see strange characters when view a feed preview on the block, preview page or auto-discovery links, you may disable UTF-8 encoding by setting nf_CONVERTENCODING to false
nf_ENABLEUPDATECHECK
For nukeFEED™ - This needs an explanation...
Pagination Control
Variables here control pagination (a new feature) within the news module. Possible settings are documented in the file. Feel free to experiment based on the needs of your site.
$useBoxoverWithnukePIE
Determines whether to display full HTML description of an RSS block feed item (now using nukePIE™) as Boxover tooltip /popup (true) or a text-only description as title tag on the feed link (false).
$statisticsExcludeList
Add usernames as additional array elements where you wish to exclude the gathering of site statistics while these users are logged in. Usually desired by those who are admins who wish to not skew their site statistics by their own accesses.

FTP Files to Remote Server

If you have modified your files directly on your final production site, you should be done with your installation. If your files are local still on your PC, read on.

WARNING: If this is NOT a fresh installation and you are overwriting an existing domain, be careful in what you overwrite. For example, you may not want to just overwrite config.php, .htaccess, .staccess, etc.

FTP ALL of the unzipped files contained within the html folder to your root web folder, usually public_html or www, but do not FTP the html folder itself unless you intend to install this in a sub-folder named "html". For example, let us assume your root site folder is "public_html". If you FTP just the contents of the "html" folder, then you will be able to access your site by this url: http://www.YOURSITE.com . However, if you FTP the entire "html" folder, then to access your site you will need to use http://www.YOURSITE.com/html, which is probably not desirable.

Verify Files

Many problems arise from an incomplete or corrupt FTP process; this is one of the first things to check if you end up having issues later on in the installation process. You may also wish to remove any index.htm file in the root of your RavenNuke™ folder. You should have only one "index" file and it should be index.php. For Linux hosts, you may need to try forcing the entire FTP upload as binary.

Install RavenNuke™ Tables To The Database

From your browser, type in http://www.YOURDOMAIN.com (add the /html or other directory name if you loaded it into a sub-directory) and press GO or the ENTER key. You should receive an error message to the effect of:

There seems to be a problem with the MySQL server Configuration Table - It's missing.

If you are installing this for the first time, did you remember to run INSTALLATION/installSQL.php file?

Otherwise, please report this to the Administrator ASAP.

We should be back shortly.

That IS what you should see at this point. If you see the following message instead, check that your config.php database connection values match your actual database settings:

There seems to be a problem with the MySQL server - Sorry for the inconvenience.

Please report this to the Administrator ASAP.

We should be back shortly.

Once you are getting the right message, from your browser, go to the following URL (change "www.YOURDOMAIN.com" with the correct one for your setup):

http://www.YOURDOMAIN.com/INSTALLATION/installSQL.php

You will be directed to an installation script especially written for this application. It is fully documented so there is no need to repeat anything here.

The first step of the table installer installs all the core RavenNuke™ tables. The second step installs the NukeSentinel™ tables. The third and final step is to load all the RavenNuke™ IP-to-Country (IP2C) data. The table is very large and is broken down into several smaller loads. If the install is successful you should see the following screen. Note: The names of the database and user will be different according to your config.php file settings


Mysql table installer 2.png

Please note that you must run the Table Installer before continuing on with the installation. You cannot configure the system until all files are loaded and all tables are created and loaded.

Setup and Configure Main Site Configuration Settings

This step will allow you to setup all admin usernames and passwords, admin email addresses, and your main regular user name and password. You can also assign your Site Name and Slogan. For security measures all passwords must be a minimum of 8 characters in length.

Point your browser to http://www.YOURDOMAIN.com/INSTALLATION/setup.php. This should display a screen that looks similar to this:

Setup.png

All fields are required. There is quite a bit of error checking that is going on behind the scenes to ensure a good configuration. Upon successful completion you should see a pop-up notice similar to this:

Setupcpt.png

NOTE: If you end up running this script multiple times, you may get a javascript pop-up error message saying that "all fields must be entered". In this case, make sure you type over each field to ensure that the script recognizes your input.

Once you are fully configured please check that the permissions of files and folders are as follows:

  • If you are running PHP as an Apache module then files/folders should be set to 664/775 or less.
  • If you are running PHP as a CGI module then files/folder should be set to 644/755 or less.
  • If your web host is running PHPSuExec or SuExec, you may be able to get away with 600/700 on some files/folders, the tighter permissions the better.

The following exceptions apply:

  • For NukeSentinel™: .htaccess = 666 (after installation), .staccess = 640 (after installation), .ftaccess = 666
  • For nukeWYSIWYG™: uploads/file = 766 or 777, uploads/flash = 766 or 777, uploads/image = 766 or 777, uploads/media = 766 or 777
  • For nukePIE™: cache = 766 or 777
  • For HTML Newsletter: modules/HTML_Newsletter/archives = 777
  • For Forums: modules/Forums/images/avatars = 777 or 766
  • For Forums Attachment Mod: modules/Forums/files - 777

How you set your permissions is really defined by your Host. The bottom line is that the files/folders mentioned above need to be readable and sometimes writable by your web server. Depending on how your web server and PHP interpreter are installed/configured will determine what permissions you use.

At this point, you have a working RavenNuke™ installation. However, for optimal security and functionality, you should continue on with Configuration.