Script Re-Install SpeedyWiki di Ubuntu 10.04

From OnnoWiki
Revision as of 04:10, 14 August 2011 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Asumsi

username root
password 123456
database mediawiki
Lokasi file images.tar.gz dan wikidb.sql.gz di /usr/local/src

Buat Script misalnya

vi /usr/local/bin/reinstall-wiki.sh

isi dengan

rm -Rf /var/data/library/datawiki/*
rm -Rf /usr/local/src/var
rm -Rf /usr/local/src/wikidb*
wget http://125.160.17.21/speedyorari/view.php?file=datawiki/wikidb.sql.gz -O /var/data/library/datawiki/wikidb.sql.gz
wget http://125.160.17.21/speedyorari/view.php?file=datawiki/images.tar.gz -O /var/data/library/datawiki/images.tar.gz
cp -Rf /var/data/library/datawiki/* /usr/local/src
cd /usr/local/src
tar zxvf images.tar.gz
gunzip wikidb.sql.gz
cp -Rf /usr/local/src/var/www/html/wiki/images /var/www/wiki/
chown -Rf www-data.www-data /var/www/wiki
service mysql stop
service mysql start
mysqladmin --user=root --password=123456 --force drop mediawiki
mysqladmin --user=root --password=123456 create mediawiki
mysql -u mediawiki -pmediawiki mediawiki < /var/www/wiki/maintenance/tables.sql
mysql -u mediawiki -pmediawiki mediawiki < /usr/local/src/wikidb.sql
service mysql stop
service mysql start
cd /var/www/wiki/maintenance
php update.php
service mysql stop
service mysql start
chown -Rf nobody.nogroup /var/data &
chmod -Rf 777 /var/data &

Ijinkan untuk di jalankan

chmod -Rf 777 /usr/local/bin/reinstall-wiki.sh

Jalankan script

/usr/local/bin/reinstall-wiki.sh

Pastikan ke dua (2) halaman muka ini sama ..

http://localhost/wiki/index.php/Halaman_Utama
http://localhost/wiki/index.php/Main_Page

Referensi

Pranala Menarik