Posts

Showing posts from 2015

Khajjiar- Switzerland of Himachal in Feb 2013

Image
I had been to Khajjiar this winter and it truly lives up to its name- Mini Switzerland of Himachal Pradesh. It is at a height of 6500 feet above sea level and surrounded by dense forests and green meadows.
The best way to enjoy Khajjiar is by doing nothing and just gazing at the idyllic pastoral scenery featuring a lake, grazing sheep & horses, pine and cedar forests and snowcapped mountains. There is Para Gliding and Horse Riding for the rest less!

A Discovery

Khajjiar was officially baptized as Mini Switzerland  by Mr. Willy t. Blazer, Vice Counselor and Head of Chancery of Switzerland in India on July 7, 1992! The Counselor also took from Khajjiar a stone which will form part of a stone collage around the Swiss Parliament to remind the visitors of Khajjiar as Mini Switzerland of India.

Tip for Stay
Khajjiar is best enjoyed by staying at the Khajji Cottage run by the Himachal Pradesh Tourism Corporation Ltd. Have a look at the accompanying photograph. The setting is…

Tapovan Gaumukh Trek

It was the month of may, we started from Uttarkashi around 10 AM in my car. Went to forest office for collecting permit to visit only Gaumukh. (For tapovan you need different permit) as it was the only plan for us. Bought few water bottles and dry fruits for trek.
By 12 PM moved toward Gangotri which is 120km. In between stayed at one of NTPC site office to have lunch. by 4.30 pm we reached Gangotri. Parked the car their but none of 3 took the food and water.

After trekking for a km reached the check point to show permit but guard was not allowing as it is not allowed to enter forest after 4 pm. We requested him alot and finally settled with him giving 50 Rs. By the time visibility was decreasing and we have to still cover 14 km. so we targeted that with speed of 4 km/hr we may reach the ashram by 8pm. It was 7pm and it became very difficult to trek in darkness. we just had our mobile, those nokia fones display as light source. It was the time when bharal, deer or unknown wild life w…

send email through SMTP in ASP.net

Imports System.Net
Imports System.IO
Imports System.Net.Mail

Following is the Code

PrivateFunction SendEmail(ByVal mailfrom AsString, ByVal mailto AsString, ByVal cc AsString, ByVal bcc AsString, ByVal subject AsString, ByVal message AsString, ByVal attach1 AsString, ByVal attach2 AsString, ByVal userid AsString, ByVal pwd AsString) AsString Try 'create the mail message Dim mail AsNewMailMessage()
'set the addresses             mail.From = NewMailAddress(mailfrom)             mail.To.Add(mailto)             mail.CC.Add(cc) 'mail.Bcc.Add(bcc)
'set the content             mail.IsBodyHtml = True             mail.Subject = subject             mail.Body = message
' add an attachment from the filesystem             mail.Attachments.Add(NewAttachment(attach1))
'to add additional attachments, simply call .Add(...) again '  mail.Attachments.Add(New Attachment(attach2)) ' mail.Attachments.Add(New Attachment("c:\temp\example3.txt"))
'send the message Dim mailClient As…

Linux Basics: Installing FTP, WEB SERVER APACHE, YUM Server, MySQL

//only standalone packages are installed by rpm

// yum to install inter dependent rpm

$ rpm -ivh vsftpd*.rpm


//To enable yum server it has to be atleast ftp/web server

installing FTP

 go to cd drive/server
$cd /media/RED*
$cd server
$rpm -ivh vsftpd*.rpm

To check installed are not query all
$rpm -qa | grep vsftpd

To check all folders query list
$ rpm -ql vsftpd

make service entry for boot time
$chkconfig vsftpd on
start service
$ service vsftpd start

Making yum Server/Client:
Test ftp in browser ftp://localhost/pub
copy all cd rpm to ftp folder. In short create two folder RHEL5 and VT inside pub and copy data from CD. VT is already having repository directory created.
$mkdir /var/ftp/pub/rhel5
$ cd /media
$cp -rvf /media/RHEL*/server /var/ftp/pub/rhel5
$cp -rvf VT /var/ftp/pub/VT

Create repository for yum server
install createrepo command
$rpm -ivh /var/ftp/pub/rhel5/server/createrepo*.rpm

To create repository file. It will create a repodata subfolder
$createrepo -v /var/ftp/pub/rhel5/
$vim…

Linux Basics : Installing Webmin

set proxy settings (if required)

$ export http_proxy=http://191.254.1.42:8080



Installing Webmin
1. RedHat
# cd /opt
# wget http://www.webmin.com/jcameron-key.asc
# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.730-1.noarch.rpm
and then run the command :
# rpm --import jcameron-key.asc
# rpm -Uvh webmin*.rpm

2. Debian

$ wget http://prdownloads.sourceforge.net/webadmin/webmin_1.730_all.deb
then run the command :
$ dpkg --install webmin_1.730_all.deb

Uninstalling Webmin

rpm -qa | grep -i webmin
You should then find the exact package name. Then run

$ rpm -e

if http://localhost:10000 dosent run then

Edit the firewall configuration file.
On Redhat and derived systems, this is /etc/sysconfig/iptables, while on Debian it is /var/lib/iptables.
The line you need to add is :
-A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT

$ /etc/init.d/iptables restart

if webmin run on http://localhost:10000 then edit firewall setting from here
delete firewall setting for reject all incoming connection.

Linux Basics: User and Group Management

Add User

$ useradd student

Switching user:

$su - student

switch to root:

$ su -

set/change password for user 'student':

$ passwd student

remove password:

$ passwd -d student

Let's make student’s account password expire on 09/15/97:

$usermod -e 09/15/97 student

Delete User:
$userdel student

create a 'sales' group and add 'student' as member and removing 'student' from the 'sales' group:

$ groupadd sales
$ gpasswd sales                     -Assign password
$ gpasswd -r sales                   -Remove password
$ usermod -G sales student
$ gpasswd -d student sales

Default user accounts DB: 
$ vi /etc/passwd

stores password in encryptes form:
$ vi /etc/shadow

Default Group Members accounts DB:
$vi /etc/group

Group Password strore in encryptes form:
$vi /etc/gshadow

Set file permission: 

Ownership: (User , Group, Others) rwx rwx rwx
Permissions: 4 = read (r) 2 = write (w) 1 = execute (x) 0 = no permission (-)

$ chmod 755 test.txt

Linux Basics: Directory, Partition and Mounting File system

Directory Description
/
The root directory, the top-level directory in the FHS. All other directories are subdirectories of root, which is always mounted on some partition.
/bin
Essential command line utilities. Should not be mounted separately; otherwise, it could be difficult to get to these utilities when using a rescue disk.
/boot
Includes Linux startup files, including the Linux kernel. The default, 100MB, is usually sufficient for a typical modular kernel and additional kernels that you might install during the RHCE or RHCT exams.
/dev
Hardware and software device drivers for everything from floppy drives to terminals. Do not mount this directory on a separate partition.
/etc
Most basic configuration files.
/home
Home directories for almost every user.
/lib
Program libraries for the kernel and various command line utilities. Do not mount this directory on a separate partition.
/mnt
The mount point for removable media, including floppy drives, CD-ROMs, and Zip disks.
/opt
Applic…

Linux Basics: Installation in Windows VMWare

1. Install VMware workstation

2. Download linux ISO

3. Create a new virtual machine in custom mode with OS to be installed later option.

4. Give ISO path in CD/DVD and power on Virtual machine.

5. Install in step by step: Create 3 basic partitions

/root

/swap

Google+ Followers