Friday, October 23, 2015

Linux : View number of files in a directory


Linux : View number of files in a directory

ls -1 | wc -l

Monday, August 31, 2015

Linux NFS mount - Release mount


Linux NFS mount -  Release mount

run the following command to un-mount folder
umount /var/www/html

edit the fs tab file to remove entry from there
vi /etc/fstab

save file

run the following command to make sure mount is removed
df -ah

Thursday, August 27, 2015

Linux : Reload .bash_profile from the command line (for PATH variable)


Reload .bash_profile from the command line
edit .bash_profile (for PATH variable etc.)


type the following command

source ~/.bash_profile

Monday, August 10, 2015

Linux Run as different user

sudo su -s /bin/bash newuser

Saturday, August 1, 2015

Sitecore secures highest spot among 19 vendors on the Ability to Execute axis of Magic Quadrant.



Gartner’s 2015 Web Content Management report evaluates 19 vendors for their Ability to Execute as well as their Completeness of Vision. This year, Sitecore® leapt vertically to the top position for its Ability to Execute among the vendors evaluated.





Web content management remains a vibrant and growing market, fueled by the aspirations of digital strategists on the demand side and continuous innovation on the supply side. IT application leaders, marketers, digital experience specialists and merchandizers all now view WCM as mission critical.

Five key capabilities your CMS should offer

Five key capabilities your CMS should offer


1.Single view of the customer

      Organizations that have optimized customer engagement have outperformed their competitors by 26% in gross margin and 85% in sales growth.

2. Real-time positioning and targeting

      Seventy-seven percent of marketers say real-time personalization is very important to their marketing strategies. Meanwhile, 60% admit that actually doing so is a struggle for their organizations

3. Multi channel support

   Seventy-five percent of marketers say real-time, cross-channel engagement is crucial to success.

4. Easy-to-use interface

   An effective digital content repository keeps content quality high by enabling a marketing team to easily manage its growth, freshness, and relevance.

5. Design flexibility

   A CMS must place the control back in the hands of those designing the user experience

Monday, July 13, 2015

How To Set Up an NFS Mount (Network File System) on AWS Linux

How To Set Up an NFS Mount (Network File System) on AWS Linux


Setup

An NFS mount is set up between at least two servers. The machine hosting the shared network is called the server, while the ones that connect to it are called ‘clients’.

Setting Up the NFS Server
1. Use yum to install nfs-utils

yum install nfs-utils nfs-utils-lib


2. run following commands to configure NFS server

sudo chkconfig nfs on
sudo service rpcbind start
sudo service nfs start

3. Export directory
sudo vi /etc/exports

add the following line (eg. for sharing /var/www/html)
/var/www/html *(rw,sync)

save

run the following command
sudo exportfs -a

Setting Up the NFS Client
1. Use yum to install nfs-utils

yum install nfs-utils nfs-utils-lib

2.create directory

mkdir -p /var/www/shared

3. mount folder
run the following command
sudo mount :/var/www/html /var/www/shared

4. verify mount worked
df -h

5.Ensure the mount is always active by adding the directory to the fstab file

vi /etc/fstab

add the following entry

:/var/www/html  /var/www/shared nfs rw,suid,dev,exec,auto,nouser,async    0 0

save

Monday, June 8, 2015

How do I create configure a CRON Job using PHP



How do I create configure a CRON Job using PHP

If you want to run the jobs as a root user use sudo bash (or change the user )
Open the cron job tab by using the following command

crontab -e







command editor will show existing cron job configurations as shown above


CRON Job Format

1 2 3 4 5 /path/to/command arg1 arg2
1: Minute (0-59)
2: Hours (0-23)
3: Day (0-31)
4: Month (0-12 [12 == December])
5: Day of the week(0-7 [7 or 0 == sunday])
/path/to/command - Script or command name to schedule


Example:

The following example shows how to create a CRON job that executes a PHP file every 15 minutes and writes out put to a log file

0,15,30,45 * * * * php -f /var/www/services/process_contact_us_submissions.php > /var/www/services/process_contact_us_submissions.log


Explanation:

1. 0,15,30,45 - run at the following minutes of the hour 0,15,30,45
2. * - runs every hour
3. * - runs every day
4. * - runs every month
5. * - runs every day of the week
php command : php -f /var/www/services/process_contact_us_submissions.php > /var/www/services/process_contact_us_submissions.log


do !wq to save the cron tab.