If you need to add additional nameservers
to your resolv.conf
because of DNS related issues, you'll want to use a package that manages the file at /etc/resolv.conf
. This is because on system restart, the file will be overwritten by other processes and you will lose any previous changes.
sudo apt update
sudo apt install resolvconf
Check if it is running
sudo systemctl status resolvconf
```...
If your logs ever start becoming too large to manage, a good way to rotate them is by using logrotate
on Ubuntu.
Install logrotate
:
sudo apt install logrotate
Then create a file named after what your project is:
sudo vim /etc/logrotate.d/portfolio
You can rotate logs based off of file size or time intervals.
/path/to/logs/www/portfolio/shared/log/*.log {
size=200M
missingok
rotate 12
compress
delay...
-c Create a new archive containing the specified items.
-r Like -c, but new entries are appended to the archive. Note that this only works on uncompressed archives stored in regular files. The -f option is required.
-t List archive contents to stdout.
-u Like -r, but new entries are added only if they have a modification date newer than the corresponding entry in the archive. Note that this only works on uncompressed archives stored in regular files....
We should install a version manager to keep our ruby versions and gems.
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm install 2.5.1
rvm use 2.5.1 --default
ruby -v
You should create a swap f...
Pi Hole is an ad blocking service that uses your server as a DNS to filter out known ad sites and can even filter out pornographic and malicious sites.
Let's update and upgrade our packages.
sudo apt-get update && sudo apt-get upgrade -y
We will need to install git in order to download the Pi Hole repository.
sudo apt-get install git
Because your internal IP address can ...
sudo fallocate -l 3G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
free -h
sudo cp /etc/fstab /etc/fstab.bak;
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sudo apt-get update
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2B...
We will use rbenv to be our Ruby version control. Let's update our app and then get the dependencies we need for our server.
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
Once we have those dependencies, let's install rbenv.
``...
AWS can be a very confusing system to work with, if you don't know much about it. I have researched many guides and manuals online, and never found one that had everything you needed, and didn't make you spend hours searching Google for commands and answers that none of these guides had. This is why I wanted to write a guide on this subject. I have put everything you will ever need to setup an AWS Rails Server here. In this guide, I will show you how to set up the following items: