Kurinchi Blogger Scribbles …


Archive for the ‘LINUX’ Category

Feb 15
2017

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

Last updated: February 15th, 2017

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

Dec 29
2016

Git error: src refspec master does not match any

Last updated: December 29th, 2016

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

Dec 17
2016

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

Last updated: December 16th, 2016

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

Dec 16
2016

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

Last updated: December 16th, 2016

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

Jul 23
2015

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

Last updated: July 23rd, 2015

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 .
(more…)

Jul 20
2015

Apache webserver (httpd) service installation on CentOS 7 Linux

Last updated: July 22nd, 2015

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

(more…)

Jul 12
2015

Setup Virtualbox Additions on Centos 7 to share files

Last updated: July 22nd, 2015

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

Jun 03
2015

How to set apache server error status codes for beginners

Last updated: July 23rd, 2015

Edit Apache configuration file for your site setting. It may be httpd.conf or a virtual host file that ends with .conf specific to your site.

Add the below line with the host file and give the correct path for the error message page.

ErrorDocument 404 /404.html

If you do not want to create a custom page to showcase the error message, you can simply add the error message in the configuration file

ErrorDocument 404 “404 – Page not found.

Error status codes on the client side

400 – Bad Request
401 – Unauthorized
402 – Payment Required
403 – Forbidden
404 – Not Found
405 – Method Not Allowed
406 – Not Acceptable
407 – Proxy Authentication Required
408 – Request Timeout
409 – Conflict
410 – Gone
411 – Length Required
412 – Precondition Failed
413 – Request Entity Too Large
414 – Request-URI Too Long
415 – Unsupported Media Type
416 – Requested Range Not Satisfiable
417 – Expectation Failed

Error status codes shown from server

500 – Internal Server Error
501 – Not Implemented
502 – Bad Gateway
503 – Service Unavailable
504 – Gateway Timeout
505 – HTTP Version Not Supported

May 23
2015

Prominent apache status code and its meaning for beginners

Last updated: July 23rd, 2015

Informational

100 – Continue
101 – Switching Protocols

Successful

200 – OK
201 – Created
202 – Accepted
203 – Non-Authoritative Information
204 – No Content
205 – Reset Content
206 – Partial Content

Redirection

300 – Multiple Choices
301 – Moved Permanently
302 – Found
303 – See Other
304 – Not Modified
305 – Use Proxy
307 – Temporary Redirect
(more…)

Apr 15
2015

PHP SYSTEM WARNING: ‘date(): It is not safe to rely on the system’s timezone settings

Last updated: July 14th, 2015

Edit /etc/php.ini and add the timezone setting within the file. For a list of timezone settings, visit http://php.net/manual/en/timezones.php


[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York


Valid HTML 4.01 Strict  Valid HTML 4.01 Strict