Category Archives: linux

mod_ruid2 does not support CentOS8


To fix directadmin install/setup:

dnf install libjpeg-turbo-devel libpng-devel freetype-devel
cd /usr/local/directadmin/custombuild/
vi options.conf

mod_ruid2=no

php1_release=7.2
php1_mode=php-fpm

./build iconv
./build php y

php -v
PHP 7.2.33 (cli) (built: Sep 25 2020 20:48:19) ( NTS )

If still ERROR: Unable to globalize '/usr/local/directadmin/data/users/*/php/php-fpm72.conf' (ret=2) from /usr/local/php72/etc/php-fpm.conf at line 68

./build all d
./build rewrite_confs

./build rewrite_confs
Checking to ensure /etc/httpd/conf/ssl.crt/server.ca is set.
Using xx.xx.xx.xx for your server IP
ls: cannot access '/usr/local/directadmin/data/users/*/httpd.conf': No such file or directory
grep: /usr/local/directadmin/conf/directadmin.conf: No such file or directory
Enabling http2 in directadmin.conf.
grep: /usr/local/directadmin/conf/directadmin.conf: No such file or directory
Enabling http2 in directadmin.conf.
Job for php-fpm72.service failed because the control process exited with error code.
See "systemctl status php-fpm72.service" and "journalctl -xe" for details.
Restarting apache.
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xe" for details.

cd /usr/local/directadmin
./directadmin i
./directadmin p

./build rewrite_confs
Checking to ensure /etc/httpd/conf/ssl.crt/server.ca is set.
Using xx.xx.xx.xx for your server IP
Restarting apache.

systemctl status httpd.service | grep active
Active: active (running) since Fri 2020-09-25 21:15:35 CEST; 2min 36s ag

systemctl status php-fpm72.service | grep active
Active: active (running) since Fri 2020-09-25 21:15:32 CEST; 3min 39s ago
Status: "Processes active: 0, idle: 0, Requests: 0, slow: 0, Traffic: 0req/sec"

goaccess ubuntu


echo "deb http://deb.goaccess.io/ $(lsb_release -cs) main" | tee -a /etc/apt/sources.list.d/goaccess.list
wget -O - https://deb.goaccess.io/gnugpg.key | apt-key --keyring /etc/apt/trusted.gpg.d/goaccess.gpg add -
apt update
apt install goaccess

mysql master slave replication


log-bin=mysql-bin
server-id=1
innobackupex --user=root --password=password /path/to/backupdir
innobackupex --user=root --password=password --apply-log /path/to/backupdir/$TIMESTAMP/

GRANT REPLICATION SLAVE ON *.* TO 'repl'@'remote_ip' IDENTIFIED BY 'slave_password';

server-id=2
cat /var/lib/mysql/xtrabackup_binlog_info
mysql-bin.000001 100
CHANGE MASTER TO MASTER_HOST='master_ip', MASTER_USER='repl', MASTER_PASSWORD='slave_password', MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=100;
START SLAVE;

mysql> SHOW SLAVE STATUS \G
...
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
...
Seconds_Behind_Master: 13

Adding another slave, run on slave:
innobackupex --user=root --password=password --slave-info /path/to/backupdir
innobackupex --apply-log --use-memory=2G /path/to/backupdir/$TIMESTAMP/

On master:
GRANT REPLICATION SLAVE ON *.* TO 'repl2'@'new_slave_ip' IDENTIFIED BY 'new_slave_pass';

cat /var/lib/mysql/xtrabackup_binlog_info
mysql-bin.000001 100
CHANGE MASTER TO MASTER_HOST='master_ip', MASTER_USER='repl2', MASTER_PASSWORD='new_slave_password', MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=100;
START SLAVE;

skip-slave-start
server-id=3

Use sshfs or rsync to move data