Friday Sep 11, 2009

Installing and running Joomla! in OpenSolaris

The OpenSolaris "/contrib" repository is a place where anybody can contribute open source software packages, which are then available for you to install on OpenSolaris.  Before a packages gets promoted to the contrib repo, you submit your package / application to a repository called "pending".  The idea is that people can test packages and get others to try them out before they get promoted so that the packages in "contrib" have been at least smoke-tested.

Recently I've noticed the number of packages and apps available growing pretty nicely, and I've been testing some of the apps that our own group (Sun's ISV Engineering organization) has been contributing.  Most of the packages I've tested have gone smoothly.  One gave me a little hiccup so I thought I'd describe what I did to get it working.

That package is the Joomla! content management system.

Installation was actually a snap; once you install the package with the OpenSolaris Package Manager, just fire up the web browser and go to http://localhost/joomla and you get the Joomla! installer.

Well, it's a little more complicated than that; you need to make sure you create a database for Joomla! to use, like this:

mysqladmin -u joomla -p create joomla

mysql -u joomla -p
mysql> grant all privileges on joomla.\* to 'joomla'@'localhost' identified by [password in single quotes here];

(assuming I created a MySQL database user called "joomla", I'm also creating a database called "joomla")

After a few web screens, I can login as the Joomla! admin just fine, but trying to go to the Joomla! front page as a regular non-admin person causes a long series of errors to spit out at me (and rather rudely, I might add); see the end of this post for the details.

Turns out it's a MySQL problem; you can see the discussion here.  The current workaround is to run MySQL in 64-bit mode, but in order to do that, you need to make sure you're running OpenSolaris in 64-bit mode.  If you type "isainfo -k" and it returns "x86", that's not good enough.

I am doing my testing in VirtualBox; to make sure I'm running OpenSolaris in 64-bit mode, I go to the VirtualBox main application panel where I can see the settings for my virtual machine.  Near the top, the section called "General", The "OS Type" field sais "OpenSolaris".  I change that to "OpenSolaris (64-bit)" and the next time I boot OpenSolaris, it's in 64-bit mode.

One more step; making sure to launch the 64-bit version of the MySQL service.  Do this:

svccfg -s mysql:version_51 setprop mysql/enable_64bit=true
svcadm refresh mysql:version_51
svcadm restart mysql:version_51

I did just this, and went back to http://localhost/joomla and everything worked perfectly well.  Joomla! works just fine in OpenSolaris, as you would expect.  Nice looking app, too.

P.S.:  (Joomla / MySQL error message below)



\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
\* Error loading Modules:MySQL server has gone away SQL=SELECT
id, title, module, position, content, showtitle, control, params FROM
jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid =
m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND (
mm.menuid = 1 OR mm.menuid = 0 ) ORDER BY position, ordering
Technorati Tags: , , , , , , , ,

Powered by ScribeFire.

About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle. What more do you need to know, really?

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today