Tag » Posts Tagged ‘Linux’

Shell script – how to find out the directory in which it resides?

Shell Script

My shell script samplescript.sh resided in the directory /home/projects/sampleproject/scripts and in the shell script I included a configuration file relatively as below:

#!/bin/bash

CONF="../config/common.conf"
. $CONF

Continue reading »

How to change the system timezone in Linux

World Clock

In Linux, the system time zone is determined by the symbolic link /etc/localtime. This symbolic link points to a time zone data file located at either /usr/share/zoneinfo or /usr/lib/zoneinfo depending on Linux distribution. So changing the system timezone is just a simple job of updating this symbolic link.

Run the following command to view the list of regions

ls -l /usr/share/zoneinfo

Continue reading »

How to include a file in a bash shell script

Linux

I had written few shell scripts for a project. All these scripts were using some common configuration parameters so I decided to put them in a common file and include it in the scripts file so that when I move the script files from the development to the production environment, I have to change the values in only one file.

My configuration file “config.conf” contained variables like:

DB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=testuser
DB_PASS=test123

Continue reading »

How to install .deb packages in Ubuntu?

Ubuntu

Debian (.deb) packages are the packages that are used in Ubuntu. You need to have administrative privileges to install a .deb file.

To install .deb files from shell/command prompt you can use the dpkg command. dpkg is a package manager for Debian based systems. It can install, remove, and build packages, but unlike other package management system’s it can not automatically download and install packages and their dependencies.

Continue reading »

Magento System Requirements

Magento

Magento is an open source e-commerce platform built on PHP/MySql. It uses parts of the PHP Zend Framework. Like any other software, Magento also has certain system requirements which must be met in order to install and run it.

Lets go through the list of requirements which must be met for successful setup and functioning of Magento.

Continue reading »

Back to top