Saturday, October 14, 2017

Recover Deleted files in RHEL 6

https://arkit.co.in/recover-deleted-files-in-rhel-6/


We may not know when we run rm -rf commands to delete the files, unexpectedly or instead of running an commands in one directory we had done in other directory so important files got deleted then how..?? See the below steps to recover deleted files in RHEL 6, which is most useful when you want to recover deleted files.
We are going to extendelete utility to recover ext3 and ext4 data files from partition. Extendelete is a complex algorithm to recover data from ext3 and ext4 data partition by running simple commands from command line.
1. Disable SELinux for it to work, with SELinux enabled I could not get the right size of the files.
You have to restart your server to effect SELinux disable state. SElinux disable is required restart until you restart your server SELinux will be in enforcing mode.
[root@arkit]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
 SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
#SELINUXTYPE=targeted
2. Install e2fsprogs packages to resolve dependencies
[root@arkit]# yum install  e2fsprogs-devel  e2fsprogs e2fsprogs-libs
Dependencies Resolved
================================================================================
Package             Arch      Version            Repository               Size
================================================================================
Installing:
e2fsprogs-devel     x86_64    1.41.12-11.el6     rhel-x86_64-server-6    158 k
Updating:
e2fsprogs           x86_64    1.41.12-11.el6     rhel-x86_64-server-6    550 k
e2fsprogs-libs      x86_64    1.41.12-11.el6     rhel-x86_64-server-6    119 k
Updating for dependencies:
libcom_err          x86_64    1.41.12-11.el6     rhel-x86_64-server-6     36 k
libcom_err-devel    x86_64    1.41.12-11.el6     rhel-x86_64-server-6     31 k
libss               x86_64    1.41.12-11.el6     rhel-x86_64-server-6     40 k
Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       5 Package(s)
Total download size: 934 k
Is this ok [y/N]: y
Downloading Packages:
(1/6): e2fsprogs-1.41.12-11.el6.x86_64.rpm                                               | 550 kB     00:14
(2/6): e2fsprogs-devel-1.41.12-11.el6.x86_64.rpm                                         | 158 kB     00:01
(3/6): e2fsprogs-libs-1.41.12-11.el6.x86_64.rpm                                          | 119 kB     00:01
(4/6): libcom_err-1.41.12-11.el6.x86_64.rpm                                              |  36 kB     00:00
(5/6): libcom_err-devel-1.41.12-11.el6.x86_64.rpm                                        |  31 kB     00:01
(6/6): libss-1.41.12-11.el6.x86_64.rpm                                                   |  40 kB     00:00
----------------------------------------------------------------------------------------------------------------
Total                                                                            16 kB/s | 934 kB     00:59
Updating   : libcom_err-1.41.12-11.el6.x86_64                                                            1/11
Updating   : e2fsprogs-libs-1.41.12-11.el6.x86_64                                                        2/11
Updating   : libcom_err-devel-1.41.12-11.el6.x86_64                                                      3/11
Updating   : libss-1.41.12-11.el6.x86_64                                                                 4/11
Updating   : e2fsprogs-1.41.12-11.el6.x86_64                                                             5/11
Installing : e2fsprogs-devel-1.41.12-11.el6.x86_64                                                       6/11
Cleanup    : libcom_err-devel-1.41.12-7.el6.x86_64                                                       7/11
Cleanup    : e2fsprogs-1.41.12-7.el6.x86_64                                                              8/11
Cleanup    : e2fsprogs-libs-1.41.12-7.el6.x86_64                                                         9/11
Cleanup    : libss-1.41.12-7.el6.x86_64                                                                 10/11
Cleanup    : libcom_err-1.41.12-7.el6.x86_64                                                            11/11
duration: 562(ms)
Installed products updated.
Installed:
e2fsprogs-devel.x86_64 0:1.41.12-11.el6
Updated:
e2fsprogs.x86_64 0:1.41.12-11.el6                    e2fsprogs-libs.x86_64 0:1.41.12-11.el6
Dependency Updated:
libcom_err.x86_64 0:1.41.12-11.el6  libcom_err-devel.x86_64 0:1.41.12-11.el6  libss.x86_64 0:1.41.12-11.el6
Complete!

How to recover deleted files in RHEL 6

3. To Download extundelete click on below link
4. Extract the archives from extundelete-0.2.0.tar
[root@arkit ~]# tar xvf extundelete-0.2.0.tar
[root@arkit ~]# cd extundelete-0.2.0
[root@arkit extundelete-0.2.0]# ls
acinclude.m4  autogen.sh  config.h.in  configure.ac  install-sh  Makefile.am  missing  src
 aclocal.m4    compile     configure    depcomp       LICENSE     Makefile.in  README
5. Configure and make
[root@arkit extundelete-0.2.0]# ./configure
Configuring extundelete 0.2.0
Writing generated files to disk
[root@arkit extundelete-0.2.0]# make && make install
make -s all-recursive
Making all in src
Making install in src
/usr/bin/install -c 'extundelete' '/usr/local/bin/extundelete'
6. The partition /dev/sdc1 is mounted on /backup/data-deleted/
[root@arkit backup]# df -h
[root@arkit backup]# cd data-deleted/
7. Create some files on backup/data-deleted.
[root@arkit data-deleted]# cat /var/log/messages > test1.txt
[root@arkit data-deleted]# du -hs *
160K    test1.txt
8. Delete the files in order to recover them later
[root@arkit data-deleted]# cd
[root@arkit ~]# rm -rf /backup/data-deleted
9. Remount partition
Note: If your files got deleted then immediately avoid the changes to the inodes because if inodes got changed then you run into the problems you may not able to recover the deleted files. mount your file system in read-only mode
[root@arkit ~]# mount -o remount,ro /backup

10. Now we will use extundelete to recover the files from the partition

in order to restore all the files which are deleted we have to use below commands
[root@arkit ~]# extundelete /dev/sdc1  --restore-all
WARNING: Extended attributes are not restored.
Loading filesystem metadata ... 63 groups loaded.
Loading journal descriptors ... 91 descriptors loaded.
Searching for recoverable inodes in directory / ...
4 recoverable inodes found.
Looking through the directory structure for deleted files ...
Failed to restore inode 32513 to file RECOVERED_FILES/data-deleted:Inode does not correspond to a regular file.
Restored inode 562514 to file RECOVERED_FILES/data-deleted/test1.txt
0 recoverable inodes still lost.
11. A directory called RECOVERED_FILES is created and inside you will find the files recovered by extundelete
[root@arkit ~]# du -hs RECOVERED_FILES/data-deleted/
520K    RECOVERED_FILES/data-deleted/
12. Finally you can recover deleted files to his original place
in order to recovery the files to the same place run the below command
[root@secondserver ~]# rsync -av  RECOVERED_FILES/data-deleted /backup/
sending incremental file list
data-deleted/
data-deleted/test1.txt
sent 106931 bytes  received 730 bytes  21400008.00 bytes/sec
total size is 1006704  speedup is 1.00
[root@secondserver ~]# cd /backup/data-deleted/
[root@secondserver data-deleted]# ls
[root@arkit ~]# du -hs /backup/data-deleted/*
160K    RECOVERED_FILES/data-deleted/test1.txt
[root@arkit ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.1 (Santiago)


Thursday, May 18, 2017

Senior Linux Administrator

Roles and Responsibilities:
  • System Administration - including managing the trouble ticket queue, responding to proactive monitoring alerts, executing change controls, routine maintenance, shell scripting, performance monitoring, tuning, and system diagnostics.
  • 24x7 rotational on-call support, including escalation to Emergency Response Team (ERT), driving Root Cause Analysis (RCA), Preventative action follow-though, and participation in weekly operations reviews.
  • Participation in all on-going infrastructure initiatives including: Software Currency, Hardware Technology Refreshes, Security hardening / Patch currency, and Enterprise Monitoring process improvements
  • Implement Operating System security policies and procedures, in line with Client objectives.
  • Adherence to all infrastructure build standards and final certification of all new system builds through a formal team Operational Readiness reviews
  • Regular proactive capacity planning and tending reviews of all systems
  • Efficient system resource utilization, including optimal performance and management of resource Sharing environments
  • Interaction with 3rd party vendors, Client Teams and senior onsite Systems Engineers as necessary to optimally perform job responsibilities
  • Create and Maintain detailed up to date technical documentation (e.g. standards, process, Run Books)
  • Detailed reporting on the status of trouble tickets and Build projects through defined processes.

Requirements:

  • Bachelors' degree in Computer Science or equivalent.
  • 5+ years of 7*24 Production support experience in managing Linux/Unix environments across different hardware platforms.
  • Hands-on experience in build, clustering, configuration, design, deployment and scalability of Linux/Unix server hardware.
  • General Administration of Unix/Linux - Installation, Users Creation, Group Creation, Permissions, Creations of Folders, Mail (Send Mail, Postfix, Spam Filter Assassin), Web (Apache, Tomcat), FTP, DHCP, DNS, Proxy (Squid), Samba, Firewall (NAT, IP Tables, Packet Filter, IP Filter) LDAP, NFS, NIS, Clear case, Rebuilding the Kernel, Integrating Windows to Linux Domain, Domain in both Windows (ADS) and Linux using LDAP
  • Must be part of the 7*24 on-call schedule for UNIX administration; must be enthusiastic about learning and supporting other flavors of UNIX administration (eg. Solaris, AIX). Understanding of the implementation and configuration of clustering software for the primary OS is strongly desirable.
  • Hands-on experience with installation and troubleshooting various Linux/Unix flavors like RedHat, Fedora Core, CentOS. Must be able to write scripts using Shell (Bash/Ksh/csh) and Perl.
  • Excellent verbal and written communication skills, organization skills, and analytical skills, Leadership skills
  • Excellent customer service & teamwork skills, quality and changed oriented with initiative and eager ability to learn.
  • Ability to operate effectively at all levels, including internal account management and local customer environment to maximize opportunities and improve customer service.
  • Having B1/H1 visa will be an added advantage.

Thursday, May 4, 2017

Ten things you need to think about when buying your first DSLR camera

http://economictimes.indiatimes.com/news/brandwire/ten-things-you-need-to-think-about-when-buying-your-first-dslr-camera/articleshow/44898218.cms


Perhaps, a DSLR camera if you are a photography enthusiast? But buying your first DSLR can be a confusing proposition.

So many things to keep in mind - cost, brand, tech specifications, what accessories to buy... 
Need some help? Ok, so here's what all you need to keep in mind if you are also thinking of getting a DSLR. 

1. The purpose 

It's your first one, so, you have to keep in mind the purpose you want to use it for. Whether you want it for. Whether you want it for amateur photography, professional clicks, personal use, etc. , all these factors are important.

2. The budget 

Of course, you have to plan it according to your budget! Go for a DSLR which has all the features you desire. It's always a good idea to compare the prices, but you can't be compromising on the features. 

You can get the zoom lenses while purchasing the DSLR itself. Try Canon EOS 1200D double zoom kit, which will make you save about 13 grands. 
3. Image quality 

Everybody who buys a DSLR eventually wants great image quality. So, it's a really important factor to keep in mind when buying your first DSLR. You can try Canon EOS 1200D's APS-c size 18 megapixel sensor which will get you crisp and vibrant images. 

4. The processor 

Your shooting performance needs to be responsive. A strong performing processor communicates with sensor providing you high quality results. So, for your first DSLR, you can try the canon EOS 1200D with Digic 4 processor. It provides quick Camera start-up and delivers smooth reproduction. 

5. The grip and size 

It may seem like a trivial thing, but the grip and size of the camera is kind of an important factor. Always try holding and carrying the DSLR before you finally purchase it. Because some of them can be really bulky, or the grip can uncomfy, which would make it difficult to use and carry around. The Canon EOS 1200D provides a contoured body with rubberized grip - fits in your hand perfectly and prevents from slipping. 

6. Versatility with View finder and Live View shooting 

Shooting through a viewfinder gives a beginner a feel of a pro. Optical view finder allows you to see exactly what you shoot with accurate focusing. DSLRs today are much more convenient with their high-quality LCD screens and benefit of Live View Shooting. 

Easy checking of focus and previewing your final image before shooting, especially in low light are the few benefits of live view shooting. And Luckily, EOS 1200D is equipped with it all. 

7. Videomaking in Full HD 

Why just capture your life in still? You can easily capture videos with your DSLR and make your memories more interesting. Especially with full HD recording capture video in high quality. And you can later view it on your HDTV. 
8. Compatibility with various lenses 

One major advantage of shooting with DSLR Cameras is ready compatibility with various lenses for shooting in all kinds of situation. Canon EOS 1200D has a large family of EF & EF-S lenses with over 70 lenses to choose from. 

9. The lens cleaning kit 

Yes, the lens cleaning kit is a must have while buying a DSLR. Like or not, you'll eventually end up with dust and finger marks on your lens, which will definitely disturb your shooting experience. You should buy a good microfiber cloth with lens cleaning solution with your first DSLR. 
10. The accessories 

Since it's your first DSLR, buying the proper accessories along with it is also important. Just focus on buying only necessary accessories for you First DSLR. On buying EOS 1200D you can get camera case, USB cable and 8GB SD card for free to all purchaser. Additionally, for the festive period, by buying EOS 1200D Double Zoom Kit, you can also get Mobile Charger. 

But wouldn't it be awesome if you manage to get in some accessories on great offers? How about some flight tickets thrown in too? Too good to be true, huh! Check out Canon's latest offer where you get to win Indigo airlines tickets, portable charger, camera carry case, and more on purchase of the Canon 1200D DSLR camera. 

Tips and tricks for you to become the ultimate DSLR pro


UNDERSTANDING THE BASICS 

Aperture 
Aperture controls the amount of light the lens lets in and the depth of field in an image — this determines how bright the image will be and how much of the area behind/in front of the subject will be blurred. Aperture is counted in f-stops on any camera — denoted as f2.8, f3.5, f8, f16 and so on. A lower f number means a wider aperture which in turn means a shallow depth of field. This highlights the subject and is ideal for portraits. A higher f number or narrow aperture keeps everything in in-focus. This works great for landscape photographs. 

ISO Level 
ISO refers to light sensitivity; higher the ISO, higher the sensitivity and vice versa. The values are counted in numbers and it starts as low as 50 going as high as several lakhs. If you are shooting at a low ISO, your camera is less sensitive to available light so you shoot in low ISO when there’s lot of light available. Lower ISOs mean better quality images overall, so there is always a trade-off. A higher ISO level makes the camera more sensitive to available light and therefore is ideal for use in low light environments. At higher ISO levels, cameras tend to add a lot of grain in the image. This will be one of the primary differences between cheap and expensive DSLRs: with more expensive ones, you will be able to push the ISO up to 800, 1600, 3200 and more to still get good, noise free results
White Balance 
White balance is the adjustment of individual colours to make the image look more natural and closer to original. Few bother about white balance since most cameras offer excellent automatic white balance. However, if you feel that the colours on your photos not the same as the actual image, you may need to manually set the white balance depending on the kind of light you are using. White balance settings will adjust the camera’s colour temperature range for cloudy light, indoor fluorescent light, sunny, tungsten light and so on. You can also try manual modes in different scenarios for interesting results. 

Shutter Speed 
The shutter speed is the amount of time that the sensor is exposed to light. Like aperture, it lets you control the amount of light that will reach the sensor but it also has other effects. A fast shutter speed, like 1/100, 1/250 going up to 1/4000 and above lets you freeze moving objects. A slow shutter like half a second, 1 second or even a few seconds keeps the sensor exposed to a lot of light. This is ideal for capturing images in low light environments. It can also show objects in motion by blurring the moving parts. Do keep in mind that you will need to use a tripod to stabilize the camera when you use slow shutter speeds. 

THINGS TO REMEMBER 

Avoid Using The Built-in Flash 
The built-in camera flash is used by a lot of beginners when shooting in low light. It typically tends to give the photos a flat feel, makes the eyes look red in low light and even tends to overexpose things that are too near the flash. Instead, you should invest in an external flash. This lets you control the angle of light so that it acts as a soft fill light rather than a hard front light. You can even add a diffuser, control the intensity of the flash that comes out as well as bounce the flash off other surfaces for interesting effects 

When in Doubt, Use a Tripod 
Many beginners make the mistake of trying to hold the camera in a maximum of scenarios. While bright, day photos can be done handheld, most other situations will give you better results with a tripod. Invest in a good tripod to use with your camera. There are different types of tripods available — some are basic with height adjustment, others let you control the pan and tilt for different angles and offer extras like a spirit level (to check that the horizon is level).

Better Composition 
Most photographers tend to start with the rule of thirds. The rule of thirds requires you to imagine that the frame is divided into 9 equal parts using evenly placed vertical and horizontal lines. The points at which the lines intersect in the frame are the ideal points at which you should place your subject. This adds depth to your photos and makes the subject stand out. Only when you learn to use the rule of thirds is when you can learn how to break it. 

Post Processing 
Apart from learning the basics, post processing is something that every photographer must learn to get the best results. However, keep in mind that if you shoot in jpeg, you can only apply a limited amount of post processing. If you shoot in RAW, post processing will allow you to tinker with almost every aspect of an image including exposure and white balance after the fact. There are several software available for post processing such as Adobe Lightroom, Photoshop, Dxo Optics and Corel Paintshop that you can try. 

Monday, April 24, 2017

How to run your small business with free open source software

http://www.cio.com/article/2380921/open-source-tools/open-source-tools-how-to-run-your-small-business-with-free-open-source-software.html


Open source office productivity suites

Very few companies using Microsoft Office actually require support from Microsoft, so using an open source alternative can make good financial sense. Open-source suites are compatible with Microsoft Office file formats such as .doc and .xls. Though their feature sets aren't quite as comprehensive as Office, that's unlikely to matter — most people only use a fraction of the available features available anyway.
Here are four open source alternatives to Microsoft Office:
  • Apache OpenOffice, a comprehensive suite for Windows, macOS and Linux;
  • Open Document Foundation's LibreOffice, a fork of OpenOffice for Windows, macOS and Linux;
  • NeoOffice, a Java-based fork of OpenOffice for macOS
  • Calligra, which runs on Windows, Linux, FreeBSD and macOS.

Open source finance and accounting applications

The following financial packages provide open source alternatives to commercial packages such as Quicken, Sage or QuickBooks:
  • GnuCash (Windows, macOS and Linux) helps very small businesses apply professional accounting principles and track bank accounts, income and expenses to help ensure balanced books and accurate financial reports.
  • TurboCASH (Windows), aimed at the small to medium-sized business market, provides a general ledger and offers core functionality such as posting transactions into accounts and producing financial reports. The product supports 80 tax regimes, including the United States and the United Kingdom.
  • xTuple offers both a free and commercial supported version of Postbooks (Windows, macOS, Linux, BSD) to medium and larger companies. It includes accounting (general ledger, accounts receivable and payable, bank reconciliation and financial reporting) as well as sales, CRM, inventory and distribution, and other business management functions.

Open source ERP software systems

Enterprise resource planning (ERP) software is complex and can be very costly. But open source alternatives to SAP or Microsoft Dynamics do exist. Here are three:
  • The popular and comprehensive open source ERP package ADempiere (Windows, macOS, Linux and Unix) offers accounting, manufacturing management, material management, finance, human resource, project management and maintenance management features.
  • OFBiz is the Apache Foundation's Java-based, multi-platform enterprise business package. It includes ERP, accounting, CRM, supply chain management, manufacturing resource management and enterprise asset management functionality.
  • Odoo (Windows and Linux) provides a full suite of applications, including sales management, accounting and finance, recruitment, purchase management and manufacturing resource management. A paid version ($25-$30 per user per month) includes support, automated updates and an unlimited bug fix guarantee.

Open source CRM software options

Commercial customer relationship management (CRM) software is available from niche vendors, software as a service providers such as Salesforce.com and large software vendors such as Oracle. Here are three open source alternatives:
  • The SugarCRM Community Edition (Windows, macOS, Linux and UNIX) is the free, unsupported version of a comprehensive CRM product that includes sales force automation, marketing campaigns and customer support.
  • OpenCRX (Windows, macOS and Linux) is designed for organizations that need multifunctional, enterprise-wide coordination of sales generation, sales fulfillment, marketing and service activities for customers, partners, suppliers and intermediaries.
  • The multi-platform Fat Free CRM is a Ruby on Rails-based CRM platform that features group collaboration, campaign and lead management, contact lists and opportunity tracking out of the box.

Open source communications and telephony software

Private branch exchange (PBX) hardware used to be very expensive, but software-based PBX releases bring the price of PBXs down. The open source PBX market is dominated by Asterisk software.
  • AsteriskNOW (Linux) is an easy-to-install IP PBX that comes with the FreePBX administrative GUI. The Asterisk project is sponsored by Digium, which also offers a commercial version of the PBX.
  • Elastix (Linux) is based on Asterisk telephony software, but it also integrates fax, instant messaging and email functionality from other open source projects. Features include voicemail, fax-to-email, support for softphones, virtual conference rooms and call recording.

Open source content management systems

Content management systems power websites — and many of the world's largest sites use an cross-platform, open source CMS such as the following:
  • Big-name sites such as The Economist, Examiner.com and The White House use Drupal. Features include user account registration and maintenance, menu management, RSS feeds, page layout customization and system administration.
  • WordPress started as a blogging system but has evolved into a full-blown CMS with thousands of plugins, widgets and themes. It's the most popular blogging platform on the Web and powers about 20 percent of the top 10 million sites on the internet.
  • Second only to WordPress in implementations, Joomla is used by organizations including Harvard University and Citibank. Thousands of extensions, both free and commercial, are available from the Joomla! Extension Directory.
  • Java-based OpenCMS offers a browser-based work environment (including a WYSIWYG editor) as well as asset, user and workflow management.

Open source ecommerce tools

Ecommerce software packages, such as the three cross-platform products listed here, include everything from product presentation to shopping carts, checkout and payment processing.
  • OpenCart is a turnkey shopping cart for small and medium-sized retailers. It includes order management and multiple payment gateways, provides the capability for customers to leave product reviews and ratings, and offers lifetime free community support. (Commercial support is available through an international partner network.)
  • PrestaShop is a popular and easy-to-use platform that offers product displays, translations, marketing, localization and taxes, and product export to eBay. Support is available as a paid service. Training is offered in France.
  • An older ecommerce platform that branched from osCommerce, Zen Cart is aimed at developers and advanced users. Features include discount coupons, gift vouchers and multiple payment options.

More open source essentials

Open source security tools
If you haven’t been looking to open source to help address your security needs, you’re missing out on a growing number of freely available tools for protecting your networks, hosts, and data.
Open source network management tools
Can open source products deliver enterprise-grade results? To answer this question we tested four open source network monitoring products: OpenNMS, Pandora FMS, NetXMS and Zabbix.