Installing Wedge

Norodo

  • Oh you Baidu, so randumb. (60 sites being indexed at once? Jeez)
  • Posts: 469
Installing Wedge
« on June 28th, 2012, 07:41 PM »Last edited on January 21st, 2014, 05:26 PM
Pre-preparation

  • Before you start the installation, make sure your server fulfills the requirements
  • Get the latest Wedge package and unpack it on your server in a web accessible folder. [1]
  • Create a database and a “semi-privileged” user. [2]

Installation

  • Point your web browser to yourserver.com/path_to_wedge/install.php and follow the instructions.  The first hinder you'll meet is likely to be setting up file permissions.[3]
  • Next up you will have to enter some information about the database you set up in step 3 of the initial setup. [4]
  • After this, simply follow the instructions and you should end up with a functioning forum.

After install
  • At this point you may want to remove anything superfluous like the Wedge installation files.
  • At last you should start configuring Wedge to function like you want.
 1. There are several ways to do this. For more help, see Uploading.
 2. See database for more information on this.
 3. See permissions for more information on this.
 4. See database continued for more information on this.
Uploading
« Reply #1, on June 29th, 2012, 10:12 AM »Last edited on January 21st, 2014, 05:25 PM
Uploading

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

SFTP
  • Download the latest Wedge package
  • Unpack it in a directory.
  • Move install.php, install.sql, Settings.php and Settings.php.bak to the "root" folder from the install folder. This folder will typically be called wedge-master
  • Upload the files to your server using SFTP. WinSCP is a decent free SFTP client.
  • Continue the install.
wget[1][2]
  • Log on to your SSH / console.
  • cd to the folder you want to install Wedge to.
  • Type wget https://github.com/Wedge/wedge/archive/master.zip
  • Unpack the files using either unzip filename or tar -xf filename depending on the file type[3]
  • Ensure the Wedge files are in the directory you want to run them from.
  • Move install.php, install.sql, Settings.php and Settings.php.bak to the "root" folder.
  • Continue your install.
 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
Database
« Reply #2, on June 29th, 2012, 10:26 AM »Last edited on July 3rd, 2012, 08:30 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.
  • Open phpMyAdmin
  • Press databases
  • At the bottom where it says “Create new database”, enter a name for your database. I recommend you choose a short but descriptive name. If your community name is “Le Wino” you can call the database “wino_wedge” or something like that.
  • Check “databases” to see if “wino_wedge” has indeed been created.
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]
  • First, click your way into your Wedge database.
  • Click “Privileges”
  • Add a new user
  • Enter your new user information. Leave host as “Any host” unless you know what you are doing.
  • Grant all privileges on your Wedge database
  • Uncheck all global privileges
  • Remember your user information and use this in the install.php part of the installation process.
  • Continue the installation
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
Permissions
« Reply #3, on June 29th, 2012, 02:20 PM »Last edited on July 3rd, 2012, 08:15 AM
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.
Database continued
« Reply #4, on July 2nd, 2012, 08:15 AM »Last edited on July 12th, 2012, 03:27 PM by Nao
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.

  • Server name: As the installer will tell you, it is usually Localhost. It is not always localhost though. If you have phpMyAdmin installed you can find your server name there.
  • Username: This should be the same as the user name you used in the database setup, or the user name your host has given you.
  • Password: This should also be the same as the user name you used in the database setup, or the password your host has given you.
  • Database name: This should be the same as the database name you used in the database setup.
  • Table prefix: If you only plan on installing one Wedge board on this database, simply leave it as is. If you plan on installing several boards on the same database, choose something unique for both of them.