About Me

My photo
Hi Friends, I am Sandeep CC and some people know me as System Administrator. I have started my professional career from 2008. I have been working as System Administrator on Linux Server and Windows Client. I am here to share my Knowledge in which I have experienced and which I have come across till now, It could be help to you people. In case anything wrong or any improvements in my post steps, Please comment to the post, Feel free to contact me by posting comments on this blog. Thanks and Regards, Sandeep CC

Wednesday, November 23, 2011

Configure Squid Authentication Password on REDHAT LINUX




Configure Squid Authentication Password



Before configuring authentication user and password 1st configure SQUID and check whether it is working fine without any authentications [Click here to check Installation steps of Squid/Proxy]

You can configure Squid to prompt users for a username and password. Squid comes with a program called ncsa_auth that reads any NCSA-compliant encrypted password file. You can use the htpasswd program that comes installed with Apache to create your passwords [Click here to check Installation steps of APACHE/WEBSERVER]

Create squid_passwd file on /etc/squid/ directory and you need to make sure that it's universally readable.

[root@sandeeplinux-server squid]# touch squid_passwd
[root@sandeeplinux-server squid]# chmod o+r squid_passwd

Use the htpasswd command to add users to the password file. You can add users at anytime without having to restart Squid. Example: User Name = sandeep with sandeep123 password

[root@sandeeplinux-server squid]# htpasswd /etc/squid/squid_passwd sandeep
New password:
Re-type new password:
Adding password for user sandeep
[root@sandeeplinux-server squid]#

Find your ncsa_auth file using the locate command.

[root@sandeeplinux-server squid]# locate ncsa_auth
/usr/lib/squid/ncsa_auth
/usr/share/man/man8/ncsa_auth.8.gz
[root@sandeeplinux-server squid]#

Enter or un-comment bellow lines in /etc/squid/squid.conf file

[root@sandeeplinux-server squid]# vi squid.conf

auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd

(Add or un-comment above line in auth_param Session)

acl ncsa_users proxy_auth REQUIRED
http_access allow ncsa_users

(Add above line in ACL Session)

Save & Exit:

Restart Squid Server

[root@sandeeplinux-server squid]# service squid restart
Stopping squid: ................ [ OK ]
Starting squid: . [ OK ]
[root@sandeeplinux-server squid]#




Now Open Browser on client machine (Windows/Linux Client) It will ask for User name and Password, Give above created user name and password, Now you can access Internet...

Thanks and Regards,
Sandeep CC

Tuesday, November 22, 2011

Configure APACHE Web Server On REDHAT LINUX-5




     CONFIGURATION OF APACHE (HTTPD) SERVER ON RHEL-5




Required RPM Packages:
httpd-2.2.3-6.el5.i386.rpm (This package available on RHEL DVD)

Installation Procedure:

[root@freedomcorp Server]# rpm -ivh httpd-2.2.3-6.el5.i386.rpm
warning: httpd-2.2.3-6.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:httpd                  ########################################### [100%]
[root@freedomcorp Server]#

Start, Stop & Restart Procedure:


[root@freedomcorp Server]# service httpd start
Starting httpd:                                            [  OK  ]
[root@freedomcorp Server]#

[root@freedomcorp Server]# service httpd restart
Stopping httpd:                                          [  OK  ]
Starting httpd:                                            [  OK  ]
[root@freedomcorp Server]#

NOTE: In-case if getting any issue while installing regarding dependency packages, then try with bellow things...(This is not a permanent solutions) 

[root@freedomcorp Server]# rpm -ivh httpd-2.2.3-22.el5.i386.rpm apr-1.2.7-11.i386.rpm apr-util-1.2.7-7.el5.i386.rpm postgresql-libs-8.1.11-1.el5_1.1.i386.rpm

You will get config file in /etc/httpd/conf path, Modify with httpd.conf file as per your requirement...

Example: You can put your own page as home page in httpd.conf file
DirectoryIndex index.html index.html.var My-Own-Home.html

This File should available on /var/www/html/My-Own-Home.html

You can put your own designed webpage in /var/www/html/ path

Now check with server and client machien


http://localhost (Server)
http://servername (Server & Client)
http://server_IP (Server & Client)


Troubleshooting: If by server name is not opening in client machine then you have to configure DNS server (Click Here to Configure DNS Server) for name resolving, If by IP not working in client or server machine then check with httpd service...


Thanks and Regards,
Sandeep CC