Thursday, August 11, 2011

Troubleshooting Caption Numbering in Microsoft Word

Problem

You are drafting a document in Microsoft Word.  You embed a number of images in this document, where these images are configured to have text flow around them. You add captions to these images, and these captions are automatically inserted into text boxes that appear underneath these images.  After inserting a number of captions, you observe that the caption numbering is out of sequence (e.g., "3.14," "3.13," "3.12," etc.).  No matter what you do to resolve this problem, such as deleting and then recreating these captions, nothing seems to work.

Discussion

When you embed images in a paragraph, an anchor is inserted into that paragraph.  You can see this anchor if you click on the paragraph symbol (¶).  The problem is (and this continues in Microsoft Word 2010) that each paragraph can anchor only one image.  If a paragraph has multiple images embedded in it, all of these images share the same anchor.  This sharing also applies to the textboxes automatically generated when you add captions to these images: these are effectively linked, and it is this linking that adversely affects the caption numbering.  You can delete, and recreate these captions; move them around; etc, all you want, but nothing here will resolve this problem.  There is however an easy workaround, and it involves using tables.

Resolution

Whenever you need to embed multiple images into a single paragraph, use the following procedure to ensure proper caption numbering:
  1. Create a single-cell table.
  2. Remove this cells visible boundaries
  3. Place the image into this cell.
  4. Change the text wrapping of this image to In line with text.
  5. Insert a caption for this image.  The caption will appear below the image (still in the cell), and no textbox will be created.
  6. Configure the table default cell margins to be "0" on all sides.
  7. Configure the paragraph lines (for both the image and its caption - these are on separate lines) as desired.
  8. Set the table wrapping to Around.
  9. Move the table where desired in the paragraph.
References
Notes
  • None

Tuesday, August 9, 2011

Migrating the Jive SBS Database Step-by-Step

Introduction

This procedure walks you through migration of the Jive SBS 4.5 internal database to a new separate instance of PostgreSQL 8.4.  Use this walkthrough when upgrading from the initial standalone, test Jive SBS instance to a full production instance.  Though this walkthrough focuses on migration of a PostgreSQL database, the method that you will learn here can be applied to any type of Jive SBS database migration.  It will also work for Jive SBS version 4.0.  Performing the migration involves seven steps: 1) Create database dump files, 2) Create databases, 3) Create user, 4) Assign dump file ownership, 5) Import dump files, 6) Update Jive startup file, 7) Restart Jive, and 8) Test.  Only minimal comments and executable statements are presented here.  Note that each step is presented discretely - skip the exits and logouts if continuing from one step to another.  Good Luck!

Procedure

Step 1: Create Database Dump Files

On the Jive SBS machine:

sudo su - root

cd /usr/local/jive/postgres/bin

./pg_dump -U postgres sbs > /pathToYourHomeDirectory/jive_db_sbs.dump

./pg_dump -U postgres sbsanalytics > /pathToYourHomeDirectory/jive_db_sbsanalytics.dump

On the new PostgreSQL machine:

cp /pathToYourHomeDirectory/jive_db_sbs.dump /tmp/jive_db_sbs.dump

cp /pathToYourHomeDirectory/jive_db_sbsanalytics.dump /tmp/jive_db_sbsanalytics.dump

logout

Step 2: Create Databases

On the new PostgreSQL machine:

sudo su - root

su - postgres

createdb -T template0 sbs

createsb -T template0 sbs

exit

logout

Step 3: Create User

On the new PostgreSQL machine:

sudo su - root

su - postgres

psql postgres

CREATE USER sbs WITH PASSWORD 'password';

GRANT ALL PRIVILEGES ON DATABASE sbs TO sbs;

GRANT ALL PRIVILEGES ON DATABASE sbsanalytics TO sbs;

\q

exit

logout

Step 4: Assign Dump File Ownership

On the new PostgreSQL machine:

sudo su - root

chmod 755 /tmp/jive_db_sbs.dump

chown postgres /tmp/jive_db_sbs.dump

chmod 755 /tmp/jive_db_sbsanalytics.dump

chown postgres /tmp/jive_db_sbsanalytics.dump

logout

Step 5: Import Dump Files

On the new PostgreSQL machine:

sudo su - root

su - postgres

psql sbs < /tmp/jive_db_sbs.dump

psql sbsanalytics < /tmp/jive_db_sbsanalytics.dump

exit

logout

Step 6: Update the Jive Startup File

On the Jive SBS machine:

sudo su - root

cd /usr/local/jive/applications/sbs/home

cp ./jive_startup.xml ./jive_startup.xml.ORIGINAL

vi ./jive_startup.xml

Make the following edits:

<serverURL>jdbc:postgresql://[YourPostgresqlDomainName]:5432/sbs</serverURL>

<password>sbsAccountPassword</password>

:x

chmod 600 ./jive_startup.xml

logout

Step 7: Restart the Jive SBS

sudo su - root

service jive-application - restart

Step 8: Test

Open a browser and point it to your Jive SBS instance.

Summary

Congratulations! In this step-by-step walkthrough, you have been shown how to perform a migration of the Jive SBS 4.5 internal backend to a new and separate instance of PostgreSQL 8.4.  The method presented here has been successfully tested on both versions 4.0 and 4.5 of Jive SBS.  The method presented here focuses on PostgreSQL migration but may be applied to any other type of database migration.

Troubleshooting

If you attempt to perform an import of the dump files, but experience a "Permission Denied" error, perform the following checks:
  • Verify that the account being used to perform the import (most likely the "postgres" account) has permission to navigate the directory path to the location of the dump files.
  • Verify that the account used to perform the import (most likely the "postgres" account) has permission to read the dump files.
If, after performing this walkthrough, you test the Jive SBS instance and experience an HTTP Status 404 error, perform the following checks:
  1. Verify that the password stated in the jive_startup.xml file is the same as that used to create the sbs user.
  2. Verify the PostgreSQL server URL and port are correct.
  3. Verify that the sbs user has been granted ALL PRIVILEGES to both the sbs and sbsanalytics databases.
  4. Verify that the PostgreSQL postgresql.conf file has been configured to allow it to listen to connection attempts ("listen_addresses").
  5. Verify that the port stated in the PostgreSQL postgresql.conf file is the same as that indicated in the jive_startup.xml file.
  6. Verify that the PostgreSQL pg_hba.conf file has been configured to allow connections from the Jive SBS IP address.
  7. Check the PostgreSQL log files located here: .../pgsql/data/pg_log/.
  8. Check the Jive SBS logs located here: .../jive/var/logs/.
References
Notes
  • Jive SBS 4.5 uses PostgreSQL 8.1 as its internal database.
  • This walkthrough was performed on headless 64-bit CentOS 5.5 servers.
  • This walkthrough was performed using 64-bit Jive SBS 4.5 and 64-bit PostgreSQL.

Tuesday, August 2, 2011

Installing Openfire and Integrating it with Jive SBS

Introduction

This step-by-step procedure walks you through installation and integration of the Openfire 3.7.0 chat infrastructure server with Jive SBS 4.0. Openfire is an open source application that implements the XMPP server protocol. It supports instant messaging capabilities for Jive SBS. Integrating Openfire with Jive SBS involves three primary steps: 1) configuring the Jive SBS Real-Time Connection; 2) installing Openfire; and 3) configuring Openfire.

Procedure

Step 1: Configuring the Jive SBS Real-Time Connection

Connect to the Jive SBS Admin console, and the go System > Real-Time. The Real-Time Integration page appears.


NOTE: In version 4.5, Real-Time Integration functionality has been packaged as a separate plug-in.  Thus, you won't see the Real-Time Integration page, when going to the Admin console.  To regain this functionality, install the Jive Connects Plugin for Openfire. You will then see the Real-Time tab again.
Click the connection page link. The Real Time – Connection Settings page appears.

Enter the Shared Secret: [enter any word]


Click the Save Shared Secret button. A green message bar will appear. You will then need to restart the Jive SBS instance in order for the new shared secret to take effect.


Logout of the Jive SBS Admin console.

In a terminal on the server hosting the Jive SBS instance, logon as the Jive user:
$ sudo su - jive
Stop the Jive SBS service:
[jive]# ./bin/appstop -v
Start the Jive SBS service:
[jive]# ./bin/appstart -v
Check the Jive SBS service status:
[jive]# service jive-application status
This completes configuration of the Shared Secret key for Openfire integration. You will need this key in order to integrate Openfire and Jive SBS. In the next section, you will install Openfire.

Step 2: Install Openfire

Logon to the target server

Download the RPM for Red Hat Linux and variants from the Openfire website. For this procedure, the downloaded file name is openfire-3.7.0-1.i386.rpm.

Logon to root:
[user]$ sudo su - root
Copy the RPM to /opt or /usr/bin:
[root]# cp /[path to file]/openfire-3.7.0-1.i386.rpm /opt
Unpack the installation file:
[root]# rpm –ivh openfire-3.7.0-1.i386.rpm
Start the service:
[root]# sudo /sbin/service openfire start
Check the service:
[root]# service openfire status
This completes Openfire installation. The next section walks you through Openfire configuration. You’ll need the Shared Secret key in order to complete this section.

Step 3: Configure Openfire

Open a browser, and then connect it to http://[targetservername]:9090. The Welcome to Setup page appears.


Choose English, and then click Continue. The Server Settings page appears.


Accept defaults, and then click Continue. The Database Settings page appears.


Choose the Embedded Database option, and then click Continue. The Profile Settings page appears.


Select the Clearspace Integration option, and then click Continue. The Profile Settings: Clearspace Integration page appears.


Enter the following:
Then click the Test Settings button. A success message should appear. If not, check the settings you entered and try again.


Click Close. You will be returned to the main page.

Click Continue. The Setup Complete page appears.


Click Login to the admin console. The login page appears.

The Server Information page appears. This completes installation and configuration of the Openfire tool.

Step 4: Uninstallation

Stop the running Openfire process

Delete the Openfire scripts in /etc/rc.d/init.d/ and/or /etc/init.d/

Delete the Openfire installation directory

E.g., /usr/local/openfire OR /opt/openfire OR [yourCustomInstallDirectory]

Delete the launch daemon in /Library/LaunchDaemons/org.jivesoftware.openfire.plist

Delete Openfire preferences /Library/PreferencePanes/Openfire.prefpane

Reboot the machine

Step 5: Troubleshooting Openfire Wizard Setup

The Openfire database schema does not appear to be installed.


Once you begin the Openfire configuration wizard, it’s best to complete it right through without navigating backwards to previous pages.  If you should do this, and if you should need to navigate back to the Database Settings page, you may experience a database schema error may be presented on the page, after clicking the Continue button.

To get around this, just open a terminal on the server hosting Openfire, and then restart the Openfire instance.  You can do this by executing one of the following commands:
[root]# /etc/init.d/openfire reload
Then try running the setup wizard again.

Summary

Congratulations!  You have established a chat infrastructure for your environment and integrated it with the Jive SBS collaboration platform.

References
Notes
  • TBD

Monday, August 1, 2011

Installation and Configuration of PostgreSQL to a Headless CentOS Server Step-By-Step

Introduction

This procedure walks you through step-by-step installation and configuration of 64-bit PostgreSQL server 8.4.8 onto a headless 64-bit CentOS 5.5 server.  The procedure involves four basic steps: 1) install PostgreSQL, 2) initialize the database, 3) start the PostgreSQL service, 4) create a symlink, 5) ensure ownership, and 6) ensure external client access.  You will install the server only; you will not install any GUI interfaces (such as pgAdmin).  All references used in this walkthrough are provided in the References section.  Good luck!

Procedure

Step 1: Install PostgreSQL

This step will install the PostgreSQL package group that comes with 64-bit CentOS.  This group includes the following packages:
  • postgresql-libs-8.4.8-1PGDG.rhel5.x86_64.rpm
  • postgresql-8.4.8-1PGDG.rhel5.x86_64.rpm
  • postgresql-server-8.4.8-1PGDG.rhel5.x86_64.rpm
Open a terminal on the target server.  Login to the root account.

Install the PostgreSQL server package and its dependencies using YUM.  Be sure to disable gpg signature checking, in order to avoid annoying warnings:
[root]# yum install postgresql-server --nogpgcheck
Installation of this package group will create the following subdirectories:
  • /var/log/pgsql
  • /var/lib/pgsql
  • /usr/share/pgsql
  • /usr/lib64/pgsql
  • /etc/sysconfig/pgsq
Step 2: Initialize the Database

Note that database initialization on RHEL (and thus also CentOS) will be somewhat different than other Linux flavors.

Execute the following command:
[root]# service postgresql initdb –D /var/lib/pgsql/data
Or, you may need to initialize the database using this approach:
[root]# /etc/init.d/postgresql start
Step 3: Start the Service

Execute the following command:
[root]# /etc/rc.d/init.d/postgresql start
Step 4: Create the Symlink

The default location on RHEL (and thus also CentOS) systems is /var/lib/pgsql.  However, applications such as bash will expect the location to be /usr/local/pgsql.  This can be fixed via soft symlink:
[root]# ln –s /var/lib/pgsql   /usr/local/pgsql
Step 5: Ensure Ownership

Check to make sure that the postgres account owns the pgsql directory and subdirectories:
[root]# ls –l /var/lib
If not, you will need to change ownership.  When changing ownership, do so recursively.  Test the account by logging into it and then performing stop and start commands:
[root]# su – postgres 
-bash-3.2$ pg_ctl –stop 
-bash-3.2$ pg_ctrl start
Step 6: Enable External Client Access

Stop the PostgreSQL instance so that you can edit configuration settings files:
[root]# service postgresql stop
Save a copy of the original configuration file:
[root]# cp /var/lib/pgsql/data/postgresql.conf /var/lib/pgsql/data/postgresql.conf.ORIGINAL
Update the PostgreSQL configuration file to enable it to listen in on the server IP address at the default port:
[root]# vi /var/lib/pgsql/data/postgresql.conf
Uncomment the line “listen_addresses” and set it equal to ‘*’.  Uncomment the “port” and leave it set to the default port (5432). Save a copy of the original security access file:
[root]# cp /var/lib/pgsql/data/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf.ORIGINAL
Update the PostgreSQL security access file to enable client access to this PostgreSQL instance from within the subnet
[root]# vi /var/lib/pgsql/data/pg_hba.conf
Identify the mask appropriate to your network.  For example, if it is 255.255.255.0, you would add this line:
host all all 192.168.0.0/24  md5
Additionally, if you want to be able to use a GUI to interact with this postgresql instance over a VPN, you’ll need to identify the IP address that is received by the PostgreSQL instance and add this to the list of hosts allowed to connect.  For example, if your VPN IP address was 69.143.195.130, then to allow only your IP address to be able to connect you would add the following:
host all all 69.143.195.130/32  md5
Startup the postgressql service back up:
[root]# service postgresql start
This completes this PostgreSQL installation procedure.
Summary
In this step-by-step walkthrough, you installed the 64-bit version of PostgreSQL server 8.4.8 onto a headless 64-bit CentOS server.  Congratulations!
References
  1. PostgreSQL Home Page: http://www.postgresql.org/.
  2. PostgreSQL 8.4.8 Documentation: http://www.postgresql.org/docs/8.4/static/index.html.
Notes
  • TBD