Install Gitlab on Debian/Ubuntu

Install requirements

Setup repo/dependency

Install gitlab

Configure Failover IP in Ubuntu 18.04 OVH VPS

Default /etc/network/interfaces in Ubuntu 18.04 in OVH VPS look like following

First install

Configure Main IP

use “ip a” command to find out interface name and IP of the VPS

In this case,

IP = 51.77.149.182
Interface Name = ens3

Use “route -n” command to find out gateway.

GATEWAY = 51.77.148.1

Edit /etc/network/interfaces

Add following

In the above, replace INTERFACE_NAME, SEVER_MAIN_IP and GATEWAY_IP.

For this server, i added.

Now reboot the server.

Once server is back online, you can configure failover IPS.

Configure Failover IP

Use following script to generate your config, add in end of /etc/network/inferfaces file

php script to generate ip config

Once configured, you need to reboot the servr.

Verify IP is up with fping command.

fping
/etc/inetnet/interfaces

Odoo apt signatures couldn’t be verified

When updating apt on Ubuntu server, i get following error

To fix, run

MySQL not starting on Ubuntu 18.04

MySQL did not start on Ubuntu 18.04 server. This is fresh server, i removed all MySQL packages, removed configuration files.

Reinstalled MySQL.

Still MySQL fail to start with some error related to

Full error here

https://gist.github.com/serverok/f82d8c891a58db3351c331005498f435

Initially i was thinking the problem is with Ubuntu 18.04 mysql package. So i set up another fresh Ubuntu 18.04 server, installed MySQL 5.7 and it worked prefectly fine.

Now i checked the permission for the folders. For this i enabled shell access for MySQL user.

Now i change to this user with command

I chaged to /var/log/mysql folder, it worked fine, i can write to the file /var/log/mysql/error.log. Tested with

It is not a permission problem. I checked the /var/log foler, found this is not an actual folder, a symlink to another folder.

This is caused by AppArmor. I disabled AppArmour with

Start MySQL with

I get some error related to data directory, i checked folder /var/lib/mysql and found it was empty. I created MySQL data folder with command

On restarting MySQL again, MySQL worked fine. But i can’t login as user root. When you initialize MySQL data folder, MYSQL generate and store temporary password in /var/log/mysql/error.log, to find the password, i run

You need to change this temporary password as it is set as expired by default. This can be done with command

Set a new secure password when it ask.

Fixing AppArmor

We need to tell AppArmour to allow MySQL to use /mnt/log/mysql folder for logging. To do this, edit file.

Added following to it.

Now restart AppArmor.

Now MySQL will work properly.

ioncube

Install ionCube on Ubuntu 18.04

Download ioncube loader

Find extension diretcory and copy .so file to php extension diretcory. To find php extension directory run

For PHP 7.2, run

Enable ioncube

for Apache, run

for php-fpm, run

Install Node.js on Ubuntu/Debian

To install Node.js on Ubuntu, first setup repository as per your version requirments.

For NodeJs v11.x

Node.js v10.x

Node.js v9.x

Node.js v8.x

Node.js v6.x

Now install node.js with

Some npm modules may need to compile and install native extenion, if you need it

See Node.Js

AMD Ryzen 3 2200G on Ubuntu 18.04

New PC i have purchased have AMD Ryzen 3 2200G CPU. This come with Vega 8 iGPU.

If you boot Ubuntu 18.04 on this PC, it fail to boot with some graphics errors. To boot, you need to select advanced option, then recovery, once you get in the menu with differnt options, select continue. This will boot PC with out hardware acceleration.

You can also set “nomodeset” in /etc/default/grub

Find

Replace with

Now run

But doing this disable hardware acceleration. Proper way is to install AMD drivers. You can use open source or AMD propritery, i dedided to go with AMD propritery drivers.

Install Latest Kernel

Support for Vega 8 iGPU only available in latest kernel. So you need to install latest kernel from ubuntu mainline.

Go to

http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D

Find the latest kernel, it will be listed on top of the page. At the time of writing this post, it is “v4.19-rc5”

Click on this folder. You need to download 3 files with name generic for amd64 and install it.

Install it with

Install AMDGPU PRO driver

I don’t really know how to find latest driver from AMD site. It only lists Windows deivers. I had to use google to find link to latest AMD driver.

With some googling, i found a driver released on August 17th , 2018

https://www.amd.com/en/support/kb/release-notes/rn-prorad-lin-18-30

On this page, you have download links for differnt linux distributions, for Ubuntu, i run

amdgpu-pro-install is actually a symlink to amdgpu-install, but you should run “amdgpu-pro-install” to install the driver as it will run amdgpu-install with –pro switch.

Now reboot your PC, your iGPU will work.

Before installing new kernel, glxinfo reported following

After install new kernel and AMDGPU Pro driver, i have

With latest mainline kernal (no AMDGPU PRO)

If you don’t install newer kernel, amdgpu-pro-install install will FAIL, i get some segmentation fault.