NUC Web

From wikidb
Jump to: navigation, search

Back

Rainier NUC

Common Setup

  • install apache2
  • install openssh-server - required for Fetch and ssh on Mac

Rainier Home Page

  • From Mac copied from the My Webs/root directory
    • index.htm
    • family0408L.jpg
    • index_files/

My Home Page

  • created /home/epp/public_html
  • chmod 0755 /home/epp/public_html
  • sudo a2enmod userdir
  • sudo service apache2 restart
  • copied web pages from Mac to public_html
    • index.htm
    • Icons/
    • Young.jpg
    • subdirectories
  • Ubuntu guide help
  • Apache docs help

MediaWiki

Install

Install required and optional packages

 sudo apt-get install mysql-server php5 php5-mysql libapache2-mod-php5
 sudo apt-get install php-apc php5-intl imagemagick phpmyadmin vsftpd php5-cli

Mediawiki Download for version 1.23.6.

  • Untar
  • Move to the wiki home. The recomended location for 14.04 ubuntu didn't work (/var/lib/mediawiki). The following worked:
 sudo mv mediawiki-1.23.6/ /var/www/html/wiki

Backup zdome

Backing up a wiki

Current steps on rainier (6/19/2015)

 cd /home/epp/dbbackup
 . dbbackup.sh
 cd dbbackups/wikidb
 tar czpf wiki20150619.tgz /var/www/html/wiki/ 

On zdome:

 mysqldump --user=root --password=xxx wikidb > wikidb-20141125.sql tar xzf wiki20141125.tgz
 tar czpf wiki20141125.tgz /var/www/html/wiki/

The ~/.my.conf option file contains the mysql root passwd so it can be skipped above.

 [client]
 password=xxx

Dietrich's backup script. MySQL Backup Script. Run it with cron.

 cron -e

Add this line

 # Backup MySQL DBs at 2:00am every day.
 0 2 * * * /home/epp/dbbackup/dbbackup.sh

See cron How To

Move wiki to rainier

Moving a wiki

On rainier copy and unpackage the wiki:

 scp epp@10.0.0.8:/home/dbbackup/dbbackups/wikidb/wikidb-20141125T1125.sql.gz .
 scp epp@10.0.0.8:/home/...../wiki20141125.tgz
 tar xzf wiki20141125.tgz
 gunzip wikidb-20141126T1119.sql.gz

Create the wikidb on MySQL

 mysql -u root -p
 
 mysql> CREATE DATABASE wikidb;
     Query OK, 1 row affected (0.00 sec)
 
 mysql> show databases;
     +--------------------+
     | Database           |
     +--------------------+
     | information_schema |
     | mysql              |
     | performance_schema |
     | wikidb             |
     +--------------------+
     4 rows in set (0.00 sec)
 
 mysql> GRANT ALL ON wikidb.* TO 'epp' IDENTIFIED BY 'passwd';
     Query OK, 0 rows affected (0.00 sec)
 
 mysql> quit
     Bye

Load the wikidb

 mysql -u epp -p wikidb < wikidb-20141126T1119.sql 
     Enter password: 

Configure the MediaWiki from 10.0.0.253/wiki. Then copy the newly created settings file to the Wiki. Later when I changed to a static IP 10.0.0.9 I changed all the 253 entries to 9.

 cp ~/Downloads/LocalSettings.php /var/www/html/wiki/

Copy the original images to the wikik.

 cp -r images/* /var/www/html/wiki/images/

Other Databases

Repeated creating databases for:

  • gallery
  • crowlivia

Then copy their web resources to www.

 tar xzf crowlivia20141125.tgz 
 tar xzf gallery20141125.tgz 
 sudo mv var/www/crowlivia/ /var/www/
 sudo mv var/www/gallery/ /var/www/


PDF

Under the Tools tab at the left go to Special pages. Then select Version. This Midiawiki is version 1.23.6. Download that version of the PDF handler form [1]

 cd /var/www/html/wiki/extensions
 tar xzvf ~/Downloads/PdfHandler-REL1_28-cb4cbb3.tar.gz

Edit /var/www/html/wiki/LocalSettings.php

 diff LocalSettings.php LocalSettings.php.170415 
   150,154d149
   < 
   < # Add new types to the existing list from DefaultSettings.php
   < # $wfLoadExtension( 'PdfHandler' ); need newer version
   < require_once "$IP/extensions/PdfHandler/PdfHandler.php";
   < $wgFileExtensions[] = 'pdf';
 sudo service apache2 restart

The extension load command $wgLoadExtension does not work in this Midiwike version. It results in a freeze. Us "required_once" instead.