Various System Stuff

 Typically I'll set up an instance, and get everything working as I like, and then promptly forget everything about it until the next time I need to create an instance from scratch.

This is great for memory space, but terrible in that I waste a lot of time trying to figure out where everything is! So to combat this in the future, this blog post is mostly for future me. This relates almost exclusively to the Amazon Linux 2 AMI. If you run other flavors of linux, your mileage may vary!

First, I can rarely remember the names of running services. To list running services:

systemctl --type=service --state=running

The result is a list where I can see, for example, the crontab is called crond. I know this can be looked up elsewhere, but usually I've made a change like to the global environment variables, and need to restart the crontab. Restarting is systemctl restart <servicename>. I get this order wrong because it used to be service <servicename> restart.

Related to this, when I've created an environment variable in my user, and want to add that to the global list:

env | grep ORACLE_HOME >> /etc/environment

env | grep LD_LIBRARY_PATH >> /etc/environment

These were two variables I needed to be default for the crontab, but they were set in my user. 

There is more, but I'll edit this blog post to add them as I find them. We're finally close to getting the new instances running correctly. It's been tiresome moving a bunch of legacy code from Rackspace to AWS, but it's close to being completed.





Comments

Popular posts from this blog

Leetcode 75: 1768. Merge Strings Alternately

Defending Against Ettercap Attacks: A Brief Overview

Leetcode Two Sum Problem in three different languages