Linux

How to build openssh 7.4 deb packages for Ubuntu 14.04LTS

2018-01-06 Bertas Linux

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

2016-04-18 Bertas Linux

gpg --keyserver pgpkeys.mit.edu --recv-key D27D666CD88E42B4
gpg -a --export D88E42B4 | sudo apt-key add -

Rescan disks

2015-10-27 Bertas Linux

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

2015-02-10 Bertas Linux

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

2015-02-06 Bertas Linux

In order to correctly mount nfs mounts on boot you should set

ASYNCMOUNTNFS=no

in /etc/default/rcS

Ganeti and xen pvm tips

2014-12-31 Bertas Linux

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

2014-05-03 Bertas Linux

This template provides graphs for PHP Opcache:

  • Cached scripts and keys
  • Hits and misses
  • Used and free memory
  • Hash, manual, oom restarts

Screenshots

cached-scripts opcache-hits opcache-memory opcache-restarts

(more…)

0

Exporting mysql users

2014-02-15 Bertas Linux

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"

0

ElasticSearch cacti template

2013-12-10 Bertas Linux

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

JVM_Heap_Mem Search_requests

(more…)

0

eAccelerator cacti template

2013-10-27 Bertas Linux

This template provides graphs for eaccelerator: Used memory and memory limit, Cached and removed scripts.

Screenshots

eAccelerator_cache_memory eAccelerator_cached_scripts

 

(more…)

0

« Previous Posts

Powered by WordPress. Designed by elogi.