INSTALLATION
Intro
This manual is created to help you with installing, configuring and running your site, powered by SkaLinks Exchange script.nu
Please note that this document is subject to change. You can follow the updates here http://www.skalinks.com .
Script installation and configuration
The whole script installation process can be divided into the following steps:
- Appropriate SkaLinks Exchange Script download;
- MySql database setup;
- Script upload to your server;
- Post-upload adjustment;
- Script installation.
Let's take a look at all these steps in details.
Download
You can download the script at http://www.skalinks.com
MySQL database setup
If you already have some earlier version of SkaLinks script installed, please skip the step of database creation.
MySQL database creation
Now create a database and a database user on your server. Grant permissions for using the database to this user. Remember database name and user name – you will use them during the next step.
You can do it in 3 ways: via your hosting account CPanel (faster and easier way), via phpMyAdmin (optional, if you have sufficient permissions for doing it in phpMyAdmin) or via SSH (optional, if you do not have CPanel on your hosting account; you need to have shell access enabled for the account). If you are not sure about whether you have CPanel or access to phpMyAdmin or SSH access, just contact your hosting providers and ask them – they should provide at least one of those. The most simple and fast way is to do this via CPanel, so if you are not experienced in scripts installation, please choose this method. CPanel is your hosting account control panel. It may be called differently, but essentially it the same thing – web host control panel.
Method #1 - CPanel
- go to MySQL database management section;
- add a database (this will create a new database), and give it any name you wish;
- add a user (this will create a new database user), and also give it any name you wish;
- add the user to the database and give it ‘All' privileges.
For all abovementioned step CPanel provides a user-friendly interface.
Method #2 - phpMyAdmin
- open phpMyAdmin main control page;
- enter a database name in the “Create new database” field, press the “Create” button;
- enter the newly created database and go to the “SQL” section;
- in the query text field run this query:
GRANT ALL PRIVILEGES ON database_name.* TO database_username@localhost IDENTIFIED BY 'password' WITH GRANT OPTION;
Do not forget to specify actual database name, username, and password instead of database_name , database_username , and password respectively.
- enter the “SQL” section again;
- run this query:
FLUSH PRIVELEGES;
Method #3 - SSH
- connect to your server via SSH;
- run the following command to enter MySQL environment:
mysql –u username –p
username must have all privileges to create databases and grant permissions to database users.
- run the following command to create a database
CREATE DATABASE database_name;
- run the following command to grant privileges to a user:
GRANT ALL PRIVILEGES ON database_name.* TO database_username@localhost IDENTIFIED BY 'password' WITH GRANT OPTION;
Do not forget to specify actual database name, username, and password instead of database_name , database_username , and password respectively.
- run the following command to apply the newly-created privileges:
FLUSH PRIVELEGES;
For more information about MySQL, you can visit the following sites:
http://www.devshed.com/c/b/MySQL .
You can download phpMyAdmin program here: http://www.phpmyadmin.net/home_page/index.php .
Upload to your server
When necessary configuration is done you should upload the script to the destination directory at your server. You can do it via an FTP client program. To learn more about FTP, please search for “ ftp ” in Google.
Post-upload adjustment
You need to “set permissions” to some directories. This means that you “allow” the script to perform certain actions with the information in this directory.
All folders should have “ 755 ” permissions. They will be in this mode by default.
There are only two exceptions. For the following directories you should set “ 777 ” permissions manually (this mode means that all users will have full set of rights for using these directories including writing to them – this is our goal after all):
- script_root_directory (for example: /my/home/dir/ )
- cache directory ( for example: /my/home/dir/cache/ )
- compile directory ( for example: /my/home/dir/compile/ )
- db backup folder ( for example: /my/home/dir/admin/db_backup/ )
- .htaccess file (for example: /my/home/dir/.htaccess )
To do so, you can enter the script_root_directory directory via an FTP/SSH client program, find command line and write:
chmod 777 dir
...and hit Enter. This will change permissions for script_root_directory . Than, find cache and compile directories and set permissions the same way as for script_root_directory . You can find this directories in script_root_directory .
Some FTP clients also have a user-friendly button “Permissions” that allows setting permissions for selected files or directories. You may use such button too.
The default admin account for enter to admin panel: username – “admin”, password – “test”.
For more detailed explanation on how to set permissions via FTP go to http://www.stadtaus.com/en/tutorials/chmod-ftp-file-permissions.php .
For download SSH client program, visit site: http://www-inst.eecs.berkeley.edu/download-ssh.html
Script installation
If you install the script for the first time, then you should run the installation module. Otherwise you should delete headers.php file from script_root_directory and after then, run the installation module. Enter this URL in the address bar of your browser: http://www.mysite.com/dir/install/ - you will see the installation form open. Please make sure that instead of “mysite” you enter the actual domain name of your site and instead of “dir” – the actual path to the directory where Skalinks script is stored on your site.
The form contains several fields that you should fill in correctly to properly set up the script. The list of the fields and their description is as follows:
$_url_main_site |
Here you should specify the correct URL of your main site's home page. For example: http://www.mysite.com/ Note that trailing “/” symbol is mandatory! |
$_url_root |
Here you should specify the correct URL of the directory with SkaLinks script. For example: http://www.mysite.com/dir/ Note that trailing “/” symbol is mandatory! For this variable the installation module will try to generate the proper value automatically. So you should just check it for correctness. |
$_dir_root |
Here you should specify the correct path to the home directory of your site in the server file system. For example: /my/home/directory/ Note that trailing “/” symbol is mandatory! For this variable the installation module will try to generate the proper value automatically. So you should just check it for correctness. |
$_site_title |
The value that is assigned to this variable will appear as a part of every page's title generated by the script. |
$_site_full_name |
The full name of your site that will be used throughout the pages. For example: “ My Site Online Services ” |
$_site_description |
The description of your site, which will be used in letter subtemplates. For example: “ We offer this and that, here and there, feel free to come and buy. ” |
$_site_brand |
Brand name's purpose is close to the one of the full name. It is a shorter presentation of the site name. For example: “ MySite ” – this brand name will be used in e-mail templates. |
$_mysql_username |
The user name to connect to MySQL database. |
$_mysql_userpwd |
The password to connect to MySQL database. |
$_mysql_dbname |
The name of MySQL database. |
$_mysql_host |
The name of MySQL server. For example: localhost if the server is situated on your site. |
Remember that if you already have some earlier version of SkaLinks script installed, as a value for $_mysql_dbname variable you should specify the name of the MySQL database that is used by the previously installed script. Otherwise, you should create a new database on the server manually and specify its name.
After you complete the form with proper values, hit the “Install” button. This will create headers.php file in the directory where the script resides.
Please note that the file headers.php appears in this directory only after installation. It is not there in the default pre-installed package.
After you run the installation module and make sure that installation process went smoothly and properly, you should delete the install directory from your server! We strongly recommend that you do it for security reasons. If the directory remains on the server, anyone will be able to ruin your site's settings.
If you decide to change any of the above-listed settings after installation, you can do it by modifying the generated headers.php file. In this file, the variables that are described in the above table are listed on the very top in a separate block. You will have to carefully change the values that were previously assigned to these variables to the new values.


