Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> MediaWiki Skins Won't Load?, We've got your solution here!
NeoAmsterdam
 Posted: Oct 30 2012, 03:21 AM
Quote Post


SLF Member
***

Group: Members
Posts: 88
Member No.: 181
Joined: 16-May 11









For the longest time now I've been avoiding mucking about with Apache and MySQL and all that jazz because I'd always end up with a mess every time I had to reconfigure MediaWiki - everything would be functional, but ugly.

Now that I've been forced to reinstall Our Fair Distro* and have copious free time**, I've finally sat down and figured out what's been going wrong with the "out-of-the-box" configuration for MediaWiki. Here's the how-to voodoo.

Nota bene: MediaWiki comes from EPEL's repo. Mix repos responsibly*.
  1. Install your webserver and database.
    I run Apache and MySQL so I'll use them in this instruction manual.
  2. Turn on Apache.
    chkconfig httpd --levels 345 on && service httpd start.
    Make sure Apache's running by browsing to your host's address.
  3. Turn on MySQL
    chkconfig mysqld --levels 345 on && service mysqld start.
    If you haven't set up MySQL, follow the directions that will appear on your screen and service mysqld restart.
  4. Install MediaWiki from EPEL.
    If you haven't enabled/installed EPEL, do so. Be sure to read the "don't mix repos" posts on the forum first!
    Once you've done that, yum install mediawiki119.
  5. Prepare your database
    See MediaWiki's Installation Manual for the relevant jiggery-pokery.
  6. Edit /etc/httpd/conf.d/mediawiki119.conf
    You need to change the default settings...
    CODE
    # Alias /wiki119/index.php           /var/www/mediawiki119/index.php
    # Alias /wiki119/api.php             /var/www/mediawiki119/api.php
    # Alias /wiki119/opensearch_desc.php /var/www/mediawiki119/opensearch_desc.php
    # Alias /wiki119/skins               /var/www/mediawiki119/skins
    # Alias /wiki119/images              /var/www/mediawiki119/images
    # Alias /wiki119                     /var/www/mediawiki119/

    # Remove this after installing.
    # Alias /wiki119/mw-config               /var/www/mediawiki119/mw-config

    # <Directory /var/www/mediawiki119>
    #  Options FollowSymLinks
    # </Directory>
    ...to this...
    CODE
    # Alias /wiki119/index.php           /var/www/mediawiki119/index.php
    # Alias /wiki119/api.php             /var/www/mediawiki119/api.php
    # Alias /wiki119/opensearch_desc.php /var/www/mediawiki119/opensearch_desc.php
    # Alias /wiki119/skins               /var/www/mediawiki119/skins
    # Alias /wiki119/images              /var/www/mediawiki119/images
    Alias /wiki119                     /var/www/mediawiki119/

    # Remove this after installing.
    Alias /wiki119/mw-config               /var/www/mediawiki119/mw-config

    <Directory /var/www/mediawiki119>
    Options FollowSymLinks
    </Directory>
    At this point we begin to ignore /usr/share/doc/mediawiki119/README.RPM because it's wrong in more ways than one...
  7. Allow MediaWiki to write its config file
    chmod a+w /var/www/mediawiki119/mw-config
  8. Restart Apache
    service httpd restart
  9. Configure MediaWiki
    If memory serves you should browse to http://your-host/wiki119/mw-config and follow directions.
  10. Retrieve your LocalSettings.php file.
    Eventually you'll put it into /var/www/mediawiki119/LocalSettings.php, but first...
  11. Edit /etc/httpd/conf.d/mediawiki119.conf
    It should now read as follows:
    CODE
    Alias /wiki119/index.php           /var/www/mediawiki119/index.php
    Alias /wiki119/api.php             /var/www/mediawiki119/api.php
    Alias /wiki119/opensearch_desc.php /var/www/mediawiki119/opensearch_desc.php
    Alias /wiki119/skins               /var/www/mediawiki119/skins
    Alias /wiki119/images              /var/www/mediawiki119/images
    Alias /wiki119                     /var/www/mediawiki119/

    # Remove this after installing.
    # Alias /wiki119/mw-config               /var/www/mediawiki119/mw-config

    <Directory /var/www/mediawiki119>
    Options FollowSymLinks
    </Directory>
    And now the critical dermatology:
  12. Make skins load with this symbolic link:
    ln -s /usr/share/mediawiki119/load.php /var/www/mediawiki119/load.php
    Finally...
  13. Put LocalSettings.php where it belongs and restart Apache.
That should do the trick. http://th166.photobucket.com/albums/u117/rdshear/Smiley%20Faces/th_smiley-face-thumbs-up.gif Just make sure that apache:apache owns /var/www/mediawiki119/images and you'll be good to go.

* Don't install OLPC's School Server software suite on Scientific Linux 6.2. Just don't. http://dl.dropbox.com/u/2835777/BangHead1.gif

** Maybe coding through hurricane Sandy such wasn't a good idea after all... rolleyes.gif


This post has been edited by NeoAmsterdam: Oct 30 2012, 03:52 AM
PM
^
joutlan
 Posted: Nov 11 2012, 05:30 AM
Quote Post


SLF Inceptor
*******

Group: Admins
Posts: 867
Member No.: 1
Joined: 8-April 11









Nice Neo....this will come in handy for some people....smile.gif

--------------------
DΞLL Precision M6700: 17 inch NB//i7-quad w/USB 3.0, 16.0GB, Quadro K5000M 2.0GB DDR3, RGBLED //W8P64/Scientific Linux 6.4 x64
DΞLL Vostro 3350 Nirvana: 13 inch NB w/ IntelSSD// W8Px64 (Work;Games)
Nexus 4 //Android
PMEmail PosterUsers Website
^
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll