Showing entries 1 to 10 of 1285
10 Older Entries »
Displaying posts with tag: Linux (reset)
Apache on Fedora 30

There was an option during the Fedora 30 Workstation installation to add the Apache Web Server, but you need to set it to start automatically. Unfortunately, there was no option to install PHP, which I thought odd because of how many web developers learn the trade first on PHP with a LAMP (Linux, Apache, MySQL, Perl/PHP/Python) stack. You see how to fix that shortcoming in this post and how to install and test PHP, mysqli, and pdo to support MySQL 8.

Before you do that make sure you install MySQL 8. You can find my prior blog post on that here.

You set Apache to start automatically, on the next boot of the operating system, with the following command:

chkconfig httpd on

It creates a symbolic link:

Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → …
[Read more]
How to Install Matomo Web Analytics with Nginx on FreeBSD 12.0

Matomo (formerly Piwik) is a free and open-source web analytics application developed by a team of international developers, that runs on a PHP/MySQL webserver. This tutorial will show you how to install Matomo on a FreeBSD 12.0 system using Nginx as the webserver and we will secure the website with a Let's Encrypt SSL certificate.

errno: 24 - Too many open files

errno: 24 - Too many open files
You might see this error inside MySQL's error log file or during mysql_upgrade operation.

Can't open file: ‘./db/table.frm' (errno: 24 - Too many open files)
To solve this issue, you will need to change the open files limit at system and db service level.


--> To check and change this limit at the system level, we use ulimit client tool to set it dynamically.

* Check current system open file limit.
root@test:~# ulimit -a core file size          (blocks, -c) 0 data seg size           (kbytes, -d) unlimited scheduling …

[Read more]
Thumb rule to choose Percona-Server ssl Linux-Generic package

Thumb rule to choose Percona-Server ssl Linux-Generic package

Here below are my thumb rules to choose which ssl linux-generic package, you should download for your system.

Like here we can see if we need to download Percona-Server Linux-Generic package then We can see here we have couple of packages available with different ssl(100/101/102) versions.

https://www.percona.com/downloads/Percona-Server-5.7/LATEST/binary/tarball/

Here you should choose below package based on your operating system.

Debian prior to 9 and Ubuntu prior to 14.04 versions --> ssl100 CentOS 6 and CentOS 7 --> ssl101 …

[Read more]
How to create CentOS VM using Vagrant

Create CentOS VM using Vagrant
1. Download and install the latest Oracle VM VirtualBox. 

https://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html

Like (For Mac OS X)
https://download.oracle.com/virtualbox/6.0.6/VirtualBox-6.0.6-130049-OSX.dmg

2. Download and install the latest Vagrant.

https://www.vagrantup.com/downloads.html

Like (For Mac OS X) …

[Read more]
MySQL 5.7 Binary install on Linux

In Generic binary Installation method, we are extracting compressed tar files of MySQL and later we can do customization for MySQL setup as per our requirement. Like having different data directory, log directory etc.

MySQL Generic Binaries can be used to install MySQL on Unix/Linux platforms.

MySQL Installation has a dependency on the libaio library. Make sure that is there on a server before mysql install.

  • Create a mysql user and group, which we will use as a service account for the mysql server.

shell> groupadd mysql

shell> useradd -r -g mysql -s /bin/false mysql

  • Extract MySQL binaries TAR to mysql base directory for example in /mysql dir

  • Create require directories and set appropriate permissions.

shell> cd mysql

[Read more]
Configuring efficient MySQL Logrotate

I am a Junior DBA at Mydbops. This is my first blog professionally, I would like to brief my encounter with Log-rotate in first few weeks of my work,  Hope it will help other beginners as well. This Blog will cover the following sections.

  • Introduction to Log-rotate

  • Issues Faced

  • Solutions (Fix for the above issues)

  • Best practices

    • How to configure the Log-rotate

    • Operation of Log-rotate

    • Files responsible for the Log_rotate utility.

1.0. Introduction to Log-rotate:

  • Log-rotate is a utility and …

[Read more]
Debug a slow Wordpress site

A few days ago my colleague asked me to help him figure out why his Wordpress website was running so slow. Everything seemed fine, the CPU was not busy, the memory was not used much. It was not the network issue because its ping time was very fast. The MySQL database was not slow either. So it was hard for me to debug.

The site returned 504 error initially, but it sometimes could load the page (after a long wait). I checked the Nginx error log and found that the upstream connection was not responded. So it must be something wrong with the PHP code.

I tried many ways which I found on the internet but no success. Most of them were about increasing the timeout or the execution time. By doing that, the page could load but it was still super slow (it loaded in > 1min).

When I sat quietly for a while to think, I realized that plugins could be the issue. There could not be any reason a Wordpress could be that slow unless …

[Read more]
[Solved] How to install MySQL Server on CentOS 7?


Recently, when I am working on setting up MySQL Enterprise Server, I found, there is too much information available over internet and it was very difficult for a newbie to get what is needed for direct implementation. So, I decided to write a quick reference guide for setting up the server, covering end to end, starting from planning to production to maintenance. This is a first post in that direction, in this post, we will discuss about installing MySQL Enterprise Server on CentOS 7 machine. Note that, the steps are same for both the Enterprise and Community editions, only binary files are different, and downloaded from different repositories.


If you are looking for installing MySQL on Windows operating system, please visit this page https://www.rathishkumar.in/2016/01/how-to-install-mysql-server-on-windows.html. …

[Read more]
Modifying List of Collected Metrics on PMM Linux Exporter

Do you need to modify the metrics collected from Linux by Percona Monitoring and Management (PMM)? In this blog post we will see how to enable, disable, and update collected metrics on PMM’s linux:metrics exporter. 

We will assume that the PMM client packages are installed, and they are configured already.

Using a custom list of metrics

Let’s now suppose we are not yet collecting any metrics on our desired client server, and we want to enable only the following: diskstats, meminfo, netdev and vmstat. We can use the following …

[Read more]
Showing entries 1 to 10 of 1285
10 Older Entries »