Tuesday, February 15, 2022

mxlinux install mongodb issue: unrecognized service how to resolve

If you follow mongodb installation instruction,  https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/will find error when trying to start the service.  

That's because mx linux uses SysV init instead of systemd, but the apt installation didn't include a SysV script.


How to fix:

The init script could be downloaded from https://github.com/mongodb/mongo/blob/master/debian/init.d

Save it as  /etc/init.d/mongod

Restart computer


$ sudo service mongod start


test launching succesful

$ sudo service mongod status


connect to the local mongodb server

$ mongosh





Labels: , ,

Sunday, February 13, 2022

linux to upgrade specific packages

Chances are, you have installed a lot of things in your beloved system.  Some, if not most, packages are installed once but seldom used that you prefer not wasting time upgrade.  Or, you enjoy having full control over everything.


Usually on a GUI desktop, an icon at menu bar will remind you if any packages upgrade.  For example in mx linux, a parcel (package) icon will turn green.  You could click it to upgrade all.


Instead, open a terminal window:


1. update package list

    sudo apt update

2. show available upgrades

    apt list --upgradable



Now you have 3 options:


3a. if want to upgrade all, not care what

    sudo apt upgrade

  

3b. install a package and all its dependencies 

    sudo apt install --upgrade  some-package


3c. install one and only one package

    sudo apt install --only-upgrade   some-package


Labels: , , ,