The following is the GNU All-permissive License as recommended in https://www.gnu.org/licenses/license-recommendations.en.html

Copyright (C) 2024 Free Software Foundation sysadmin@fsf.org

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.

Contributions are welcome. See https://savannah.gnu.org/maintenance/fsf/.

install

~# aptitude install openssh-client apache2 curl htop imagemagick
mysql-server php5 php-cas php5-cgi php5-curl php5-gd php5-mysql
php5-xmlrpc unzip emacs24-nox nano

a2dissite 000-default.conf

Apache

a2enmod rewrite
mkdir -p /var/log/apache2/libreplanet/

/var/www/.htaccess

RewriteEngine On
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
############


/etc/apache2/sites-available/libreplanet.org
############
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory /var/www>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
/var/log/apache2/libreplanet/error.log
/var/log/apache2/libreplanet/access.log combined
</VirtualHost>
############

/etc/apache2/sites-available/libreplanet.org-ssl

service apache2 reload

MYSQL

mysql -uroot -p'pass'; #login to mysql
create database mediawiki; #create database
grant all privileges on mediawiki.* to mediawiki@localhost identified by
'mUqL3juF'; #create user and grant all permissions to use the database
mysql -umediawiki -pmUqL3juF mediawiki < libreplanet.2015.05.05.sql

Files

WWW=/var/www/ #set path variable for the www environment
LP=/var/www/w #set path variable for the new wiki
OLP=/var/www/w_old #set path variable the old wiki

tar zxf libreplanet-2015-05-05.tgz -C $WWW #untars old wiki into www
mv $LP $OLP # moves old wiki to backup directory

wget -P $WWW
http://releases.wikimedia.org/mediawiki/1.25/mediawiki-1.25.1.tar.gz
#gets latest version of mediawiki
tar zxf $WWW/mediawiki-1.25.1.tar.gz -C $WWW # untars latest verion of
wiki into www
mv $WWW/mediawiki-1.25.1 $LP #changes the name from mediawiki to w under
www directory
mkdir $LP/tmp #creates tmp folder under the latest mediawikiversion
directory

cp $OLP/LocalSettings.php $LP/LocalSettings.php # copies the original
config file to the new mediawiki version
cp -r $OLP/images $LP/ # copies al immages from the old wiki to the new one

#comment ;' at $LP/LocalSettings:348

awk -F'/' '/extensions/ {print $3}' $LP/LocalSettings.php|sort #gets a
sorted list of the extensions installed
awk -F'/' '/extensions/ {print $3}' $LP/LocalSettings.php|sort >
$LP/tmp/required_extensions

ls $LP/extensions/|sort # gets a list of the already available
extensions under the latest mediawiki version
ls $LP/extensions/|sort > $LP/tmp/available_extensions>
$LP/tmp/available_extensions # gets a list of the already available
extensions under the latest mediawiki version

sdiff $LP/tmp/available_extensions  $LP/tmp/required_extensions


cp -r $OLP/extensions/UserMerge/ $LP/extensions/
cp -r $OLP/extensions/Calendar/ $LP/extensions/
cp -r $OLP/extensions/SemanticForms $LP/extensions/
cp -r $OLP/extensions/SemanticMediaWiki $LP/extensions/
cp -r $OLP/extensions/MultiPages $LP/extensions/
cp -r $OLP/extensions/SubPageList3 $LP/extensions/
cp -r $OLP/extensions/Maintenance $LP/extensions/
cp -r $OLP/extensions/bad-behavior $LP/extensions/
cp -r $OLP/extensions/WikiCurl $LP/extensions/
cp -r $OLP/extensions/CASAuth $LP/extensions/
cp -r $OLP/extensions/MagicNoCache.php $LP/extensions/
cp -r $OLP/extensions/WikiBanner $LP/extensions/
cp $OLP/includes/DatabaseFunctions.php $LP/includes/
cp $OLP/skins/common/images/groups-logo.png $LP/skins/logo.png

wget http://downloads.wordpress.org/plugin/bad-behavior.2.2.16.zip
mv $LP/extension/bad-behavior $LP/extension/bad-behavior_bak
unzip bad-behavior.2.2.16.zip  -d $LP/extensions/
rm bad-behavior.2.2.16.zip

#comment wfLoadExtensionMessages at $LP/extensions/Calendar/Calendar.php:115
#comment wfLoadExtensionMessages at
$LP/extensions/SemanticForms/includes/SF_LinkUtils.inc:209

$wgLogo            = "$wgStylePath/logo.png";
$wgEnableUploads  = true;
$wgUseImageMagick = false;
$wgImageMagickConvertCommand = "/usr/bin/convert";
$wgTmpDirectory = "$IP/images/temp";

$LP/maintenance/update.php

find ./ -type f -exec chmod -R 0644 {} \; ;find ./ -type d -exec chmod
-R 0755 {} \;CustomLogErrorLog############