All posts by Paul

CERT Coordinator, Ham Radio Operator, GTD Fan; Photographer; Domino/Notes Administrator

MariaDB – Admin – managing and confirming service is running

Desired Outcome:
Understanding the components that go into running the MariaDB Server – service, confirming status, starting, stopping, scripts, etc.

Q: What is the MariaDB server binary called?
A: mysqld
Note: The “d” stands for daemon and is written “mysqld” to preserve upline compatibility with MySQL

Q: Is MariaDB a binary drop-in replacement for SQL?
A: Yes

Q: How to check if mysqld is running?
A: service mysqld status
Redirecting to /bin/systemctl status mysqld.service
mariadb.service – MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
Active: active (running) since Wed 2015-11-25 10:34:27 PST; 4 days ago
Main PID: 1291 (mysqld)
Status: “Taking your SQL requests now…”
CGroup: /system.slice/mariadb.service
ââ1291 /usr/sbin/mysqld
Nov 25 10:34:26 localhost.localdomain mysqld[1291]: 2015-11-25 10:34:26 13972…
Nov 25 10:34:27 localhost.localdomain mysqld[1291]: Version: ‘10.1.8-MariaDB’…
Nov 25 10:34:27 localhost.localdomain systemd[1]: Started MariaDB database se…
Hint: Some lines were ellipsized, use -l to show in full.

Q: If it’s recommended to start MariaDB from a script, how is that configured?

Notes to process into the above, for complete understanding
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service
systemctl is-active mariadb.service (to check it’s working) — says “active”
mysql -u root -p and entered the password I had set — It worked!!! I’m into Monitor:

NOTE: I have it configured so that mariadb.service auto starts, so I only have to do the mysql -u root – p

Note: To stop service:
sudo systemctl stop mariadb.service

Welcome to the MariaDB monitor. Commands end with ; or \g.

Project Summary (Centos7, JDK7, Apache Tomcat, MariaDB)

Project Summary:

As of 20151126, I have the following components installed on my test server. I originally went down path of installing Apache Tomcat (because of the association with LongJump CRM), thinking that I would also be able to install PHP and SugarCRM. Now I realize that Apache Tomcat is more for Java-based apps and Apache HTTPD would be for HTML Site, PHP, phpMyAdmin, SugarCRM. It’s possible to install HTTPD on my current test server, but I’m going to hold off for now.

I have enough to go on for now with current system, for learning stuff, and could work to join the MariaDB (SQL) Server to the Apache Tomcat WebServer. Initial focus would then be on MariaDB and Java apps.

Itemized list of of what I currently have installed as of 20151126:

Centos7 (CentOS Linux release 7.0.1406 (Core))
Command: cat /etc/centos-release

CentOS Kernel Version (Linux localhost.localdomain 3.10.0-123.9.3.el7.x86_64 #1 SMP Thu Nov 6 15:06:03 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux)
Command: uname -a

MariaDB version installed:
Command: yum list installed mariadb*
Installed Packages
MariaDB-client.x86_64 10.1.8-1.el7.centos @mariadb
MariaDB-common.x86_64 10.1.8-1.el7.centos @mariadb
MariaDB-server.x86_64 10.1.8-1.el7.centos @mariadb
MariaDB-shared.x86_64 10.1.8-1.el7.centos @mariadb

MariaDB running? (Yes – Active)
Command: systemctl is-active mariadb.service

MariaDB – how to run it
Command: mysql -u root -p
Note: Password is what I set for the Database Server

Java JDK 7 (java version “1.7.0_91”)
Command: java -version

Apache Tomcat (Version: 8.0.28)
Note: cd /opt/tomcat
Command: java -cp lib/catalina.jar org.apache.catalina.util.ServerInfo
Server version: Apache Tomcat/8.0.28
Server built: Oct 7 2015 18:25:21 UTC
Server number:
OS Name: Linux
OS Version: 3.10.0-123.9.3.el7.x86_64
Architecture: amd64
JVM Version: 1.7.0_91-mockbuild_2015_10_21_20_22-b00
JVM Vendor: Oracle Corporation

Project Learning Focus:

-Linux – using CentOS
-SQL Databases – using MariaDB
-Web Server (Java focused) – using Apache Tomcat
-Java Programming
-Programming Languages (Python, C++)

Apache HTTPD installed on same server as Apache Tomcat

Desired Outcome
Install Apache HTTPD on same server as Apache Tomcat, so I can then get PHP working on HTTPD including SugarCRM. Also, it can be configurd so that the HTTP and Tomcat servers talk to each and pass the applicable requests back and forth.
XREF to this document —

Note: I’m going to put this project down as Someday/Maybe because there are many things to learn with my current setup, before going down path of adding another module.

firewalld – understanding within Centos7

Desired Outcome:

Understanding all CLI commands and features of firewalld (which replaced iptables)

XREF to this for info:

Error I’m working with:
firewall-cmd –zone=public –list-services
ERROR:dbus.proxies:Introspect error on :1.4:/org/fedoraproject/FirewallD1: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type=”method_call”, sender=”:1.21″ (uid=1000 pid=2418 comm=”/usr/bin/python -Es /usr/bin/firewall-cmd –zone=p”) interface=”org.freedesktop.DBus.Introspectable” member=”Introspect” error name=”(unset)” requested_reply=”0″ destination=”:1.4″ (uid=0 pid=618 comm=”/usr/bin/python -Es /usr/sbin/firewalld –nofork -“)
Error: Rejected send message, 1 matched rules; type=”method_call”, sender=”:1.21″ (uid=1000 pid=2418 comm=”/usr/bin/python -Es /usr/bin/firewall-cmd –zone=p”) interface=”” member=”getServices” error name=”(unset)” requested_reply=”0″ destination=”:1.4″ (uid=0 pid=618 comm=”/usr/bin/python -Es /usr/sbin/firewalld –nofork -“)

Answer to above error — when working with firewalld, be root (or su -)