Archive for the ‘Systems’ Category
Monitoring Process and User
##Display Statistics of Users Connect Time
# ac
##Display Statistics of Users Day-wise
# ac -d
##Display Time Totals for each User
# ac -p
##Display Individual User Time
# ac tecmint
##Display Day-Wise Logn Time of User
# ac -d tecmint
FreeBSD run problem after upgrade
FreeBSD upgrade from 7.4->8.1 or 8.1->8.2
Freebds freeze on boot.
Boot on single user mode and ADD to /boot/device.hints
hint.usb.0.disabled=”1″
hint.ohci.0.disabled=”1″
hint.ata.0.disabled=”1″
hint.ata.1.disabled=”1″
FFserver, which has been removed :(
APIchanges: FFserver, which has been removed from FFmpeg 🙁
Log:
multimedia/ffmpeg: update to 4.0
– FFSERVER support was removed upstream
– libressl now uses libtls backend instead of patching openssl one
(more…)
centos virualmin nginx php-fpm
cd /opt
git clone https://github.com/Real-Gecko/virtualmin-nginx-fpm.git
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
Example:
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
[INCLUDES]
before = common.conf[Definition]
failregex = ^ WARN.*org.jivesoftware.admin.LoginLimitManager – Failed admin console login attempt by admin from
$ ignoreregex =
[Init]
datepattern = ^%%Y.%%m.%%d %%H:%%M:%%S
vim jail.conf
[openfire]
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 + PHP
#vi /etc/yum.repos.d/mongodb-org-3.4.repo
[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
#yum install -y mongodb-org
#yum install php-fpm php-gd php-json php-mbstring php-mysqlnd php-xml php-xmlrpc php-opcache \
php-imagick php-posix php-devel php-pecl-mongo php-pecl-mongodb –enablerepo=remi
#find / -name php.ini -type f -exec sh -c “echo extension=mongo.so >> {}” \;