Debian Xen Kernel Bug
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903821;msg=57
How to build openssh 7.4 deb packages for Ubuntu 14.04LTS
Check current installed ssh version:
dpkg -l|grep openssh ii openssh-client 1:6.6p1-2ubuntu2.8 amd64 secure shell (SSH) client, for secure access to remote machines ii openssh-server 1:6.6p1-2ubuntu2.8 amd64 secure shell (SSH) server, for secure access from remote machines ii openssh-sftp-server 1:6.6p1-2ubuntu2.8 amd64 secure shell (SSH) sftp server module, for SFTP access from remote machines |
telnet localhost 22 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8 |
add deb-src http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ zesty main restricted to /etc/apt/source.list
apt-get update apt-get install dpkg-dev apt-get source openssh-server cd openssh-7.4p1/ |
open debian/control, remove libsystemd-dev from Build-Depends
open debian/rules, search for “confflags += –with-systemd” and comment this line
apt-get install devscripts autotools-dev debhelper dh-autoreconf dh-exec dh-systemd libaudit-dev libedit-dev libgtk-3-dev libkrb5-dev libpam-dev libselinux1-dev libssl-dev libwrap0-dev zlib1g-dev debuild -b -uc -us |
return one folder up
cd .. ls |
and there should be openssh-7.4 deb packages.
Install them:
dpkg -i openssh-client_7.4p1-10_amd64.deb openssh-server_7.4p1-10_amd64.deb openssh-sftp-server_7.4p1-10_amd64.deb |
ssh restart:
/etc/init.d/ssh restart |
check:
telnet localhost 22 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. SSH-2.0-OpenSSH_7.4p1 Ubuntu-10 |
Debian apt-get update gpg fix
gpg --keyserver pgpkeys.mit.edu --recv-key D27D666CD88E42B4 gpg -a --export D88E42B4 | sudo apt-key add - |
Rescan disks
for i in `ls /sys/class/scsi_device/`; do echo 1 >/sys/class/scsi_device/$i/device/rescan; done |
Synology owncloud file/pdf download problem
If you are getting “Missing File” error in owncloud, which is installed in synology, you should login to your device via ssh, with root account and:
$> vi /etc/httpd/conf/extra/mod_xsendfile.conf-user |
Add “XSendFilePath /volume1” to the end of file:
LoadModule xsendfile_module modules/mod_xsendfile.so XSendFile on XSendFilePath /var/services/web /var/services/homes SetEnv MOD_X_SENDFILE_ENABLED yes XSendFilePath /volume1 |
And restart web server:
$> httpd -k restart |
Debian Wheeze NFS mount on boot
In order to correctly mount nfs mounts on boot you should set
ASYNCMOUNTNFS=no |
in /etc/default/rcS
Ganeti and xen pvm tips
Mount vm boot partition:
mount -o offset=1048576 /dev/xenvg/lv_name /mnt |
Check grub config:
python /usr/lib/xen-4.1/lib/python/grub/GrubConf.py grub2 /mnt/grub.cfg |
Opcache cacti template
This template provides graphs for PHP Opcache:
- Cached scripts and keys
- Hits and misses
- Used and free memory
- Hash, manual, oom restarts
Screenshots
Exporting mysql users
Command to export mysql users, except root and debian-sys-maint:
mysql -B -N -e \ "SELECT DISTINCT CONCAT('SHOW GRANTS FOR \'', user, '\'@\'', host, '\';') AS query FROM mysql.user"\ |grep -v debian-sys-maint|grep -v root \ |mysql \ |sed -e 's/$/;/g' \ |grep -v "Grants for" |
ElasticSearch cacti template
This template provides graphs for ElasticSearch:
- ElasticSearch Memory Usage
- JVM Heap Mem
- JVM non Heap Mem
- JVM Uptime
- JVM Threads
- Search requests
- Indexing requests
- Number of open files
- CPU used by ElasticSearch
- Indeces Storage Size
- Docs in Indeces
- Execution times
- Segments
- Merges
- Gets Count
- Gets Times
Screenshots