Search This Blog

Showing posts with label Installation Guide. Show all posts
Showing posts with label Installation Guide. Show all posts

2018/02/15

Install MonoDevelop using Flatpak

To install FlatPak onto your debian machine add respository & then install flatpak package.

    Add Repositoy for flatpak:
        wget -O - https://sdk.gnome.org/apt/debian/conf/alexl.gpg.key|apt-key add -
        echo "deb [arch=amd64] https://sdk.gnome.org/apt/debian/ jessie main" > /etc/apt/sources.list.d/flatpak.list
 

    Update Package List : 
           we can install flatpak by first updating package list         
                       apt update   
                       apt install flatpak
 

    Testing flatpak with monodevlop:
       You can download monodevelop.flatpakref from monodevlop.org portal naviagate to your download directory

             flatpak install --user --from monodevelop.flatpakref
                         or
             flatpak install --user --from https://mono-project.azureedge.net/repo/monodevelop.flatpakref
 

    To launch mono-develop with flatpack go ahead and run below line
        flatpak run com.xamarin.MonoDevelop

2017/06/02

Quick Notes OrientDb installation on Debian 9

1) Download OrientDb Community Edition for linux from official sites
           orientdb-community-2.2.21.tar.gz
2) Extract it
   tar -zxvf orientdb-community-2.2.21.tar.gz
3) Move to /opt dir
    mv ~/orientdb-community-2.2.21 /opt/orientdb
4) installation
    Inside  /opt/orientdb issue below command
       sudo bin/server.sh
   follow the installation instruction & note password set for administrative    
   user account “root”.
 4) create user & group for running  orientdb as service dameon
       sudo useradd -r orientdb -s /sbin/nologin.
5) give access rights to new user
     sudo chown -R orientdb:orientdb /opt/orientdb
6) configuration
      Inside /opt/orientdb/bin/server.sh 
      a) ORIENTDB memory options change below line
                       ORIENTDB_OPTS_MEMORY="-Xms2G -Xmx2G"
                       with ORIENTDB_OPTS_MEMORY="-Xms128m -Xmx256m"
7)   Inside /opt/orientdb/bin/orientdb.sh
    b) OrientDB installation directory set installation path & user
                       ORIENTDB_DIR="/opt/orientdb"
                   ORIENTDB_USER="orientdb"

8)  Orientdb comes with web based gui like phpmyadmin assign sufficient right to         
    its config file
    sudo chmod 640 /opt/orientdb/config/orientdb-server-config.xml
9)  Package come with service but you have to move it to respective os directory
     sudo cp /opt/orientdb/bin/orientdb.service /etc/systemd/system   
    Inside this newly copied service file new need to set our user & entrypoint for server
         Open /opt/orientdb/bin/orientdb.service and replace default values with  
    orientdb user & group & change entry point with location of server.sh as
    below
          [Service]
      User=orientdb
      Group=orientdb
      ExecStart=/opt/orientdb/bin/server.sh
10) Setup Dameon
            sudo systemctl daemon-reload
        sudo systemctl start orientdb
        sudo systemctl enable orientdb
        sudo systemctl status orientdb
11) Hit http://localhost:2480 to see oriendb studio a web based interface like phpmyadmin.
12) Orientdb  server uses ports 2424 for binary connections & 2480 for HTTP
    connections.you might need to open the 2480 port in firewall.
13) Commandline interface
            sudo /opt/orientdb/bin/console.sh
            connect remote:127.0.0.1 root yourpasword









2017/04/09

REDIS on Debian 9 Installation Notes


To install redis on Debian 9 we need to download source code then we need to compile it by unzipping then running make,make install & finally from util dir run "install_server.sh".

Please refer below link for  detail instructions.

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis

Here are notes of installation.

Installation Details
Default Port:6379
Configuration:/etc/redis/6379.conf
Log:/var/log/redis_6379.log
Data Directory:/var/lib/redis/6379
EXEC PATH:/usr/local/bin/redis-server

redis service start /stop/status/restart:

sudo service redis_6379 start
sudo service redis_6379 stop
sudo service redis_6379 restart
sudo service redis_6379 status

How to start command line interface for redis:
redis-cli

Adding redis to auto start:
sudo update-rc.d redis_6379 defaults

Examples of same articles (https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis) are are elaborated further below in case of cryptic information while others are summarized.

Checking if Redis is Up:

SET users:GeorgeWashington "job: President, born:1732, dislikes: cherry trees"
GET users:GeorgeWashington

Expiry of key:
SET classified:information "Secret Stuff"
EXPIRE classified:information 45

this will key expire in 45 second while below command will give time remaining in second for expiry for given key (here classified)

TTL classified:information

Increment/Decrement of Key (numeric)
SET population 6
INCRBY population 10
INCR population
GET population

on same line 'of "INCR" ,"DECR" will decrement value by 1

DECR population

and "DECRBY" is similar counterpart of "INCRBY"

DECRBY population 5

Running commnds in a transaction(all or nothing):

following command will create transaction of commands and will execute them in a order.

MULTI
SET population 6
INCRBY population 10
INCR population
EXEC

Removed Blocked transaction:
   if redis interrupted while processing transaction then it goes into blocking stage to get out of this mess below command is used

edis-check-aof

-------------------------------------------------------------
                    # SET
-------------------------------------------------------------
SET (Multiple values against single key):
   SET is type of collection which is order agnostic,SADD adds element to set

SADD colors red
SADD colors orange
SADD colors yellow
SADD colors orange

   as orange is already added set will not take duplicate value,below command will give list of all members of set "colors"

SMEMBERS colors

   while below command will give random number from our set "colors"

SRANDMEMBER colors

Intersection of two sets:
   creating one more set with some common elements

SADD colors_new orange
SADD colors_new green
SADD colors_new yellow

   below command will give intersection of our two sets colors & colors_new

SINTER colors colors_new

Checking if a set has a given member:
   Below command will check if green is member of colors_new set

SISMEMBER colors_new green

-------------------------------------------------------------------
                  # SORTED SET
--------------------------------------------------------------------
we are adding key along with a number association that will be used for ordering.

zadd countries 9 Tuvalu
zadd countries 10 India
zadd countries 11 Japan
zadd countries 7 USA
zadd countries 50 China
zadd countries 34 Tibet

   inside collection they get sorted based on number associated (low to high)

Low to high sorting:
     "withscores" differ from penultimate command it gives both value & associated number unlike without it.
zrange countries 0 -1
zrange countries 0 -1 withscores

High to low sorting:
ZREVRANGE countries 0 -1

Range:
   below command will display only display element in array with index 0,1 & 2 when sorted from low to high

zrange countries 0  2 withscores

negative index can also be used with convention that -1 is the last element of the sorted set,-2 the penultimate element.
e.g. wrt collection below

 7 -->"USA"
 9 --> "Tuvalu"
10 --> "India"
11 --> "Japan"
34 --> "Tibet"
50 --> "China"

 china is of index -1,tibet is of -2 ,japan -3 so on

Removing a element from sorted set:
below command will remove "USA" from sorted set

ZREM countries  "USA"

this can be confirmed by seeing members of sorted set

zrange countries 0 -1

--------------------------------------------------------------
                   # LIST
--------------------------------------------------------------
"RPUSH" command add a value to the end of a list

rpush lunch.provider alice
rpush lunch.provider bob
rpush lunch.provider carol
rpush lunch.provider don
rpush lunch.provider emily

but "lpush" adds a value to start of list

lpush lunch.provider zoe

to view all elements in list below command is used

lrange lunch.provider 0 -1

to remove last element of list RPOP used

RPOP lunch.provider

to remove first element of list LPOP used

LPOP lunch.provider

Trim list to specific size:
Based on counting 1st element of index as 0,till index become 2 all element will be kept while all others will be deleted

LTRIM lunch.provider  0  2

this list structure can be used to emulate both stack as well as queue.


--------------------------------------------------------------------
                               # HASH KEY
--------------------------------------------------------------------

Hash is a key value pair based collection it is efficient in storing large amount of data

hmset user:1 username jsmith password 4bAc0s email jsmith@gmail.com

this will store multiple key values namely

username -->jsmith
password --> 4bAc0s
        email  --->jsmith@gmail.com

against single collection name "user:1"

can be viewed as

hgetall user:1

to retreive only value of single key against collection name say email in above scenario we can issue

hget user:1  email

if we want retrive values of multiple keys against collection name below command is used ,it will  retrive value for contact & email field

HMGET user:1   email contact


to add one more key value in this collection name

HSET user:1 contact 02334556

verify now by looking at whole collection as below

hgetall user:1