Please note: This wiki article is a formatted version of the /docs/install.txt file that is included in all WRE binaries.
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.
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.
Install WebGUI: You will need to install WebGUI to /data/WebGUI prior to running WRE console (step #6).
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. On the command-line, go to /data/WebGUI/sbin, and as root, run the testEnvironment.pl script to install any new dependencies in WebGUI that may be missing from the WRE.
10. Go to the "Sites" tab and add your first web site.
11. Go to the "Services" tab and start mod_proxy, mod_perl, and S.P.E.C.T.R.E.
12. Visit your new web site!
13. 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
You can set up the WRE to start automatically at system boot by running the following commands after the WRE is installed. Please read about it here: startup scripts
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 :)
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
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
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.
Add a webgui user
In Snow Leopard you can run the following command:
dscl . -create /Users/webgui
Otherwise, 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/
Setup WebGUI config to support case insensitive filesystem:
Line to add to your webgui conf file: "caseInsensitiveOS" : "1",
Also see above for setting up a 'webgui' user. Snow Leopard on a Minimac runs an x86_64 architecture. There are a couple of modifications needed to install WRE 0.9.3 in this environment:
./Configure darwin64-x86_64-cc --prefix=/data/wre/prereqs shared
Most everything else compiled fine once those modifications were made. The Perl modules are another story. Remember to run /data/WebGUI/sbin/testEnvironment.pl prior to running wreconsole to be sure all your Perl modules are installed. This may take up to an hour and you'll need to force install a few modules which are failing their tests.
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
Please see Building the WRE on 64bit RHEL 5 or CentOS 5
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 during the install choose a port other than 80 for mod_proxy to run on.
Keywords: WRE
www:/data/WebGUI/sbin # ./testEnvironment.pl
"
do: cd /data/wre/prereqs/lib
ln -s libexpat.so.1 ./libexpat.so.0
and it will start...."
i reach to step 6 when i command ". wreconsole.pl" there is an error occurs "use: command not found line 15: syntax error near unexpected token`(' line 15: `use carp qw(carp croak)"
and i don't know what's the wrong"