Posts

Day 4: Securing MySQL and Essential my.cnf Settings

Image
Objective Secure a MySQL 8.4 LTS server on Oracle Linux 9 with my.cnf settings, TLS-only connections and a source-restricted firewall rule, a hands-on lab for DBAs. By the end of Day 4, mysql84-prod01 listens on one address, refuses unencrypted connections, skips host name lookups and accepts MySQL traffic only from the admin host dba-admin01 , and we have a least-privilege monitoring account to prove it.

Day 3: Configuring postgresql.conf and pg_hba.conf for Secure PostgreSQL Access

Image
1. Objective Configure PostgreSQL 17 on Oracle Linux so it accepts remote connections from exactly one admin host, using postgresql.conf , pg_hba.conf , SCRAM passwords and a firewall rule limited to one source address. Day 3 of DBA365, for DBAs who want secure remote access instead of "allow all".

Day 2: Installing Oracle Database and Creating the SALES Container Database

Image
Day 2 of the daily DBA365 series. On ora19-prod01 we install the Oracle Database 19c software with Release Update 19.33 applied during the install, then create our first container database, SALESCDB , with one pluggable database, SALESPDB .

Day 1: Building the DBA365 Oracle Linux Database Lab (Oracle, PostgreSQL, MySQL)

Image
Day 1 of the daily DBA365 series. The whole series uses one consistent lab with clear host and database names, so you can rebuild every step exactly as written. Today we build the foundation: three Oracle Linux 9 hosts, one for each database engine.

SQLNET.ORA Parameters: SQLNET.EXPIRE_TIME & SQLNET.INBOUND_CONNECT_TIMEOUT

Finally after a long long time posting on this blog.  Hi All,  Oracle documentation states SQLNET.EXPIRE_TIME parameter is used to avoid  unused sessions to be kept open in database and  locking resources. For SQLNET.INBOUND_CONNECT_TIMEOUT, it states:  If the client fails to establish a connection and complete authentication in the time specified, then the database server terminates the connection. In addition, the database server logs the IP address of the client and an  ORA-12170: TNS:Connect timeout occurred  error message to tnslsnr diag destination ($ORACLE_HOME/diag/tnslsnr/<listener_name>/trace/<listener.log> . The client receives either an  ORA-12547: TNS:lost contact  or an  ORA-12637: Packet receive failed  error message.and also records in alert log if audit is enabled for IPs.  In our environment both parameters are set for default value which I feel were too low SQLNET.EXPIRE_TIME (0 - dis...

How to resolve "`/root/.gvfs':Permission denied" when running df command from non-root user

When root user is logging in to GNOME, error "`/root/.gvfs':Permission denied" occurs if a normal user runs df. Solution Verified - Updated May 6 2014 at 12:16 AM - English English Environment Red Hat Enterprise Linux (RHEL) 6 GNOME Desktop Environment Issue When root user is logging in to GNOME, the following error occurs if a normal user runs df. $ df -kl Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 24670076 3751464 19665444 17% / tmpfs 1030908 100 1030808 1% /dev/shm /dev/sda1 99150 25491 68539 28% /boot df: `/root/.gvfs': Permission denied Resolution To disable gvfs-fuse-daemon , the GVFS_DISABLE_FUSE environment needs to be set. Create the file /etc/X11/xinit/xinitrc.d/00-gvfs-disable-fuse.sh with the follwing contents: GVFS_DISABLE_FUSE=1 export GVFS_DISABLE_FUSE Log out and log in again. If vncserver is running, restart ...

Moving a volume group to another system

Image
- Moving a volume group to another system It is quite easy to move a whole volume group to another system if, for example, a user department acquires a new server. To do this we use the vgexport and vgimport commands. vgexport/vgimport is not necessary to move drives from one system to another. It is an administrative policy tool to prevent access to volumes in the time it takes to move them. 1. Unmount the file system First, make sure that no users are accessing files on the active volume, then unmount it. Here the mount point directory is /mnt/temp1. # unmount /mnt/temp1 2. Mark the volume group inactive Marking the volume group inactive removes it from the kernel and prevents any further activity on it.Here users is the volume group name. # vgchange -an users vgchange -- volume group "users" successfully deactivated 3. Export the volume group It is now necessary to export the volume group. This prevents it from bei...