User:Huji

From MediaWiki.org
Jump to: navigation, search

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 atom
    sudo add-apt-repository ppa:webupd8team/atom
    sudo apt-get update
    sudo apt-get install atom
  2. 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
  3. 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
  4. Configure git
    git config --global user.email "you@example.com"
    git config --global user.name "Your Name"
  5. Install git-review
    sudo pip install git-review
  6. Create SSH private and public keys
    cd; ssh-keygen -t rsa -C "you@example.com"
    Store the public key on https://gerrit.wikimedia.org/r/#/settings/ssh-keys
  7. Clone mediawiki into /var/www/html
    sudo chmod 777 /var/www/html
    cd /var/www/html
    git clone ssh://huji@gerrit.wikimedia.org:29418/mediawiki/core.git .
    composer update
  8. Clone the Vector skin:
    cd skins
    git clone ssh://huji@gerrit.wikimedia.org:29418/mediawiki/skins/Vector.git .
  9. Add wfLoadSkin( 'Vector' ); to the end of LocalSettings.php file
  10. Create the CentralAuth database
    cd extensions
    git clone ssh://huji@gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth.git
    cd CentralAuth
    mysql -u root -p then ...
    CREATE DATABASE centralauth;
    USE centralauth;
    SOURCE central-auth.sql;
    quit
  11. Install MediaWiki; follow this: https://gist.github.com/Huji/a41e3d59ac4c43f245083024dbf36203