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

How to set apache server error status codes for beginners

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

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

Prominent apache status code and its meaning for beginners

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
Continue Reading…

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

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

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

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

How to avoid search engines from crawling your website?

Your answer is to create a robots.txt file in the root of your web directory and to have the code setting given below in the file.

User-agent: *
Disallow: /

You can read more about Robots exclusion protocol, here

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

How to use different Python version with virtual environments?

Use the flag -p with virtualenv command to specify the python version that you would want to use

$ virtualenv -p /usr/bin/python/2.7

For windows environment, use

c:\> virtualenv –python=c:\Python27\python.exe myenv

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

Python: How to setup virtual environment?

Different projects in python may require different modules and its dependencies. Also, there may be a necessity that certain projects be run on newer/older python releases hence introducing version conflicts. Virtual environment is a tool that helps you manage these scenarios.

To install virtualenv, use pip

$ pip install virtualenv

Now, create a virtual environment “myenv”

$ virtualenv myenv

To use the virtual environment, key in

$ source myenv/bin/activate

(if in windows, key in “myenv\Scripts\activate“)

The name of your virtual environment will appear on the left of the prompt

(myenv) …$

To exit out of the virtual environment, key in

$ deactivate

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

MySQL Error: Got a packet bigger than ‘max_allowed_packet’ bytes

When trying to import large SQL dump, you often get the above message. Remedy for this issue is to increase the packet size of MySQL’s daemon by setting a packet size of max_allowed_packet. Sudo to your account and set the following

root $ mysql -u admin -p

mysql> set global net_buffer_length=1000000;

mysql> set global max_allowed_packet=1000000000;

In the command line, issue the command

$ mysql –max_allowed_packet=128M -uUSER -pPASSWORD database < database.sql.dump

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

Wireframesketcher – Tool for prototyping

Wireframing is one of the most valuable phase of any application development process. Understanding requirements from customers is the key step to project success. When this process is done with a right wireframing tools such as WireframeSketcher, PowerMockUp, Gliffy (some of the tools that I experimented this year) it helps designers produce quintessential designs in short span of time and developers understand finer details of the design elements.

As a startup, I was using paper-and-pencil model for wireframe creation to take down requirements, visually portray design concepts and straighten project objectives for creating web applications. Going with the traditional method of prototyping had its own drawbacks and the four major ones are
a) flexibility to change or tweak the prototypes built in short duration
b) re-usability of the prototypes built in the past to save time
c) option to develop prototypes in online and offline mode
d) easy options to save, export prototypes in digital formats
Continue Reading…

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
Kurinchi Calendar
June 2017
M T W T F S S
« Apr    
 1234
567891011
12131415161718
19202122232425
2627282930