Skip to content

Instantly share code, notes, and snippets.

@samuell
Last active October 7, 2016 04:14
Show Gist options
  • Select an option

  • Save samuell/4f515973bb8d215eac22 to your computer and use it in GitHub Desktop.

Select an option

Save samuell/4f515973bb8d215eac22 to your computer and use it in GitHub Desktop.
# Install some essential development tools
sudo apt-get install gnome-terminal vim git tig curl subversion
# Installing the basics of a LAMP server
sudo apt-get install apache2 mysql-server php5
# Installing the "connections" between the packages
sudo apt-get install libapache2-mod-php5 php5-mysql
# Various extra stuff for
sudo apt-get install php5-cli php5-gd php5-xdebug php5-json php5-xsl
# Restart the Apache web server
sudo service apache2 restart
# Test that the web server works
firefox http://localhost
# Go the web folder
cd /var/www
# Change owner and group of the main web files folder:
sudo chown -R rdfio:www-data html/
# Go into the html folder
cd /var/www/html
# Create a file named phpinfo.php with the following content:
<?php
phpinfo();
# Test the php info file in a browser:
firefox http://localhost/phpinfo.php
# Download MediaWiki
firefox http://mediawiki.org
# Download the latest mediawiki release
wget http://releases.wikimedia.org/mediawiki/1.23/mediawiki-1.23.0.tar.gz
# Unpack the mediawiki archive
tar -zxvf mediawiki-1.23.0.tar.gz
# Rename the extracted folder
mv mediawiki-1.23.0 mw123
# Log in to MySQL as root:
mysql -u root -p
# In the mysql shell, enter the following commands:
CREATE DATABASE mw123;
CREATE USER mw123@localhost IDENTIFIED by 'changethis';
GRANT ALL ON mw123.* TO mw123@localhost;
# Quit from the MySQL shell:
quit
# Run through the installation of mediawiki with the above settings ...
# After downloading the LocalSettings.php file, copy it to the wiki folder:
cp ~/Downloads/LocalSettings.php .
# Enter your new wiki:
firefox http://localhost/mw123/
# Head over to the SMW website:
firefox http://semantic-mediawiki.org
# Click the "orange button" saying "SMW 1.9.2"
# Locate and click the link to the "installing" instructions.
# Open the composer intall instructions
firefox https://getcomposer.org/doc/00-intro.md#installation-nix
# Get Composer
curl -sS https://getcomposer.org/installer | php
# Check that you have the phar file at hand
ll *.phar
# Install SMW via composer
php composer.phar require mediawiki/semantic-media-wiki "~1.9"
# Go to the RDFIO page:
firefox http://www.mediawiki.org/wiki/Extension:RDFIO
# Install the dependency, Wiki Object Model:
cd extensions
svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/WikiObjectModel
# Add the following line to LocalSettings.php:
include_once("$IP/extensions/WikiObjectModel/WikiObjectModel.php");
# You can alternatively just run this command:
echo 'include_once("$IP/extensions/WikiObjectModel/WikiObjectModel.php");' >> LocalSettings.php
# Install dependency #2: ARC2:
cd extensions/SemanticMediaWiki
mkdir libs
cd libs
git clone https://github.com/semsol/arc2.git arc
# Install RDFIO
cd wiki/extensions
git clone https://github.com/samuell/RDFIO.git
# Add the following lines to your LocalSettings.php:
include_once("$IP/extensions/RDFIO/RDFIO.php");
$smwgOWLFullExport = true;
# Alternatively, just run this command:
echo 'include_once("$IP/extensions/RDFIO/RDFIO.php");' >> LocalSettings.php
echo '$smwgOWLFullExport = true;' >> LocalSettings.php
# Log in to your wiki as a super user
# Open the page MediaWiki:Sidebar
firefox http://localhost/mw123/MediaWiki:Sidebar
# Edit the page and paste the following code, and save:
* Semantic Tools
** Special:ARC2Admin|ARC2 Admin
** Special:RDFImport|RDF Import
** Special:SPARQLEndpoint|SPARQL Endpoint
** Special:SPARQLImport|SPARQL Import
# Go to the Special:ARC2Admin page, and hit the "install" button
firefox http://localhost/mw123/Special:Arc2Store
# Go to The "RDF Import" page, by clicking in the menu to the left
# Import some test data
# Check in the "Recent changes" if something has been installed!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment