LINUX

How to run multiple node versions in a computer?

Solution is to use Node Version Manager (nvm) which helps manage multiple version of node versions.

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash

To see the list of all available nvm versions,
$ nvm ls-remote

Currently, Node v6.11.1 has the long term support (Latest LTS: Boron). We will setup that first version

$ nvm install 6.11

The above command will install Node.js version 6.11.x (where x will be the last available version number)

To find where the node version is installed, type
$ nvm which 6.11

As of this writing, the latest version available is v8.1.4

$ nvm install 8.1.4

When nvm installs the corresponding npm package also gets installed.

You can switch between different versions of the node by typing

$ nvm use 6.11.1

or

$ nvm use 8.1.4

To list all the available versions of installed node versions, type

$ nvm ls

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

How to move the atom editor installable file to a different location?

When Atom editor is installed, it creates a symbolic link in /usr/local/bin folder. Get the new folder path where atom editor installable file resides and run the following command in the terminal

$ ln -s /NewFolder/Atom.app/Contents/Resources/app/atom.sh /usr/local/bin/atom

If a link is already created for the atom editor, then you need to remove the existing symbolic link before creating a new one

$ unlink AtomSymbolicLink (OR)

$ rm AtomSymbolicLink

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

How to open a file in Atom editor from a Mac terminal?

When atom installs, it sets up a symbolic link to the location where it is installed. You can open a file or folder in atom by using the following commands

a) Open the editor

$ atom

b) Open a file

$ atom index.html

c) Open atom in the current folder

$ atom .

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Git: How to reset Develop branch to be in sync with Master branch?

First checkout Develop branch

$ git checkout dev

Then, reset it to Master branch
$ git reset –hard master

Make sure to push the changes by force to make origin/dev to be the same as origin/master
$ git push –force origin develop

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Git error: src refspec master does not match any

Point 1) Check if you have followed the below sequence of steps when setting up git in your local workstation

$ git init

$ git add .

$ git commit -am “name of the commit”

$ git remote add origin https://github.com/username/repository.git

$ git push -u origin master

Point 2) Check if .git/config file has the following parameters in it

[branch “master”]

remote = origin

merge = refs/heads/master

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Git: error: RPC failed; curl 55 SSL_write() returned SYSCALL,

Git uses “Transfer-encoding” in POST requests and some proxy servers do not support this encoding by default. When large files are pushed, the git client requires higher http.postBuffer setting.

Increase the buffer size to see if the issue is related to it.

$ git config –global http.postBuffer 134217728

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Git: SSL certificate problem: unable to get local issuer certificate

You get this message when the system is behind a firewall and when the security certificates are blocked.

There are two ways to overcome this message and to enable a git pull or git clone.

i) Issue the below command from git bash

$ git config –global http.sslVerify false

OR

ii) Add http block in “gitconfig” file to avoid ssl verification

[http] sslVerify = false
sslCAinfo = /bin/curl-ca-bundle.crt

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Django: Permission denied access to / because search permissions are missing on a component of the path

Possible reasons and solutions

i) SELinux settings enforcing a file serve

$ /etc/selinux/config

Change SELINUX = disabled within the file and check if this is the cause for the error

ii) Application directory under restricted user permission folder path

For example, configuring the django project inside /root folder and trying to serve those files via apache server (apache user).

Try changing the folder to a path that you think is good for allowing public access such /var/www or /opt/sites .
Continue Reading…

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Apache webserver (httpd) service installation on CentOS 7 Linux

First set up the httpd (web) service

$ yum install httpd

If httpd service is already installed, update the service

$ yum update httpd

Now, start the web server

$ service httpd start

Redirecting to /bin/systemctl start httpd.service

Check the status of the web server

$ service httpd status

Continue Reading…

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Setup Virtualbox Additions on Centos 7 to share files

First step is to install dependencies

$ sudo yum groupinstall “Development Tools”

$ sudo yum install kernel-devel

Mount the Virtualbox Additions CD ISO. You should download the virtualbox additions iso from http://download.virtualbox.org/virtualbox/ depending on your version of Virtual Box.

$ sudo mkdir /media/cdrom/

$ sudo mount /dev/cdrom /media/cdrom/

$ cd /media/cdrom

$ sudo ./VBoxLinuxAdditions.run

Before this step, create a shared folder in your host system. Say for example, if you created a shared folder named “CentosShare” in the host system you will follow the steps given below to access the share from within Centos.

$ mkdir ~/share

$ mount -t vboxs CentosShare ~/share

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
Kurinchi Calendar
September 2017
M T W T F S S
« Jul    
 123
45678910
11121314151617
18192021222324
252627282930