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, October 30, 2013

YUM CONFIGURATION & INSTALLATION ON REDHAT LINUX

YUM CONFIGURATION & INSTALLATION ON REDHAT LINUX

Requirements:
1. Need to copy all linux rpm packages in one directory (if you have ftp/httpd then copy /var/www/html or /var/ftp/pub direcotry, also you can keep anywhere in your linux box but you can't use this server for other linux clients for yum installation...)

2. Need to install createrepo rpm on server side...

3. yum packages (This package will installed default)

Copy All RPM to your linux location:
keep RHEL DVD in dvd rom and copy /Server directory to your selected location, In my server its running httpd service and vsftpd service so I am keep all copied file under httpd location /var/www/html/yumpack/

[root@proxy1 RHEL5]# cp -R Server/ /var/www/html/yumpack/
[root@proxy1 RHEL5]#
[root@proxy1 Server]# pwd
/var/www/html/yumpack/Server
[root@proxy1 Server]#

Installation of createrepo rpm:
[root@proxy1 Server]# rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm
warning: createrepo-0.4.11-3.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:createrepo             ########################################### [100%]
[root@proxy1 Server]#

Copy comps-rhel5-server-core.xml file to /var/www/html/yumpack/Server location from /var/www/html/yumpack/Server/repodata/

[root@proxy1 Server]# cd repodata/
[root@proxy1 repodata]# ls -ltr
total 10144
-rw-r--r-- 1 root root    1139 Oct 29 17:33 TRANS.TBL
-rw-r--r-- 1 root root 1010906 Oct 29 17:33 comps-rhel5-server-core.xml
-rw-r--r-- 1 root root 2400291 Oct 29 17:33 filelists.xml.gz
-rw-r--r-- 1 root root    1314 Oct 29 17:33 repomd.xml
-rw-r--r-- 1 root root  733418 Oct 29 17:33 primary.xml.gz
-rw-r--r-- 1 root root 6199888 Oct 29 17:33 other.xml.gz
[root@proxy1 repodata]#

[root@proxy1 repodata]# cp comps-rhel5-server-core.xml /var/www/html/yumpack/Server/
[root@proxy1 repodata]# cd ..
[root@proxy1 Server]#

[root@proxy1 Server]# ls -ltr |grep comp
-rw-r--r-- 1 root root    79270 Oct 29 17:33 compat-dapl-utils-2.0.13-4.el5.i386.rpm
-rw-r--r-- 1 root root  1010906 Oct 29 17:43 comps-rhel5-server-core.xml
[root@proxy1 Server]#

compat-dapl-utils-2.0.13-4.el5.i386.rpm this file content all rpm updates, that we have to update with group with that directory, follow below steps...
[root@proxy1 Server]# createrepo -vg comps-rhel5-server-core.xml /var/www/html/yumpack/Server/
1/2255
...
2254/2255 - esc-1.0.0-39.el5.i386.rpm
2255/2255 - xml-common-0.6.3-18.noarch.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
[root@proxy1 Server]#

In this file updation it will update all /Server rpm packs, see above it has updated 2255/2255 packages

Modify /etc/yum.repos.d/rhel-debuginfo.repo file (This steps you can do in server as well as in client machine)
[root@proxy1 Server]# cd /etc/yum.repos.d/
[root@proxy1 yum.repos.d]#
Keep original file copy for your safety purpose
[root@proxy1 yum.repos.d]# ls -ltr
total 8
-rw-r--r-- 1 root root 254 Dec 16  2008 rhel-debuginfo.repo
[root@proxy1 yum.repos.d]# cp rhel-debuginfo.repo rhel-debuginfo.repo.org
[root@proxy1 yum.repos.d]#

[root@proxy1 yum.repos.d]# vi rhel-debuginfo.repo
[my_Server]
name=my_Yum_Server
baseurl=http://172.16.4.205:9542/yumpack/Server/
enabled=1
gpgcheck=0

###clear yum cache### (This step need to do only in server side)

[root@proxy1 yum.repos.d]# yum clean all
Loaded plugins: rhnplugin, security
Cleaning up Everything
[root@proxy1 yum.repos.d]#

###update the yum####  (This step need to do only in server side)
[root@proxy1 yum.repos.d]# yum update
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
my_Server                                                                                                        | 1.1 kB    
00:00    
primary.xml.gz                                                                                                         | 791
kB     00:00    
my_Server                                                2255/2255
Skipping security plugin, no data
Setting up Update Process
No Packages marked for Update
[root@proxy1 yum.repos.d]#

###Test Yum Working or not (This step you can check with Server or client [if client /etc/yum.repos.d/rhel-debuginfo.repo modified])

[root@proxy1 ~]# yum install nfs-utils
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package nfs-utils.i386 1:1.0.9-40.el5 set to be updated
--> Processing Dependency: nfs-utils-lib >= 1.0.8-2 for package: nfs-utils
--> Processing Dependency: librpcsecgss.so.2 for package: nfs-utils
--> Processing Dependency: libnfsidmap.so.0 for package: nfs-utils
--> Running transaction check
---> Package nfs-utils-lib.i386 0:1.0.8-7.2.z2 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================
 Package                            Arch                      Version                              Repository                
           Size
=============================================================================================================================
Installing:
 nfs-utils                          i386                      1:1.0.9-40.el5                       my_Server                 
    380 k
Installing for dependencies:
 nfs-utils-lib                      i386                      1.0.8-7.2.z2                         my_Server                 
     55 k
Transaction Summary
=============================================================================================================================
Install      2 Package(s)        
Update       0 Package(s)        
Remove       0 Package(s)        
Total download size: 434 k
Is this ok [y/N]: yes
Downloading Packages:
(1/2): nfs-utils-lib-1.0.8-7.2.z2.i386.rpm                                                                             |  55
kB     00:00    
(2/2): nfs-utils-1.0.9-40.el5.i386.rpm                                                                                 | 380
kB     00:00    
----------------------------------------------------------------------------------------------------------------------------
Total                                                                                                         3.7 MB/s | 434
kB     00:00    
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : nfs-utils-lib                                     [1/2]
  Installing     : nfs-utils                                         [2/2]
Installed: nfs-utils.i386 1:1.0.9-40.el5
Dependency Installed: nfs-utils-lib.i386 0:1.0.8-7.2.z2
Complete!
[root@proxy1 ~]#

Thanks and Regards,
Sandeep CC

Wednesday, October 23, 2013

Install & Configure VNCSERVER on REDHAT LINUX-5


INSTALLATION & CONFIGURATION OF VNCSERVER ON REDHAT LINUX


Requirement: VNCSERVER package (server end) & Client version for client side...

INSTALL PACKAGE:

[root@proxy2 ~]# rpm -ivh vnc-server-4.1.1-10.1.0.0.1.i386.rpm
Preparing...                ########################################### [100%]
        package vnc-server-4.1.2-9.el5 (which is newer than vnc-server-4.1.1-10.1.0.0.1) is already installed
        file /etc/rc.d/init.d/vncserver from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /etc/sysconfig/vncservers from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /usr/bin/Xvnc from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /usr/bin/vncconfig from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /usr/bin/vncpasswd from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /usr/bin/vncserver from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /usr/bin/x0vncserver from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /usr/share/man/man1/vncserver.1.gz from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
        file /usr/share/vnc/classes/vncviewer.jar from install of vnc-server-4.1.1-10.1.0.0.1 conflicts with file from package vnc-server-4.1.2-9.el5
[root@proxy2 ~]#

ADD ONE USER FOR VNCSERVER (For security purpose don't use root user)
[root@proxy2 ~]# useradd vncserver

GO TO VNCSERVER USER (ALSO YOU CAN CREATE PASSWORD FOR LOCAL USERLOGIN BY USING "PASSWD USERNAME" COMMAND)
[root@proxy2 ~]# su -l vncserver

CREATE VNC SERVER PASSWORD FOR CREATED USER (this password is must required for remote login)
[vncserver@proxy2 root]$ vncpasswd
Password:
Verify:
[vncserver@proxy2 root]$

ALLOW CREATED USER TO VNCSERVER (Uncomment last 2 lines & give user session , like 1st user '1:myuser')
[root@proxy2 ~]# cd /etc/sysconfig/
[root@proxy2 sysconfig]# ls -ltr |grep vncser
-rw-r--r-- 1 root root   847 Jan 15  2007 vncservers
[root@proxy2 sysconfig]# cp vncservers vncservers.org
[root@proxy2 sysconfig]#
[root@proxy2 sysconfig]# vi vncservers
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own).  You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted!  For a secure way of using VNC, see
# .
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
# Use "-nohttpd" to prevent web-based VNC clients connecting.
# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel.  See the "-via" option in the
# `man vncviewer' manual page.
# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
VNCSERVERS="1:vncserver" ------------------------------------------------------> ADD CREATED USER HERE
VNCSERVERARGS[1]="-geometry 1600x1200" ----------------------------------------> GIVE REQUIRED RESULATION TO VIEW

"vncservers" 23L, 911C written

#####MAKE ON VNCSERVER WHILE BOOTING SERVER#####
[root@proxy2 ~]# chkconfig --list |grep vncserver
vncserver       0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@proxy2 ~]# chkconfig --level 35 vncserver on
[root@proxy2 ~]# chkconfig --list |grep vncserver
vncserver       0:off   1:off   2:off   3:on    4:off   5:on    6:off
[root@eduproxy2 ~]#
[root@proxy2 sysconfig]#

##########SERVICE START############
[root@proxy2 sysconfig]# service vncserver start
Starting VNC server: 1:vncserver xauth:  creating new authority file /home/vncserver/.Xauthority
xauth: (stdin):1:  bad display name "proxy2.com:1" in "add" command
New 'proxy2.com:1 (vncserver)' desktop is proxy2.com:1
Creating default startup script /home/vncserver/.vnc/xstartup
Starting applications specified in /home/vncserver/.vnc/xstartup
Log file is /home/vncserver/.vnc/proxy2.com:1.log
                                                           [  OK  ]
[root@proxy2 sysconfig]#

### Go to Client machine###
Note: We can install vnc client version in any OS, I have installed and tried in XP platform...also we can open this vnc server on any java updated browser, you can see 2 steps also below...

Step-1: With VNC Client exe...




Step-2: Open in any java updated browser with default port 5801