Replikasi Mediawiki https://lms.onnocenter.or.id/wiki/ ubuntu 20.04, khusus mediawiki-1.32.0

server :

install mediawiki :

buat tempat menyimpan keperlannya

mkdir /var/data
mkdir /var/data/library
mkdir /var/data/library/datawiki
sudo apt update
sudo apt-get install apache2 php php-xmlrpc php-mysql php-gd php-cli php-curl mysql-client mysql-server libphp-adodb libgd-dev php-pear php-common libapache2-mod-php php-fpm php-bz2 php-xml imagemagick git php-mbstring
service apache2 stop
service apache2 start
sudo locale-gen id_ID.UTF-8

buat database mediawiki (aku lewat phpmyadmin) -> kasih nama mediawiki

download & install mediawiki :

cd /var/data/library/datawiki/
wget https://releases.wikimedia.org/mediawiki/1.32/mediawiki-1.32.0.tar.gz
tar zxvf mediawiki-1.32.0.tar.gz
mv mediawiki-1.32.0 wiki
cp wiki /var/www/html/
cp -Rf /var/www/html/wiki/mw-config/ /var/www/html/wiki/config
chmod a+w /var/www/html/wiki/mw-config
chmod a+w /var/www/html/wiki/config
chmod -Rf 777 wiki
chown -Rf www-data.www-data wiki
/etc/init.d/apache2 restart

lanjut install di web :

*catatan : Database Prefix -> wiki_ 

download LocalSettings.php, taruh di file bersama wiki/index.php

cd ~/Downloads
mv LocalSettings.php /var/www/html/wiki/
chmod 777 /var/www/html/wiki/LocalSettings.php

lanjut di terminal

cd /var/data/library/datawiki/
# yg kepakai cuman wikidb.sql.tar.gz & images.tar.gz, jadi kyknya cuman download itu aja
wget http://onnocenter.or.id/pustaka/datawiki/wikidb.sql.tar.gz -O /var/data/library/datawiki/wikidb.sql.tar.gz
wget http://onnocenter.or.id/pustaka/datawiki/wikidb.sql -O /var/data/library/datawiki/wikidb.sql
wget http://onnocenter.or.id/pustaka/datawiki/wikidb.xml -O /var/data/library/datawiki/wikidb.xml
wget http://onnocenter.or.id/pustaka/datawiki/wikidb.xml.tar.gz -O /var/data/library/datawiki/wikidb.xml.tar.gz
wget http://onnocenter.or.id/pustaka/datawiki/images.tar.gz -O /var/data/library/datawiki/images.tar.gz
tar zxvf images.tar.gz
tar zxvf wikidb.sql.tar.gz
cp -Rf /var/data/library/datawiki/var/www/html/wiki/images /var/www/html/wiki/
chown -Rf www-data.www-data /var/www/html/wiki
service mysql stop
service mysql start
/usr/bin/mysqladmin --user=root --password=123456 --force drop mediawiki
/usr/bin/mysqladmin --user=root --password=123456 create mediawiki
mysql -u root -p123456 mediawiki < /var/www/wiki/html/maintenance/tables.sql
mysql -u root -p123456 mediawiki < /var/data/library/datawiki/var/www/html/pustaka/datawiki/wikidb.sql
service mysql stop
service mysql start
cd /var/www/html/wiki/maintenance
php update.php
service mysql stop
service mysql start
chown -Rf nobody.nogroup /var/data
chmod -Rf 777 /var/data

refresh web nya, done