Building a bridge
unsplashunsplash
Gradient background

Setting up my environment in Fedora - Installing apps

Clarice Bouwer

Software Engineering Team Lead and Director of Cloudsure

Saturday, 20 October 2018 · Estimated 3 minute read

I had to re-install so I documented my process. In this post, I focus on the installation of my most used apps.


Get dnf ready

dnf is Dandified YUM, a .rpm-based distribution package manager. To speed up the upgrade download times, try using fastest mirror.

Copy
# Install the fastestmirror plugin to speed up the upgrade
sudo yum install yum-plugin-fastestmirror
sudo yum clean
sudo yum update

sudo dnf upgrade

Apps

Here are some of the apps I use and where to download them from.

IntelliJ

Inotify watches limit

  1. Add the following line to either /etc/sysctl.conf file or a new *.conf file (e.g. idea.conf) under /etc/sysctl.d/ directory:

fs.inotify.max_user_watches = 524288

  1. Then run this command to apply the change:

sudo sysctl -p --system

And don't forget to restart your IDE.

Note: the watches limit is per-account setting. If there are other programs running under the same account which also uses Inotify the limit should be raised high enough to suit needs of all of them.

No nREPL ack received

The REPL is taking too long to connect and the timeout set in IntelliJ might be too low.

Settings -> Languages & Frameworks -> Clojure -> REPL startup timeout

You can bump that up while you investigate why the startup takes so long.

Java SDK

Copy
sudo dnf search openjdk | grep devel
sudo dnf install -y java-1.8.0-openjdk-devel.x86_64
java -version
which java

Node.js

Copy
sudo dnf search nodejs | grep "nodejs\."
sudo dnf install -y nodejs.x86_64
node --version
which node

To get the latest version of nodejs (v.10.x):

Copy
sudo dnf remove nodejs
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -
sudo yum -y install nodejs
node --version
which node

Leiningen

Leiningen is the easiest way to use Clojure. Leiningen and Clojure rquire Java. OpenJDK version 8 is recommended at this time.

Copy
curl -o lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
chmod a+x lein
mv /usr/bin
lein

Gatsby

I use Gatsby for my blog so I need to install it to build, test and deploy my website.

Copy
sudo npm install --global gatsby-cli

Vim

Copy
sudo yum install -y vim

Stopwatch

#!/bin/bash
echo "Stopwatch"
date1=`date +%s`;
while true; do
echo -ne "$(date -u --date @$((`date +%s` - $date1)) +%H:%M:%S)\r";
sleep 0.1
done
# chmod +x stopwatch
# stopwatch
view raw stopwatch.sh hosted with ❤ by GitHub

Countdown timer

#!/bin/bash
echo "Countdown"
date1=$((`date +%s` + $1));
while [ "$date1" -ge `date +%s` ]; do
echo -ne "$(date -u --date @$(($date1 - `date +%s`)) +%H:%M:%S)\r";
sleep 0.1
done
# chmod +x countdown
# countdown 60
view raw countdown.sh hosted with ❤ by GitHub

Datomic

  • Add license-key to config/dev-transactor.properties which is copied and renamed from config/samples/dev-transactor-template.properties

  • Create console.sh

    Copy
    #!/bin/bash
    ./bin/console -p 8080 dev datomic:dev://localhost:4334
    Copy
    chmod a+x console.sh
    sudo ln -s /home/<user>/Workspace/datomic-pro-0.9.5703/console.sh /usr/bin/datomic-console
  • Create transactor.sh

    Copy
    #!/bin/bash
    ./bin/transactor config/dev-transactor.properties
    Copy
    chmod a+x transactor.sh
    sudo ln -s /home/clarice/Workspace/datomic-pro-0.9.5703/transactor.sh /usr/bin/datomic-transactor