Friday, 15 November 2013

HTTP and User Base Authentication in LINUX

# yum install httpd -y

# cd /var/www/html - > Default Document Root.

Just creating a index.html file with test matter.

cat > index.html
Test for HTTPD

ctrl + D


# vi /etc/httpd/conf/httpd.conf
at last of this file



<VirtualHost *:80>
    ServerAdmin root@desktop10.example.com  # Administrator of HTTP Site
    DocumentRoot /var/www/html # Document Root for Index.html
    ServerName desktop10.example.com  # Website Name
</VirtualHost>


# Service httpd restart;chkconfig httpd on


elinks desktop10.example.com  # Check normal website is working or not.


For user base Authentication - 


vi /var/www/html/.htaccess  # creating to add username and password details


AuthName "Test for learning"  # This text displayed as a caption.

AuthType basic # Authentication Type
AuthUserFile /var/www/html/mypass # Password file location for user below
require user ashutosh 

edit httpd.conf again and add at last


<Directory "/var/www/html">

  AllowOverride AuthConfig
  Order allow,deny
  Allow from all

</Directory>

# useradd ashutosh

# passwd ashutosh # Not compulsory

# htpasswd -c /var/www/html/mypass ashutosh # this is save an encrypted password to mypass file.


#service httpd restart 


CHECK THE RESULT


Suggestion, Comments are alwasy WELCOME

Regards
Ashutosh S.Bhakare
(EX413, RHCSS,RHCVA 3.0,RHCE,MCP,CCNA)
Unnati Computers,Aurangabad
Red Hat Authorised Training Partner
www.unnatiithub.org
Ph.9822451920,0240-2485766

Tuesday, 5 November 2013

ISCSI - Server and Client Side


iSCSI is an Internet Protocol (IP)-based storage networking standard for linking data storage facilities. By carrying SCSI commands over IP networks, iSCSI is used to facilitate data transfers over intranets and to manage storage over long distances. iSCSI can be used to transmit data over local area networks (LANs), wide area networks (WANs), or the Internet, and can enable location-independent data storage and retrieval.

Steps
1) Create LVM with name iscsi

2) Install package scsi-target-utils



vim /etc/tgt/target.conf
<target iqn.yyyy.mm.revers order name>
e.g.
<target iqn,2010-12.com.example.desktop4:iscsi>
backing-store /dev/vol1/iscsi
initiator-address 192.168.0.5  
initiator-address 192.168.0.6
initiator-address 192.168.0.7
<target>

3) Service tgtd restart
4) Chkconfig tgtd on
5) Tgtd-admin –s

This will create an iSCSI server; Check iSCSI Client side below

1) Yum install iscsi-initiator*
2) iscsiadm –m discovery –t st –p [IP of iscsi server]
3) isciadmin –m node –T iqn.string -l -> For Login the iscsi
4) Check for new HDD in using fdisk -l and do partition using Fdisk.

Ashutosh S.Bhakare
(EX413, RHCSS,EX423,RHCVA 3.0,RHCE,MCP,CCNA)
Unnati Computers,Aurangabad
Red Hat Authorised Training Partner
www.unnatiithub.org
Ph.9822451920,0240-2485766