Downgrade the MongoDB to older version in Ubuntu

For some reason, after upgraded the MongoDB from 3.2 to 4.2 the daemon started to complaints. I haven’t reviewed the log yet, so I need to quickly downgrade to the previous version. Here is the command I used to downgrade from version 4.2 back to 3.2:

sudo apt-get install -y --allow-downgrades mongodb-org=3.2.22 mongodb-org-server=3.2.22 mongodb-org-shell=3.2.22 mongodb-org-mongos=3.2.22 mongodb-org-tools=3.2.22

References:

Install mongodb in Ubuntu Desktop 18.04

Installing the official MongoDB packages provided by MongoDB didn’t allow the mongod to start the service and returned the following error:

Failed to start mongod.service: Unit mongod.service not found

That is not good, because that would required me to start the mongodb manually:

mongod –dbpath some-path/to-store-mongodb-db-data

Instead, I installed the unofficial mongodb package provided by Ubuntu, and it just works fine when I start the service:

sudo systemctl start mongodb

Run MongoDB in local environment using Docker

Running MongoDB in local environment using Docker without installing the MongoDB server would be my preference since I use Docker. The reason is obvious, I don’t want to clutter my development environment with a bunch of database server installations.

With Docker installed on development environment I could just simply execute the following command to spin up a new MongoDB server running in a container:

docker run -d -p 27017:27017 –name=local-mongodb mongo:3.6

But, still to connect with the database you would need a client, in my case, I simply installed the mongodb-org-shell and use it to connect to the MongoDB database running in the container. The earlier command I showed to you will run the MongoDB container and expose the 27017 port to the host machine. Connecting to the MongoDB in the container would simply just executing the following command on the CLI:

mongo

I use this approach in several projects, and I am quite happy.

Bagaimana saya memperbaharui nodejs yang sudah terpasang ke versi stabil yang terbaru?

Update Process

Update Process

Di hari minggu pagi buta ini saya merasa kurang puas dengan versi nodejs yang sedang saya gunakan saat ini, yaitu nodejs v0.5.11-pre. Oh ya, sebelum berlanjut saya asumsikan Anda sebagai pembaca sudah melakukan pemasangan nodejs yang langkah-langkahnya dijelaskan pada halaman wiki berikut:

https://github.com/joyent/node/wiki/Installation

Saya ingin memperbaharui dengan nodejs versi stabil terbaru saat saya tulis blog post ini, yaitu v0.6.0 yang dirilis pada 2011.11.04. Penasaran dengan hal ini, maka saya lakukan pencarian dengan dengan kata kunci “how to update nodejs” melalui mesin pencari Google dan tautan menarik yang saya dapatkan adalah:

http://groups.google.com/group/nodejs/browse_thread/thread/15b1588d51f2efd2

Pada diskusi di mailing list tersebut ada pertanyaan dari salah satu anggota yang pertanyaannya serupa dengan apa yang sedang pertanyakan saat ini “Bagaimana saya memperbaharui nodejs yang sudah terpasang ke versi stabil yang terbaru?”
Dari diskusi tersebut saya mendapatkan snippet command yang perlu dijalankan untuk memperbaharui nodejs ke versi stabil yang terbaru:

https://gist.github.com/318ccfeebbc4f1264a99

Jadi, untuk melakukan langkah pembaharuan nodejs ke versi terbaru bisa dilakukan dengan mengikuti langkah-langkah berikut:

  1. Pindahkan working directory ke direktori nodejs. Pada development environment yang saya gunakan nodejs dipasang pada direktori /opt/node.
    cd /opt/node
  2. Unduh sumber kode terbaru nodejs dari official repository (https://github.com/joyent/node).
    sudo git fetch origin
  3. Checkout a branch or paths to the working tree. Pada hal ini saya ingin memperbaharui nodejs ke versi stabil v0.6.0.
    sudo git tag -l # tampilkan daftar nama tag yang ada
    sudo git checkout v0.6.0 # checkout nodejs versi stabil v0.6.0
  4. Configure sudo
    sudo./configure
  5. Do make
    sudo make
  6. Do make install
    sudo make install

Jadi, proses pembaharuannya tidak sulit dan saat ini saya merasa puas dengan versi nodejs yang terpasang pada development environment saya saat ini. Development environment yang saya gunakan pada saya melakukan pembaharuan ini adalah Ubuntu Linux 11.04 dan git 1.7.4.1.

Can’t install the Blaast SDK on Ubuntu 11.04 because of node-stringprep@0.0.5 Failed to exec install script

node-stringprep failed to exec script

node-stringprep failed to exec script

Hello, yesterday I failed to install the newest Blaast SDK (version 20111027). In the first time, I just don’t know what’s wrong with the node-stringprep package, so everytime I try to run the installation is always failed.

So, I visit the official node-stringprep project on https://github.com/astro/node-stringprep and found this section:

Installation
apt-get install libicu-dev # Debian
emerge icu # Gentoo
port install icu +devel # OSX using macports
npm install node-stringprep

My assumption the Blaast SDK installation is failed because there is dependencies package I have not install yet, then I run this command:

apt-get install libicu-dev

After, the libicu-dev sucesfully installed I run the Blaast SDK installation again and the installation is run smoothly.

So, guys if you experienced the same problem like me here, it could be the libicu-dev package is not already installed on your Ubuntu 11.04 box.

[Resolved and Fixed] Failed to install Blaast SDK on Ubuntu 11.04. Cannot find module bootstrap.js

Yesterday I reported an issue to Blaast developer support forum. Before you continue to read, I have to tell you the issue I write on this blog post is already fixed by the Blaast engineer, so on this post you will only read my own documentations of the issue and the work-around I have done to solve the issue.

What is the issue

Basically, I have an installation issue. Yesterday I tried to install the Blaast SDK (release of August 26th 2011) but failed. Why failed? Okay, let me explain what I did yesterday. What I did yesterday is doing fresh installation, which means I deleted the old Blaast SDK directory and replaced it with the newest one. Sadly, the installation process is failed and is the installation log message I got when the installation failed:

node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module '/opt/blaast-sdk/runtime/bootstrap.js'
at Function._resolveFilename (module.js:320:11)
at Function._load (module.js:266:25)
at Array. (module.js:423:10)
at EventEmitter._tickCallback (node.js:126:26)

Work-around for the issue

It looks like the bootstrap.js module was not there. So, the work-around just copy the bootstrap.js module from the source of previous Blaast SDK to the newest one. This module must be located at the BLAAST_SDK_DIR/runtime/. I think if I did not delete the old Blaast SDK directory it will works fine, because the bootstrap.js module will still be there.

My development environment

Okay, that’s it and by the way here is the information of my dev environment:

  • Ubuntu Linux 10.04 LTS
  • JDK 6 Update 25

Further reading

If you want to read the complete discussion of the issue please have a read here:
Failed to install Blaast SDK on Ubuntu Linux. Cannot find module ‘/opt/blaast-sdk/runtime/bootstrap.js’

1st Time Using Audacious

Saya adalah seorang manusia yang suka mendengarkan musik tentunya, mulai dari aliran Hip Hop dan sebagainya. Sudah sejak lama saya menggunakan sistem operasi linux distro Ubuntu dan untuk mendengarkan musik biasanya saya menggunakan pemutar musik Songbird. Tapi kali ini saya mencoba untuk menggunakan Audacious, kesan pertama yang muncul adalah perangkat lunak pemutar musik ini sekilas mirip dengan pemutar musik yang lain yaitu Winamp. Berikut tampilan dari Audacious:

1st time using audacious

1st time using audacious