Upgrade Debian 8 Jessie To Debian 9 Stretch

debian linux

Upgrading server on a remote location is not safe unless you have KVM access. I did many Debian 8 to Debian 9 upgrade on remote server with out probem. On one server, network card name chaned from eth0 to new enp4s0 format. I had to access the server using KVM and fix network configuration by editing /etc/network/interfaces

First you need to upgrade all software on your server to latest Debian 8

Now replace content of /etc/apt/sources.list file with following

Add

Update the software again with

It can take some time for the upgrade to finish. Once update complete, you can check with lsb_release -a command, you will see

debian upgrade

Remove unused packages with command

At this stage, server stil use old debian 8 kernal.

To boot to new Debian 9 kernal, reboot the server with

After reboot, you will see new kernal.

Debian 8 jessie repo error

On a Debian 8 server, when running apt update, got following error

To fix it, run

Add following content to the file

Create

Add

apt – Problem unlinking the file auxfiles

When i get apt update on a Debian 9 server, i get following error

The problem is fixed by deleting

Install PowerShell in Debian 9

To install Microsoft PowerShell in Debian 9, run

Install GPG keys

Add repository

Install powershell

To start powershell, run

apt-key keyserver receive failed: No dirmngr

When running apt-key command, i get following error.

To fix this, run

apt install dirmngr

Install MongoDB 4 on Debian 9

You can see detailed instruction on how to install on MongoDB web site.

First add key

For Debian 8, run

For Debian 9, run

Now install mongoDB with

Once installed, you can check version with

Enable MongoDB start on boot

To start/stop mongodb

Install OpenLiteSpeed on Ubuntu/Debian

OpenLiteSpeed ia an Open Source version of LiteSpeed Web Server.

To install OpenLiteSpeed, add repository by running

Now you have openlitespeed packages available on your server. Here is packages available on a Debian 9 server.

OpenLiteSpeed Web Server

To install OpenLiteSpeed, run

OpenLiteSpeed will be installed in folder

You can start/stop OpenLiteSpeed using command

Once installed, you will be able to login to WebAdmin at

You can change default admin passord by going to

Admin > WebAdmin Settings > General > Users

Click on edit icon right side of user “admin”.

OpenLiteSpeed Change Admin Password

You can also change OpenLiteSpeed Admin password by running following command as user root

Ubuntu find Dependencies for a package

To find dependencies for a package, run

Example

In above example, when you install php7.2, it install “libapache2-mod-php7.2”, that will install Apache web server. I had a server with ngtinx, when i install php7.2 package, apache get installed.

You can also use

To find reverse dependency, run