M3U Restream

There’s a wonderful piece of microservice node.js based restream utility, that let you re-stream from a source and also do the ffmped transcoding if you’d like. I just liked the piece!

My installed OS was Ubuntu 18.x and I used node version 12.x.

The problem

You have an IPTV provider that provides an (extended) M3U playlist file. You want to:

  • Add HTTPS encryption to the streams (and probably move the unencrypted reception offsite).
  • Transcode the streams to a lower bitrate, or convert to a uniform video or audio format.

The solution

Run this software, preferably on an offsite host. It only requires a Node installation (No NPM modules are required!). To add HTTPS support, front it with nginx (or similar).

Read more

Share

Install phpIPAM on Ubuntu 20.04/18.04

The objective of this guide is to help you Install and Configure phpIPAM on Ubuntu 20.04/18.04 Linux distribution. phpIPAM is an open-source php-based web IP address management application (IPAM). Its goal is to provide light, modern and useful IP address management. phpIPAM uses MySQL database backend and jQuery libraries, Ajax and HTML5/CSS3 features.

Install phpIPAM on Ubuntu 20.04/18.04

phpIPAM has a number of dependencies that we need to install before we can install and configure phpIPAM. These are:

  • MySQL / MariaDB server
  • php / php-fpm for nginx
  • php modules
  • Apache / nginx web server
  • phpIPAM domain – ipam.example.com (should be replaced with your domain)

Read more

Share

osTicket Automated Install Script

osTicket is one of the leading open source ticketing systems. Here’s an easy way to spin up an instance on Ubuntu.

Note:
This script is purely intended for use in short-lived demo systems. The passwords are obvious (password !?) and there is no hardening applied to any of this system. DO NOT USE THIS SCRIPT IN PRODUCTION.

Create Shell Script
Spin up an Ubuntu instance then create a new shell script and give it executable permissions:

touch osTicket.sh
chmod +x osTicket.sh

Script Content
Paste this into the script:

Read more

Share

Install Redis on Ubuntu 18.04 & 16.04 LTS

Step 1 – Prerequsities

Log in to your system with sudo privilege account using shell access, to which you need to install Redis.

ssh ubuntu@remote

Update the apt-get packages index files and also update existing packages to the newest versions by using the following commands:

sudo apt-get update
sudo apt-get upgrade

Step 2 – Installing Redis

The Redis packages are available under the default apt repository. For the installation of Redis on an Ubuntu VPS. Run below command from the terminal to install Redis on your machine:

sudo apt-get install redis-server

Next is to enable Redis to start on system boot. Also restart Redis service once.

sudo systemctl enable redis-server.service

Read more

Share

Reset lost root password on Ubuntu 18.04 Bionic Beaver Linux

Boot Into GRUB menu

The first step is to reboot into the GRUB menu. If Ubuntu 18.04 Bionic Beaver is the only operating system installed you need to keep pressing SHIFT for the GRUB menu to show up.

Edit Grub Menu

Using arrows select the Ubuntu menu or the menu you use to boot your system and hit the e key. This will allow you to edit the menu:

Read more

Share

Ubuntu 18.04: Disable Netplan switch back to networking /etc/network/interfaces

The following procedure works for Ubuntu 18.04 (Bionic Beaver)

I. Reinstall the ifupdown package:

# apt-get update
# apt-get install ifupdown

II. Configure your /etc/network/interfaces file with configuration stanzas such as:

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

allow-hotplug enp0s3
auto enp0s3
iface enp0s3 inet static
address 192.168.1.133
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
# Only relevant if you make use of RESOLVCONF(8)
# or similar...
dns-nameservers 1.1.1.1 1.0.0.1

III. Make the configuration effective (no reboot needed):

Read more

Share

How to Enable /etc/rc.local with Systemd

If you are running a Linux distro that uses Systemd, then you may find that your command in /etc/rc.local file would not run on system boot. This guide explains how to enable /etc/rc.local script to run on system startup.

Enable /etc/rc.local on Systemd

If you type the following command in terminal:

sudo systemctl status rc-local

You may get this output:

rc-local.service - /etc/rc.local Compatibility
Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2015-11-26 23:54:58 CST; 59s ago
Process: 1001 ExecStart=/etc/rc.local start (code=exited, status=1/FAILURE)
Nov 26 23:54:57 vivid rc.local[1001]: File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 920, in require
Nov 26 23:54:57 vivid rc.local[1001]: needed = self.resolve(parse_requirements(requirements))
Nov 26 23:54:57 vivid rc.local[1001]: File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 807, in resolve
Nov 26 23:54:57 vivid rc.local[1001]: raise DistributionNotFound(req)
Nov 26 23:54:57 vivid rc.local[1001]: pkg_resources.DistributionNotFound: shadowsocks==2.8.2
Nov 26 23:54:58 vivid sudo[1008]: pam_unix(sudo:session): session closed for user root
Nov 26 23:54:58 vivid systemd[1]: rc-local.service: control process exited, code=exited status=1
Nov 26 23:54:58 vivid systemd[1]: Failed to start /etc/rc.local Compatibility.
Nov 26 23:54:58 vivid systemd[1]: Unit rc-local.service entered failed state.
Nov 26 23:54:58 vivid systemd[1]: rc-local.service failed.

And if you try to enable /etc/rc.local to run on system boot with the command:

Read more

Share

How to Change Hostname on Ubuntu 18.04

Display the Current Hostname

To view the current hostname, enter the following command:

hostnamectl

As you can see in the image above, the current hostname is set to ubuntu1804.localdomain.

Change the Hostname

The following steps outline how to change the hostname in Ubuntu 18.04.

1. Change the hostname using hostnamectl

In Ubuntu 18.04 we can change the system hostname and related settings using the command hostnamectl.

For example, to change the system static hostname to linuxize, you would use the following command:

Read more

Share