SMWCon Fall 2013/Hands-on session. Programming MediaWiki extension/Linux setup

From semantic-mediawiki.org

If you have linux machine you have to install the following:

  • Apache
  • PHP
  • MySQL
  • set up MediaWiki on that

There are good instructions on how to install Apache+php+mysql. We assume that you have Ubuntu.

1. Go to console and run

sudo apt-get install apache2 mysql-server php5 php5-mysql libapache2-mod-php5 php5-cli

2. Set mysql password

 sudo mysqladmin -u root password "<enter the new password here>" 

3. Create a mysql database and mysql user and make it possible for user to write into database. For that go to console and run:

mysql -uroot -p"<enter the password here>"
CREATE DATABASE mw CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER mwuser IDENTIFIED BY 'userpasswordhere';
GRANT ALL ON mw.* TO mwuser IDENTIFIED BY 'userpasswordhere';

4. Download the latest version of MediaWiki

5. Unpack it into your webserver directory. In case of Ubuntu it will be /var/www

6. Open your browser and go to http://127.0.0.1. Follow the installation process as usual

7. Install gedit (installation and usage instructions) or any other text editor