Mac OS X 10.8, MacPorts and WoodWing Enterprise

Hello!

FYI: This works for Enterprise 9 as well.

Several years ago (almost exactly two years ago as I write this) I wrote a post for installing WoodWing’s Enterprise Content Management system onto a Mac running Mac OS X 10.6 (see here).

Just recently I got a new machine and, of course, I need to install all these bits and pieces again so that I can run Enterprise v8 on my machine.

Below are the steps that I followed. This assumes that this is a new machine running Mac OS X 10.8.x

Preparation

I generally have to do a few things to prepare a new machine as I generally don’t like to migrate things from the old machine.

To get prepared for this I had to do the following:

1. I create the non-Admin user for security reasons.

2. Install TextWrangler

I install TextWrangler on any machine that I spend time on where I’m installing software. It has code coloring and outside of BBEdit is my favorite text editors.

3. Install Apple’s Xcode

Xcode is required for MacPorts to be able to compile the bits and pieces we are going to need.

To get Xcode go to the App Store, download and install it.

Once Xcode is installed there are still some components that need to be installed so that we can compile stuff.

Start Xcode, select the ‘Xcode’ menu at the top and select ‘Preferences’. In the preferences screen select ‘Downloads’.

‘Command Line Tools’ should be listed. Press the ‘Install’ button and watch the magic.

4. Install MacPorts.

Download the latest MacPorts installer from here (http://www.macports.org).

Be sure to get the right one for your operating system. The installer comes as a .dmg file. Open the file and run the installer. Read more here.

After installation I open the ‘Terminal’ application and enter the following command:

sudo port -v selfupdate

MacPorts will update, if necessary, and then it is ready to use.

You will also want to get the path information to your profile run the following commands in Terminal to do so:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export MANPATH=/opt/local/share/man:$MANPATH
Install Apache2, PHP and MySQL

Installing MySQL

1. Start Terminal

2. Run the following command to install MySQL v55

sudo port install mysql55

If you want MySQL to start up on start of the machine run:

sudo port install mysql55-server

Then the command below to get the initial databases installed:

sudo -u _mysql /opt/local/lib/mysql55/bin/mysql_install_db

To get your server to start when the machine starts up:

sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql55-server.plist

You might run into this: Starting MySQL… ERROR! The server quit without updating PID file
See here.
Installing PHP5

Note that Apache2 will get installed by issuing the command below.

The command to install php5 is: sudo port install php5

NOTE: We could do a command that would install PHP5 and all of the other necessary bits. Instead, below I have outlined the individual port commands below.

sudo port install php5-mysql
sudo port install php5-sqlite
sudo port install php5-sockets
sudo port install php5-mcrypt
sudo port install php5-curl
sudo port install php5-mbstring
sudo port install php5-imagick
sudo port install php5-xdebug
sudo port install php5-xmlrpc
sudo port install php5-xsl
sudo port install php5-zip
sudo port install php5-soap
sudo port install php5-gd
sudo port install php5-exif
sudo port install php5-openssl
sudo port install php5-iconv
sudo port install php5-ftp

Set up Apache2 to start up automatically

Use Terminal and issue this command:
sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist

You may need to set the server name in the ‘httpd.conf’ file to something like:

ServerName 127.0.0.1:8080

Starting Apache

There are two commands that you will need if you are making adjustments to Apache or PHP config files.

Start Apache:
sudo /opt/local/apache2/bin/apachectl -k start

Stop Apache:
sudo /opt/local/apache2/bin/apachectl -k stop

Installing Enterprise
Follow the admin guide provided on the Community site.

WoodWing and CentOS 6.4

Spent some time bringing up a CentOS 6.4 VM that ran Enterprise and Elvis.

Had to install a few things on the Apache/PHP/MySQL front. Below are the commands that I ran to to get things running for Enterprise.

Keep in mind that your mileage will vary here as how you installed CentOS (For instance did you make the selection to install a ‘Web Server’ when running the installer) will make a big difference on what you have to do.

After you have created the VM (In my case I used Parallels because…that’s what I had).

CentOS 6.4

Install the base goodies.

yum -y install httpd php mysql mysql-server php-mysql

For PHP I had to install a few other extensions:

mbstring
yum install php-mbstring

mcrypt
To get this installed I had to reference another repository and then run the command. Be sure to check the link below to make sure you are getting the correct version.

a. ‘rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

b. yum install php-mcrypt

References:

maxwhale.com

imagick
Need to install php-pear and gcc (should already be installed)

yum install php-pear gcc

yum install ImageMagick

References:

tecmint.com

xmlrpc
yum install php-xmlrpc

php-soap
yum install php-soap

Install PHPMyAdmin

I installed PHPMyAdmin to work with MySQL. I like the tool. Easy to install and use.

Enterprise configuration changes

You’ll need to make one change to the server config files for the ‘locale’ setting.
a. Open ‘config.php’

b. Add setlocale(LC_ALL,”en_US.utf8″);’ after file encoding section at the bottom of the file.

References:

WoodWing Community Site article about ‘locale’ setting

Installing OPCache

The latest version of WoodWing’s Enterprise Multi-Channel Publishing System, version 9.1, takes advantage of PHP OPcache.

OPcache is part of PHP 5.5 and can be installed via pecl for v5.2 to v5.4.

When installing Enterprise the Test Suite will notify you that OPcache is not installed (it will do so when checking the php.ini settings. So, clearly the first thing is install the feature.)

I use MacPorts to maintain my Apache/PHP installation so here’s what I did to install on my machine:

  • sudo port self update
  • port install php54-opcache

If you are running PHP v5.3 then the command is:

  • port installl php53-opcache

MacPorts does its thing and when it’s finished…BAZING! we have OPcache installed.

I added the following line to my php.ini file:

zend_extension = /opt/local/lib/php53/extensions/no-debug-non-zts-20090626/opcache.so

Make sure that this line comes after the line for Ioncube.

Restart Apache. I navigated back to the Health Test and selected ‘php.ini’ to test. The test came through as good.

PHP OPcache is installed and ready to go!

WoodWing Enterprise and SOLR4

Apache Solr

In the process of upgrading my personal machine Enterprise v9.2.

This version of Enterprise includes support for Solr4. Pretty easy update on the ol’ Mac with MacPorts.

  1. Start the Terminal application
  2. Enter ‘sudo port install apache-solr4’ and press enter

MacPorts does its thing. 

I also upgraded our Windows server running in the Amazon S3 service. A little different process but just as easy.

Lots of nice stuff in Enterprise v9.2. More about that soon. 

Update: In case you are curious here is the path to the solrconfig.xml and schema.xml files (default)

/opt/local/share/java/solr-4.7.0/example/solr/collection1/conf