One Unified Global Perspective
Communications with a Global Perspective
Home
Intro
Contact Us
Voice over IP
PBX Solutions
Services
Support
Glossary
Open Source
Blog
Forum

WebMail





2007 Jan 25 - Thu

PlainBlack WebGUI Usage Notes

In two prior entries, I went through the procedure for installing the Fedora Core 4 Linux Distribution, followed by a procedure to install WebGUI on top.

Here are a few notes I've collected that helped me as a newcomer to WebGUI get started with using WebGUI.

Site Mods to get basic layout going:
  • Make a copy of the WebGui 6 style sheet and called it One Unified Style sheet. All the plainblack references and icons were removed to leave the basic background in place.
  • More work is needed to clean up some .css droppings
Usage and Design Notes
  • Use 'Page Layout' to add a new page
  • Use 'Article' to create a formattable text block on that page
  • Use 'File Pile' to upload a .png image file to be sequenced on the page
  • Be aware that if you have copy/pasted an article, deleting one article will delete all replicated articles.
Copying Content From One Server To Another

On the source server:

mysqldump --add-drop-table pb_oneunified_net > wg.sql

On the destination server:

scp root@192.168.59.132:/root/wg.sql .
mysqldump --add-drop-table docs_oneunified_net > old.sql
mysql docs_oneunified_net < wg.sql
cd /data
cd domains
cd oneunified.net/docs/
cd public/
cd uploads/
scp -r root@192.168.59.132:/data/domains/oneunified.net/pb/public/uploads/* .
chown -R apache.apache *
RSS

PlainBlack FAQ with RSS method


Installing PlainBlack WebGUI 6.8.8

The PlainBlack WebGUI documentation server install requires the use of the Fedora Core 4 base build. If you are using VMWare, be sure to Snap Shot the base build so you can roll back the installation should the need arise.

These instructions are based upon the instructions at the Plainblack website:

http://www.plainblack.com/installing_webgui

For creating content, help on WebGUI content can be found at:

http://www.plainblack.com/?op=viewHelpIndex

http://www.plainblack.com/?op=viewHelpTOC

Install various packages required by WebGUI:

yum install perl-XML-Simple
yum install ghostscript-fonts
yum install ImageMagick ImageMagick-devel ImageMagick-perl
yum install libapreq2 libapreq2-devel
yum install perl-libapreq2

There are some additional perl modules to be installed:

perl -MCPAN -eshell
install Cache::Cache
install Devel::Symdump
install Pod::Coverage
install HTML::Parser
install Archive::Zip
install Tie::IxHash
install Tie::CPHash
install Class::Singleton
install Module::Build
install Params::Validate
install DateTime::TimeZone
install DateTime::Locale
install DateTime::Format::Strptime
install DateTime::Cron::Simple
install DateTime
install Time::HiRes
install IO::Stringy
install Mail::Field
install Mail::Header
install Mail::Internet
install MIME::Parser
install SOAP::Lite
install Log::Log4perl
install Net::LDAP
install HTML::Highlight
install HTML::TagFilter
install HTML::Template
install Parse::RecDescent
install HTML::Template::Expr (optional)
#install Template (optional)no
install Parse::PlainConfig
install XML::RSSLite
install JSON
install HTML::TableExtract
install Finance::Quote
install Pod::Escapes
install Pod::Simple
install Clone
install Test::Pod
install Data::Structure::Util

Obtain the latest WebGUI installation:

cd /usr/src
wget http://www.plainblack.com/downloads/6.x.x/webgui-6.8.8-gamma.tar.gz

WebGUI Installation:

tar -zxvf webgui-6.8.8-gamma.tar.gz
mkdir /data
mv WebGUI /data/
touch /data/webgui.log
chown apache /data/webgui.log crontab -e    0 * * * * cd /data/WebGUI/sbin/; perl runHourly.pl >/dev/null 2>/dev/null mkdir  -p /data/domains/oneunified.net/docs/public cd /data/domains/oneunified.net/docs mkdir logs cp /data/WebGUI/etc/WebGUI.conf.original /data/WebGUI/etc/docs.oneunified.net.conf cp /data/WebGUI/etc/log.conf.original /data/WebGUI/etc/log.conf cd public cp -R /data/WebGUI/www/uploads ./ chown apache uploads cd /data/WebGUI/etc service mysqld start mysql -e "create database docs_oneunified_net"
mysql -e "grant all privileges on docs_oneunified_net.* to webgui@localhost identified by 'webgui'" mysql -e "flush privileges" mysql -uwebgui -pwebgui docs_oneunified_net < /data/WebGUI/docs/create.sql

Edit the file /data/WebGUI/etc/docs.oneunified.net.conf:

sitename = docs.oneunified.net, oneunified.net
uploadsPath = /data/domains/oneunified.net/docs/public/uploads
passthruUrls => /icons
dsn = DBI:mysql:docs_oneunified_net
dbuser = webgui
dbpass = webgui
authMethods = WebGUI
logfile = /data/webgui.log

Edit the file /data/WebGUI/etc/log.conf:

log4perl.appender.mainlog.filename = /data/webgui.log

Changes need to be made to the /etc/httpd/conf/httpd.conf file. Just prior to <Directory "/var/www/html">, insert the following block of code:

#LoadModule apreq_module modules/mod_apreq2.so
#LoadModule perl_module modules/mod_perl.so
PerlSetVar WebguiRoot /data/WebGUI
PerlCleanupHandler Apache2::SizeLimit
PerlRequire /data/WebGUI/sbin/preload.perl
Alias /extras /data/WebGUI/www/extras
Alias /uploads /data/domains/oneunified.net/docs/public/uploads

Append to the end of the file the following lines:

<VirtualHost *:80>
        ServerName docs.oneunified.net
        ServerAlias oneunified.net
        DocumentRoot /data/domains/oneunified.net/docs/public
        SetHandler perl-script
        PerlInitHandler WebGUI
        PerlSetVar WebguiConfig docs.oneunified.net.conf
</VirtualHost>

Elsewhere in the file, update the line:

ServerName docs.oneunified.net:80

To finish up, check that all libraries have been installed:

cd /data/WebGUI/sbin/
perl testEnvironment.pl

You should get a final OK for everything.

Start the Web server:

service httpd start

You should get an appropriate OK result. If not, check the /var/log/httpd/error_log file to see what errors have occurred.

Set the services for auto-start:

chkconfig --level 345 httpd on
chkconfig --level 345 mysqld on

Once the web service is running, run 'ifconfig' to obtain the machines address. Bring up a web browser and go to that address. You should be able to log in. After logging in, put in the company name, url, and email address.

Templates

Internet Explorer insists on rendering .txt documents when it sees stuff in it that it thinks can be rendered. Hence, when clicking on the template in IE, you'll see junk. Right click on the resulting document and look at the source. That is the original source. Firefox resolves the file just fine--as in it doesn't do any rendering.

plainblack.template.txt


2007 Jan 24 - Wed

Fedora Core 4 Base Build

I needed to install a base build of Fedora Core in order to install WebGUI. Here is the base build that I used (in VMWare). The WebGIU installation instructions will be in the next article. This installation makes use of the Logical Volume Manager (LVM) tools. These tools make it easier to expand partitions and to take snapshots.

This build process creates a basic VMWare session with Fedora Core 4. Familiarity with VMWare is assumed. A similar configuration can be used when installing on physical hardware.

To create a VM, start the VMWare wizard with File -> New -> Virtual Machine. Use a 'Custom' Virtual Machine Configuration.

Select Next and then for an 'Appropriate Configuration', choose custom, then click 'Next'.

For a 'Virtual Machine Format', use 'New - Workstation 5'.

New Virtual Machine

When you need to select a Guest Operating System, there is no entry for Fedora, so in the radio button list, select 'Linux'. Then in the drop down box, select 'Other Linux 2.6.x kernel'.

In the next wizard window, provide a Virtual Machine name such as 'fc4base'. Select an appropriate directory.

Select Guest Operating System

For 'Processor Configuration', select 'One' processor.

Default memory usage of 256 MB should be fine.

networktype.PNG

For the 'Network Type', typically you'd use 'Bridged Networking'. During operating system installation and configuration, you can then assign a dedicated IP address or allow the network DHCP to assign it an IP address.

On the 'Specify Disk Capacity' wizard window, the 8GB default disk size should be fine. Leave 'Allocate all disk space now' as blank. Optionally, you can select the 'Split disk into 2 GB files'.

When you need to specify 'Disk File', give it a name such as hda which is similar to the Linux physical drive vernacular.

Click 'Finish' to finish the VM session creation.

Operating System Installation

Now that the VM session has been created, the operating system can now be installed.

For the VM properties, you can point the virtual CD-ROM to a physical drive or to an .iso file on your harddrive. In either case, make the Fedora Core 4 CD 1 available and start the VM session. It should boot from you CD or .iso file.

Install by using the graphical mode by pressing the <ENTER> key. The operating system will load up. You should get a screen confirming a CD was found. Press <TAB> to highlight 'Skip' and then press <ENTER>.

Review the 'Welcome to Fedora Core' page. When running this in VMWare, VMWare 'contains' your keyboard and mouse. To release them, press <CTRL>+<INS>. After installation, VMWare can be used to install vmware-tools to automate the release of the keyboard and mouse.

Click 'Next' to proceed with the installation.

Use English for the installation language.

Use U.S. English for the Keyboard Configuration

This will be a server based installation without the GUI interface.

The installation process begins by partitioning the drive, configuring LVM (Logical Volume Manager), assigning mount points, and beginning the installation process.

To get a feel for the installation process, select 'Manually Partition with Disk Druid' when you reach the 'Disk Partitioning Setup' window. This will initialize your drive, so say Yes and accept that it will 'Erase All Data'.

Except for a brief description to follow, the installation process documented here does not include procedures for building a RAID configuration.

The drive will be created with two basic partitions:

  • 100MB bootable partition for the /boot mount point
  • remainder of drive assigned to LVM for other mount points

On a physical server, these two partitions would be created across two physical drives using RAID 1.

For the primary partition, click 'New'. Select Mount Point of '/boot', File System Type of 'ext3', Fixed Size of 100 MB, and check the box to 'Force to be primary partition', and click 'OK' to save it.

For the LVM partition, click 'New', leave Mount Point unselected, choose File System Type of 'physical volume (LVM)', and choose 'Fill to maximum size', and click OK to save it.

To allow creation of mount points in the LVM volume, select the LVM button. Put in 'vg01' for the volume group name. Leave the Physical Extent as default.

Click Add to add several mount points:

  • no mount point, file system = swap, name = lvSwap, size = 500MB
  • mount point = '/', file system = ext3, name = lvBase, size = 2000MB
  • mount point = '/var', file system = ext3, name = lvVar, size = 1000MB

Click Ok to finish Logical Volume creation.  You should see a configuration similar to the following:

Once the drive is configured, save the settings and move on to the Grub boot loader screen. Accept the defaults. At some point in time, it may be useful to know that the basic operating installation mount point of / is found at /dev/vg01/lvBase.

On the network settings screen, there are a number of necessary settings. For each interface found during boot-up, there is an entry you can edit. There are three ways you can set each interface:

  • Allow a DHCP address to be assigned by default (typically for workstations or for servers that will be moved around)
  • Manually assign an ip address (typically for servers in a server segment). When manually assigning an ip address, you'll need to provide Gateway and one or more DNS server addresses.
  • Do not assign an ip address (recommeded for ports to be used as network scanners like Tcpdump or Ethereal, or for intrusion detection ports used with Snort.) This type of configuration is not allowed from the GUI and will need to be performed later at the command line.

You will need to supply Hostname manually.

After saving the network configuration settings, there are some changes on the firewall screen.

Leave the firewall enabled. Allow the SSH and HTTP services. Deactivate SELinux (for a public server, you may with to turn this on, but for internal use, I typically turn it off or set it to Warn).

Save the settings.

After selecting an appropriate TimeZone and providing a root password, you end up at the Package Group Selection screen. There are some changes to be made:

  • Text-based Internet:
    • enable lynx
    • disable slm
    • disable cadaver
  • Disable all Server Configuration Tools
  • Web Server:
    • disable httpd-manual
    • enable php-mysql
    • enable php-pgsql
    • disable squid
    • disable tux
  • Windows File Server
    • disable system-config-samba
  • Enable PostgreSQL Database
    • disable unixODBC
  • Enable MySQL Database
    • disable myODBC
    • enable php-mysql
    • disable unixODBC
  • Enable Development Tools
    • disable doxygen
    • enable expect
    • disable gcc-gfortran
    • disable rcs
  • Disable Administration tools
  • System Tools:
    • disable bluez-pin
    • enable iptraf
    • enable lslk
    • enable mc
    • enable net-snmp-tools
    • enable sysstat
  • Disable Printing Support

After enabling and disabling the appropriate packages, you can proceed with the install.

After the installation has completed and the session has restarted, you can login.

Use the command ifconfig to find out the machine address if you've used DHCP to assign a dynamic address.

[root@docfc4base network-scripts]# ifconfig eth0
          eth0 Link encap:Ethernet  HWaddr 00:0C:29:0A:46:F2
          inet addr:192.168.59.133  Bcast:192.168.59.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe0a:46f2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:26477 errors:0 dropped:0 overruns:0 frame:0
          TX packets:336 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1675075 (1.5 MiB)  TX bytes:34722 (33.9 KiB)
          Interrupt:10 Base address:0x1400

[root@docfc4base network-scripts]#

If you need to change network settings, the settings can be found in the file /etc/sysconfig/network-scripts/ifcfg-eth0.

You can restart the interface by:

ifdown eth0
ifup eth0

Once the installation is complete, bring the system up-to-date:

yum update
rpm --import /usr/share/rhn/RPM-GPG-KEY

Install additional tools:

yum install ncftp ntp

Basic Perl Configuration. For a first time installation, accept all defaults. For choosing a repository, choose close and fast. For example, for where I'm at, I use North America with Duke. If you know of a faster one, then by all means, use it. http://cpan.belfry.net/ seems to be a good one.

perl -MCPAN -eshell
install PAR::Dist
install Compress::Zlib
install IO::Zlib
install Test::More
install Spiffy
install Test::Base
install Digest::SHA::PurePerl
install Bundle::CPAN
reload cpan
install Error
install Digest::SHA1
install Digest::MD5
install DBI

If you choose a download site that doesn't work very well, use the following command and restart the perl configuration.

rm -rf /usr/lib/perl5/5.8.6/CPAN/Config.pm

Perform general configuration install generic utilities. Some examples include:

  • configuring NTP
  • change the default editor
    • nano /root/.bashrc
      • export EDITOR=nano
    • source .bashrc
  • installing your .ssh key
scp -r .ssh root@192.168.59.133:/root

Finally, if you are using VMWare, make a snapshot of the base build so it can be used as a basis for other servers, and can be rolled back when necessary.

From the command line, you can do so by:

shutdown -h now
Finding Files

Immediately after an installation, if you wish to 'locate' files, perform a:

updatedb

This normally runs at midnight, but you can run it manually. Now to locate a file on the drive, you can use the locate command with some portion of the file name to find the file and the directory in which it resides.

GUI vs Console

If you happened to install in GUI mode, and you want to stop the GUI to reduce processor overhead, use:

init 3

To start the GUI again:

init 5
CPU'd Kernel

To find the current version of kernel:

uname -a

To install a new kernel:

yum install kernel.i686
yum install kernel-devel.i686



Blog Content ©2008
Ray Burkholder
All Rights Reserved
ray@oneunified.net
(441) 505 7293
Available for Contract Work
Resume

RSS: Click to see the XML version of this web page.

View Ray 
Burkholder's profile on LinkedIn
technorati
Add to Technorati Favorites



October
Su Mo Tu We Th Fr Sa
     
14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  


Main Links:
Monitoring Server
SSH Tools
QuantDeveloper Code

Special Links:
Frink

Blog Links:
Sergey Solyanik
Marc Andreessen
HotGigs
Micro Persuasion
... Reasonable ...
Chris Donnan
BeyondVC
lifehacker
Trader Mike
Ticker Sense
HeadRush
TraderFeed
Stock Bandit
The Daily WTF
Guy Kawaski
J. Brant Arseneau
Steve Pavlina
Matt Cutts
Kevin Scaldeferri
Joel On Software
Quant Recruiter
Blosxom User Group
Wesner Moise
Julian Dunn
Steve Yegge

2008
Months
OctNov Dec




Mason HQ

Disclaimer: This site may include market analysis. All ideas, opinions, and/or forecasts, expressed or implied herein, are for informational purposes only and should not be construed as a recommendation to invest, trade, and/or speculate in the markets. Any investments, trades, and/or speculations made in light of the ideas, opinions, and/or forecasts, expressed or implied herein, are committed at your own risk, financial or otherwise.