Posts tagged with “Ubuntu 18.04”

Install Docker CE on Ubuntu 18.04.2 LTS

Introduction

I've decided to spin up a new VM to see what all the fuss abut Docker is about. I'll be following the guide on the official docker docs website which I will link to at the bottom of the post.

I'm going to set it up using repositories so that it will be easier to update in the future.

Installation

First i updated the package index and installed the ability to use repositories over https

sudo apt-get update `sudo apt-get install \

apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common`
	

Then I added Dockers GP key with curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

I set up the repository for smd 64bit with

sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"

Run a package update again and then use sudo apt-get install docker-ce docker-ce-cli containerd.io to install docker

Then to test that it was working I ran sudo docker run hello-world

It seems everyting was installed correctly so I'm going to move on to some post install

Post Installation

To enable Docker to start on boot I'll simply run sudo systemctl enable docker

I'll also add docker as a user and group so that it can be accesses more easily from a non root-user account

First sudo groupadd docker Then sudo usermod -aG docker $USER

You should be able to run commands without sudo now.

Quick Links

Docker Install Guide Docker Post Installation Getting Started Guide


Plex Update on Ubuntu 18.04.2 LTS

Introduction

So recently I've been having an issue with my Plex Media Server (PMS) where the Hama scanner plugin gets stuck in a constant loop maxing out one core of my cpu to endlessly scan my files. Not sure why this is, most likely cause is a corrupt media file somewhere. So While I'll probably eventually have to find that file at some point I thought I'd take the time to update plex and the Hama plugin at the same time.

Updating Plex

Because I have the Plex distribution package enabled I can simply use sudo apt update && sudo apt upgrade to update all packages including Plex. Then the service needs to be restarted with sudo service plexmediaserver stop

However, this did not fix the issue with the scanner, so I now have to update that separately because it's not a stock service but a plugin i added.

Updating Hama

Luckily there is a handy sequence of code that someone wrote up to install and update Hama and ASS easily and quickly. So I ended up plugging those into my system and they worked like a charm. I did have to sudo rm a file when it was getting stuck, but once that was finished everything else worked like it should.

sudo service plexmediaserver stop cd /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-ins/Hama.bundle sudo git reset --hard && sudo git pull cd /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Scanners/Series/ wget -N https://raw.githubusercontent.com/ZeroQI/Absolute-Series-Scanner/master/Scanners/Series/Absolute%20Series%20Scanner.py && cd sudo chown -R plex:plex /var/lib/plexmediaserver sudo chmod 775 -R /var/lib/plexmediaserver sudo touch /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Data/com.plexapp.agents.hama/StoredValues sudo chmod 777 /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Data/com.plexapp.agents.hama/StoredValues sudo chown plex:plex /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Data/com.plexapp.agents.hama/StoredValues sudo service plexmediaserver restart

Final Notes

It seems that everything is now working as it should. Looks like it wasn't a corrupt media file after all but rather a a corrupt file in the Hama scanner files. I should not that I also made sure to optimize the database and clean the bundles after most steps throughout this process.

Hopefully everything stays working from now on!

Quick Links

Plex Install Guide Hama and ASS Install Guide


Creating a Minecraft Server on Ubuntu 18.04

Introduction

I decided to try and get a small minecraft server running on a Linux server because, why not?

So I spun up a new VM of Ubuntu 18.04 and went to work.

Installation

First update everything apt update && apt install git build-essential

Then get Java installed, but the headless version of Java, cause, well, server apt install openjdk-8-jre-headless

Create a new user to run the minecraft instance instead of the root sudo useradd -r -m -U -d /opt/minecraft -s /bin/bash minecraft

switch to the minecaft user su - minecraft

Although in my case, during the installation of the VM I created a user "minecraft" so I didn't need to manually create one.

Navigate to the /server directory and download a new server jar. I used BuildTool to create a new jar file. using wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar to download the new tools and then I ran java -jar BuildTools.jar --rev 1.13.2 to get a new server build and move that into the /server directory if it isn't already.

From there run java -Xmx4G -Xms2G -d64 -jar server.jar nogui in the /server directory and then it will generate the initial files for the server.

Edit the server.properties file and change the following values rcon.port=25575 rcon.password=strong-password enable-rcon=true

Final Notes

Now from there everything should be good to go. I ended up adding plugins to the generated plug in folder using a new sftp connection from another computer on my network. I'm still in the process of configuring those plugins and such but overall the server is up and running.

Things to still do are port forward the re correct port on my router to access the server outside of the local network.

Quick Links

Reference Install Guide Server Jar Builder