Difference between revisions of "Talk:Mediawiki"

From SME Server
Jump to navigationJump to search
(Comments regarding wiki howto page being out of date/incorrect - unless I am wrong)
 
(2 intermediate revisions by 2 users not shown)
Line 18: Line 18:
 
Also login was with user ''admin'' and the password of the SME Server ''admin'' user - as opposed to password ''admin'' stated in wiki
 
Also login was with user ''admin'' and the password of the SME Server ''admin'' user - as opposed to password ''admin'' stated in wiki
 
[[User:Timn|Timn]] 14:46, 24 February 2010 (UTC)
 
[[User:Timn|Timn]] 14:46, 24 February 2010 (UTC)
 +
 +
 +
--
 +
This howto was posted at the URL www.netztechnik.at/download/linux/sme/sme8/howto/mediawiki/howto-mediawiki.txt - which is no longer working - copied from the google cache:
 +
--
 +
<pre>
 +
###########################################################################################################
 +
#                                                                                                        #
 +
# ++++++++ Draft v0.3 - 14022011 ++++++++++                                                              #
 +
#                                                                                                        #
 +
# +++ Author Franz J. PANIS - http://www.netztechnik.at +++                                              #
 +
#                                                                                                        #
 +
###########################################################################################################
 +
 +
 +
+++ Howto install Mediawiki 1.16.x on SME8b6 (contribs.org) +++
 +
 +
 +
# download and untar the files
 +
cd /usr/local/src
 +
wget -c http://download.wikimedia.org/mediawiki/1.16/mediawiki-1.16.2.tar.gz
 +
tar xvf mediawiki-1.16.2.tar.gz
 +
mv /usr/local/src/media*/ /opt/mediawiki/
 +
rm -f mediawiki-1.16.2.tar.gz
 +
 +
# Change permissions
 +
chown -R www.www /opt/mediawiki
 +
chmod a+w /opt/mediawiki/config
 +
 +
# Just for installation create the mysql-user temp
 +
mysql -e "CREATE USER 'temp'@'localhost' IDENTIFIED BY 'temp';"
 +
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'temp'@'localhost' WITH GRANT OPTION;"
 +
mysql -e "FLUSH PRIVILEGES"
 +
 +
# Create a Template Fragement
 +
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
 +
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
 +
 +
nano 89mediawiki
 +
 +
------------------------------------ Begin - Content of 89mediawiki --------------------------------------
 +
 +
Alias /mediawiki /opt/mediawiki
 +
Alias /wiki      /opt/mediawiki/index.php
 +
 +
<Directory /opt/mediawiki>
 +
          # SSLRequireSSL on
 +
        AddType application/x-httpd-php .php .php3 .phtml
 +
        Options FollowSymLinks
 +
        order deny,allow
 +
          allow from all
 +
        php_flag register_globals off
 +
        php_admin_value open_basedir /opt/mediawiki/:/tmp/
 +
</Directory>
 +
 +
<Directory /opt/mediawiki/includes>
 +
        order deny,allow
 +
          allow from all
 +
</Directory>
 +
 +
<Directory /opt/mediawiki/languages>
 +
        order deny,allow
 +
          allow from all
 +
</Directory>
 +
 +
<Directory /opt/mediawiki/maintenance>
 +
        order deny,allow
 +
          allow from all
 +
</Directory>
 +
 +
<Directory /opt/mediawiki/math>
 +
        order deny,allow
 +
          allow from all
 +
</Directory>
 +
 +
<Directory /opt/mediawiki/tests>
 +
        order deny,allow
 +
          allow from all
 +
</Directory>
 +
 +
<Directory /opt/mediawiki/maintenance/archives>
 +
        order deny,allow
 +
          allow from all
 +
</Directory>
 +
 +
------------------------------------ End - Content of 89mediawiki --------------------------------------
 +
 +
 +
# Expand template
 +
expand-template /etc/httpd/conf/httpd.conf
 +
/etc/rc.d/init.d/httpd-e-smith restart
 +
 +
# Configure MediaWiki
 +
Goto http://<your-server-ip>/mediawiki/index.php
 +
 +
# Site config
 +
 +
- Wiki name: your-wikiname
 +
- Contact e-mail: admin@your-domain
 +
- Language: chose-your-language
 +
- Copyright/license: what-you-need
 +
- Admin username: WikiSysop
 +
- Password: your-WikiSysop-password
 +
- Password confirm: your-WikiSysop-password
 +
- Object caching: No caching
 +
 +
 +
# E-mail, e-mail notification and authentication setup
 +
 +
- E-mail features (global): Enabled
 +
- User-to-user e-mail: Enabled
 +
- E-mail notification about changes: Enabled
 +
- E-mail address authentication: Enabled
 +
 +
 +
# Database config
 +
 +
- Database type: MySQL
 +
- Database host: localhost
 +
- Database name: wikidb
 +
- DB username: wikiuser
 +
- DB password: your-wikiuser-password
 +
- DB password confirm: your-wikiuser-password
 +
- Superuser account: click to activate
 +
- Superuser name: temp
 +
- Superuser password: temp
 +
 +
 +
# MySQL-specific options
 +
 +
- Storage Engine: InnoDB
 +
- Database character set: MySQL 4.1/5.0 binary
 +
 +
 +
Finaly click on  Install MediaWiki! Button
 +
 +
 +
# After the Configuration move LocalSettings.php and change Permissions
 +
mv /opt/mediawiki/config/LocalSettings.php /opt/mediawiki/
 +
chmod 600 /opt/mediawiki/LocalSettings.php
 +
 +
# Delete config folder
 +
rm -rf /opt/mediawiki/config
 +
 +
# Drop the mysql-user temp with:
 +
mysql -e "DROP USER 'temp'@'localhost'"
 +
 +
 +
# Finaly goto this Link:
 +
http://<your-server-ip>/mediawiki/
 +
 +
# Login as wiki-admin
 +
username: WikiSysop
 +
passwword: your-WikiSysop-password
 +
 +
</pre>
 +
 +
 +
 +
<pre>
 +
this is the original template based in SME7
 +
 +
cat /etc/e-smith/templates/etc/httpd/conf/httpd.conf/95mediawiki
 +
 +
------------------------------------ Begin - Content of 95mediawiki --------------------------------------
 +
 +
#------------------------------------------------------------
 +
#  Mediawiki
 +
#------------------------------------------------------------
 +
Alias /mediawiki /opt/mediawiki
 +
Alias /wiki      /opt/mediawiki/index.php
 +
 +
<Directory /opt/mediawiki>
 +
{
 +
    my $mwsec = $mediawiki{'HTTPS'} || "off";
 +
    if ($mwsec eq "off")
 +
    {
 +
  $OUT .= "  # SSLRequireSSL on";   
 +
    } else {
 +
  $OUT .= "  SSLRequireSSL on";
 +
    }
 +
}
 +
AddType application/x-httpd-php .php .php3 .phtml
 +
Options FollowSymLinks
 +
order deny,allow
 +
{
 +
    my $mwiki = $mediawiki{'PublicAccess'} || "local";
 +
    if ($mwiki eq "local")
 +
    {
 +
  $OUT .= "  deny from all\n";
 +
  $OUT .= "  allow from $localAccess";   
 +
    } else {
 +
  $OUT .= "  allow from all";
 +
    }
 +
}
 +
php_flag register_globals off
 +
php_admin_value open_basedir /opt/mediawiki/:/tmp/
 +
</Directory>
 +
 +
<Directory /opt/mediawiki/includes>
 +
order deny,allow
 +
{
 +
    my $mwiki = $mediawiki{'PublicAccess'} || "local";
 +
    if ($mwiki eq "local")
 +
    {
 +
  $OUT .= "  deny from all\n";
 +
  $OUT .= "  allow from $localAccess";   
 +
    } else {
 +
  $OUT .= "  allow from all";
 +
    }
 +
}
 +
</Directory>
 +
 +
<Directory /opt/mediawiki/languages>
 +
order deny,allow
 +
{
 +
    my $mwiki = $mediawiki{'PublicAccess'} || "local";
 +
    if ($mwiki eq "local")
 +
    {
 +
  $OUT .= "  deny from all\n";
 +
  $OUT .= "  allow from $localAccess";   
 +
    } else {
 +
  $OUT .= "  allow from all";
 +
    }
 +
}
 +
</Directory>
 +
 +
<Directory /opt/mediawiki/maintenance>
 +
order deny,allow
 +
{
 +
    my $mwiki = $mediawiki{'PublicAccess'} || "local";
 +
    if ($mwiki eq "local")
 +
    {
 +
  $OUT .= "  deny from all\n";
 +
  $OUT .= "  allow from $localAccess";   
 +
    } else {
 +
  $OUT .= "  allow from all";
 +
    }
 +
}
 +
</Directory>
 +
 +
<Directory /opt/mediawiki/math>
 +
order deny,allow
 +
{
 +
    my $mwiki = $mediawiki{'PublicAccess'} || "local";
 +
    if ($mwiki eq "local")
 +
    {
 +
  $OUT .= "  deny from all\n";
 +
  $OUT .= "  allow from $localAccess";   
 +
    } else {
 +
  $OUT .= "  allow from all";
 +
    }
 +
}
 +
</Directory>
 +
 +
<Directory /opt/mediawiki/tests>
 +
order deny,allow
 +
{
 +
    my $mwiki = $mediawiki{'PublicAccess'} || "local";
 +
    if ($mwiki eq "local")
 +
    {
 +
  $OUT .= "  deny from all\n";
 +
  $OUT .= "  allow from $localAccess";   
 +
    } else {
 +
  $OUT .= "  allow from all";
 +
    }
 +
}
 +
</Directory>
 +
 +
<Directory /opt/mediawiki/maintenance/archives>
 +
order deny,allow
 +
{
 +
    my $mwiki = $mediawiki{'PublicAccess'} || "local";
 +
    if ($mwiki eq "local")
 +
    {
 +
  $OUT .= "  deny from all\n";
 +
  $OUT .= "  allow from $localAccess";   
 +
    } else {
 +
  $OUT .= "  allow from all";
 +
    }
 +
}
 +
</Directory>
 +
 +
<Directory /opt/mediawiki/serialized>
 +
  order deny,allow
 +
        {
 +
            my $mwiki = $mediawiki{'PublicAccess'} || "local";
 +
            if ($mwiki eq "local")
 +
            {
 +
  $OUT .= "  deny from all\n";
 +
          $OUT .= "  allow from $localAccess";
 +
            } else {
 +
          $OUT .= "  allow from all";
 +
            }
 +
}
 +
</Directory>
 +
 +
 +
<Directory /opt/mediawiki/t>
 +
  order deny,allow
 +
        {
 +
            my $mwiki = $mediawiki{'PublicAccess'} || "local";
 +
            if ($mwiki eq "local")
 +
            {
 +
          $OUT .= "  deny from all\n";
 +
          $OUT .= "  allow from $localAccess";
 +
            } else {
 +
          $OUT .= "  allow from all";
 +
            }
 +
}
 +
</Directory>
 +
 +
 +
------------------------------------ End - Content of 95mediawiki --------------------------------------
 +
</pre>
 +
<pre>
 +
the standard db configuration entries also from sme7
 +
 +
db configuration show mediawiki
 +
mediawiki=service
 +
    DbName=mediawiki
 +
    DbUser=mediawikiuser
 +
    HTTPS=on
 +
    Name=MediaWiki
 +
    PublicAccess=local
 +
 +
 +
In "PublicAcces = local" scenario you can add also one Entry AllowHosts with comma separatd IP's from where you like to be accessed (even outzide local network)
 +
 +
something like
 +
    AllowHosts=10.10.10.1,10.20.20.1,10.30.1.1
 +
</pre>

Latest revision as of 09:54, 6 May 2016

  • Is there a authentication method incorporated against SME server somehow please? RequestedDeletion

--

After uninstalling (and using the full uninstall script) there is still an entry left in the accounts db:

 # db accounts show mediawiki
 mediawiki=reserved

--jester 16:56, 11 August 2009 (UTC)

There is a newer version 1.6.10-9 on smecontribs so I assume the wget/localinstall instructions are now out of date.

Just installed with

yum install --enablerepo=smecontribs smeserver-mediawiki 

and all looks good.

Also login was with user admin and the password of the SME Server admin user - as opposed to password admin stated in wiki Timn 14:46, 24 February 2010 (UTC)


-- This howto was posted at the URL www.netztechnik.at/download/linux/sme/sme8/howto/mediawiki/howto-mediawiki.txt - which is no longer working - copied from the google cache: --

###########################################################################################################
#                                                                                                         # 
# ++++++++ Draft v0.3 - 14022011 ++++++++++                                                               #
#                                                                                                         #
# +++ Author Franz J. PANIS - http://www.netztechnik.at +++                                               #
#                                                                                                         #
###########################################################################################################


+++ Howto install Mediawiki 1.16.x on SME8b6 (contribs.org) +++


# download and untar the files
cd /usr/local/src
wget -c http://download.wikimedia.org/mediawiki/1.16/mediawiki-1.16.2.tar.gz
tar xvf mediawiki-1.16.2.tar.gz
mv /usr/local/src/media*/ /opt/mediawiki/
rm -f mediawiki-1.16.2.tar.gz

# Change permissions
chown -R www.www /opt/mediawiki
chmod a+w /opt/mediawiki/config

# Just for installation create the mysql-user temp
mysql -e "CREATE USER 'temp'@'localhost' IDENTIFIED BY 'temp';"
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'temp'@'localhost' WITH GRANT OPTION;"
mysql -e "FLUSH PRIVILEGES"

# Create a Template Fragement
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/

nano 89mediawiki

------------------------------------ Begin - Content of 89mediawiki --------------------------------------

Alias /mediawiki /opt/mediawiki
Alias /wiki      /opt/mediawiki/index.php

<Directory /opt/mediawiki>
          # SSLRequireSSL on
        AddType application/x-httpd-php .php .php3 .phtml
        Options FollowSymLinks
        order deny,allow
          allow from all
        php_flag register_globals off
        php_admin_value open_basedir /opt/mediawiki/:/tmp/
</Directory>

<Directory /opt/mediawiki/includes>
        order deny,allow
          allow from all
</Directory>

<Directory /opt/mediawiki/languages>
        order deny,allow
          allow from all
</Directory>

<Directory /opt/mediawiki/maintenance>
        order deny,allow
          allow from all
</Directory>

<Directory /opt/mediawiki/math>
        order deny,allow
          allow from all
</Directory>

<Directory /opt/mediawiki/tests>
        order deny,allow
          allow from all
</Directory>

<Directory /opt/mediawiki/maintenance/archives>
        order deny,allow
          allow from all
</Directory>

------------------------------------ End - Content of 89mediawiki --------------------------------------


# Expand template
expand-template /etc/httpd/conf/httpd.conf
/etc/rc.d/init.d/httpd-e-smith restart

# Configure MediaWiki
Goto http://<your-server-ip>/mediawiki/index.php

# Site config

	- Wiki name: 		your-wikiname
	- Contact e-mail: 	admin@your-domain
	- Language: 		chose-your-language
	- Copyright/license: 	what-you-need
	- Admin username: 	WikiSysop
	- Password: 		your-WikiSysop-password
	- Password confirm: 	your-WikiSysop-password
	- Object caching: 	No caching


# E-mail, e-mail notification and authentication setup

	- E-mail features (global):		Enabled
	- User-to-user e-mail:			Enabled
	- E-mail notification about changes:	Enabled
	- E-mail address authentication:	Enabled


# Database config

	- Database type:	MySQL
	- Database host:	localhost
	- Database name:	wikidb
	- DB username:		wikiuser
	- DB password:		your-wikiuser-password
	- DB password confirm:	your-wikiuser-password
	- Superuser account:	click to activate
	- Superuser name:	temp
	- Superuser password:	temp
	

# MySQL-specific options

	- Storage Engine:		InnoDB
	- Database character set:	MySQL 4.1/5.0 binary


Finaly click on  Install MediaWiki! Button


# After the Configuration move LocalSettings.php and change Permissions
mv /opt/mediawiki/config/LocalSettings.php /opt/mediawiki/
chmod 600 /opt/mediawiki/LocalSettings.php

# Delete config folder
rm -rf /opt/mediawiki/config

# Drop the mysql-user temp with:
mysql -e "DROP USER 'temp'@'localhost'"


# Finaly goto this Link:
http://<your-server-ip>/mediawiki/

# Login as wiki-admin
username: 	WikiSysop
passwword:	your-WikiSysop-password


this is the original template based in SME7 

cat /etc/e-smith/templates/etc/httpd/conf/httpd.conf/95mediawiki 

------------------------------------ Begin - Content of 95mediawiki --------------------------------------

#------------------------------------------------------------
#   Mediawiki
#------------------------------------------------------------
Alias /mediawiki /opt/mediawiki
Alias /wiki      /opt/mediawiki/index.php

<Directory /opt/mediawiki>
	{
	    my $mwsec = $mediawiki{'HTTPS'} || "off";
	    if ($mwsec eq "off")
	    {
	  $OUT .= "  # SSLRequireSSL on";    
	    } else {
	  $OUT .= "  SSLRequireSSL on";
	    }
	}
	AddType application/x-httpd-php .php .php3 .phtml
	Options FollowSymLinks
	order deny,allow
	{
	    my $mwiki = $mediawiki{'PublicAccess'} || "local";
	    if ($mwiki eq "local")
	    {
	  $OUT .= "  deny from all\n";
	  $OUT .= "  allow from $localAccess";    
	    } else {
	  $OUT .= "  allow from all";
	    }
	}
	php_flag register_globals off
	php_admin_value open_basedir /opt/mediawiki/:/tmp/
</Directory>

<Directory /opt/mediawiki/includes>
	order deny,allow
	{
	    my $mwiki = $mediawiki{'PublicAccess'} || "local";
	    if ($mwiki eq "local")
	    {
	  $OUT .= "  deny from all\n";
	  $OUT .= "  allow from $localAccess";    
	    } else {
	  $OUT .= "  allow from all";
	    }
	}	
</Directory>

<Directory /opt/mediawiki/languages>
	order deny,allow
	{
	    my $mwiki = $mediawiki{'PublicAccess'} || "local";
	    if ($mwiki eq "local")
	    {
	  $OUT .= "  deny from all\n";
	  $OUT .= "  allow from $localAccess";    
	    } else {
	  $OUT .= "  allow from all";
	    }
	}
</Directory>

<Directory /opt/mediawiki/maintenance>
	order deny,allow
	{
	    my $mwiki = $mediawiki{'PublicAccess'} || "local";
	    if ($mwiki eq "local")
	    {
	  $OUT .= "  deny from all\n";
	  $OUT .= "  allow from $localAccess";    
	    } else {
	  $OUT .= "  allow from all";
	    }
	}
</Directory>

<Directory /opt/mediawiki/math>
	order deny,allow
	{
	    my $mwiki = $mediawiki{'PublicAccess'} || "local";
	    if ($mwiki eq "local")
	    {
	  $OUT .= "  deny from all\n";
	  $OUT .= "  allow from $localAccess";    
	    } else {
	  $OUT .= "  allow from all";
	    }
	}
</Directory>

<Directory /opt/mediawiki/tests>
	order deny,allow
	{
	    my $mwiki = $mediawiki{'PublicAccess'} || "local";
	    if ($mwiki eq "local")
	    {
	  $OUT .= "  deny from all\n";
	  $OUT .= "  allow from $localAccess";    
	    } else {
	  $OUT .= "  allow from all";
	    }
	}
</Directory>

<Directory /opt/mediawiki/maintenance/archives>
	order deny,allow
	{
	    my $mwiki = $mediawiki{'PublicAccess'} || "local";
	    if ($mwiki eq "local")
	    {
	  $OUT .= "  deny from all\n";
	  $OUT .= "  allow from $localAccess";    
	    } else {
	  $OUT .= "  allow from all";
	    }
	}
</Directory>

<Directory /opt/mediawiki/serialized>
  order deny,allow
        {
            my $mwiki = $mediawiki{'PublicAccess'} || "local";
            if ($mwiki eq "local")
            {
	  $OUT .= "  deny from all\n";
          $OUT .= "  allow from $localAccess";
            } else {
          $OUT .= "  allow from all";
            }
	}
</Directory>


<Directory /opt/mediawiki/t>
  order deny,allow
        {
            my $mwiki = $mediawiki{'PublicAccess'} || "local";
            if ($mwiki eq "local")
            {
          $OUT .= "  deny from all\n";
          $OUT .= "  allow from $localAccess";
            } else {
          $OUT .= "  allow from all";
            }
	}
</Directory>


------------------------------------ End - Content of 95mediawiki --------------------------------------
the standard db configuration entries also from sme7

db configuration show mediawiki 
mediawiki=service
    DbName=mediawiki
    DbUser=mediawikiuser
    HTTPS=on
    Name=MediaWiki
    PublicAccess=local


In "PublicAcces = local" scenario you can add also one Entry AllowHosts with comma separatd IP's from where you like to be accessed (even outzide local network)

something like
    AllowHosts=10.10.10.1,10.20.20.1,10.30.1.1