Archive for the ‘Systems’ Category

FFserver, which has been removed :(

APIchanges: FFserver, which has been removed from FFmpeg 🙁

multimedia/ffmpeg: update to 4.0

– FFSERVER support was removed upstream
– libressl now uses libtls backend instead of patching openssl one

postgress dump restore

pg_dumpall > db.out
psql -f db.out postgres

centos virualmin nginx php-fpm

cd /opt
git clone
tar -zcf virtualmin-nginx-fpm.tar.gz virtualmin-nginx-fpm

Webmin menu >> Mebmin module >> Install Module >> From local file >> enter /opt/virtualmin-nginx-fpm.tar.gz >> click ‘Install Module’.

ERROR 1577 (HY000): Cannot proceed because system tables used by Event Scheduler were found damaged at server start

#mysql_upgrade -u [username] -p
#mysqlcheck -u [username] -p --all-databases --check-upgrade --auto-repair
#systemctl restart mysqld

mysql> show events;
Empty set (0.00 sec)

Replase date format in file name

Mass replase date format in filename

From filename_012017.txt to filename_12017.txt

ls | sed -e 'h;s/_0/_/;x;G;s/^\(.*\)\n\(.*\)$/\ln -s \1 \2/' | sh

fail2ban openfire

#vim filter.d/openfire.conf

before = common.conf


failregex = ^ WARN.*org.jivesoftware.admin.LoginLimitManager – Failed admin console login attempt by admin from $

ignoreregex =

datepattern = ^%%Y.%%m.%%d %%H:%%M:%%S

vim jail.conf

enabled = true
filter = openfire
action = iptables-allports[]
logpath = /opt/openfire/logs/all.log

Порівняння файлів

Інколи потрібно порівняти списки в фйлах.

cat ip.block | grep -v –file /home/bagas/ip1.block

Install MongoDB

#vi /etc/yum.repos.d/mongodb-org-3.4.repo

name=MongoDB Repository

#yum install -y mongodb-org

#yum install php-devel php-pecl-mongo php-pecl-mongodb –enablerepo=remi

#find / -name php.ini -type f -exec sh -c “echo >> {}” \;

#mongo –port 27017

use admin
db.createUser( { user: “root”, pwd: “passwd”, roles: [ “userAdminAnyDatabase”, “dbAdminAnyDatabase”, “readWriteAnyDatabase” ] } )


Встановлення MySQL 5.5 на RHEL / CentOS 6 или 5

Для CentOS / RHEL 5 32-64 бит

#rpm -Uvh

Для CentOS / RHEL 6 32-64 бит

#rpm -Uvh

#rpm -Uvh

Для CentOS / RHEL 7 32-64 бит

#rpm -Uvh remi-release-7.rpm

#yum update
#yum –enablerepo=remi install mysql mysql-server

Upgrade php5-5.4 to php56

#portmaster -o lang/php56 php5-5.4.35
#portmaster -y -D -o devel/oniguruma5 oniguruma4

#pkg info | grep php | grep 5.4 | awk ‘{print $1}’ |awk -F ‘-5.4’ ‘{print “whereis “$1}’ |sh |awk -F ‘: /usr/ports/’ ‘{print “portmaster -y -D -o “$2” “$1}’ | sed -e “s@/php5-@/php56-@” -e ‘s@$@-5.4.35@’ | sh