How to install mariadb on FreeBSD

Recent discussion around mysql license and its future lead me to mariadb.

From Wikipedia

MariaDB is a community-developed branch of the MySQL database, the impetus being the community maintenance of its free status under GPL, as opposed to any uncertainty of MySQL license status under its current ownership by Oracle.

The intent also being to maintain high fidelity with MySQL, ensuring a “drop-in” replacement capability with library binary equivalency and exacting matching with MySQL APIs and commands. It includes the XtraDB storage engine as a replacement for InnoDB.

Its lead developer is Monty Widenius, the founder of MySQL and Monty Program AB.”

dba by night, ninja by nightBeing curious I decide to install mariadb on my Freebsd 8.1 stable . My first option for install is via ports but at time writing I don’t find the mariadb port :-(

After search and dig google I came up with solution on how to install mariadb from source.

Here the steps :

read more »

How to install postgresql 8.1.22 and php 5.2.14 on FreeBSD 8.1 stable

Recent change in mysql make my friend contact me. He want to learn and practice about postgresql before use it on real cpanel host that support postgresql . I agree to set new server for him to play around. The  server itself basically consists of apache, php, postgresql and phppgadmin on FreeBSD 8.1 stable.

Here the steps :

Which Version of Postgresql

I also have same hosting account that my friend use. I log in to cpanel then click phppgadmin to see postgresql version.

Ok. I can see that Postgresql 8.1.22 installed on that host.

read more »

Upgrade Zimbra Network Edition from 6.0.1 to 6.0.8

Stop Zimbra Service

su – zimbra

$ zmcontrol stop
Host mail.yourdomain.com
Stopping stats…Done.
Stopping mta…Done.
Stopping spell…Done.
Stopping snmp…Done.
Stopping archiving…Done.
Stopping antivirus…Done.
Stopping antispam…Done.
Stopping imapproxy…Done.
Stopping memcached…Done.
Stopping mailbox…Done.
Stopping convertd…Done.
Stopping logger…Done.
Stopping ldap…Done.
$
$ exit
logout
#

Backup Zimbra

# cd /opt
# tar cvzf zimbra.tar.gz zimbra

Check Zimbra Version

$ zmcontrol -v

Release 6.0.1_GA_1816.UBUNTU8 UBUNTU8 NETWORK edition.

Check License
$ zmlicense -c
license is in grace period

$ zmlicense -c
license is OK

read more »

How to update / renew Zimbra License

Your Zimbra Network License expired 24 days ago :-)

Yes, that message show up when I log in to one of my client and they ask me to renew the license.

Well, the process itself isn’t difficult as what you need to extend zimbra license just ask sales at zimbra.com.

they will email license key and with the key what you need to do is login to zimbra admin.

Click on Global Settings.

Click License will give this screen.

Click Update License.

Browse for license file and click Next.

Your license file is uploaded successfully.

Click Install.

You license file is installed successfully.

Done.

Client can continue their zimbra mailbox.

Renew Certificate or Create New Certificate from Zimbra CLI

my emailLicense for one of our client get expired and current status is in grace period.

Accident happen when server was forced to shutdown due to electrical problem. When the server goes up nothing email server still down. I try to start the service manually.

$ zmcontrol start
Host mail.yourdomain.com
Unable to determine enabled services from ldap.
Unable to determine enabled services. Cache is out of date or doesn’t exist.

Further investigation tell me about certificate expiration, I must renew it.

Here the steps :

# su – zimbra
$ /opt/zimbra/bin/zmcertmgr createca -new
/opt/zimbra/bin/zmcertmgr must be run as user root
$ exit
logout

Hohoho, the command must run by root.

Begin by generating a new Certificate Authority (CA).

# /opt/zimbra/bin/zmcertmgr createca -new

** Creating /opt/zimbra/ssl/zimbra/ca/zmssl.cnf…done
** Creating CA private key /opt/zimbra/ssl/zimbra/ca/ca.key…done.
** Creating CA cert /opt/zimbra/ssl/zimbra/ca/ca.pem…done.

Then generate a certificate signed by the CA that expires in 365 days.

# /opt/zimbra/bin/zmcertmgr createcrt -new -days 365

Validation days: 365
** Creating /opt/zimbra/conf/zmssl.cnf…done
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20101009200401
** Generating a server csr for download self -new -keysize 1024
** Creating /opt/zimbra/conf/zmssl.cnf…done
** Backup /opt/zimbra/ssl/zimbra to /opt/zimbra/ssl/zimbra.20101009200401
** Creating server cert request /opt/zimbra/ssl/zimbra/server/server.csr…done.
** Saving server config key zimbraSSLPrivateKey…failed.
** Signing cert request /opt/zimbra/ssl/zimbra/server/server.csr…done.

Next deploy the certificate.

# /opt/zimbra/bin/zmcertmgr deploycrt self

** Saving server config key zimbraSSLCertificate…done.
** Saving server config key zimbraSSLPrivateKey…done.
** Installing mta certificate and key…done.
** Installing slapd certificate and key…done.
** Installing proxy certificate and key…done.
** Creating pkcs12 file /opt/zimbra/ssl/zimbra/jetty.pkcs12…done.
** Creating keystore file /opt/zimbra/mailboxd/etc/keystore…done.
** Installing CA to /opt/zimbra/conf/ca…done.

Next deploy the CA

# /opt/zimbra/bin/zmcertmgr deployca

** Importing CA /opt/zimbra/ssl/zimbra/ca/ca.pem into CACERTS…done.
** Saving global config key zimbraCertAuthorityCertSelfSigned…done.
** Saving global config key zimbraCertAuthorityKeySelfSigned…done.
** Copying CA to /opt/zimbra/conf/ca…done.

To finish, verify the certificate was deployed to all the services.

# /opt/zimbra/bin/zmcertmgr viewdeployedcrt

::service mta::
notBefore=Oct  9 13:04:03 2010 GMT
notAfter=Oct  9 13:04:03 2011 GMT
subject= /C=US/ST=N/A/O=Zimbra Collaboration Suite/OU=Zimbra Collaboration

Suite/CN=mail.yourdomain.com
issuer= /C=US/ST=N/A/L=N/A/O=Zimbra Collaboration Suite/OU=Zimbra Collaboration

Suite/CN=mail.yourdomain.com
SubjectAltName=
::service proxy::
notBefore=Oct  9 13:04:03 2010 GMT
notAfter=Oct  9 13:04:03 2011 GMT
subject= /C=US/ST=N/A/O=Zimbra Collaboration Suite/OU=Zimbra Collaboration

Suite/CN=mail.yourdomain.com
issuer= /C=US/ST=N/A/L=N/A/O=Zimbra Collaboration Suite/OU=Zimbra Collaboration

Suite/CN=mail.yourdomain.com
SubjectAltName=
::service mailboxd::
notBefore=Oct  9 13:04:03 2010 GMT
notAfter=Oct  9 13:04:03 2011 GMT
subject= /C=US/ST=N/A/O=Zimbra Collaboration Suite/OU=Zimbra Collaboration

Suite/CN=mail.yourdomain.com
issuer= /C=US/ST=N/A/L=N/A/O=Zimbra Collaboration Suite/OU=Zimbra Collaboration

Suite/CN=mail.yourdomain.com
SubjectAltName=
::service ldap::
notBefore=Oct  9 13:04:03 2010 GMT
notAfter=Oct  9 13:04:03 2011 GMT
subject= /C=US/ST=N/A/O=Zimbra Collaboration Suite/OU=Zimbra Collaboration

Suite/CN=mail.yourdomain.com
issuer= /C=US/ST=N/A/L=N/A/O=Zimbra Collaboration Suite/OU=Zimbra Collaboration

Suite/CN=mail.yourdomain.com
SubjectAltName=
#

done.

Try start the service :

~$ zmcontrol start
Host mail.yourdomain.com
Starting ldap…Done.
Starting logger…Done.
Starting convertd…Done.
Starting mailbox…Done.
Starting antispam…Done.
Starting antivirus…Done.
Starting snmp…Done.
Starting spell…Done.
Starting mta…Done.
Starting stats…Done.
$