Please note: This wiki article is a formatted version of the /docs/install.txt file that is included in all WRE binaries.
WEBGUI RUNTIME ENVIRONMENT INSTALL
-------------------------------------------------------
The instructions below will allow an administrator to get the WRE up and running quickly. If you have problems installing the WRE, please see the WRE Troubleshooting wiki page.
PRIOR TO INSTALLING
The WRE works best on Linux-based operating systems. We recommend Red Hat Enterprise Linux, but it is not required. You can also use the WRE on Mac OS X, and BSD based platforms but you need to review the platform specific notes at the bottom of this document before installing.
INSTALLING
1a. Download WRE at sourceforge.net
1b. Unpack the archive.
mkdir /data
cd /data
tar xvfz /path/to/wre-x.x.x-osname.tar.gz
If you are going to do a manual install of webgui (ie: install an older version of webgui) download the archive and extract it in the /data directory at this time.
2. Add a "webgui" user to the system. Note that you can name this user whatever you want, but we recommend "webgui". On most systems you run a command similar to the following as the root user:
adduser -s /sbin/nologin webgui
- or -
useradd -s /sbin/nologin webgui (ubuntu/suse)
- or -
useradd -r webgui (debian)
NOTE: If you're just using the WRE for development on your
machine, feel free to just use your own user account rather than creating a new one.
3. If you have an existing Apache or MySQL running please shut them down now. On most systems you can shut them down hard by running commands like this:
killall mysqld
killall httpd
4. If you have a MySQL config file at /etc/my.cnf please remove or rename it so that it doesn't interfere with the WRE MySQL.
mv /etc/my.cnf /etc/my.cnf.old
(remember to remove startup scripts for these if you are going to use wre's)
5. Create your DNS entries (or add to /etc/hosts) for the sites you will be using, including the AWStats site.
6. Run the WRE Console which you can use to configure WebGUI.
cd /data/wre/sbin
. setenvironment.sh
./wreconsole.pl
NOTE: If you are not an administrator on this machine you should start the WRE console with sudo like this:
sudo ./wreconsole.pl
NOTE: You should probably add the following command to your profile so it executes every time you log in:
. /data/wre/sbin/setenvironment.sh
7. Use your favorite web browser to visit the WRE Console setup page:
http://localhost:60834/setup
- or -
http://www.example.com:60834/setup
NOTE: You may have to open a firewall port to access this, or use port forwarding.
8. Follow the on screen instructions to complete the configuration.
NOTE: Safari is not capable of displaying a page as it's being downloaded so it is not the best browser you can use for the setup process, which is a realtime process. Safari will work in most cases, but it is not ideal. We recommend Firefox instead.
9. Go to the "Sites" tab and add your first web site.
10. Go to the "Services" tab and start mod_proxy, mod_perl, and S.P.E.C.T.R.E.
11. Visit your new web site!
12. Add the following cron jobs to your server's cron tab.
0 0 * * * /data/wre/sbin/logrotate.pl
*/3 * * * * /data/wre/sbin/wremonitor.pl
0 2 * * * /data/wre/sbin/backup.pl
If you are using the demo system then add this:
0 0 * * * /data/wre/sbin/democleanup.pl
PLATFORM SPECIFIC NOTES
-----------------------
*Mandriva Linux
This note applies for at least Mandriva 2007 to 2009 FREE versions, but could also apply to other Mandriva distributions. Use the current WRE build for Redhat (rhel5), which works perfectly for Mandriva (at least I tested 0.8.x and 0.9.x versions), if you run the following comands before launching ./wreconsole.pl script:
chmod -v 1700 /root/tmp
This sets the sticky bit for /root/tmp directory, which will permit write access to mysql but without any deletion allowed. Mysql needs to write temporary files on a 'tmp' directory. On Mandriva based systems, the TMPDIR env variable is set to /"current user"/tmp (you are either root or su'ed during install, so it is actually /root/tmp even if mysql is started as another user) and this environment variable overrides any mysql default config or configuration files, except the "--tmpdir=/tmp" command line option. If mysql can't write temporary files, it fails and ends, so ./wreconsole.pl does.
vi /data/wre/var/setupfiles/my.cnf and add "tmpdir=/tmp" and the very end of the file (which is also the end of [mysqld] section).
This is "just in case". I didn't check at the end which tmp directory mysql was using, but it cannot harm anyway :)
urpmi libgomp
This is mandatory for mod_perl to recompile when you start it from the services tab as mentionned in the above procedure.
PS: don't forget to apply the first 3 commands mentionned in Red Hat Linux section below if you want webgui service to be started automatically at boot time :)
* Red Hat Linux
This note applies to all linux' that use chkconfig to setup services. These include RHEL, Fedora, Mandrake, SuSE, CentOS, and others. You can set up the WRE to start automatically at system boot by running the following commands after the WRE is installed:
ln -s /data/wre/sbin/services/redhat/webgui /etc/init.d/webgui
chkconfig --add webgui
chkconfig webgui on
On RHEL (or CentOS) 5 or higher you need to install the libgomp RPM.
yum install libgomp
* Debian Linux
install packages:
build-essential
libncurses5-dev
You can set up the WRE to start automatically at system boot by running the following commands after the WRE is installed:
ln -s /data/wre/sbin/services/redhat/webgui /etc/init.d/webgui
update-rc.d webgui defaults
* SELinux
The WRE contains no policies for configuring SELinux. If your distribution uses SELinux, you will need to disable it, set it into permissive mode, or write your own policies for SELinux.
* Mac OS X
There is no command line user add script on Mac OSX. Therefore you can either use the graphical "Accounts" manager in "System Preferences", or the really
horrible "netinfo" command line utility. Alternatively, you can also download some free user utilities from this site:
http://www.osxgnu.org/software/pkgdetail.html?project_id=231#4095
To get the WRE to start automatically at boot run the following commands:
ln -s /data/wre/sbin/services/osx/org.webgui.wre.plist /Library/LaunchDaemons/
* FreeBSD
You must install and use the bash shell while using the WRE. The WRE also assumes that the bash shell is installed or linked at /bin/bash.
You can set up the WRE to start automatically at system boot by running the following commands after the WRE is installed
ln -s /data/wre/sbin/services/freebsd/webgui /usr/local/etc/rc.d/webgui
echo "webgui_enable=YES" >> /etc/rc.conf.local
* Microsoft Windows
NOTE: WEBGUI NO LONGER SUPPORTS WINDOWS. PLAIN BLACK RECOMMENDS USING THE VMWARE APPLIANCE FOR WINDOWS INSTALLS. http://www.webgui.org/download
To use the .pl commands (like wreconsole.pl) you need to double-click on
the "Command Prompt.bat" icon in your /data/wre/sbin folder, and then run
the commands by prefixing them with "perl ", like this:
perl wreconsole.pl
Before you install the WRE, make sure that you have disabled IIS or
Keywords: wre