lunes, 21 de junio de 2021

MariaDB 5.5.68 Upgrade to 10.4

First step BACKUP.
# mysqldump -u root -p --all-databases --routines --triggers > /tmp/all-databases.sql
# cp /etc/my.cnf /etc/my.cnf.orig

Validate version:
# mysql -V

Update and reboot...
# yum update -y
# reboot

Stop services: 
# systemctl stop mariadb

Remove mariadb-server / mariadb.
# yum remove mariadb mariadb-server

Install nano editor but you can use vi / vim / etc....

# yum install nano epel-release

Create or edit the repo file.
# nano /etc/yum.repos.d/mariadb.repo

name = MariaDB
baseurl =

Clean repos...
# yum clean all

Install MariaDB / Client 10.4
# yum install MariaDB-server MariaDB-client net-snmp perl-DB-MySQL -y

Restore my.cnf (if required ... sometimes it is not ...)
# rm -rf /etc/my.cnf
# cp /etc/my.cnf.orig /etc/my.cnf

Enable services:
# systemctl enable mariadb
# systemctl start mariadb

Upgrade databases:
# mysql_upgrade

If you receive this error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

# mysql_ugprade --password

Validate version:
# mysql -V

jueves, 25 de febrero de 2021

ZimbraLogHostname is not configured - error

[root@mail ~]# cat /etc/centos-release

CentOS Stream release 8

[zimbra@mail ~]$ zmcontrol -v

Release 8.8.15_GA_3953.RHEL8_64_20200629025823 UNKNOWN_64 FOSS edition, Patch 8.8.15_P19.

Log in as the zimbra user

[root@mail ~]# su - zimbra

[zimbra@mail ~]$

Now run this command to set the hostname in the Logs configuration.

Remember to change the domain name to yours.

[zimbra@mail ~]$ zmprov mcf zimbraLogHostname

[zimbra@mail ~]$ exit


Switch to root user.

[root@mail ~]#

Update the log configuration with this command.

[root@mail ~]# /opt/zimbra/libexec/zmsyslogsetup

updateSyslogNG: Updating /etc/syslog-ng/syslog-ng.conf...done.

Last step restart zimbra services

With this you can see all your statistics and logs from the administrator gui.

miércoles, 31 de julio de 2019

How to install spacewalk 2.9 on CentOS 7

Spacewalk is an open source Linux systems management solution.

Spacewalk's capabilities include:
- Inventory your systems (hardware and software information)
- Install and update software on your systems
- Collect and distribute your custom software packages into manageable groups
- Provision (kickstart) your systems
- Manage and deploy configuration files to your systems
- Provision virtual guests
- Start/stop/configure virtual guests
- Distribute content across multiple geographical sites in an efficient manner


- Outbound open ports 80, 443
- Inbound open ports 80, 443, 5222 (only if you want to push actions to client machines) and 5269 (only for push actions to a Spacewalk Proxy), 69 udp if you want to use tftp
- Storage for database: 250 KiB per client system + 500 KiB per channel + 230 KiB per package in channel (i.e. 1.1GiB for channel with 5000 packages)
- Storage for packages (default /var/satellite): Depends on what you're storing; Red Hat recommend 6GB per channel for their channels
- 2GB RAM minimum, 4GB recommended
- Make sure your underlying OS is fully up-to-date.

Project page:

Spacewalk repositories:

Last build #00912457


EPEL 7 repositories
yum -y install epel-release

Step 1:

Configure hosts file
# vi /etc/hosts   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6     spacewalk.ibtechpa.local spacewalk

Install spacewalk repositories
# rpm -Uvh

Install EPEL repositories
# yum -y install epel-release

Configure locale to avoid perl warning. 
This can cause some issues when configuring spacewalk.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "C.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Add these lines:
# vi /etc/environment

Update and reboot the OS
# yum -y update
# reboot

Step 2:

Configure firewalld
# firewall-cmd --permanent --add-service=http
# firewall-cmd --permanent --add-service=https
# firewall-cmd --permanent --add-port=69/udp --add-port=5222/tcp --add-port=5269/tcp
# firewall-cmd --reload

Install spacewalk embebbed database
#  yum -y install spacewalk-setup-postgresql

Install spacewalk
# yum install -y spacewalk-postgresql

Step 3:

Configure spacewalk
[root@spacewalk ~]# spacewalk-setup
* Setting up SELinux..
** Database: Setting up database connection for PostgreSQL backend.
Database "rhnschema" does not exist
** Database: Installing the database:
** Database: This is a long process that is logged in:
** Database:   /var/log/rhn/install_db.log
*** Progress: #
** Database: Installation complete.
** Database: Populating database.
*** Progress: ############################
* Configuring tomcat.
* Setting up users and groups.
** GPG: Initializing GPG and importing key.
** GPG: Creating /root/.gnupg directory
You must enter an email address.
Admin Email Address?
* Performing initial configuration.
* Configuring apache SSL virtual host.
Should setup configure apache's default ssl server for you (saves original ssl.conf) [Y]? y
** /etc/httpd/conf.d/ssl.conf has been backed up to ssl.conf-swsave
* Configuring jabberd.
* Creating SSL certificates.
CA certificate password?
You must enter a password.
CA certificate password?
Re-enter CA certificate password?
Cname alias of the machine (comma seperated)? spacewalk
Organization? ibtechpa
Organization Unit [spacewalk.ibtechpa.local]?
Email Address []?
City? Panama
State? Panama
Country code (Examples: "US", "JP", "IN", or type "?" to see a list)? PA
** SSL: Generating CA certificate.
** SSL: Deploying CA certificate.
** SSL: Generating server certificate.
** SSL: Storing SSL certificates.
* Deploying configuration files.
* Update configuration in database.
* Setting up Cobbler..
Cobbler requires tftp and xinetd services be turned on for PXE provisioning functionality. Enable these services [Y]?
* Restarting services.
Installation complete.
Visit https://spacewalk.ibtechpa.local to create the Spacewalk administrator account.
[root@spacewalk ~]#

Validate services its OK:
# spacewalk-service status

Step 4:

Open your browser and use IP address:

Domain name:

Create administrator account and set your password:

You are ready to start managing spacewalk:

viernes, 24 de mayo de 2019

How to install Zimbra Collaboration Open Source 8.8.12_GA on CentOS 7

  • CentOS 7
  • 10 GB RAM
  • 5 GB Free Space on /opt/Zimbra
  • 10 GB free disk space on /opt
  • 10 GB free disk space on /tmp
  • Fully Qualified Domain Name (FQDN), in this demo is “mail.ibtechpa.local”
  • Record A & MX for your Server
  • The firewall should be disabled
Become the root user:

# sudo su -
# su -

Apply the latest updates using following command and then reboot:

# yum update -y
# reboot

Install Zimbra dependencies:
# yum install unzip net-tools sysstat libaio nmap-ncat openssh-clients perl-core wget libreoffice libreoffice-headless -y

Set the hostname of your server:

# hostnamectl set-hostname
# exec bash

Edit hosts file:
# vi /etc/hosts

Add: mail

# cat /etc/hosts localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 mail

Zimbra recommends the firewall to be disabled:
# systemctl stop firewalld
# systemctl disable firewalld

In CentOS 7, postfix is installed and running by default. So, we need to disable it for Zimbra installation:
# systemctl stop postfix
# systemctl disable postfix

Create Zimbra directory to place the installer:

# mkdir /zimbra
# cd /zimbra

Download the Zimbra 8.8.12_GA:
# wget

Extract the downloaded file:

# tar -zxvf zcs-8.8.12_GA_3794.RHEL7_64.20190329045002.tgz

Go to extracted folder and run the install script:
# cd zcs-8.8.12_GA_3794.RHEL7_64.20190329045002
[root@mail zcs-8.8.12_GA_3794.RHEL7_64.20190329045002]#
# ./

You will get text-based installation wizard. Press Y to accept the Zimbra license agreement:

Configure the Zimbra package repository:

Press "Y" to all Zimbra Components to install.

Pres "Y" to continue to download the Zimbra related packages. This task can take time depending upon on your internet speed.

Once all the Zimbra packages are download and installed, we will get the below window.
Enter the domain name for Zimbra installation.

In this case ""

Now we need to set the Zimbra admin password:
Press 7 and them 4.

Set Password, Press enter, and press "r" to return.

After set the admin password Press “s” and then Press enter to save the config in a file. Now Press “a” to apply the changes and enter “Y” to continue.

Logging in to cli and check services:

[root@mail ~]# su - zimbra
Last login: Fri May 24 17:10:48 EST 2019 on pts/0
[zimbra@mail ~]$

[zimbra@mail ~]$ zmcontrol status
        amavis                  Running
        antispam               Running
        antivirus               Running
        dnscache               Running
        ldap                      Running
        logger                   Running
        mailbox                Running
        memcached           Running
        mta                        Running
        opendkim               Running
        proxy                     Running
        service webapp     Running
        snmp                      Running
        spell                      Running
        stats                       Running
        zimbra webapp     Running
        zimbraAdmin webapp      Running
        zimlet webapp       Running
        zmconfigd              Running
[zimbra@mail ~]$

Check Version:

[zimbra@mail ~]$ zmcontrol -v
Release 8.8.12_GA_3794.RHEL7_64_20190329045002 RHEL7_64 FOSS edition, Patch 8.8.12_P1 proxy.
[zimbra@mail ~]$

Users -> URL –
Admin URL –

Test success!!!

miércoles, 12 de junio de 2013

ownCloud server install & basic configuration

First step:

[lbazan@ILBR001 ~]$ su
[root@ILBR001 lbazan]# yum install owncloud

Second step:

Initialize apache:

[root@ILBR001 lbazan]#service httpd start
Redirecting to /bin/systemctl start  httpd.service

[root@ILBR001 lbazan]#

Third step:

when the installation finish go to your browser and write:


When appear the owncloud home page you can write admin user and password. ownCloud don't have default user and password so you should think of one for that time. You can select the DB system for your election, in this case I use SQLite for a basic installation.

If you are user MySQL you need first create the database and then configure the user and password then put this configuration == in the ownCloud home page or you can edit the config file in "vi cd /etc/owncloud/config.php" directly. 

Ok! you finish the third step.

Now you have personal CLOUD

Screen Shots:

User Home Page

Expand configuration area

User admin area: You can create users and groups

Personal area: edit personal data and others

Aplication area: for install more addons

Administration area: some additional things for the good administration of the cloud

I hope you learn something this information. :-)


jueves, 26 de julio de 2012

Nagios Notifications

To enable notifications the first step is edit contact email (example mail:

[root@BMNG001 soporte]# cd /etc/nagios/objects
[root@BMNG001 soporte]# vi contacts.cfg

1. Edit this lines:

define contact{
        contact_name  Soporte          ; Short name of user
        use           generic-contact  ; Inherit default values...
        alias         Soporte          ; Full name of user
        email   ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
2. And Then
edit hosts
vi /etc/hosts   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 BMNG001.ZEUS.loc BMNG001
Add your: IP - - HOSTNAME
[root@BMNG001 soporte]# service nagios restart

This is because I see that many have problems with notifications to 
the end and it is something simple but not everyone knows it.


jueves, 19 de julio de 2012

Nagios in Fedora

Basic installation and configuration of Nagios on F17. Go into the console, login as root and proceed to write yum install nagios*

Install Nagios:

[soporte@BMNG001 ~]$ su                                                                                                                                      
[root@BMNG001 soporte]# yum install nagios*

Start services Nagios and Apache:

[root@BMNG001 soporte]# services start nagios
[root@BMNG001 soporte]# services start httpd

Enable apache service:

[root@BMNG001 soporte]# chkconfig httpd on

Create nagios admin password:

[root@BMNG001 soporte]# htpasswd -c /etc/nagios/passwd nagiosadmin 

Check the configuration file:

[root@BMNG001 soporte]# vi /etc/httpd/conf.d/nagios.conf
Nagios user & groups 

[root@BMNG001 soporte]# groupadd nagios
[root@BMNG001 soporte]# adduser nagios -g nagios
[root@BMNG001 soporte]# passwd nagios
[root@BMNG001 soporte]# usermod -G nagios nagios
[root@BMNG001 soporte]# usermod -G apache,nagios apache

Verify the configuration:

[root@BMNG001 soporte]# nagios -v /etc/nagios/nagios.cfg
Nagios Core 3.4.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 05-11-2012
License: GPL

Reading configuration data...
   Read main config file okay...
Processing object config file '/etc/nagios/objects/commands.cfg'...
Processing object config file '/etc/nagios/objects/contacts.cfg'...
Processing object config file '/etc/nagios/objects/timeperiods.cfg'...
Processing object config file '/etc/nagios/objects/templates.cfg'...
Processing object config file '/etc/nagios/objects/localhost.cfg'...
Processing object config file '/etc/nagios/objects/windows.cfg'...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
        Checked 61 services.
Checking hosts...
        Checked 8 hosts.
Checking host groups...
        Checked 2 host groups.
Checking service groups...
        Checked 0 service groups.
Checking contacts...
        Checked 1 contacts.
Checking contact groups...
        Checked 1 contact groups.
Checking service escalations...
        Checked 0 service escalations.
Checking service dependencies...
        Checked 0 service dependencies.
Checking host escalations...
        Checked 0 host escalations.
Checking host dependencies...
        Checked 0 host dependencies.
Checking commands...
        Checked 28 commands.
Checking time periods...
        Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check

Now type in your browser http://yourIP/nagios login with  your  nagiosadmin user already created.


Service Area

This is an example Nagios in Server my office:
Hosts Area

Coming soon: How to define hosts and groups. :-)