Very simple to do Cacti upgrade
wget http://www.cacti.net/downloads/cacti-0.8.8g.tar.gz
mysqldump -l --add-drop-table cacti > cacti.sql
mv cacti cacti_old
tar xvf cacti-0.8.8g.tar.gz
mv cacti-0.8.8g cacti
Very simple to do Cacti upgrade
wget http://www.cacti.net/downloads/cacti-0.8.8g.tar.gz
mysqldump -l --add-drop-table cacti > cacti.sql
mv cacti cacti_old
tar xvf cacti-0.8.8g.tar.gz
mv cacti-0.8.8g cacti
Перед заменой сбойного диска на сервере желательно сначала его подсветить, чтобі по случайности не вінять “живой” диск
Делается єто так:
/MegaRAID/MegaCli/MegaCli64 -PdLocate -start -PhysDrv [32:1] -a0
где:
32 – Enclosure Device ID: 32
1 – Slot Number: 1
Выключить подсветку:
/MegaRAID/MegaCli/MegaCli64 -PdLocate -stop -PhysDrv [32:1] -a0
Если у вас настроена репликация Mysql то иногда бинарные логи розрастаются до неймоверных обьемов. В таком случае эти логи можно скормить мастеру Mysql заодно освободив место на файловой системе
Делается это так:
master$ mysql -u root -pMypass -e "PURGE BINARY LOGS TO 'mysql-bin.0066';"
Или так:
Sometimes need to shape speed in browser (Firefox) for emulate slow user connections
Using tc :
tc qdisc add dev eth0 root netem delay 2000ms 1000ms
2000ms – original packet timeout
1000ms – deviation
Вот так незамысловато все устроено 🙂
If you want update Mysql from 5.6 to 5.7 do this steps
https://dev.mysql.com/downloads/repo/apt/
Download mysql-apt-config_0.6.0-1_all.deb
Install apt-sources
dpkg -i mysql-apt-config_0.6.0-1_all.deb
After that you have apt-resources for installing
Update resources
apt-get update
По следам заметки chan_dongle + asterisk 10
Текущая версия dongle уже не поддерживается на сайте google
Форк можно взять тут https://github.com/bg111/asterisk-chan-dongle
Особо ничего не поменялось.
Собирать будем под Asterisk 13.7
Asterisk 13.7.0, Copyright (C) 1999 - 2014, Digium, Inc. and others
Run this command if you want get SSL certificate info from bash openssl x509 -in certificate-1.crt -noout -text -certopt no_header,no_version,no_serial,no_signame,no_pubkey,no_sigdump,no_aux
При создании бекапа выскочина ошибка
mysqldump: Couldn't execute 'SHOW TRIGGERS LIKE 'logs'': Can't read dir of './mydatabase/' (errno: 24 - Too many open files) (1018)
Хотя в limits.conf указано значение 30000 и в my.cnf
open-files-limit = 20000
И процесс запущен с правильными параметрами
/usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/lib/mysql/error.log --open-files-limit=20000 --pid-file=/var/run/mysql.run --port=3306
Fetching: mini_portile-0.6.2.gem (100%)
Fetching: nokogiri-1.6.6.3.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby1.9.1
--help
--clean
--use-system-libraries
--enable-static
--disable-static
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--enable-cross-build
--disable-cross-build
Gem files will remain installed in /var/lib/gems/1.9.1/gems/nokogiri-1.6.6.3 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/nokogiri-1.6.6.3/ext/nokogiri/gem_make.out
Fix