How to install WEB server, FTP server, DATA server in Linux

How to install WEB server in Linux

 

For Http Server packages to be install

1)httpd-manual

2)httpd-2

3)http-tools

 

After mounting cdrom install packages then edit below the files;

Make a directory with domain name

(com) mkdir (space) /var/www/html/amitava.com

Make a html file in amitava.com directory

(com) cat >(space) /var/www/html/amitava.com/index.html  [Insert html code ]

<html>

<body bgcolor=”red”>

Test Page

</body>

</html>

Save and exit

Set permission for that directory amitava.com

(com) chmod(space)777 (space) /var/www/html/amitava.com

For all files and folder permission

(com) chmod(space)777 (space) /var/www/html/amitava.com/*.*

Edit  apache configuration file

(com) vi (space) /etc/httpd/conf/httpd.conf  [Go to the end of the file and write]

<Virtual host (domain ip):80>

(tab) DocumentRoot(space) /var/www/html/amitava.com

(tab) ServerName (space) www.amitava.com

</virtual Host>

Active this service

(com) chkconfig (space) httpd (space) on

Now restart the service

(com) service httpd restart

 

 

 

How to install ftp server

Packages  to installed for FTP server

 

1)vsftpd-2

 

After installing vsftpd-2 package check pub folder is empty or not.

(com) cd (space) var/ftp/pub

(com) ls (space) –l

 

Create files for download in pub folder

Cat (space) > (space) myftpfile.txt

Set permission for this file

(com) chmod  (space) 777 (space) myftpfile.txt

Now restart service

 

For Upload server create upload folder

# madir (space) /var/ftp/uploads

Now configure vsftpd file

Vi (space) /etc/vsftpd/vsftpd.conf  [Go to “anonymous-enable=yes” and remove # before it]

[Go to “anon-upload-enable=yes” and remove # before it then immediate after the line write

Anon-umask=077]

[Go to “chown-uploads=yes” remove #] after this line [chown-username=daemon] save and exit

Set permission for uploads directory

# chmod (space) 777 (space) /var/ftp/uploads

Restart service service (space) vsftpd (space) restart

Active this service

# chkconfig (space) vsftpd (space) on

 

 

How to configure Data Server

 

For data server packages to be installed

1)      Samba-3

2)       Samba-client

3)       Samba-common

4)       Samba-swa (For redhat 5)

 

After installation all packages create samba group

(com) groupadd (space)  samba group name

Create samba shareable directory

(com) mkdir (space) / samba shareable directory name

Create a samba user and samba password

(com)adduser (space) user name

(com) smbpasswd (space) –a (space) user name

 

Put samba shareable directory into the samba group

(com)chgrp (space) samba group name (space) / samba shareable directory name

Set permission for this directory

(com) Chmod (space) 777 (space) / samba shareable directory name

Put samba user in samba group and modify its logging shell

(com) Usermod (space) –G (space) samba user group name (space) samba user name

(com) usermod (space) –s (space) /sbin/nologing (space) samba user name

 

Now Edit samba configuration file

(com) vi (space) /etc/samba/smb.conf

[ See global Setting   Workgroup (space) =(space) windows pc workgroup

Host allow (space) = (space) 127. (space) 192.168.1.   ]

Go to end of the file and copy [public] section with details and pest after last line

 

[public]

;               comment = Public Stuff

;               path = /home/samba

;               public = yes

;               writable = yes

;               printable = no

;               write list = +staff

 

Edit like below:

[matrimony]    ———————- Display name

path = /home/Directoey name

public = yes

writable = yes

browseable = yes

printable = no

valid user =  User name

create mask = 0770

write list = Group name

 

Then save and exit .

 

Now restart “smb & nmb” services

And on the “smb & nmb” services

 

(com)chkconfig (space) smb (space) on

(com)chkconfig (space) nmb (space) on

 

 

 

Posted in Server | 34 Comments

How To Configure Server in Linux

How to mount cdrom

creat folder a new folder

(com) mkdir (space)  /media/redhatdvd

Set permission to that folder

(com) chmod  (space) 777 (space) /media/redhatdvd

Now Mount cd rom

(com) mount (space)  /dev/dvd / (space) media/redhatdvd

How to unmount cdrom

(com) unmount (space) /dev/dvd

How to eject  cdrom

(com) eject  (space) /dev/dvd

How to verify which packages will be installed

(com) rpm -qa (package name)*

How to install a packages

(com) rpm -ivh (package name)

How to uninstall a package

(com) rpm -e (package name)

 

DNS server configuration

 

For DNS server packages to be installed

1)      bind-9

2)      bind-chroot

3)      bind-libs

4)      bind-utils

Configure ifcfg-eth0 file for DNS server

(com) vi /etc/sysconfig/network-scripts/ifcfg-eth0  [edit write PEERDNS=no

Configure named file

(com) vi /etc/sysconfig/named     [omit # before ROOTDIR=/var/named/chroot]

Edit another fileresolve.conf

(conf) vi /etc/resolv.conf

[nameserver 192.168.1.55

search amitava.in

domain amitava.in]

Edit another file named.conf

(com) vi /var/named/chroot/etc/named.conf

 

options {

listen-on port 53 { any; };

directory              “/var/named”;

};

zone “amitava.in” {

type master;

file “amitava.in.zone”;

};

 

Edit another file amitava.in.zone

(com) vi /var/named/chroot/etc/named/amitava.in.zone

 

$TTL      86400

@           IN          SOA      amitava.in.         (root;

03082012;

10800;

1800;

12900;

604800)

IN           NS          gbinfosys.amitava.in.

IN              MX 10   mail.amitava.in.

Gbinfosys           IN           A             192.168.1.55

Mail      IN           A             192.168.1.55

www    IN           A             192.168.1.55

 

Owner ship change

(com) chown root.named /var/named/chroot/var/named/amitava.in.zone

Group change:

(com) chgrp named /var/named/chroot/etc/named.conf

Dns service active:

(com) chkconfig named on

How to stop iptable

(com) service iptables stop

How to stop Linux firewal

(com) setenforce 0

How to save configuration

(com) service iptables save

Test dns server

(com) service named configtest

How to restart DNS service

(com) service named restart

 

Posted in Server | Tagged | 25 Comments

File and folder permission for user, group and others in linux

UGO Mode permission

In Linux for any directory or there are three types off permission you can provide,

1)      Read

2)      Write

3)      Execute

If a directory have read permission then you can read the content of the directory, if the directory  has write permission then you can edit the content of the directory, if the directory has execute permission then you can run that directory if it is a program directory.

If a directory has read permission then you can browse contains of the directory, if the directory has write permission then you can edit or delete contains of the directory, if the directory has execute permission then you can change to the directory or move inside to the directory.

Read permission is indicated by “r”, write permission is indicated by “w” and execute permission is indicated by “x”. All these three permission can be given to three types of entities – User, Group and Others. User is the creator or owner of any particular file or directory. Group is a collection of user who has the same rights and community as the owner. Others is the collection of those users who do not belong to the group of the owner. User is indicated by “u” Group is indicated by “g”, Others is indicated by “o”.

To provide permission use “+”and  to take away permission use “-“permission can be given or withdrawn by the” chmod” command.

(com) chmod (space) u/g/o (space) +/- r/w/x (space) file/directory

 

 

Octal Notation permission

You can also provide the permission by using “octal notation” where a three digit number is used to represent the entire permission set. Value for read permission is “4”, Value for write permission is “2” and Value for execute permission is “1”.

 

(com) chmod (space) u(421)g(421)o(421) (space) file/directory

 

The left most digit of the three digit (u,g,o), represents total permission for user, The middle digit of the three digit (u,g,o), represents total permission for group, The right most digit of the three digit (u,g,o), represents total permission for others. Each total (421) permission is the sum total of read, write, execute permission.

 

Sticky bit in Linux

 

It is a special attribute which can be applied to a directory of a user, if that directory is a publicly accessible directory that means other users have full permission to the directory of that user. When other users have full permission for the directory of a user then there is also possibility that this other users can very easily delete the file of the original user inside the directory. If sticky bit is given to that directory then this can’t be done. The other users will be only able to delete those files that are created by them and not by the original user.

 

How to enable sticky bit permission

(com) chmod (space) 1777 (space) directory name/ file

(com) chmod (space) go+t (space) directory name/ file

 

User ACL (Access control List) Linux

 

By using “chmod” you can give individual permission only to the owner or user the rest permission are all community permission like group and others. If you want to provide individual permission for a file or directory to a user who is not the owner, you have to use “ACL” follow below these steps.

 

1)      Activate ACL for the root file system

(com) vi (space) /etc/fstab [Then edit the file system default as (defaults,acl) then save and exit

(com) esc : x

2)       Then remount the root file system.

(com) mount (space) –o (space) remount (space) /

3)      Specify ACL for any other user

(com) setfacl (space) –m (space) u:(user name):(permission r/w/x) (space) file or directory name (home/user/file)

4)      How to check the “ACL”

(com) getfacl (space) file or directory name (home/user/file)

5)      How to remove the “ACL” permission

(com) setfacl (space) –x (space) u:(user name):(space) file or directory name (home/user/file)

 

 

Posted in Linux | 19 Comments

How to setup a net work in Linux

How to configure the IP parameters (IP address, subnet mask, gateway and DNS)

(com) system-config-network [Now specify Ip address, subnet mask, gate way, DNS for eth0 also specify DNS server IP address. In the DNS section also specify the host name then save and exit.

How to active onboot

(com)  vi(space) /etc/sysconfig/network-scripts/ifcfg-eth0 [ edit onboot=yes, then save and exit]

How to restart this network setup

(com) service (space) network (space) restart

How to save the network setting permanently

(com) chkconfig (space)network(space) on

How to check the IP setting

(com) ifconfig

How to disable the network connection

(com) ifconfig (space) eth0 (space) down

How to enable the network connection

(com) ifconfig (space) eth0 (space) up

How to check lan card (Loop back ping)

(com) ping 172.0.0.1

How to stop the ping

(com) ctrl + c

How to specify the number of  this ping

(com) ping 172.0.0.1 (space) –c (space) (no of time 5/6/10)

How to see network configuration file in Linux

(com)  /etc/sysconfig/network-scripts/ifcfg-eth0

How to edit network configuration file in Linux

(com)  vi(space) /etc/sysconfig/network-scripts/ifcfg-eth0

How to find DNS information of Linux

(com) /etc/resolv.conf

Posted in Uncategorized | 9 Comments

Basic linux command for redhat enterprise 6

How to see your present directory

(Com)   pwd

How to get the information regarding on particular command

(com)      man (space) commend name

                info (space) commend name {press q for exit]

How to auto complete any commend

(com) Type some latter and then press tab

How to see the path of that commend

(com) which (space) commend name

How to create a directory

(com) mkdir (space) directory name

How to create parent directory and sub directory

(com) mkdir (space) –p (space) a/b/c/d

How to change directory

(com) cd (space ) directory name

How to go parent directory

(com) cd (space) ..

How to go home directory by one shot

(com) cd

How to remove directory

(com) rmdir (space) directory name [This commend can only remove empty directory]

(com) rm (space) –r (space) directory name [ Remove directory with content]

How to see the content of a directory

(com) ls (space) –l (space) directory name

How to see content  of directory as pagewise

(com) ls (space) –l (space) directory name (space) | (space) more

How to create a file

(com) cat (space) > (space) file name[After putting data press Ctrl D to save and exit]

How to create more than one empty file in one shot

(com) touch (space) file name (space) file name (space) ……….

How to display content of a file

(com) cat (space) file name

How to display content of file with line number

(com) cat (space) –b (space) file name

How to add content to another file

(com) cat (space) source file (space) >> (space) destination file

How to rename file

(com) mr (space) old name (space) new name

How to transfer a file one location to another location

(com) mv (space) file name (space) destination directory

How to create duplicate of a file

(com) cp (space) source file (space) destination file

How to create duplicate of a file in another location

(com) cp (space) source file (space) destination directory

How to create hard link of a file

(com) ln(space) original file (space) hard link file

How to create soft link of a file

(com) ln(space) –s (space) original file (space) soft link file

How to delete a file

(com) rm (space) file name

How to find out whether a pattern exists in a file

(com) grep (space) search pattern (space) file name

How to ignore the case of search pattern

(com) grep (space) –i

How to find out the line with the line numbers having that search pattern

(com) grep (space) –n

How to find out the number of occurrences of the search pattern

(com) grep (space) –c

How to display the line which not having the search pattern

(com) grep (space) –v

How to show combine content of two files in a side by side fashion

(com) past (space) first file name (space) second file name

How to show combine content of two files one below the other

(com) past (space)-s (space) first file name (space) second file name

How to compare between two files

(com) cmp (space) first file name (space) second file name

How to display unique common part between two files

(com) comm (space) first file name (space) second file name

How to short a file

(com) short (space) file name

How to reverse short a file

(com) short (space)-r

How to find a numeric short in a file

(com) short (space)-n

How to short a database file

(com) short (space)-t “Field separator :/I” (space) –k-shorting field number (space) file name

How to display the first two lines of a line

(com) head (space) file name

How to display some specific line from the top

(com) head (space) –n (no of line) (space) file name

How to display last 10 lines

(com) tale (space) file name

How to display some specific line from the end

(com) tail (space) –n (no of line) (space) file name

How to display some specific no of line from in between head and tail both

(com) head (space) –n (no of line 15) (space) file name shift+| (space) tail (space) –(no of line 5)

Posted in Linux | 25 Comments

What is linux operating system!

Linux is an open sources operating system. It was invented by Linus Torvalds. He actually created the Linux kernel and put it on the net so anybody can download it, create and customize sell on it and produce new distribution of Linux known as Linux distribution for example –

1. Red hat

2. Ubuntu

3. Debain

4. Mandriva

5. Bodhi linux

6. Suse linux

Among all of this Red Hat as a lion shear and it has a well organize training methodology and curriculum. So, to know Linux communities you must go for Red hat Linux. The commence of Red hat Linux a sum which is similar to the other version of Linux. Red hat produce two types of Linux –

• “fedora”

• “enterprise”

Fedora is a free version where as enterprise Linux is paid version and this payment is required when you are going for several other services form the Linux community. Red hat Linux kernel at present is 2.6 kernel. In fact Red hat Linux kernel is characters by major number, minor number and revision number. Revision number indicates small up gradation and revision for the Linux kernel , Minor number indicates sum more significance development and if the minor number is even then it indicates a fully tried and tested stable kernel which is suitable for the corporate , if the minor number is odd then that kernel is not fully tested . So it is suitable for school, college etc. The major number indicates a radical change of the kernel.

Important system directories:

[/] root directory- this directory is use to hold the enter Linux system.

[/boot] this directory is hold the important booting files of Linux.

[/root] this is the home directory for the root user and contended all the important directory and documents of the root user.

[/home] this directory holds the home directory of all the others users of the Linux.

[/bin] this directory holds the different executable file which is related to the different user processes.

[/sbin] this directory holds the executable file which is required by the system.

[/dev] this directory holds the different device file.

[/mnt] this directory holds the mount point directory for the different partition of hard disk

[/media] this directory holds the mount point directory of the removable media

[/etc] this directory holds the different configuration for the difference service offered by Linux.

[/user] this directory holds the difference library file that the necessary for the system.

Posted in Linux | 19 Comments

A Deep Impact of IT in Modern Civilization

This is the age of technology.  Computer plays an important role in it. Now-a-days, the most common word that we can hear all time is none other than “Information Technology.” It first heard in a modern sense in the year 1958 inside a magazine, named Harvard Business Review. Its author said that, “the new technology does not yet have a single established name. We shall call it information technology.” The processing, acquisition and storage of any kind of written, vocal and numerical information by a micro-electronic gadgetis called information technology.

IT is the area of managing technology and spans wide area related to computer software, information system, computer hardware, programming language etc. Anything related with data management are covered by IT.

An IT professional performs various types of functions those begin from installation of application to designing complex networks. Such other duties which perform by an IT professional are data management, engineering, hardware as well as management of entire IT system and whole industry also.  Today it is not only using as a computer related term but its scope spreads too many other electronic devices also. It’s now gives a deep impact in our society. It is now used in cell phone, television, automobile and many more which increases it demand day by day.

These days IT is used as a subject of education in degree course. It is now create a position as a distinct field of study compared to Computer science and Information System. IT now looks like radar of this dynamic society. Today, any development in our civilization without IT, is seems to be a ship without its radar.

Posted in IT support In Kolkata | 120 Comments

Computer hardware system is not a scaring matter today

What is computer hardware?  If you asked this question to the computer literate pupil, a huge number of people among them can’t give the answer perfectly.

At first you have to think your PC as a system, which consists of two main parts; one is version of windows and programs – - called software. And the other one which you can see and feel, and which you can break by dropping it – is called Hardware. There are many hardware components in your PC. To know hardware, you have to know all of these components accurately. A brief discussion about these components is given below:

First of all you need to know about system unit-which is comprised of a floppy drive and DVD or CD drive. Inside this unit, you actually see another disc drive, which is called hard drive and this is the place where every thing of your computer is stored. Secondly you have to know about RAM. It is an abbreviated form of Random Access Memory. Whatever you are currently working in your computer is always stored in it. RAM is such kind of storage device which basically works faster than the other storage devices. But it is volatile in nature. It can’t store any information when power is turned off. So, you have to go through with hard drive for long time storage. Third one is computer hard drive device. It is the place where everything going on your computer is stored. You can’t see it because it is placed inside the system unit. It is able to store data permanently, with or without power. Now-a-days it has a huge memory of billion of bytes. Then you need to know about mouse, which are the most essential components of computer hardware system. It is the device which allows you to navigate your PC quickly and easily. If the work can do without mouse, it becomes more time consuming and difficult to work. Finally the most indispensable and important computer hardware device is computer keyboard. The keyboard is playing the important role to interact with your PC. While you have to type even a single word in your computer, you have to go in your keyboard and write it in there. So,   I hope that the above discussion on computer hardware maintenance system may assist you to familiar with it and you can also give the answer of the question that what is hardware.

To know computer hardware system is an essential requirement to a computer literate people. To know computer hardware system, you have to know all the hardware devices. Here a short synapsis gives to you to make you familiar with all these devices.

Related Posts Plugin for WordPress, Blogger...
Posted in Uncategorized | 105 Comments