Author: admin

MAC OS X

Trouble installing an older version of MAC OS X

Introduction: You downloaded Yosemite or El Capitan Mac OS X and decided to install it a month or so later. As you start to install it and you get the error message: “This copy of the Install OS X Yosemite(El Capitan) application can’t be verified. It may have been corrupted or tampered with during downloading.” …

Bash, Linux, Monitoring

Verifying the validity of an NFS mount

Introduction: Every now and then if an NFS mount is no more connected to the server or something goes wrong with the NFS connection, running the command ‘ls mountpoint’ hangs the terminal till I press CTRL-C. So I tried to figure out a script that will be run as cron job and will tell me …

Linux

Checking the Health of LSI Logic / Symbios Logic MegaRAID SAS 2108 RAID Controller

Introduction: This HowTo show how to check the health of Hard Disks connected to a ‘LSI Logic/Symbios Logic MegaRAID SAS 2108’ RAID controller. We look for its presence in the system: lspci | grep RAID Example Result: 01:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] (rev 05) Bingo!, we can …

Linux

Debian Jessie official repositories list

Here are the official repositories for Linux Debian Jessie (8.0). This should be entered in the file: /etc/apt/sources.list # Debian Jessie deb http://security.debian.org/ jessie/updates main deb-src http://security.debian.org/ jessie/updates main deb http://ftp.at.debian.org/debian/ jessie main contrib non-free deb-src http://ftp.at.debian.org/debian/ jessie main contrib non-free To make sure the GPG key is also saved locally to avoid Key error …

Linux, XEN

Creating a new Xen Debian virtual machine from scratch

Introduction: In this tutorial a new virtual machine based on Debian Jessie distribution will be created from scratch with minimal components. Assumption: The Xen Hypervisor should already be installed and running in the main system (DOM0). Creating the Xen Virtual Machine This virtual machine will be created with the xen tools which bootstraps the creation …

Linux, XEN

Installing Xen 4.4 on Ubuntu Server 14.04 LTS (Trusty)

Introduction: This HowTo assumes that the Internet access from VMs via DOM0 and the private LAN are done using the Bridge method. In the previous versions of Xen installation the bridges were dynamically built via the Xen scripts, in this version the bridges are built permanently as the DOM0 boots up. DOM0:xenbr0(eth0) —bridging==>> DOMUs:eth0 DOM0:pdummy0(dummy0) …

Bash, Linux, Security

Recursively delete files securely: shredding

Description: Every administrator should know that when we delete a file on the hard disk, almost nothing is really deleted. The space used by the files is simply put back on the list of ‘free to use‘ space in the filesystem and will no more appear in the directory listing. This means forensic tools can …

Linux, MySQL

Create a new database and use in MySQL/MariaDB

These commands will create a new database in MySQL/MariaDB including a new user/password with full access to the DB. mysql -p -u root Enter the MySQL root password. mysql> CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_bin; mysql> GRANT ALL PRIVILEGES ON dbname.* TO ‘user’@’localhost’ IDENTIFIED BY ‘password’; mysql> FLUSH PRIVILEGES; mysql> QUIT

GlusterFS, Linux, Monitoring, Security

Reporting SMART status of RAID disks

Reference site: http://www.cyberciti.biz/faq/linux-checking-sas-sata-disks-behind-adaptec-raid-controllers/ Note: Although Hardware RAID controllers made by other hardware manufacturers here I use Adaptec as an example: Install the software: apt- get install smartmontools Curious which company the RAID controller is from? Find out which RAID controller you have: lspci | grep ‘RAID’ Result: 01:00.0 RAID bus controller: Adaptec Device 028b (rev …

Bash, Linux

Using SS tool for network troubleshooting

Introduction: The following article is been copied completely 1 to 1 (full plagiat!!)from the following site inn order to be able to refer to it here in case the article disappears from Internet access or moves location. http://www.linux-magazine.com/Issues/2015/181/Querying-Sockets-with-ss Linux Magazine. Article from Issue 181/2015 Author(s): Chris Binnie The unassuming ss utility is easy to understand …

Bash, Linux, Monitoring, Security

Preventing a bash script from running concurrently

Introduction: In order to prevent a bash script instance from running more than once concurrently, here is a small tip on how to write the script. Script template: #!/bin/bash # Prevents that an instance of the script starts while another instance of it is still running scriptname=$(basename $0) lockfile=”/tmp/${scriptname}.lock” if [ -e $lockfile ]; then …

Apache, Linux, NGinX, NGinX, Wordpress

Issue free and CA signed SSL certificates for web servers from LetsEncrypt

Introduction: SSL Certificates provide two functions: 1. Authentication 2. Encryption Encryption can be achieved without authentication but, for some reason, someone decided to join them together in one certificate. It seem to make sense for banks and serious e-commerce sites which need to be properly authenticated. Therefore when the HTTPS protocol got developed it was …

Apache, Email, Linux, NGinX, Security, Wordpress

Creating a web certificate CSR file.

The process of buying an SSL certificate for a web site is usually as follows: – You create a secret key and CSR files using the method showm in this post. – You cut and paste the content of the CSR file into a field in a SSL Vendor web site – The SSL vendor …

Linux, Security

Scanning for viruses on a Debian/Ubuntu server

Situation: Although most viruses would be mostly harmless in a Linux environment if the viruses are just files laying around, BUT since a server is meant to SERVE it is one of the best place to spread the viruses to other systems where it could do damages. Solution: Scan the system or certain vulnerable directories …

Apache, Linux, NGinX, NGinX

Configuring HAproxy load balancer in Ubuntu 14.04

Goal: In this example HTTP requests are proxied directly as HTTP requests to the HTTP web servers. In the case of HTTPS requests, they are handled with the certificates by HAproxy and then proxied to the web servers as HTTP requests. SSLCertificates: The certificates for all virtualhosts being proxied are stored as one PEM format …

Linux, Security

Example of using UFW firewall in Debian/Ubuntu

Introduction: I just started to use the firewall UFW which is a terminal commands based firewall. The tool seemed a bit difficult to understand at first but with a bit of trying and errors I finally got something working. So here is what I did. I install the UFW firewall: apt-get install ufw Assumption: I …

Apache, Linux, NGinX, Security

Installing pure-ftpd in Debian/Ubuntu

Difficulty with FTP servers and firewall: If you configure a firewall for a host which runs an FTP server you normally need to leave the ports 1024-65365 range open, since you never know which port the FTP server will use to send data to the FTP client. This situation is quite critical if you have …

GIT, Linux

Installing a newer git version in Debian/Ubuntu

Introduction: In many cases where Git is involved it’s possible ethat your distribution doesn’t offer the version of git that is appropriate to the software you want to run. In this case you can install from sources. Here is one method fro example to install the version 2.4.3. Steps: Remove packaged Git apt-get remove git …

Uncategorized

Installing Debian backports in Debian Wheezy

Login as root and run the following commands: cd /etc/apt echo “deb http://http.debian.net/debian wheezy-backports main” > /etc/apt/sources.list.d/backport.list apt-get update gpg –keyserver pgpkeys.mit.edu –recv-key 7638D0442B90D010 gpg -a –export 7638D0442B90D010 | apt-key add – (should get the ‘OK’ as answer) Installing a single package from backports: apt-get -t wheezy-backports install {package-name}

Uncategorized

Installing Java 8.x in Debian Wheezy or Ubuntu 14.04(Trusty)

Here are the commands to install Java 8.x into Debian Wheezy via the repository and PPA. cd /etc/apt/ echo “deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main” | tee /etc/apt/sources.list.d/webupd8team-java.list echo “deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main” | tee -a /etc/apt/sources.list.d/webupd8team-java.list apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys EEA14886 apt-get update apt-get install oracle-java8-installer