Difference between revisions of "Script Re-Install SpeedyWiki di Ubuntu 16.04"

From OnnoWiki
Jump to navigation Jump to search
(Created page with "Asumsi username root password 123456 database mediawiki Lokasi file images.tar.gz dan wikidb.sql.tar.gz di /usr/local/src Buat Script misalnya vi /usr/local/bin/reinst...")
 
Line 12: Line 12:
 
isi dengan
 
isi dengan
  
mkdir -p /var/data/library/datawiki
 
rm -Rf /usr/local/src/var
 
rm -Rf /usr/local/src/wikidb*
 
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/images.tar.gz -O /var/data/library/datawiki/images.tar.gz
 
 
  rm -Rf /usr/local/src/var
 
  rm -Rf /usr/local/src/var
 
  rm -Rf /usr/local/src/wikidb*
 
  rm -Rf /usr/local/src/wikidb*
Line 23: Line 18:
 
  tar zxvf images.tar.gz
 
  tar zxvf images.tar.gz
 
  tar zxvf wikidb.sql.tar.gz
 
  tar zxvf wikidb.sql.tar.gz
  cp -Rf /usr/local/src/var/www/html/wiki/images /var/www/wiki/ &
+
  cp -Rf /usr/local/src/var/www/html/wiki/images /var/www/html/wiki/ &
  chown -Rf www-data.www-data /var/www/wiki &
+
  chown -Rf www-data.www-data /var/www/html/wiki &
 
  service mysql stop
 
  service mysql stop
 
  service mysql start
 
  service mysql start
 
  mysqladmin --user=root --password=123456 --force drop mediawiki
 
  mysqladmin --user=root --password=123456 --force drop mediawiki
 
  mysqladmin --user=root --password=123456 create mediawiki
 
  mysqladmin --user=root --password=123456 create mediawiki
  mysql -u root -p123456 mediawiki < /var/www/wiki/maintenance/tables.sql
+
  mysql -u root -p123456 mediawiki < /var/www/html/wiki/maintenance/tables.sql
 
  mysql -u root -p123456 mediawiki < /usr/local/src/var/www/html/pustaka/datawiki/wikidb.sql
 
  mysql -u root -p123456 mediawiki < /usr/local/src/var/www/html/pustaka/datawiki/wikidb.sql
 
  service mysql stop
 
  service mysql stop
 
  service mysql start
 
  service mysql start
  cd /var/www/wiki/maintenance
+
  cd /var/www/html/wiki/maintenance
 
  php update.php
 
  php update.php
 
  service mysql stop
 
  service mysql stop

Revision as of 11:30, 13 June 2017

Asumsi

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

Buat Script misalnya

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

isi dengan

rm -Rf /usr/local/src/var
rm -Rf /usr/local/src/wikidb*
cp -Rf /var/data/library/datawiki/* /usr/local/src
cd /usr/local/src
tar zxvf images.tar.gz
tar zxvf wikidb.sql.tar.gz
cp -Rf /usr/local/src/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
mysqladmin --user=root --password=123456 --force drop mediawiki
mysqladmin --user=root --password=123456 create mediawiki
mysql -u root -p123456 mediawiki < /var/www/html/wiki/maintenance/tables.sql
mysql -u root -p123456 mediawiki < /usr/local/src/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 &


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