Help:Installing Metabolonote

From Metabolonote
jump-to-nav Jump to: navigation, search
< Contents | Installation_guide | Installing_Metabolonote


 En.gif English | Ja.gif 日本語  


Step 4: How to Install Metabolonote

Contents

Overview

Metabolonote is a unique MediaWiki extension function that handles metadata accompanied with metabolomics data.

Prerequisite

To install Metabolonote, the following programs need to be installed in advance in this order. In particularfor SemanticMediaWiki and SemanticForms, the version that has uniquely extended function by Metabolonote is required.

MediaWiki SemanticMediaWiki SemanticForms

Confirming Files

After downloaded files are uncompressed, install Metabolonote by using the following files.

  • Metabolonote
  • mnapi.php
  • Metabolonote_CreateTables.sql
  • Metabolonote_FormsData.xml

Arrangement of Data Files

The following section gives description based on "metabolonote" as the directory where files are placed and "/var/www/html" as the document root of Apache.

Metabolonote Directory

  • Uncompress the downloaded files.
$ unzip Metabolonote-1.3.0.zip
  • Move into the generated directory
$ cd Metabolonote-1.3.0
  • Copy the "Metabolonote" directory under the extensions directory of the metabolonote directory.
$ cp -ar Metabolonote /var/www/html/metabolonote/extensions/Metabolonote

API File for Metabolonote

  • Copy the API file used for the Metabolonote system to the metabolonote directory.
$ cp -ar mnapi.php /var/www/html/metabolonote/mnapi.php

Adding MySQL Tables

Before installing Metabolonote, you need to add tables to the MySQL database.

Name Desctiption
DATABASE_NAME Name of database for storing MediaWiki data
MYSQL_USER MySQL user name
MYSQL_PASS MySQL password

The following section describes based on the above table.

Adding tables

  • After change the current directory to the directory where the install files uncompressed, add tables by using the command below.
$ mysql -u MYSQL_USER -p --database DATABASE_NAME < Metabolonote_CreateTables.sql

Installation

Add the line below to the last line of "/var/www/html/metabolonote/LocalSettings.php".

require_once("$IP/extensions/Metabolonote/Metabolonote.php");

Confirm e-mail

Edit the Sidebar

Login as an administrator.
Access to the following page.

http://your.server/index.php?title=MediaWiki:Sidebar

Enter page edit mode by clicking "Edit" menu.
Replace the page contents as follows.

* navigation
** mainpage|mainpage-description
** mn-publicpages-url|mn-publicpages
** mn-parsonalpages-url|mn-parsonalpages_enableLoginUser
** mn-sharedpages-url|mn-sharedpages_enableLoginUser
** mn-metadatasearch-url|mn-metadatasearch
** mn-createsampleset-url|mn-createsampleset_enableLoginUser
** portal-url|portal
** currentevents-url|currentevents
** helppage|help
* MN_RANKING
* SEARCH 
* TOOLBOX
* LANGUAGES

Save the page. Then special menu items are displayed in the side bar.

Installing Initial Page Data

Without page data, you cannot confirm the operation of various page creation functions using the form.

Import the same setting files of Metabolonote as the initial page data and to confirm the operation, import data as described below.

Name Description
ADMINISTRATOR_NAME MediaWiki administrator name
ADMINISTRATOR_PASS MediaWiki administrator password

The following section describes based on the table above.



Log in / create account

Log in / create account

  • Select the "Log in / create account" link on the upper right of the page.
  • Log in to Metabolonote as the administrator privilege user created when MediaWiki was installed.
Username: ADMINISTRATOR_NAME
Password: ADMINISTRATOR_PASS

After entering necessary information, click the Log in button.


Main Page

Main Page

  • Select the "Special Pages" link from the toolbox on the left side of the page.



Special pages

Special pages

  • Select the "Import page data" link.



Import pages

Import pages

  • File name: File path of "Metabolonote_FormsData.xml"

After entering the information above, click the Upload file button.


Import pages

A message "Import finished!" is displayed.


Refresh the system cache by the following procedure.

  • Select the "Special Pages" link from the toolbox on the left side of the page.
  • Select the "Admin functions for SemanticMediaWiki" link.
  • Click the "Start updating data" button.

Cache will be completely cleared after reloading some pages on the system. The progress is displayed on the "Admin functions for SemanticMediaWiki" page.


If you find that some data imported are not displayed properly, try to clear the cache of your browser.

Option Settings

In the Metabolonote system, the following settings described below are added to LocalSettings.php.

  • Set the maximum process number of page data import.
$wgJobRunRate = 100;
  • Disable the original MediaWiki API.
$wgEnableAPI = false;
  • Set to prevent the IP address from displaying when the user is not logged in.
$wgShowIPinHeader = false;
  • Restrict the user to move from page to page.
$wgGroupPermissions['user']['move'] = false;
  • Change the logo displayed on the upper left of the page (Following shows the Metabolonote logo)
$wgLogo = "$wgScriptPath/extensions/Metabolonote/skins/images/metabolonote_logo.jpg";

Global Variables

The table below shows global variables used in the Metabolonote system. When changes are needed in these variables, write the changes to LocalSettings.php.

Variable Description Default value Example
$mngSpecialNamespacesIndex Minimum number of sample set ID (name space) 200 $mngSpecialNamespacesIndex = 200;
$mngTopPageName Top page name of sample set / $mngTopPageName = "/";
$mngDatabaseName Database name described in info file when API is output. It must be unique in the world, when you build a public Metabolonote system. kazusa $mngDatabaseName = "kazusa";
$mngPublicTopPagePrefix String that becomes title when sample set ID is published SE $mngPublicTopPagePrefix = "SE";
$mngSkinEditUsers Permits users specified by array to change skin array() $mngSkinEditUsers = array('UserName*');
$mngCreateAccountWaitTime Waiting time (sec.) to prevent creation of consecutive accounts 60 $mngCreateAccountWaitTime = 60;
$mngCreateAccountLimit Limited number of accounts that can be created within 24 hours 5 $mngCreateAccountLimit = 5;
$mngExportAPIXMLParametar The field name of the forms that should be recognized as attributes, but not elements, in the generation of XML output by API. id $mngCreateAccountLimit = 'id';
Variable Description
$mngXMLSchemaURI URI of the XSD file for generating XML outputs of metadata by means of Metabolonote API
Default value
http://webs2.kazusa.or.jp/metabolonote/TogoMetabolomeDbSchema.xsd
Example
$mngXMLSchemaURI = 'http://webs2.kazusa.or.jp/metabolonote/TogoMetabolomeDbSchema.xsd';

* "UserName" is a user without adminstrator right.


Server Settings

Enable URI File Open

The following settings are required when the API functions "getDataByMetadataId" and "getDataByMetadataIdWithAM" are used.

  • Set "allow_url_fopen = On" in the php.ini

Alternatively,

  • Install curl command to enable the PHP function "cURL".

Check the installation of curl command to type the command below.

# curl --help

The curl command is enabled if the help of curl is displayed.

Personal tools
View and Edit Metadata
Variants
Views
Actions