Repo.or.cz



Wildfire Installation GuideWildfire allows you to choose a specific geographic coordinate and generate a virtual fire simulation based on the weather accumulations at the specified time that you desire to look at. It takes into consideration the surroundings, wind speeds, weather and topological layout of the location.Wildfire uses many packages and was developed using mostly Python (). Documentations for python along with the developed packages used are all thoroughly documented online.Table of ContentsPrerequisite InstallationSetup Installation GuideDeploying Web ProductionSetting-up MySQL DatabaseCleaning up the Database of Junk InformationPrerequisite InstallationThis installation guide is written for installing the Wildfire Server on the Ubuntu OS. The OS can be found at . Carefully follow these instructions to successfully install wildfire on your sever. The command guides are written for the Ubuntu Operating System, the command examples may not work if installing on another OS.Install Git () so that you can check out the repository.$ sudo apt-get install gitCreate a directory called tmp if it doesn’t already exist.$ sudo mkdir /tmpClone the git repository online into the temporary directory using:$ git clone git://repo.or.cz/WRF-GoogleEarth.git -b m3 /tmp/WRF-GoogleEarthEnter the directory /tmp/WRF-GoogleEarth/installation$ cd /tmp/WRF-GoogleEarth/installation/Execute setup.sh$ sudo ./setup.shBe sure to say yes to all package installation requests. MySQL will prompt to create secure password upon installation. Choose the mail method you want to use when Postfix prompts for SMTP Host Service.Execute install_python_dependencies.sh$ sudo ./install_python_dependencies.shCreate an empty directory called static and media$ sudo mkdir /opt/static /opt/mediaYou can store this directory anywhere as long as you remember where.Create a user called scp along with a home directory for the user for when they log in. This user is used for the secure transfers of KMZ’s from the server making your wildfire files back to this web server.$ sudo useradd scp$ sudo passwd scpMake sure the home directory scp is owned by scp and is part of the group apache server is using. (Apache’s group can be found under envvars file, /etc/apache2/envvars, set to the variable APACHE_RUN_GROUP. Some aliases apache uses are [www, www-data, apache, web])$ sudo mkdir /home/scp$ sudo chown scp /home/scp$ sudo chgrp [replace with apache group name] scpChange your user to scp. Inside of /home/scp/ create a new folder called kmz and make sure the permissions are owned by apache and also in apache’s group. Finally return to your regular user.$ su scp$ cd /home/scp/$ mkdir kmz$ exitIf everything installed correctly and was setup correctly, please continue to ‘Setup Installation Guide’.Setup Installation GuideThese instructions were written for installing Wildfire on the Ubuntu Operating System. This guide is intended to get the server up and running for testing purposes. If you have not followed the “Prerequisite Guide”, please read through that documentation before starting here.Move the cloned wildfire directory to /opt/wildfire/: $ sudo mv /tmp/WRF-GoogleEarth/django/wildfire/ /opt/wildfire/Edit the following environment variables inside /opt/wildfire/settings.pyADMINS: Change the information to be the Admins of the page. Error Messages will be emailed to the MANAGERS which is currently set as the ADMINS.DATABASES: Use the database preference you desire. The database recommended is MySQL. Enter all of the information necessary for Django to connect to the database that you have already configured. A guide to setting up the database initially is under the ‘Setting-up MySQL Database’ section.DEBUG settings: Set the values to what they recommend until you know that they are working properly. DEBUG should remain True until everything else is sure to be working properly.DEFAULT_FROM_EMAIL: This is the sender of the email notifications.KMZ_REQUEST_HOST: This will be the host that will be requesting the creation of the KMZ files via SSH.KMZ_REQUEST_USERNAME: The username that will log-in to the KMZ_REQUEST_HOST via SSH. Note: You will only be able to access the host through Key Based Authentication. Be sure to make sure the host supports and recognizes the public key of the requester so you can SSH in securely without a password prompt.KMZ_UPLOAD_SCP_PATH: This is the upload to bring the KMZ files back after a request to the other server. Make sure the path is in the format <username>:<myhost>:<path_to_kmz_directory>/. The kmz folder is inside scp’s home directory probably called /home/scp/kmz. Note: This uses SCP to do file transfers, please see man scp for more details.MEDIA_ROOT: Have this path point to your created directory ‘/opt/media/’STATIC_ROOT: Have this path point to your created directory ‘/opt/static/’TIME_ZONE: Please see for the desired time zone.Make sure sendmail server is setup properly. An easy way to test is to type in the following command line and see if it works:$ /usr/sbin/sendmail email-address enter body of message CTRL-DIf the email is not sending properly, please visit and set fail_silently=False to track the type of error. Usually it is a firewall setting that keeps emails from getting sent out.Sync all of the necessary files for django by typing the following lines.$ python /opt/wildfire/manage.py syncdb$ sudo python /opt/wildfire/manage.py collectstaticRun the command line:$ python /opt/wildfire/manage.py runserver [0.0.0.0:Port]If it runs without errors, then all of the python and django dependencies are installed correctly.If everything works correctly when testing the web page, you are ready to deploy it as an apache server using Django. Please go to “Deploying Web Production” to finish the complete installation guide.Setting-up MySQL DatabaseThis guide is to create a MySQL Database properly. This assumes that you have mysql already installed on your system. Following the setup instructions and running setup.sh will automatically install mysql-server on your machine. Log in to mysql. If there is no password required, leave the –p out in the command line$ mysql –u root –p Enter password:Create a database called wildfiremysql> create database wildfiredb;Query OK, 1 row affected (0.00 sec)Allow our user wildfire to connect to database using the password ‘my_password’. Understand that the password will be stored as plain text when connected to django so don’t use a universal password for this.mysql> grant usage on *.* to wildfire@localhost identified by ‘my_password’;Query OK, 1 row affected (0.00 sec)Give wildfire user privileges on the wildfire databasemysql> grant all privileges on wildfiredb.* to wildfire@localhost;Query OK, 1 row affected (0.00 sec)Now test to see if you can enter the database by doing the following command lines:mysql> quit$ mysql –u wildfire –p’my_password’ wildfiredbIf no error was shown, you have followed the prompts correctly. Please put these setting parameters into settings.py when setting-up django.Deploying Web ProductionThis portion of the installation guide take in the assumption that you have done Part I and all dependencies are properly installed and working. This guide is to help you get the server up and running for production. Once again, the instructions are written for basic installation on the Ubuntu Operating System.Make sure that apache is setup and configured correctly for a basic html web page interface. The default setup has an example web page that usually says “It Works”. Please see for setup documentation.Enter the apache settings file httpd.conf and append the following lines:<Location “/”>SetHandler python-programPythonHandler django.core.handlers.modpythonSetEnv DJANGO_SETTINGS_MODULE wildfire.settingsPythonDebug OnPythonPath “[‘/path/to/WRF-GoogleEarth/django’, ‘/path/to/WRF-GoogleEarth/django/wildfire’] + sys.path”</Location>Make the following changes to the following lines:PythonPath: Change the two path’s to match the directory that the contents are actually in. Also, make sure PythonPath is all on one line or apache will throw an exception.Note: For more information about setting up django with apache, please visit and check the documentation for django with apache. There are other plugins you can use other than mod_python if that’s not your choice. Another popular choice is mod_wsgi.Cleaning up the Database of Junk InformationInside of the main wildfire folder, run:python manage.pyIt will show a list of commands that can be run whenever desired. The three important commands you want to use to clean-up the database trash regularly are:cleanupBrokenRequests – This will delete the requests that were not completed properly.cleanupExpiredRequests – This will delete the requests that have not been touched for the specified number of days within settings.py using the variable WRF_REQUEST_EXPIRE_DAYS.cleanupregistration – This will delete the requests for account creations where the user did not verify his/her email address.To execute any of the cleanupBrokenRequests command, simply type in the command line:$ sudo python manage.py cleanupBrokenRequests It is recommended to throw these command calls into cronjobs to do this on a certain timetable specified by you. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download