User:Greudin
Appearance
Salut,
Currently operating:
- bricosoft.com special:version : svn stable version + mysql Ubuntu server like farm wiki (see wiki family)
1 local mediawiki svn + postgresql1 mediawiki 1.9.3 + mysql FreeBSD server1 mediawiki 1.10.0 + postgresql Debian server
In the Wikimedia's ecosystem, I'm :
- bureaucrat on wikibooks:fr:
- sysop on commons:
to do
[edit]must have extensions
[edit]require_once :
- Extension:SyntaxHighlight GeSHi
- Extension:ConfirmEdit pour interdire 99,999% des spambots
include_once :
A tester :
- Extension:ReaderFeedback
scripts for *nix happy people
[edit]All this scripts make things in userland (aka not root) - but tricky things are made as sudoer -, it differs from several www's sources (/usr/local/... etc :().
libs_mediawiki_extensions_add.sh
[edit]- check your PATH, echoing $PATH must show /home/YOURLOGIN/bin.
- alter DIR_EXTENSIONS, it's the folder where extensions are
- put this file into your home ~/bin/libs_mediawiki_extensions_add.sh
- chmod u+x it
- launch it from the root dir of your new wiki where LocalSettings.php *is*, for example:
$ libs_mediawiki_extensions_add.sh SyntaxHighlight_GeSHi
#!/bin/bash
usage () { # Message "Usage :"
cat << EOM
Usage : $(basename $0) extension_name
EOM
return 0
}
function header
{
echo "================================================================================"
echo " $1"
echo "================================================================================"
}
if test "$#" -eq 0
then
usage
exit 1
fi
DIR_EXTENSIONS="$HOME/libs/mediawiki/extensions"
URL_EXTENSIONS="http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/"
header "adding $1 extension"
cd "$DIR_EXTENSIONS"
svn co "$URL_EXTENSIONS/$1"
cd -
cat << FIN >> LocalSettings.php
require_once("extensions/$1/$1.php");
FIN
libs_mediawiki_extensions_update.sh
[edit]It updates all extensions
#!/bin/bash
function header
{
echo "================================================================================"
echo " $1"
echo "================================================================================"
}
DIR_EXTENSIONS="$HOME/libs/mediawiki/extensions"
for extension in $DIR_EXTENSIONS/*
do
if [ -d "$extension" ]
then
header "update $extension"
svn update "$extension"
fi
done
mediawiki_create_database.sh
[edit]Create a fresh new Mysql database for your new wiki.
usage : ./mediawiki_create_database.sh mywiki_rules_zz
#!/bin/bash
usage () { # Message "Usage :"
cat << EOM
Usage : $(basename $0) database
EOM
return 0
}
if test "$#" -eq 0
then
usage
exit 1
fi
function header
{
echo "================================================================================"
echo " $1"
echo "================================================================================"
}
LIBPATH="$HOME/libs/mediawiki"
header "Database $1 creation #1/2"
mysql -u root -p -e "create database $1;"
header "Rights granting #2/2"
mysql -u root -p -e "grant create, index, select, insert, update, delete, alter, lock tables on $1.* to 'wikiuser'@'localhost' identified by 'password';"
mediawiki_install.sh
[edit]It installs a brand new wiki using mediawiki as a lib. (Taken from various sources, please remind me and I'll credit it correctly).
#!/bin/bash
#cd "`dirname "$0"`"
function header
{
echo "================================================================================"
echo " $1"
echo "================================================================================"
}
LIBPATH="$HOME/libs/mediawiki"
header "Install #1/2 : ln, cp, chown ..."
ln -s $LIBPATH/{languages,includes,skins,redirect.php,index.php,maintenance,StartProfiler.php} .
cp -a $LIBPATH/config/ $LIBPATH/install-utils.inc .
mkdir images
sudo chown www-data: config/ images/
sudo chmod ug+w config images
header "Install #2/2 : LocalSettings.php, chmod, rm ... Please browse this FQDN right now, fill out the form and continue this script by hitting any key..."
read
mv config/LocalSettings.php .
sudo chmod 700 LocalSettings.php
rm -rf config install-utils.inc
Wikimedia sync script
[edit]Sync your wiki with wikimedia ones :
voir aussi
[edit]Cordialement, G.