Mediawiki installation/Version 1.23.8
From Biowikifarm Metawiki
MediaWiki version 1.23.8 is a long term support version.
Contents
Architecture
- see http://biowikifarm.net/meta/Mediawiki_installation#Cloning_a_new_wiki
- have a Long Term Support (LTS) Version of MediaWiki
- install extensions for a wiki version
MW_WMF_CLONE /usr/share/mw-wmf-clone ├ core (Git) ─────────git-archive-export───┐ /usr/share/mw-wmf-clone/core └ extensions (Git) ───git-archive-export─→ ) ─┐ /usr/share/mw-wmf-clone/extensions │ │ WIKI_SOURCE_LTS (e.g. REL1_23) │ │ ┌ core-files (local git archive-export) ←┘ │ /usr/share/mediawiki23 ├ extensions (mixed: │ /usr/share/mediawiki23/extensions │ svn biowikifarm, (repo: as svn-post-commit) │ git-archive-export) ←──────────────────┘ │ some svn extensions from MediaWiki Extension:StringFunctions ↓ │ WEB_WIKI (as LTS web Wiki) ├─→ core-files (linked) /var/www/v-infoflora/d/ └─→ extensions (linked) /var/www/v-infoflora/d/extensions composer-extensions must be dealt with /var/www/v-infoflora/d/composer.json on level WEB_WIKI individually
Git short help
#↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
git checkout <branch>
git checkout <tag-name>
git checkout -b <create-new-branch>
git branch -r|--remotes # list all branches
git tag -l|--list # list all tags
git tag -l|--list <pattern> # list tags matching the pattern
git archive <tag-or-branch-or-tree-ish> # extract an archive
#↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
Script(ed) installation
Try to install it from scratch and using no template (for the first time)
“Global Variables”
##↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
# set global variables
do_not_install_but_show_dry_run="" # "" or "anything-but-non-empty"
if [ "$do_not_install_but_show_dry_run" != "" ]; then
install_notice="DRY RUN (nothing is done)";
else
install_notice="INSTALL";
fi
git_mw_basedir="/usr/share/mw-wmf-clone"
git_mw_core_source_dir="${git_mw_basedir}/core"
git_mw_extension_source_dir="${git_mw_basedir}/extensions"
git_branch="origin/REL1_23"
git_tag="1.23.8"
v_wiki_folder="./v-infoflora"
v_wiki_sub_folder="" # default ""
web_wiki_script_folder="./d" # default ./w for wiki or web or what ever
web_wiki_config_folder="./mw-config" # default ./mw-config
web_base_dir="/var/www"
# mdo_web_installation="" # "" is false
if [ "${v_wiki_sub_folder}" == "" ];then
web_wiki_base_dir="${web_base_dir}/${v_wiki_folder}/${web_wiki_script_folder}"
else
web_wiki_base_dir="${web_base_dir}/${v_wiki_folder}/${v_wiki_sub_folder}/${web_wiki_script_folder}"
fi
mw_LTS_version_source_path="/usr/share/mediawiki23"
mw_LTS_version_source_extension_path="${mw_LTS_version_source_path}/extensions"
# echo "$mw_LTS_version_source_extension_path"
if [ "`command -v realpath`" ]; then web_wiki_base_dir=`realpath "$web_wiki_base_dir"`; fi
printf "\e[47mBase directory of the Wiki will be: \e[42m'%s'\e[0m\n" "${web_wiki_base_dir}"
echo -e "\e[31m$install_notice\e[0m"
# end of global variables
##↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
Create Web-Wiki
##↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
# STEP create web wiki directory
if ! [ -d "${web_wiki_base_dir}" ]; then
echo -e "\e[47mCreate wiki web base directory (sudo): \e[42m'${web_wiki_base_dir}'\e[0m"
if [ "$do_not_install_but_show_dry_run" == "" ]; then
sudo -u root -g mwadmin mkdir --parent "${web_wiki_base_dir}"
# sudo chown root:mwadmin "${web_wiki_base_dir}" -R
else
echo "sudo -u root -g mwadmin mkdir --parent \"${web_wiki_base_dir}\""
fi
else
echo -e "\e[47mWiki web base dirsectory exits already: \e[42m'${web_wiki_base_dir}'\e[0m"
fi
##↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
OpenMedia Symlink
##↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
# STEP create symlink to openmedia
if ! [ -d "${web_base_dir}/${v_wiki_folder}/o" ]; then
echo -e "\e[47mCreate Openmedia-symlink \e[42m'${web_base_dir}/${v_wiki_folder}/o'\e[47m → \e[42m'../v-species/o'\e[0m"
if [ "$do_not_install_but_show_dry_run" == "" ]; then
sudo ln -s "../v-species/o" "${web_base_dir}/${v_wiki_folder}/o"
sudo mkdir "${web_base_dir}/${v_wiki_folder}/o = Openmedia-symlink"
# sudo chown root:mwadmin "${web_wiki_base_dir}" -R
else
echo "sudo ln -s \"../v-species/o\" \"${web_base_dir}/${v_wiki_folder}/o\";"
fi
else
echo -e "\e[47mOpenmedia-symlink exits already \e[42m'${web_base_dir}/${v_wiki_folder}/o'\e[0m"
fi
##↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑