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

Thursday, August 11, 2011

Installation Of Team Viewer On REDHAT LINUX-5




Setup:

Machine Name: sandeeplinux3 (Connected To Internet)

Requirement:

Team Viewer RPM Package

Download Required Packages From Website:

Website: http://www.teamviewer.com/hi/download/index.aspx and Save on Desktop in Linux Machine.

Note: Installation steps should do in root user.

Installation Of Required Packages:

Login As Root User
[sandeep@sandeeplinux3 ]$su -l root

[root@sandeeplinux3 ]# [Right Click On Desktop --> Open Terminal.]

[root@sandeeplinux3 ]#cd Desktop
[root@sandeeplinux3 Desktop]#rpm -i teamviewer_linux.rpm

Now Teamviwer has installed, Confirm once package installed properly or not

[root@sandeeplinux3 Desktop]#rpm -qa |grep teamviewer

OR

Go to Application --> Internet --> TeamViewer (After Installing Teamviewer RPM it should show in Application --> Internet)

Note: Teamviewer can't open in Root User (will give good trick for root later) so logoff root user and go normal user and Go to Application --> Internet --> Click on TeamViewer

For Root User

Now Here I am going to post 1 trick for TeamViewer. Many Users who likes to work as root and but in RHEL-5 there is restriction for Running as root.

Whenever you are trying to run TeamViewer as root from Terminal, You will get message like below :-

TeamViewer must not be executed as root!

By Following few steps you will be able to run TeamViewer as root.

Follow Steps to run TeamViewer As root.

1. Login as root user to do these all steps.
2. Open Terminal Go to Applications -> System Tools -> Terminal
3. Now Lets find where exactly teamviewer command is. Execute Following command to Find it out.
[root@sandeeplinux3 ]#which teamviewer
/usr/bin/teamviewer <– You will get this kind of output on your terminal
4. Be safe So First Lets take a backup of Original TeamViewer Command. Execute Following Command
[root@sandeeplinux3 ]#cp /usr/bin/teamviewer /usr/bin/teamviewer.orig

5. Open teamviewer file. Here in /usr/bin/teamviewer they have put the restriction for root user. So Lets Remove it. Open File By Executing vi /usr/bin/teamviewer and You will able to see following lines into /usr/bin/teamviewer :-

userid=$(id -u)

if [ $userid = 0 ]
then
echo TeamViewer must not be executed as root!
exit 1
fi

CHANGE those line to

##userid=$(id -u)

##if [ $userid = 0 ]
##then
## echo TeamViewer must not be executed as root!
## exit 1
##fi

Save and Exit this file ( Press “ESC” then Press :wq! )

6. To Open TeamViewer from GUI. Click on Applications -> Internet -> TeamViewer
7. To Open TeamViewer from Terminal Click on Applications -> System Tools -> Terminal. On Terminal Execute Command teamviewer

Testing TeamViewer between Linux-Linux OR Linux-Windows OR Windows-Linux


Linux-Linux (For another linux machine follow installation step as per given above)

Machine Name's: Linux1 & Linux2

Linux1
Login as Normal User

Go to Application --> Internet --> Click on TeamViewer --> It will open one Window with user ID and Password.

Linux2
Login as Normal User

Go to Application --> Internet --> Click on TeamViewer --> It will open one Window with user ID and Password.

Now go to any one machine and give User Name and Password of another Machine and Connect --> Now you can see Remote Desktop Of 1st Machine.


Linux-Windows OR Windows-Linux

On Linux Machine:

Login as Normal User

Go to Application --> Internet --> Click on TeamViewer --> It will open one Window with user ID and Password.

On Windows Machine:

Note: Download .exe package and Install in windows machine (Download Website: http://www.teamviewer.com/hi/download/index.aspx)

Go to Start --> All Programs --> Click On TeamViewer Application.

Now go to any one machine and give User Name and Password of another Machine and Connect --> Now you can see Remote Desktop of 1st Machine.


If anything kind of doubts please reply to this post i will correct ASAP.....

SQUID Configuration On REDHAT LINUX-5



SQUID (PROXY SERVER)

Setup:

Server: sandeeplinux-server (192.168.4.1 Local Network IP)
Client: Linux & Windows XP/2003 etc...
Default Port NO: 3128

Requirement: This SQUID package available on RHEL5 DVD only
squid-2.6.STABLE6-3.el5

Installation Of Required Packages:

[root@sandeeplinux-server RHEL5_Total_Pack]# rpm -i squid-2.6.STABLE6-3.el5
warning: squid-2.6.STABLE6-3.el5: Header V3 DSA signature: NOKEY, key ID 37017186
[root@sandeeplinux-server RHEL5_Total_Pack]#

Configure SQUID config file:

NOTE: Modify squid.conf file (Before Modifying any Files take one backup copy)

[root@sandeeplinux-server ~]# cd /etc/squid
[root@sandeeplinux-server squid]# vi squid.conf

Uncomment Bellow lines in config file...



Access Control Lists

# Add in ACL your local network information
acl all src 192.168.1.0/255.255.255.0 (Allow here your local network Address)

One Sample Passage for ACL configuration

#Recommended minimum configuration:
acl all src 192.168.4.0/255.255.255.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
acl blocksites dstdomain .orkut.com
acl blocksites dstdomain .facebook.com
acl blocksites dstdomain .youtube.com
http_access deny blocksites
acl banned src 192.168.4.3
http_access deny banned
acl localnetwork src 192.168.1.0/24
http_access allow localnetwork
acl blockfiles urlpath_regex /etc/squid/blocks.files.acl
deny_info ERR_BLOCKED_FILES blockfiles
http_access deny blockfiles
acl business_hours time M T W H F 9:00-19:00
acl RestrictedHost src 192.168.1.3
http_access deny RestrictedHost
http_access allow business_hours
acl bad url_regex "/etc/squid/squid-block.acl"
http_access deny bad

Now Try To Start SQUID Service & Keep Permanently On:

[root@sandeeplinux-server squid]# service squid status
squid is stopped
[root@sandeeplinux-server squid]# service squid start
Starting squid: [OK]
[root@sandeeplinux-server squid]# chkconfig squid on
[root@sandeeplinux-server squid]#

Now Check SQUID/PROXY with Windows Client:

Go To Internet Explore --> Properties --> Connections --> LAN Settings --> Use a Proxy Server for your LAN --> Give server IP or Name --> Port 3128 --> OK



BLOCKED SITE EXAMPLE (ORKUT SITE)

For Writing our own Notice Messages and all modification you can do in /usr/share/squid/errors/English

[root@sandeeplinux-server English]# vi ERR_ACCESS_DENIED

Write Message Save & Exit and Restart once your squid server.



Thanks and Regards,
Sandeep CC