############################################################################### # # # INSTALL - How to install and upgrade HLmaps on your server # # - Copyright Scott McCrory as part of the HLmaps distribution # # - Distributed under the GNU Public License - see docs for info # # - http://hlmaps.sourceforge.net # # # ############################################################################### # CVS $Id: INSTALL,v 1.7 2000/11/26 01:12:09 smccrory Exp $ ############################################################################### Some important things have changed since 0.93, so READ THIS WHOLE FILE READ THIS WHOLE FILE READ THIS WHOLE FILE There, you've been told! :-) Introduction ------------ Setting up HLmaps really isn't a big deal, so don't let the long INSTALL file intimidate you. I've decided to be pretty detailed so that new users have all the information they need while sophisticated users will know exactly how the whole shebang works and how to customize it. Also, sorry to NT users out there for Linux-centric documentation - I could use some help with better NT instructions if you're up to the task...! Note: HLmaps now supports MySQL as the interrim data store. I highly recommend getting HLmaps to work with just the text data file first before switching to MySQL to make resolving any problems easier. That's also why I've put the pertainent installation instruction in a separate INSTALL.MySQL file... With that, here we go! Install Images -------------- First install all of the JPG images from the latest hlmaps_images package available at http://sourceforge.net/project/filelist.php?group_id=8280 into a web-accessable directory. If you already (or plan to) use hlds_ld.cgi (available at http://linuxhlds.halflife.org/) or halfStats (http://www.halfstats.com) or hlmon.pl (http://www.linuxquake.com/qsmon) or cssserverstat (http://server.counter-strike.net/csserverstat/) then by all means make all of them point to the same directory to make things simpler to maintain! For example, I store all my images in /home/httpd/html/images/Maps/halflife and make each one of those programs point to it for their image stores. Modify and Copy Preferences --------------------------- (NOTE to NT users: Make sure that your paths in the .conf file, as well as in the beginning of the hlmaps.pl and hlmaps.cron scripts are correct and use "\" characters instead of "/" for DIR paths). Edit the hlmaps.conf.distrib file that came with the distribution to point to the correct paths and to use the appearances you'd like. Then copy it somewhere like your /etc/ directory as hlmaps.conf and assign appropriate owner, group and file permissions so that your web server can read it. For example, I run my Linux Apache daemon under an "httpd" user and an "httpd" group. So I'd type the following: cp hlmaps.conf.distrib /etc/hlmaps.conf chown httpd.httpd /etc/hlmaps.conf chmod 444 /etc/hlmaps.conf Set Up The Cron Script ---------------------- HLmaps now uses a scheduled script (hlmaps.cron) to periodically collect info from the map directory, download dir, mapcycle, server logs, etc. This makes HLmaps MUCH lighter on the server by not having to parse all those things for each web hit. However, it means you have to take 2 additional steps over version 0.93 - 1) set up the scheduled job and 2) make sure the data file has the right permissions for read and write. Win NT ------ If you're running NT, then you'll want to get hold of a scheduling program from http://www.tucows.com or use WinAT to interface with the built-in scheduler service. Please let me know what works for you and I'll put better NT instructions in the next HLmaps release. Essentially you just want to copy hlmaps.cron to a convenient location (not web accessable, and some people just plop it into the c:\winnt\system directory) then tell the scheduler to run it nightly. You should test hlmaps.cron from the command line first to make sure it runs independantly, then work on scheduling it. Linux ----- Setting up a cron job for Linux is very easy. Simply copy hlmaps.cron to the /etc/cron.daily directory and make it executable by typing: cp hlmaps.cron /etc/cron.daily/hlmaps.cron chown root.root /etc/cron.daily/hlmaps.cron chmod 755 /etc/cron.daily/hlmaps.cron You should make sure that hlmaps.cron is pointing to the hlmaps.conf file (look at the top of the script) and then test it by invoking it from the command line: /etc/cron.daily/hlmaps.cron If it takes a few seconds (or minutes) and then returns without saying anything to you, then it (most likely) worked - check for /var/hlmaps.data (or whatever your specified) for content. You're already half-way there! Set up Data File Permissions ---------------------------- As mentioned in the section above, you'll now need to make sure the hlmaps.data (run by the web server) can be read correctly. I recommend: chmod 744 /var/hlmaps.data Copy the Perl/CGI Script ------------------------ NOTE to NT users: This script works with ActiveState's Perl for NT if you take out the "-T" on the first line of the hlmaps.pl script. Finally copy the hlmaps.pl script into your web server's cgi directory (usually /home/httpd/cgi-bin/) and assign it the same owner and group assignments and file permissions that you usually use for your other CGI scripts. For example, I run my Linux Apache daemon under an "httpd" user and an "httpd" group. So I'd do the following: cp hlmaps.pl /home/httpd/cgi-bin/ chown httpd.httpd /home/httpd/cgi-bin/hlmaps.pl chmod 555 /home/httpd/cgi-bin/hlmaps.pl Test and Troubleshoot --------------------- Now fire up a browser and test the script by going to http://my.server.com/cgi-bin/hlmaps.pl and see if you get output. If the images don't show up, then check the IMAGES_DIR and IMAGES_URL settings. If it doesn't find maps, then check the SERVER_xxxx_DIR settings. If it doesn't detect mapcycle inclusion, then check the MAPCYCLE setting. Again, make sure your permissions are correct and also check to make sure that you don't have a funky mapcycle.txt file which may have extra characters inside. I've heard of several people fixing mapcycle detection by re-creating the file from scratch using vi. Let me know if you have problems AFTER you've checked things over several times and please be specific about what you see and what you've tried. MySQL Notes ----------- MySQL is now supported!! Once you have HLmaps working with just the text data file, go to the INSTALL.MySQL file to learn how to use a database as the interrim data store. -- Hope you enjoy! Scott and the HLmaps development team.