Jump to content

User:Huji

From mediawiki.org

Find me here please.


Useful links for me:


Setting up an Ubuntu VM for MW development

I had to do this so many times (setting up an Ubuntu VM using VirtualBox, then installing and configuring MediaWiki on it to resemble the WMF environment, just to start working on a patch on MW or an extension) that I felt like I might as well just document the commands somewhere so I can copy-paste them the next time!

  1. Install Oh-my-zsh!
    sudo apt-get install zsh
    wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
    chsh -s `which zsh`
    Log out and log back in
  2. Install LAMP, and git stuff
    sudo apt-get install apache2 mysql-server php-mysql php-mbstring php-xml curl git libapache2-mod-php php-mcrypt python-pip ssh composer
    sudo service apache2 restart
  3. Configure git
    git config --global user.email "[email protected]"
    git config --global user.name "Your Name"
  4. Install git-review
    sudo pip install git-review
  5. Create SSH private and public keys
    cd; ssh-keygen -t rsa -C "[email protected]"
    Store the public key on https://gerrit.wikimedia.org/r/#/settings/ssh-keys
  6. Clone mediawiki into /var/www/html
    sudo chmod 777 /var/www/html
    cd /var/www/html
    git clone ssh://[email protected]:29418/mediawiki/core.git .
    composer update
  7. Clone the Vector skin:
    cd skins
    git clone ssh://[email protected]:29418/mediawiki/skins/Vector.git .
  8. Add wfLoadSkin( 'Vector' ); to the end of LocalSettings.php file
  9. Create the CentralAuth database
    cd extensions
    git clone ssh://[email protected]:29418/mediawiki/extensions/CentralAuth.git
    cd CentralAuth
    mysql -u root -p then ...
    CREATE DATABASE centralauth;
    USE centralauth;
    SOURCE central-auth.sql;
    quit
  10. Install MediaWiki; follow this: https://gist.github.com/Huji/a41e3d59ac4c43f245083024dbf36203