GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing opensourceinside.blog.yuvaraj.dev — KodeMonk
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Saturday, September 15, 2018Getting Started With RabbitMQ in 10 Minutes (On Ubuntu)Getting Started With RabbitMQ in 10 Minutes
RabbitMQ is one of the most popular opensource message broker/Queuing engine available in the market..
It has been used as communication(Message Oriented) bridge in many software architectures.. Communication between Microservices is one of the obvious use case where we can use MQ to make things simple .. RabbitMQ makes communication between services easy with it's simple messaging system.. Rabbit MQ supports multiple protocols like AMQP
Installing RabbitMQ (In Ubuntu based systems)First update source-list and add signing key sudo apt update
wget -O - 'https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc' | sudo apt-key add -
Now add repository to source list echo "deb https://dl.bintray.com/rabbitmq/debian $(lsb_release -cs) main erlang" | sudo tee /etc/apt/sources.list.d/bintray.rabbitmq.list
Now update the source list and install the RabbitMQ .... sudo apt update
sudo apt install rabbitmq-server -y
The server is started as a daemon by default when the RabbitMQ is installed. Verify the installation.. with the following command... sudo systemctl status rabbitmq-server.service
shivaraj@shivaraj-Aspire-A315-21:~$ sudo systemctl status rabbitmq-server.service
[sudo] password for shivaraj:
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-09-15 15:25:31 IST; 1h 29min ago
Main PID: 1217 (beam.smp)
Status: "Initialized"
Tasks: 86 (limit: 4486)
CGroup: /system.slice/rabbitmq-server.service
├─1217 /usr/lib/erlang/erts-9.2/bin/beam.smp -W w -A 64 -P 1048576 -t 5000000 -stbt db -zdbbl 1280000 -K true -- -root /usr/lib/erlang -progname erl -- -home /var/lib/rabbitmq -- -p
├─1333 /usr/lib/erlang/erts-9.2/bin/epmd -daemon
├─1572 erl_child_setup 1024
├─1624 inet_gethost 4
└─1625 inet_gethost 4
Sep 15 15:25:26 shivaraj-Aspire-A315-21 rabbitmq-server[1217]: ## ##
Sep 15 15:25:26 shivaraj-Aspire-A315-21 rabbitmq-server[1217]: ## ## RabbitMQ 3.7.7. Copyright (C) 2007-2018 Pivotal Software, Inc.
Sep 15 15:25:26 shivaraj-Aspire-A315-21 rabbitmq-server[1217]: ########## Licensed under the MPL. See http://www.rabbitmq.com/
Sep 15 15:25:26 shivaraj-Aspire-A315-21 rabbitmq-server[1217]: ###### ##
Sep 15 15:25:26 shivaraj-Aspire-A315-21 rabbitmq-server[1217]: ########## Logs: /var/log/rabbitmq/[email protected]
Sep 15 15:25:26 shivaraj-Aspire-A315-21 rabbitmq-server[1217]: /var/log/rabbitmq/rabbit@shivaraj-Aspire-A315-21_upgrade.log
Sep 15 15:25:26 shivaraj-Aspire-A315-21 rabbitmq-server[1217]: Starting broker...
Sep 15 15:25:31 shivaraj-Aspire-A315-21 rabbitmq-server[1217]: systemd unit for activation check: "rabbitmq-server.service"
Sep 15 15:25:31 shivaraj-Aspire-A315-21 systemd[1]: Started RabbitMQ broker.
Sep 15 15:25:32 shivaraj-Aspire-A315-21 rabbitmq-server[1217]: completed with 3 plugins.
shivaraj@shivaraj-Aspire-A315-21:~$
And also I'll show you small how to with NodeJS and RabbitMQ.. for this you need to have Node installed in your system.. If you haven't installed NodeJs you can check the instructions here.. First you need to install amqplib.. it's RabbitMQ client for NodeJs.. npm install amqplib
Then create two files named.. sender.js and receiver.js Now you can run the receiver.js and and publisher.js and you can see the output like one shown below... node sender.js
node receiver.js
If you want to use it with other languages.. please check official guide.. https://www.rabbitmq.com/getstarted.html That's it for now.. If you like.. don't forget to share it guys.. You can follow us on fb.com/opensourceinside and also subscribe our channel on Youtube..
Labels:
linux,
message queue,
messaging,
micro services,
mq,
nodejs,
queue,
rabbit,
rabbitmq,
servers,
services,
ubuntu,
ubuntu 14.04,
ubuntu 16.04,
ubuntu 18.04
Friday, August 31, 2018How TO Install Docker On Ubuntu 18.04/16.04How To Install Docker In Ubuntu Linux 14.04, 16.04 And 18.04I'm going to show you how to install and run Docker in Ubuntu Linux First update source-list sudo apt update
Install required dependencies.. sudo apt install apt-transport-https ca-certificates curl software-properties-common
Then.. Add docker's official GPG key with following command.. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
The above commands output will looks like.. shivaraj@shivaraj-Aspire-A315-21:~$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK
shivaraj@shivaraj-Aspire-A315-21:~$
Now add Docker Community Edition's repository to list.. sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
shivaraj@shivaraj-Aspire-A315-21:~$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://packages.microsoft.com/repos/vscode stable InRelease
Ign:3 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 InRelease
Get:4 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]
Hit:5 http://dl.google.com/linux/chrome/deb stable Release
Hit:6 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Hit:7 https://deb.opera.com/opera-stable stable InRelease
Get:8 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Get:9 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Hit:10 http://archive.canonical.com/ubuntu bionic InRelease
Hit:11 http://linux.teamviewer.com/deb stable InRelease
Hit:12 http://linux.teamviewer.com/deb preview InRelease
Hit:13 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 Release
Hit:15 https://repo.skype.com/deb stable InRelease
Get:16 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:17 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [1,708 B]
Hit:18 https://download.sublimetext.com apt/stable/ InRelease
Fetched 313 kB in 2s (128 kB/s)
Reading package lists... Done
shivaraj@shivaraj-Aspire-A315-21:~$
Now update the package index once again.. sudo apt update
Now Install the docker.. sudo apt install docker-ce
shivaraj@shivaraj-Aspire-A315-21:~$ sudo apt install docker-ce
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
aufs-tools cgroupfs-mount pigz
The following NEW packages will be installed:
aufs-tools cgroupfs-mount docker-ce pigz
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 40.4 MB of archives.
After this operation, 198 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://download.docker.com/linux/ubuntu bionic/stable amd64 docker-ce amd64 18.06.1~ce~3-0~ubuntu [40.2 MB]
Get:2 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 pigz amd64 2.4-1 [57.4 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 aufs-tools amd64 1:4.9+20170918-1ubuntu1 [104 kB]
Get:4 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 cgroupfs-mount all 1.4 [6,320 B]
Fetched 40.4 MB in 12s (3,510 kB/s)
Selecting previously unselected package pigz.
(Reading database ... 273749 files and directories currently installed.)
Preparing to unpack .../archives/pigz_2.4-1_amd64.deb ...
Unpacking pigz (2.4-1) ...
Selecting previously unselected package aufs-tools.
Preparing to unpack .../aufs-tools_1%3a4.9+20170918-1ubuntu1_amd64.deb ...
Unpacking aufs-tools (1:4.9+20170918-1ubuntu1) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../cgroupfs-mount_1.4_all.deb ...
Unpacking cgroupfs-mount (1.4) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../docker-ce_18.06.1~ce~3-0~ubuntu_amd64.deb ...
Unpacking docker-ce (18.06.1~ce~3-0~ubuntu) ...
Setting up aufs-tools (1:4.9+20170918-1ubuntu1) ...
Setting up docker-ce (18.06.1~ce~3-0~ubuntu) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Processing triggers for ureadahead (0.100.0-20) ...
ureadahead will be reprofiled on next reboot
Setting up cgroupfs-mount (1.4) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.3) ...
Processing triggers for man-db (2.8.3-2) ...
Setting up pigz (2.4-1) ...
Processing triggers for ureadahead (0.100.0-20) ...
shivaraj@shivaraj-Aspire-A315-21:~$
The Docker daemon starts automatically. Verify the installation.. with the following command... sudo docker run hello-world
shivaraj@shivaraj-Aspire-A315-21:~$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
9db2ca6ccae0: Pull complete
Digest: sha256:4b8ff392a12ed9ea17784bd3c9a8b1fa3299cac44aca35a85c90c5e3c7afacdc
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
shivaraj@shivaraj-Aspire-A315-21:~$
Here is the video version of above tutorial..That's it for now.. If you like.. don't forget to share it guys.. You can follow us on fb.com/opensourceinside and also subscribe our channel on Youtube.. Saturday, June 30, 2018Installing Multiple Versions Of NodeJs Versions On Your Linux SystemInstalling Multiple Versions Of NodeJs Versions On Your Linux System
Today, I'm going to show you how to install and manage multiple versions of NodeJs on your linux system. We are going to use NVM to install and manage multiple versions of NodeJs on same system. So we need to install NVM first.. To install it just copy paste the below command. wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
The above script will download and install NVM on your Linux box.. Now run the below command to activate it in current terminal session or just close and open your current terminal session. source ~/.bashrc
Now just check the NVM installation with following command.. nvm --version
It should print version like one shown below.. shivaraj@shivaraj-A14RM0E:~/articles-now$ nvm --version
0.33.8
shivaraj@shivaraj-A14RM0E:~/articles-now$
Installing NodeJs with NVM
Now we are going to see how to install the latest version of Nodejs using NVM..
nvm install node
This will produce output like one shown below.. on successful installation.. shivaraj@shivaraj-A14RM0E:~/articles-now$ nvm install node
Downloading and installing node v10.5.0...
Downloading https://nodejs.org/dist/v10.5.0/node-v10.5.0-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v10.5.0 (npm v6.1.0)
You can check the version of node installed with shivaraj@shivaraj-A14RM0E:~/articles-now$ node -v
v10.5.0
shivaraj@shivaraj-A14RM0E:~/articles-now$ npm -v
6.1.0
shivaraj@shivaraj-A14RM0E:~/articles-now$
You can install particular version of NodeJs with shivaraj@shivaraj-A14RM0E:~/articles-now$ nvm install 8
Downloading and installing node v8.11.3...
Downloading https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v8.11.3 (npm v5.6.0)
shivaraj@shivaraj-A14RM0E:~/articles-now$
To check the different versions of NodeJs installed in your local system.. run the following command nvm ls
shivaraj@shivaraj-A14RM0E:~/articles-now$ nvm ls
v8.9.4
-> v8.11.3
v9.4.0
v10.5.0
default -> 8 (-> v8.11.3)
node -> stable (-> v10.5.0) (default)
stable -> 10.5 (-> v10.5.0) (default)
iojs -> N/A (default)
lts/* -> lts/carbon (-> v8.11.3)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.14.3 (-> N/A)
lts/carbon -> v8.11.3
shivaraj@shivaraj-A14RM0E:~/articles-now$
To switch from one version to other you can use following command.. shivaraj@shivaraj-A14RM0E:~/articles-now$ nvm use 10
Now using node v10.5.0 (npm v6.1.0)
shivaraj@shivaraj-A14RM0E:~/articles-now$
If you want to set some node version as default version to use ... you can set it with following command.. shivaraj@shivaraj-A14RM0E:~/articles-now$ nvm alias default 8
default -> 8 (-> v8.11.3)
shivaraj@shivaraj-A14RM0E:~/articles-now$
Here is the video for above tutorial... That's it for now.. Thank You.. If you like don't forget to share it guys.. You can follow us on fb.com/opensourceinside and also subscribe our channel on Youtube.. Sunday, May 6, 2018Finding Application / Process Running On Particular Port In Linux SystemsFinding Application / Process Running On Particular Port In Linux Systems
Today, I'm going to show you how to find application / process running on particular port in Linux Systems. We can use lsof -i :port
Summary of above code...
Note:
If you ignore ip address / port after For example to find the process / application listening on port 80, run the following code.. lsof -i :80
The output will looks like following.. shivaraj@shivaraj-A14RM0E:~$ lsof -i:80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
plugin_ho 3981 shivaraj 20u IPv4 420822 0t0 TCP 192.168.0.117:33104->45.55.41.223:http (CLOSE_WAIT)
shivaraj@shivaraj-A14RM0E:~$
If you omit port value... shivaraj@shivaraj-A14RM0E:~$ lsof -i
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
plugin_ho 3981 shivaraj 20u IPv4 420822 0t0 TCP 192.168.0.117:33104->45.55.41.223:http (CLOSE_WAIT)
node 4165 shivaraj 12u IPv4 509873 0t0 TCP *:http-alt (LISTEN)
firefox 4178 shivaraj 114u IPv4 7216095 0t0 TCP 192.168.0.117:42436->server-54-230-190-100.maa3.r.cloudfront.net:https (ESTABLISHED)
shivaraj@shivaraj-A14RM0E:~$
By specifying lsof -t -i :port
If you want to find out pid of process listening on port 80, run the following code.. lsof -t -i :80
The above commands output will looks like.. shivaraj@shivaraj-A14RM0E:~$ lsof -t -i :80
3981
shivaraj@shivaraj-A14RM0E:~$
How to find and kill the process running on particular port..
That's it for now.. If you like don't forget to share it guys.. You can follow us on fb.com/opensourceinside and also subscribe our channel on Youtube..
Labels:
cool hacks,
cool linux hacks,
find process,
linux,
linux tricks,
port,
process,
tricks,
ubuntu
Saturday, December 30, 2017How To Solve Sublime Text Not Showing In Optional Application List Of Open With Menu On Right ClickHow To Solve Sublime Text Not Showing In Optional Application List Of Open With Menu On Right Click
I just installed sublime text in my new Linux box.. And tried to open text file with it instead of default editor.. So I clicked on 'Open With' option in Right Click menu.... But I couldn't see sublime-text in application list shown on clicking 'Open With'... So I just googled for solution... It's easy to fix... We just need to copy desktop entry to local list of desktop entries list... Just Run The Following Lines.. To Make Things Work... Step 1 :Just Copy the contents of /usr/share/applications/sublime_text.desktop to ~/.local/share/applications/sublime_text.desktop cp /usr/share/applications/sublime_text.desktop ~/.local/share/applications/sublime_text.desktop
Step 2 :Now Just update the index of desktop entries... sudo update-desktop-database sudo update-desktop-database
That's It Now It will appear at menu list of 'Open With'... Just check the video... Friends... Don't Forget To Subscribe...
Labels:
issue,
issues,
linux,
sublime,
sublimetext,
sublimetext3
Wednesday, February 8, 2017Disabling/Changing Drum Beat Sound On Ubuntu StartupDisabling/Changing Drum Beat Sound On Ubuntu Startup
Ubuntu would always play, Drum Beat sound on Ubuntu system startup, But some people may find this is annoying and want to disable or want to change it with their own custom alert sound... Unfortunately, Ubuntu haven't provided a simpler GUI way to disable/customize the startup sound (so far I know..). However, it's not that much hard to disable/change the startup sound. In this post I will show you how to change/disable startup sound in Ubuntu. Mostly, All sounds which generally used by Ubuntu are Disable Startup Sound :To disable startup sound we just have to rename the file named system-ready.ogg which is located in sudo mv /usr/share/sounds/ubuntu/stereo/system-ready.ogg /usr/share/sounds/ubuntu/stereo/system-ready.ogg.old
Changing The Startup Sound With One You Like To Hear..We can change/customize our startup sound just by replacing existing I have already mentioned that Ubuntu use .ogg file format for its alert sounds.. So your new sound file also should be in that format.. Don't worry, If you don't have your sound file in .ogg format.. You can just convert your sound file from current format to .ogg .. There are many tools available to do that for you.. Even you can convert it in online... media.io is one of such kind of web site where you can freely convert your sound file to .ogg format.. Now, if you have your new sound file with .ogg format in your hands.. Then... Just disable existing sound by running following commands.. sudo mv /usr/share/sounds/ubuntu/stereo/system-ready.ogg /usr/share/sounds/ubuntu/stereo/system-ready.ogg.old
sudo cp /PATH_TO_YOUR_NEW_SOUND_FILE/ /usr/share/sounds/ubuntu/stereo/system-ready.ogg
Please, Don't forget to replace /PATH_TO_YOUR_NEW_SOUND_FILE/ with your files path..
For Example..If you have your new file named beep.ogg in your Downloads directory.. Then you have to execute following command.... sudo cp ~/Downloads/beep.ogg /usr/share/sounds/ubuntu/stereo/system-ready.ogg
I have tested it in my Ubuntu Linux 16.04 LTS and Hope will work in other versions too...
That's it.. Now just restart your system and see the change... Follow us on facebook. Friday, December 30, 2016How To Get Rid Of "N: Ignoring file '20auto-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension" Warning Message In Ubuntu 16.04How To Get Rid Of
|
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |