Wedge

Public area => Documentation => Topic started by: Norodo on June 28th, 2012, 07:41 PM

Title: Installing Wedge
Post by: Norodo on June 28th, 2012, 07:41 PM
Pre-preparation


Installation


After install
 1. There are several ways to do this. For more help, see Uploading(http://wedge.org/doc/7490/installing-wedge-wip/msg280490/#msg280501).
 2. See database(http://wedge.org/doc/7490/installing-wedge-wip/msg280502/#msg280502) for more information on this.
 3. See permissions(http://wedge.org/doc/7490/installing-wedge-wip/msg280509/#msg280509) for more information on this.
 4. See database continued(http://wedge.org/doc/7490/installing-wedge-wip/msg280560/#msg280560) for more information on this.
Title: Uploading
Post by: Norodo on June 29th, 2012, 10:12 AM
Uploading

There are several ways to get a Wedge loaded onto your server. Novice users should use the SFTP method.

SFTP
wget[1][2]
 1. This is a guide for somewhat more advanced users
 2. This method seems slower, but is actually faster because you don't have to download the files to your computer and then upload them one by one by slow FTP. For this one you are going to need to have some basic Linux file system knowledge.
 3. .zip files are unzipped. tar.gz, tar.bz, tar.xz, tgz, tbz and txz files are tar -xfed
Title: Database
Post by: Norodo on June 29th, 2012, 10:26 AM
Setting up the database for Wedge

Wedge is sometimes able to create and configure the database and settings for you during install, but it is almost always preferable to set up the database and settings yourself using phpMyAdmin or the mysql command line, due to security concerns, and because the PHP installation doesn't always have enough permissions to create a database.

Setting up the database for Wedge using phpMyAdmin

Creating a database

The first thing you want to do in phpMyAdmin is create a database that Wedge can use to store data.
Creating a semi-privileged user (optional / recommended)

You can run Wedge using your root / superadmin user, but this is not a good idea. Quickly summarized you are much more likely to destroy something unintentionally if you let Wedge use your root account It is generally recommended to run Wedge as a limited user. [1]
Setting up the database from the MySQL command line

First, connect to the MySQL from SSH or Console like this: mysql –user=myusername –password –host=localhost –port=3306 . Replace myusername with the actual mysql username that Wedge will use to access the MySQL database. [2] You will immediately be prompted to “Enter password”. Type in the password for the above mysql user. Hit enter, if all goes well, you should see a welcome message similar to this:

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1238
Server version: 5.1.58-1ubuntu1 (Ubuntu)

Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


You will noe be creating a database that Wedge will use. In the mysql commandline interpreter, simply run this statement:

Code: [Select]
CREATE DATABASE myexampledatabaseName
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;


Then hit enter. If all goes well, the result of your query should read:
Query OK, 1 row affected (0.00 sec)
Type exit to leave mysql's commandline interpreter and continue your install
 1. This is not to say that Wedge will ruin your webserver, but this simple step can help you from making changes to the wrong databases, and increase the security from “hackers"
 2. For more information on creating a user, see CREATE USER(http://dev.mysql.com/doc/refman/5.1/en/create-user.html)
Title: Permissions
Post by: Norodo on June 29th, 2012, 02:20 PM
Setting file permissions

In order for PHP / Wedge to be allowed to change and use files, you might have to change the file permissions. [1]

This can be done in many ways.

The “required” permission level can vary from program to program, but it is usually adviceable to set your permissions to be liberal while installing, and secure while running. While installing you should set files that need to be used[2] to 777 (all permissions), while on a running system you will want your files to have the permissions set to 644. If that doesn't work for you, try 664.

Using your SFTP client

You can usually change the file permissons with your SFTP client. As an example, in WinSCP, you can right click a file or a folder, and even choose if you want the permissions to recurse down the folder hierarchy. Don't forget to set the files back to 644 or 664 when you are done with the installation.

Using SSH / console

You can also, of course, use the local console or SSH if you prefer that. Usage is pretty simple, first you cd to the directory where wedge is located, then you use the chmod command to change the files you need changed to the setting you want them to be at. IE: If Wedge asks you to change the files called configuration.txt and data/config.cfg to be writable you can type chmod 777 configuration.txt data/config.cfg. Don't forget to set the files back to 644 or 664 when you are done with the installation.
 1. Usually you will have to.
 2. But only the files that need to be used, not all files.
Title: Database continued
Post by: Norodo on July 2nd, 2012, 08:15 AM
Database settings

At this point in the install you are asked to enter your database settings. You should have already gone through the basic database setup before you do this part.