The collaboratively edited Wikipedia (http://en.wikipedia.org) is a
vast, searchable repository of information, constantly written and re-written
by its readers. Don’t you wish you or your group could have your own
editable encyclopedia of brain dumps and documentation like Wikipedia? You
can. MediaWiki (http://mediawiki.org/wiki/MediaWiki), the software
that runs Wikipedia, is freely available for anyone to install. In this hack,
you set up MediaWiki on your Windows PC and add and edit pages to your
new, local personalpedia.
NOTE MediaWiki is advanced wiki software that requires Apache web server,
the PHP scripting language, and the MySQL database server installed to run.
What You Need
■■ AWindows computer, not already running Apache web server.
■■ WAMP server software, the all-in-one PHP/MySQL/Apache
installation for Windows XP, available as a free download at
http://en.wampserver.com.
■■ MediaWiki, available as a free download at
http://mediawiki.org/wiki/MediaWiki.
What to Do
Setting up MediaWiki involves configuring the WAMP web and database
servers as well as the MediaWiki source files. Here’s how to get all the components
installed and working together.
WARNING Running a server on your personal computer can be a security
risk. Make sure you are behind a firewall that prevents unauthorized access to
your server. See Hack 85, “Firewall Your Computer,” for more information.
1. Download WAMP and install it in the C:\wamp\ directory. (If you
must install it elsewhere, make sure the folder you choose has no spaces
or special characters in its name.) Check the Autostart option. When the
installation completes, visit http://localhost/ in your web
browser to see the front page of your new web server (see Figure 1-5).
2. You’re already behind or running a firewall (right?) but just to be on the
safe side, you’re going to assign a password to your new database
server. (It’s good to be healthily paranoid where security’s concerned.)
From the homepage of your WAMP installation (http://localhost),
go to the Tools section and click the PHPmyadmin 2.7.0-pl2 link (your
version may be more recent).
3. Then, click the Privileges link. Check all users except root, and click
Delete.
4. Click the Edit button next to the root user, and change the password to
something you’ll remember and save. Now PHPmyadmin no longer
has to access your database, because it doesn’t have your new password.
You can remedy that easily.
5. Open the C:\wamp\phpmyadmin\config.inc.php file in a text
editor. Change the line that reads:
$cfg[‘Servers’][$i][‘password’] = ‘’;
to
$cfg[‘Servers’][$i][‘password’] = ‘yournewpassword’;
Where yournewpassword is the password you just set up in PHPmyadmin.
Refresh the PHPmyadmin interface in your web browser,
and you should be able to view your database information.
6. Unzip and untar the MediaWiki package you downloaded. Rename the
resulting folder (probably called media-wiki-1.6.3, although your version
may differ) to mywikipedia and move the entire directory to
C:\wamp\www\mywikipedia.
7. Access your new MediaWiki installation at http://localhost/
mywikipedia. Click the Set the Wiki Up! link. The screen that opens
requires all of MediaWiki’s configuration options.
8. This will seem like a long, complicated questionnaire but it really isn’t.
Accept all the default values except you must set a site name (mine is
Ginapedia), WikiSysOp password, and your database password. The
Database User can be root and the password whatever you chose in
step 2. (Alternately, create a non-root database user with fewer rights in
phpMyAdmin and use that instead.)
9. When you’ve finished configuring your wiki, click the Install! button
and let MediaWiki work its magic. If all goes well, you get a message at
the bottom of the screen that reads, “Move the config/LocalSettings.php
file into the parent directory, then follow this link to your wiki.” To do
that, cut and paste the C:\wamp\www\mywikipedia\config\
LocalSettings.php file to C:\wamp\www\mywikipedia\
LocalSettings.php
Then click the link to visit your new wiki installation, located at
http://localhost/mywikipedia.
10. You might notice that the image in the upper-left corner isn’t very personal.
To set it to something you like, crop and resize an image of your
choice to 135×135 pixels, and save it as C:\wamp\www\mywikipedia\
skins\common\images\mywikilogo.jpg. Then, open the c:\wamp\
www\mywikipedia\LocalSettings.php file and change the line that
reads:
$wgLogo = “$wgStylePath/common/images/wiki.png”;
to:
$wgLogo = “$wgStylePath/common/images/mywikilogo.jpg”;
Refresh the wiki front page to see your new logo.
Now you’ve got a clean, new, customized local installation of MediaWiki all
ready to use however you please. As evidenced by Wikipedia, the best application
of a wiki is group collaboration. However, wikis come in handy for individual
use as well, to track lists, notes, links, images, or anything else you want
to search or reference over time.
vast, searchable repository of information, constantly written and re-written
by its readers. Don’t you wish you or your group could have your own
editable encyclopedia of brain dumps and documentation like Wikipedia? You
can. MediaWiki (http://mediawiki.org/wiki/MediaWiki), the software
that runs Wikipedia, is freely available for anyone to install. In this hack,
you set up MediaWiki on your Windows PC and add and edit pages to your
new, local personalpedia.
NOTE MediaWiki is advanced wiki software that requires Apache web server,
the PHP scripting language, and the MySQL database server installed to run.
What You Need
■■ AWindows computer, not already running Apache web server.
■■ WAMP server software, the all-in-one PHP/MySQL/Apache
installation for Windows XP, available as a free download at
http://en.wampserver.com.
■■ MediaWiki, available as a free download at
http://mediawiki.org/wiki/MediaWiki.
What to Do
Setting up MediaWiki involves configuring the WAMP web and database
servers as well as the MediaWiki source files. Here’s how to get all the components
installed and working together.
WARNING Running a server on your personal computer can be a security
risk. Make sure you are behind a firewall that prevents unauthorized access to
your server. See Hack 85, “Firewall Your Computer,” for more information.
1. Download WAMP and install it in the C:\wamp\ directory. (If you
must install it elsewhere, make sure the folder you choose has no spaces
or special characters in its name.) Check the Autostart option. When the
installation completes, visit http://localhost/ in your web
browser to see the front page of your new web server (see Figure 1-5).
2. You’re already behind or running a firewall (right?) but just to be on the
safe side, you’re going to assign a password to your new database
server. (It’s good to be healthily paranoid where security’s concerned.)
From the homepage of your WAMP installation (http://localhost),
go to the Tools section and click the PHPmyadmin 2.7.0-pl2 link (your
version may be more recent).
3. Then, click the Privileges link. Check all users except root, and click
Delete.
4. Click the Edit button next to the root user, and change the password to
something you’ll remember and save. Now PHPmyadmin no longer
has to access your database, because it doesn’t have your new password.
You can remedy that easily.
5. Open the C:\wamp\phpmyadmin\config.inc.php file in a text
editor. Change the line that reads:
$cfg[‘Servers’][$i][‘password’] = ‘’;
to
$cfg[‘Servers’][$i][‘password’] = ‘yournewpassword’;
Where yournewpassword is the password you just set up in PHPmyadmin.
Refresh the PHPmyadmin interface in your web browser,
and you should be able to view your database information.
6. Unzip and untar the MediaWiki package you downloaded. Rename the
resulting folder (probably called media-wiki-1.6.3, although your version
may differ) to mywikipedia and move the entire directory to
C:\wamp\www\mywikipedia.
7. Access your new MediaWiki installation at http://localhost/
mywikipedia. Click the Set the Wiki Up! link. The screen that opens
requires all of MediaWiki’s configuration options.
8. This will seem like a long, complicated questionnaire but it really isn’t.
Accept all the default values except you must set a site name (mine is
Ginapedia), WikiSysOp password, and your database password. The
Database User can be root and the password whatever you chose in
step 2. (Alternately, create a non-root database user with fewer rights in
phpMyAdmin and use that instead.)
9. When you’ve finished configuring your wiki, click the Install! button
and let MediaWiki work its magic. If all goes well, you get a message at
the bottom of the screen that reads, “Move the config/LocalSettings.php
file into the parent directory, then follow this link to your wiki.” To do
that, cut and paste the C:\wamp\www\mywikipedia\config\
LocalSettings.php file to C:\wamp\www\mywikipedia\
LocalSettings.php
Then click the link to visit your new wiki installation, located at
http://localhost/mywikipedia.
10. You might notice that the image in the upper-left corner isn’t very personal.
To set it to something you like, crop and resize an image of your
choice to 135×135 pixels, and save it as C:\wamp\www\mywikipedia\
skins\common\images\mywikilogo.jpg. Then, open the c:\wamp\
www\mywikipedia\LocalSettings.php file and change the line that
reads:
$wgLogo = “$wgStylePath/common/images/wiki.png”;
to:
$wgLogo = “$wgStylePath/common/images/mywikilogo.jpg”;
Refresh the wiki front page to see your new logo.
Now you’ve got a clean, new, customized local installation of MediaWiki all
ready to use however you please. As evidenced by Wikipedia, the best application
of a wiki is group collaboration. However, wikis come in handy for individual
use as well, to track lists, notes, links, images, or anything else you want
to search or reference over time.
No comments:
Post a Comment