Install Tools - keepcoding-tech/ctrl_nest GitHub Wiki
First things first — let’s get the basics out of the way. The stuff you need to do… well, anything.
MacOS
We’re assuming you’ve got brew
already singing on your system.
If not, head over to the brew website and get cozy with it.
sudo apt update -y
sudo apt upgrade -y
sudo apt install curl
sudo apt install git
MacOS
brew update
brew upgrade
brew install curl
brew install git
The following commands will install all the necessary tools to download and run Mojolicious
sudo apt install build-essential
sudo apt install cpanminus
MacOS
A word about build-essential
on Mac:
Spoiler: you don’t need it unless you’re planning to bake Debian packages from scratch. On Linux, it pulls in GCC, make, and other pointy things needed for compiling, but on Mac, you only need the xcode-command-line-tools, which are downloaded automatically when you install
Homebrew
.
brew install cpanminus
-
build-essential
→ Your compiler toolbox (GCC, make, etc.). -
cpanminus
→ Minimalistic, no-nonsense CPAN installer. No drama, just modules.
Next, let's install Mojolicious and Carton the easy way — with cpanm
. Trust the camel.
cpanm Mojolicious
cpanm Carton
MacOS
You might need sudo
if your system plays hard to get.
cpanm Mojolicious
cpanm Carton
Then check if everything’s wired up correctly:
mojo version
Because even Perl devs occasionally reach for JavaScript. We're going for the latest LTS via NodeSource — stable and predictable, like strict
and warnings
.
curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
sudo apt install nodejs
MacOS
brew install nodejs
Quick sanity check:
node -v
npm -v
Time to set up the elephant in the room. Run the following commands to install PostgreSQL and it's dependencies.
sudo apt install -y \
postgresql \
postgresql-contrib \
libpq-dev
MacOS
brew install postgresql
After the instalation, fire it up with:
sudo systemctl start postgresql
sudo systemctl enable postgresql
MacOS
brew services start postgresql
And check if the elephant’s walking:
brew services list
Sometimes you need to initialize the DB manually:
initdb /usr/local/var/postgres
Now hop into psql
to set up a user and database for your app:
sudo -u postgres psql
-- Create a user with password
CREATE USER myuser WITH PASSWORD 'mypass';
-- Create a database owned by the new user
CREATE DATABASE mydb OWNER myuser;
-- Grant all privileges
GRANT ALL PRIVILEGES ON DATABASE mydb TO myuser;
Then type \q
to exit. If you're in as postgres
, type exit
to return to your shell.
By default, PostgreSQL on Linux uses peer authentication. That means it only trusts you if your OS user matches your DB user — not always handy. To allow password login for your user:
- Open the
pg_hba.conf
config file:
nano /etc/postgresql/16/main/pg_hba.conf
MacOS
nano /opt/homebrew/var/postgresql@16/pg_hba.conf
- Change this line:
local all all peer
to:
local all all md5
MacOS
If you see trust
instead of peer
, change that to md5
too.
local all all trust
to:
local all all md5
- Restart PostgreSQL so it picks up the new rules:
sudo systemctl restart postgresql
MacOS
brew services restart postgresql
Now you should be able to connect using:
psql -U myuser -d mydb
Give yourself a high five — the stack’s alive. 🐫✨