Archive for September, 2006

Install bugzilla in Solaris 10

First of all i’ve to say that i love Solaris and the other UNIX variants like GNU/Linux, but sometimes i love the easy way of Mac OSX or Windows installations too.

The first thing i did is install Solaris 10 in a x86 machine, the version i’ve used is the last one (at this time 10 6/6) and have a lot of open source software out-of-the-box like MySQL, Apache, Perl …

MySQL

I think it was one of the easiest steps of whole process. There are a file in /etc/sfw/mysql called README.solaris.mysql that explaint the entire installation.

/usr/sfw/bin/mysql_install_db
groupadd mysql
useradd -g mysql mysql
chgrp -R mysql /var/mysql
chmod -R 770 /var/mysql
installf SUNWmysqlr /var/mysql d 770 root mysql
cp /usr/sfw/share/mysql/my-medium.cnf /var/mysql/my.cnf
/etc/sfw/mysql/mysql.server start

Check the file, maybe in you version there are more steps.

Apache 2

Just copy /etc/apache2/httpd.conf-example into /etc/apache2/httpd.conf and try:

svcadm enable apache2

Now check in your browser thar Apache is serving properly.

Maybe someday i continue this history … sorry

Perl and Modules

sunfreeware

GCC and Sun compiler tools

Bugzilla

Sendmail

Conclusion

Commons Validator outside Struts framework

Introduction

Commons Validator API is a piece of software that let us to decouple the validation routines and the main code of the project. With Validator, we can save a lot of time using predefined rules to accomplish the repetive tasks. The constraints are defined in a xml document and can be reusable in several projects.

Maybe, you have already used Validator in Struts framework, but with minimal effort we can integrate in your application.

This is your actual application, you have validations written in java code in many parts, and the code is redundant, and not reusable. When you begin another project, you have to code again this validations or copy & paste. This way is a error prone aproach, and only recomended in very simple applications.
myApp3

On the other side, we have Struts. This framework is modular, and one specific part has the only purpose of validation, commons validator. Despite validator was originally coded for struts is also valid for any other kind of applications.
struts
Of course, this is not a real struts diagram, is only for this explanation purpose.

We want to plug validator inside the application and move the java code to xml document. In the future, adding more validation constraints will be quick and easy.
myApp2

Read more »