Install proxmox 6.0 on top of Debian Buster

This is mostly a copy&paste of the article about installing Proxmox 5.X on top of Debian Stretch, but with the links and repositories updated to the new Debian Buster and Proxmox 6.X

The default proxmox installation ISO is notably minimalist, and one way to be able to do simple customization and have a little bit more flexibility to for example choose the partition layout or use an encrypted LVM is to first make a basic Debian installation and then upgrade it to a full blown Proxmox Installation.

This process is simple, fast and is described in detail at the official proxmox wiki here

But here is the tl;dr version with a few extras and useful modifications from the original article:

Start by making a minimal installation of Debian 10,ie. at the software selection screen check only “SSH server” and “standard system utilities”.
After installation boot to your new Debian machine and be sure that you can resolve the host-name of your machine, the command bellow must return an IP address that is not ‘127.0.0.1’.
This step is important because Proxmox expect to have a “real”( non localhost) IP or else the installation of the package ‘proxmox-ve’ will fail during post-install.
Continue reading “Install proxmox 6.0 on top of Debian Buster”

RIP Sound Card Audio in Linux

Sometimes you need a quick and dirty way of ripping the audio of your sound card, in Linux you can easily do it with the following script:


#!/bin/bash
set -x
WAV="$1"
if [ -z "$WAV" ]; then
    echo "Usage: $0 OUTPUT.WAV" >&2
    exit 1
fi
rm -f "$WAV"

# Get sink monitor:
MONITOR=$(pactl list | egrep -A2 '^(\*\*\* )?Source #' | \
    grep 'Name: .*\.monitor$' | awk '{print $NF}' | tail -n1)
echo "set-source-mute ${MONITOR} false" | pacmd >/dev/null

# Record it raw, and convert to a wav
echo "Recording to $WAV ..."
echo "Close this window to stop"
parec -d "$MONITOR" | sox -t raw -b 16 -e signed -c 2 -r 44100 - "$WAV"

 
Store it somewhere in your PATH, and when you need to record the audio just use it as:


./soundRipper.sh output.wav

 
If you don’t want to store wave files you can convert it as shown HERE

Sources:

https://outflux.net/blog/archives/2009/04/19/recording-from-pulseaudio/
https://www.pantz.org/software/alsa/recording_sound_from_your_web_browser_using_linux.html

Convert wav files to mp3

When you want to convert a wave file to MP3, one of the simplest ways you’ll find is by using ffmpeg.

If you use Debian, you can install it with:

apt install ffmpeg

 
If you use Centos you can install it following this steps:

sudo rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
wget http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
yum localinstall nux-dextop-release-0-5.el7.nux.noarch.rpm -y 
yum update
yum install ffmpeg -y

 
After that, you just need to specify the files input and output names

ffmpeg -i input.wav -acodec mp3 -ab 256k output.mp3

 

Sources:

https://lonewolfonline.net/convert-wav-mp3-linux/
https://linuxadmin.io/install-ffmpeg-on-centos-7/

Install proxmox 5.0 on top of Debian Stretch

The default proxmox installation ISO is notably minimalist, and one way to be able to do simple customization and have a little bit more flexibility to for example choose the partition layout or use an encrypted LVM is to first make a basic Debian installation and then upgrade it to a full blown Proxmox Installation.

This process is simple, fast and is described in detail at the official proxmox wiki here

But here is the tl;dr version with a few extras and useful modifications from the original article:

Start by making a minimal installation of Debian 9,ie. at the software selection screen check only “SSH server” and “standard system utilities”.
After installation boot to your new Debian machine and be sure that you can resolve the host-name of your machine, the command bellow must return an IP address that is not ‘127.0.0.1’.
This step is important because Proxmox expect to have a “real”( non localhost) IP or else the installation of the package ‘proxmox-ve’ will fail during post-install.
Continue reading “Install proxmox 5.0 on top of Debian Stretch”

Bad Idea of the day, Compiling PHP-52 for Debian 8

Sometimes you have to test a bad idea, or you just don’t want/can’t to let that 10+ years old ugly and unmaintained project die no matter what, and for that you might have to use a EOL unsupported PHP version

First install the necessary build tools, some of which you may not need:

apt-get install -y autoconf2.13 libbz2-dev libcurl4-openssl-dev libltdl-dev libmcrypt-dev libevent-dev libmhash-dev libmysqlclient-dev libpcre3-dev libpng12-dev libxml2-dev make patch xmlstarlet make patch libssl-dev libssl1.0.0

Continue reading “Bad Idea of the day, Compiling PHP-52 for Debian 8”

Bad Idea of the day, Disable Secure Repository check APT

Sometimes you are trying to install stuff from a really ancient repository that sometimes don’t have the necessary security functions in place, looking at you ‘HP Software Delivery Repository for mcp’, while this is generally a bad idea you can force apt to ignore the safety checks, and what could possibly wrong by doing it :), by appending “-o Acquire::Check-Valid-Until=false -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true” at the end of your apt command.
 

apt update -o Acquire::Check-Valid-Until=false -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true

Continue reading “Bad Idea of the day, Disable Secure Repository check APT”

Debian non-free firmware netinst ISOs

The latest images are always found at the link, it’s name should be something like “firmware-?.?.?-amd64-netinst.iso”:

http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current/amd64/iso-cd/

In case you happen to need an older version of the boot image, you can search for the specific version that you need on this link:

http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/archive/

Install php7.2 Debian Stretch

As PHP versions 5.6 and 7.0 reach End Of Life you might want to update to something newer and supported, unfortunately the official Debian Stretch repositories don’t have PHP versions 7.1 or 7.2 yet, but with a third-party repository and a bit of fiddling it’s easy to update, and more importantly keep it updated, your server PHP version.
 

Just run as root:
Continue reading “Install php7.2 Debian Stretch”

AWS S3 Backup Guide 2, aws-cli

If you already have aws-cli installed and want to send a file to Amazon S3 it’s really easy:

aws s3 cp ARCHIVE_TO_SEND s3://BUCKET_NAME/ARCHIVE_TO_SEND

 

Sending files ‘by hand’ is all good, but if you are serious about backups you need to automate the process, here is a quick and dirty backup script.
It lists, tars, bzips and individually uploads all the directories under the path you specify o the script.
 
You just need to set the variables at lines 5, 6, 7 and 8.
Continue reading “AWS S3 Backup Guide 2, aws-cli”