Tuesday, December 21, 2010

RedHat SATELLITE SERVER Installation and configuration


Satellite server IP:10.0.0.11
Hostname:(rajat.yeswedeal.com)
OS:RHEL5.3
Satellte client IP:10.0.0.100
Hostname:(client.yeswedeal.com)
OS:RHEL5.3
Minimum Requirements for server:
Intel core processor,2.4GHz,512k cache
Recommended- intel Multi core processor,2.4GHz dual processor,512k cache
Required-2GB RAM
Recommended-8GB RAM
5 GB-Base Install RHEL 5
30 GB storage for software channel including base and child channels /var/satellite
12 GB for database repository /rhnsat
Raid 5
IMPORTENT:
selinux-permissive
firewall-disabled
Valid Subscriptions:a3c5b675a24e93b6
:22b0edc1233bcaed
Download software redhat-rhn-satellite-5.3-server-x86_64-5-embedded-
oracle.iso
RHN Entitlement Certificate
Server:
Log into the machine as root.
Insert the RHN Satellite Server CD containing the installation files or download
the ISO image from the RHN website.
[root@satellite ~]#rhn_register
[root@satellite ~]#yum update
(OR)
Create Repository:
#vi /etc/yum.repos.d/rhel-debuginfo.repo
[Server]
name=Server
baseurl=file:///var/ftp/pub/Server
enabled=1
gpgcheck=0
[EmbeddedDB]
name=EmbeddedDB
baseurl=file:///var/ftp/pub/EmbeddedDB
enabled=1
gpgcheck=0
[Satellite]
name=Satellite
baseurl=file:///var/ftp/pub/Satellite
enabled=1
gpgcheck=0
[root@satellite ~]# mount /dev/cdrom /mnt
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@satellite ~]# cd /mnt
You have mail in /var/spool/mail/root
[root@satellite mnt]# ls
EmbeddedDB install install.pl README Satellite TRANS.TBL updates
[root@satellite mnt]# ./install.pl
* Starting the Red Hat Network Satellite installer.
* Performing pre-install checks.
* Pre-install checks complete. Beginning installation.
* RHN Registration.
** Registration: System is already registered with RHN. Not re-registering.
* Checking for uninstalled prerequisites.
** Checking if yum is available ...
There are some packages from Red Hat Enterprise Linux that are not part
of the @base group that Satellite will require to be installed on this
system. The installer will try resolve the dependencies automatically.
However, you may want to install these prerequisites manually.
Do you want the installer to resolve dependencies [y/N]? y
* Applying updates.
* Installing RHN packages.
* Now running setup.
* Setting up Oracle environment.
* Setting up database.
** Database: Installing the database:
** Database: This is a long process that is logged in:
** Database: /var/log/rhn/install_db.log
*** Progress: ##############################################################
** Database: Installation complete.
** Database: Setting up database connection.
** Database: Testing database connection.
** Database: Populating database.
*** Progress: ############################################################
* Setting up users and groups.
** GPG: Initializing GPG and importing key.
** GPG: Creating /root/.gnupg directory
You must enter an email address.
Admin Email Address? rajat@yeswedeal.com
* Performing initial configuration.
* Activating RHN Satellite.
Where is your satellite certificate file? /root/yeswedeal.cert
** Loading RHN Satellite Certificate.
** Verifying certificate locally.
** Activating RHN Satellite.
* Enabling Monitoring.
* Configuring apache SSL virtual host.
Should setup configure apache's default ssl server for you (saves original
ssl.conf) y/n? y
** /etc/httpd/conf.d/ssl.conf has been backed up to ssl.conf-swsave
* Creating SSL certificates.
CA certificate password?
Re-enter CA certificate password?
Organization? yeswedeal
Organization Unit [satellite.server.com]?
Email Address [rajat@yeswedeal.com]?
City? hyderabad
State? ap
Country code (Examples: "US", "JP", "IN", or type "?" to see a list)? IN
** SSL: Generating CA certificate.
** SSL: Deploying CA certificate.
** SSL: Generating server certificate.
** SSL: Storing SSL certificates.
* Deploying configuration files.
* Update configuration in database.
* Setting up Cobbler..
Cobbler requires tftp and xinetd services be turned on for PXE provisioning
functionality. Enable these services (y/n, default = 'y')?
* Restarting services.
Installation complete.
Visit https://satellite.server.com to create the RHN Satellite administrator
account.
You have new mail in /var/spool/mail/root
[root@satellite mnt]# https://satellite.server.com
[root@satellite ~]# /usr/sbin/rhn-satellite restart
(if need)
For Redhat Channel Importing:
[root@satellite ~]# satellite-sync –list-channels
11:32:55 Red Hat Network Satellite - live synchronization
11:32:55 url: https://satellite.rhn.redhat.com
11:32:55 debug/output level: 1
11:32:58 db: rhnsat/@rhnsat
11:32:58
11:32:58 Retrieving / parsing channel-families data
11:33:04 channel-families data complete
11:33:08
11:33:08 Retrieving / parsing channel data
11:34:31 p = previously imported/synced channel
11:34:31 . = channel not yet imported/synced
11:34:31 base-channels:
11:34:31 . redhat-linux-alpha-6.2 1184
11:34:31 . redhat-linux-alpha-7.0 1412
11:34:31 . redhat-linux-alpha-7.1 1487
11:34:31 . redhat-linux-ee-i386-6.2 13
11:34:31 . redhat-linux-i386-6.2 1357
11:34:31 . redhat-linux-i386-7.0 1615
11:34:31 . redhat-linux-i386-7.1 2046
11:34:31 . redhat-linux-i386-7.2 2338
11:34:31 . redhat-linux-i386-7.3 2481
11:34:31 . redhat-linux-i386-8.0 2316
11:34:31 . redhat-linux-i386-9 1864
11:34:31 . redhat-linux-iSeries-7.1 1135
11:34:31 . redhat-linux-ia64-7.1 1392
11:34:31 . redhat-linux-ia64-7.2 1886
11:34:31 . redhat-linux-pSeries-7.1 1135
11:34:31 . redhat-linux-s390-7.2 1447
11:34:31 . redhat-linux-s390x-7.1 977
11:34:31 . redhat-linux-severn-i386-9.0.93 1455
11:34:31 . redhat-linux-sparc-6.2 1201
11:34:31 . rh-i386-desktop-4 7062
11:34:31 . rh-x86_64-desktop-4 8092
11:34:31 . rhel-i386-as-3 5447
11:34:31 . rhel-i386-as-4 7112
11:34:31 . rhel-i386-client-5 5276
11:34:31 . rhel-i386-desktop-3 4790
11:34:31 . rhel-i386-es-3 5466
11:34:31 . rhel-i386-es-4 7112
11:34:31 . rhel-i386-server-5 6330
11:34:31 . rhel-i386-ws-3 5391
11:34:31 . rhel-i386-ws-4 7062
11:34:31 . rhel-ia64-as-3 5715
11:34:32 . rhel-ia64-as-4 7330
11:34:32 . rhel-ia64-es-3 5251
11:34:32 . rhel-ia64-es-4 7329
11:34:32 . rhel-ia64-server-5 6482
11:34:32 . rhel-ia64-ws-3 5663
11:34:32 . rhel-ia64-ws-4 7285
11:34:32 . rhel-ppc-as-3 5792
11:34:32 . rhel-ppc-as-4 8000
11:34:32 . rhel-ppc-server-5 8222
11:34:32 . rhel-x86_64-as-3 6024
11:34:32 . rhel-x86_64-as-4 8142
11:34:32 . rhel-x86_64-client-5 6188
11:34:32 . rhel-x86_64-desktop-3 5389
11:34:32 . rhel-x86_64-es-3 5529
11:34:32 . rhel-x86_64-es-4 8142
11:34:32 . rhel-x86_64-server-5 8313
11:34:32 . rhel-x86_64-ws-3 5967
11:34:33 . rhel-x86_64-ws-4 8092
11:34:33 . rhemrg-nonlinux-grid-1 0
11:34:33 . rhemrg-nonlinux-messaging-1 0
11:34:33 . severn-beta2-i386 1466
11:34:33 . solaris-sparc-9 0
11:34:33 redhat-linux-alpha-6.2:
11:34:33 . redhat-powertools-alpha-6.2 532
11:34:33 redhat-linux-alpha-7.0:
11:34:33 . redhat-powertools-alpha-7.0 461
11:34:33 redhat-linux-alpha-7.1:
11:34:33 . redhat-powertools-alpha-7.1 459
11:34:33 redhat-linux-i386-6.2:
11:34:33 . redhat-powertools-i386-6.2 584
11:34:33 redhat-linux-i386-7.0:
11:34:33 . redhat-powertools-i386-7.0 520
11:34:33 redhat-linux-i386-7.1:
11:34:33 . redhat-powertools-i386-7.1 541
11:34:33 redhat-linux-i386-7.2:
11:34:33 . k12ltsp-i386-7.2 63
11:34:33 redhat-linux-i386-7.3:
11:34:33 . education-general-i386-7.3 7
11:34:33 . redhat-gcc3.1-i386-7.3 12
11:34:33 . education-k12ltsp-i386-7.3 82
11:34:33 redhat-linux-i386-8.0:
11:34:33 . education-k12ltsp-i386-8.0 122
11:34:33 redhat-linux-i386-9:
11:34:33 . rhn-tools-redhat-linux-i386-9 1536
11:34:33 . education-k12ltsp-i386-9 123
11:34:33 redhat-linux-severn-i386-9.0.93:
11:34:33 . redhat-linux-severn-i386-9.0.93-updates 2388
11:34:33 redhat-linux-sparc-6.2:
11:34:33 . redhat-powertools-sparc-6.2 480
11:34:33 rh-i386-desktop-4:
11:34:33 . rh-i386-desktop-4-fastrack 273
11:34:33 . rhn-tools-rhel-4-desktop-i386 1318
11:34:33 . rh-i386-desktop-4-extras 481
11:34:33 . rh-i386-desktop-4-sdk 1
11:34:33 rh-x86_64-desktop-4:
11:34:33 . rh-x86_64-desktop-4-extras 371
11:34:33 . rhn-tools-rhel-4-desktop-x86_64 1318
11:34:33 . rh-x86_64-desktop-4-fastrack 307
11:34:33 . rh-x86_64-desktop-4-sdk 1
11:34:33 rhel-i386-as-3:
11:34:33 . rhel-i386-as-3-fastrack 56
11:34:33 . rhel-i386-as-3-hwcert 9
11:34:33 . redhat-rhn-proxy-4.0-as-i386-3 118
11:34:33 . redhat-rhn-proxy-4.2-as-i386-3 135
11:34:33 . rhel-3-as-i386-rhds-2 27
11:34:33 . rhel-i386-as-3-cluster 34
11:34:33 . rhn-tools-rhel-3-as-i386 1571
11:34:33 . rhel-i386-as-3-rhcmsys-7.1 1
11:34:33 . redhat-rhn-proxy-4.1-as-i386-3 95
11:34:33 . rhel-i386-as-3-gfs-6 178
11:34:33 . rhis-i386-as-3-rhdirserv 0
11:34:33 . rhel-i386-as-3-devsuite 6
11:34:33 . rhel-i386-as-3-rhdirserv-7.1 8
11:34:33 . rhel-i386-as-3-extras 202
11:34:33 rhel-i386-as-4:
11:34:33 . rhel-i386-as-4-extras 481
11:34:33 . rhel-i386-as-4-mrg-messaging-1 151
11:34:33 . rhel-i386-as-4-hwcert 25
11:34:33 . redhat-rhn-proxy-4.0-as-i386-4 116
11:34:33 . rhel-i386-as-4-appstk-1 517
11:34:33 . rhn-tools-rhel-4-as-i386 1321
11:34:33 . rhel-i386-as-4-rhdirserv-7.1 8
11:34:33 . rhel-i386-as-4-mrg-grid-1 52
11:34:33 . redhat-rhn-proxy-4.2-as-i386-4 124
11:34:33 . rhel-i386-as-4-mrg-management-1 0
11:34:33 . rhel-i386-as-4-fastrack 278
11:34:33 . rhel-i386-as-4-mrg-messaging-base-1 68
11:34:33 . rhel-4-as-i386-rhds-3 163
11:34:33 . redhat-rhn-proxy-5.0-as-i386-4 121
11:34:33 . redhat-rhn-proxy-5.2-as-i386-4 94
11:34:33 . redhat-rhn-proxy-5.3-as-i386-4 78
11:34:33 . rhel-i386-as-4-rhdirserv-8 58
11:34:33 . rhel-i386-as-4-sdk 1
11:34:33 . rhel-i386-as-4-cluster 548
11:34:33 . redhat-rhn-proxy-5.1-as-i386-4 110
11:34:33 . redhat-rhn-proxy-4.1-as-i386-4 93
11:34:33 . rhel-4-as-i386-rhds-2.1 15
11:34:33 . rhel-i386-as-4-rhcmsys-7.1 1
11:34:33 . rhel-i386-as-4-rhcmsys-7.2 100
11:34:33 . rhel-i386-as-4-rhcmsys-7.3 109
11:34:33 . rhel-i386-as-4-gfs-6.1 523
11:34:33 rhel-i386-client-5:
11:34:33 . rhel-i386-client-workstation-fastrack-5 42
11:34:33 . rhel-i386-client-supplementary-5 440
11:34:33 . rhel-i386-client-fastrack-5 127
11:34:33 . rhel-i386-client-workstation-5 2323
11:34:33 . rhel-i386-client-vt-5 170
11:34:33 . rhn-tools-rhel-i386-client-5 422
11:34:33 rhel-i386-desktop-3:
11:34:33 . rhel-i386-desktop-3-extras 179
11:34:33 . rhn-tools-rhel-3-desktop-i386 1474
11:34:33 . rhel-i386-desktop-3-devsuite 6
11:34:33 . rhel-i386-desktop-3-fastrack 55
11:34:33 rhel-i386-es-3:
11:34:33 . rhel-i386-es-3-rhdirserv-7.1 8
11:34:33 . rhel-i386-es-3-cluster 34
11:34:33 . rhel-3-es-i386-rhds-2 27
11:34:33 . rhel-i386-es-3-rhcmsys-7.1 1
11:34:33 . rhn-tools-rhel-3-es-i386 1571
11:34:33 . rhel-i386-es-3-devsuite 6
11:34:33 . rhis-i386-es-3-rhdirserv 0
11:34:33 . rhel-i386-es-3-extras 202
11:34:33 . rhel-i386-es-3-gfs-6 178
11:34:33 . rhel-i386-es-3-fastrack 56
11:34:33 rhel-i386-es-4:
11:34:33 . rhel-i386-es-4-fastrack 278
11:34:33 . rhel-i386-es-4-appstk-1 517
11:34:33 . rhel-i386-es-4-cluster 548
11:34:33 . rhel-4-es-i386-rhds-3 145
11:34:33 . rhel-i386-es-4-sdk 1
11:34:33 . rhel-i386-es-4-gfs-6.1 523
11:34:33 . rhn-tools-rhel-4-es-i386 1318
11:34:33 . rhel-i386-es-4-mrg-management-1 0
11:34:33 . rhel-i386-es-4-rhcmsys-7.1 1
11:34:33 . rhel-i386-es-4-rhcmsys-7.2 100
11:34:33 . rhel-i386-es-4-rhcmsys-7.3 109
11:34:33 . rhel-i386-es-4-mrg-messaging-base-1 68
11:34:33 . rhel-i386-es-4-rhdirserv-8 58
11:34:33 . rhel-i386-es-4-extras 481
11:34:33 . rhel-i386-es-4-rhdirserv-7.1 8
11:34:33 . rhel-i386-es-4-mrg-messaging-1 151
11:34:33 . rhel-i386-es-4-mrg-grid-1 52
11:34:33 . rhel-4-es-i386-rhds-2.1 15
11:34:33 rhel-i386-server-5:
11:34:33 . rhel-i386-server-supplementary-5 485
11:34:33 . rhel-i386-server-productivity-5 1107
11:34:33 . rhn-tools-rhel-i386-server-5 425
11:34:33 . rhel-i386-server-hts-5 14
11:34:33 . rhel-i386-server-5-mrg-management-1 9
11:34:33 . rhel-i386-server-5-mrg-grid-1 72
11:34:33 . rhel-i386-server-vt-5 170
11:34:33 . rhel-i386-server-5-mrg-messaging-1 132
11:34:33 . rhel-i386-server-cluster-5 129
11:34:33 . rhel-i386-server-5-rhcmsys-7.3 0
11:34:33 . rhel-i386-server-cluster-storage-5 186
11:34:33 . rhel-i386-server-fastrack-5 178
11:34:33 . redhat-rhn-proxy-5.2-server-i386-5 89
11:34:33 . rhel-i386-server-5-mrg-realtime-1 155
11:34:33 . rhel-i386-server-5-mrg-messaging-base-1 72
11:34:33 . rhel-i386-server-5-rhcmsys-8 72
11:34:33 . rhel-i386-server-5-appstk-2 400
11:34:33 . redhat-rhn-proxy-5.3-server-i386-5 77
11:34:33 . rhel-i386-server-5-rhdirserv-8 35
11:34:33 rhel-i386-ws-3:
11:34:33 . rhel-i386-ws-3-devsuite 6
11:34:33 . rhel-i386-ws-3-cluster 29
11:34:33 . rhel-3-ws-i386-rhds-2 27
11:34:33 . rhel-i386-ws-3-extras 202
11:34:33 . rhel-i386-ws-3-gfs-6 178
11:34:33 . rhn-tools-rhel-3-ws-i386 1571
11:34:33 . rhel-i386-ws-3-fastrack 55
11:34:33 rhel-i386-ws-4:
11:34:33 . rhel-i386-ws-4-fastrack 273
11:34:33 . rhel-i386-ws-4-cluster 548
11:34:33 . rhel-i386-ws-4-sdk 1
11:34:33 . rhel-i386-ws-4-extras 481
11:34:33 . rhel-i386-ws-4-gfs-6.1 523
11:34:33 . rhel-4-ws-i386-rhds-3 145
11:34:33 . rhn-tools-rhel-4-ws-i386 1318
11:34:33 . rhel-4-ws-i386-rhds-2.1 15
11:34:33 rhel-ia64-as-3:
11:34:33 . rhel-3-as-ia64-rhds-2 27
11:34:33 . rhel-ia64-as-3-devsuite 3
11:34:33 . rhel-ia64-as-3-gfs-6 77
11:34:33 . rhel-ia64-as-3-fastrack 61
11:34:33 . rhel-ia64-as-3-cluster 29
11:34:33 . rhn-tools-rhel-3-as-ia64 1239
11:34:33 . rhel-ia64-as-3-extras 116
11:34:33 . rhel-ia64-as-3-hwcert 9
11:34:33 rhel-ia64-as-4:
11:34:33 . rhn-tools-rhel-4-as-ia64 1257
11:34:33 . rhel-ia64-as-4-cluster 327
11:34:33 . rhel-ia64-as-4-hwcert 25
11:34:33 . rhel-4-as-ia64-rhds-2.1 15
11:34:33 . rhel-ia64-as-4-extras 126
11:34:33 . rhel-ia64-as-4-fastrack 304
11:34:33 . rhel-4-as-ia64-rhds-3 163
11:34:33 . rhel-ia64-as-4-gfs-6.1 255
11:34:33 rhel-ia64-es-3:
11:34:33 . rhel-ia64-es-3-gfs-6 77
11:34:33 . rhel-ia64-es-3-fastrack 61
11:34:33 . rhel-ia64-es-3-devsuite 4
11:34:33 . rhel-3-es-ia64-rhds-2 27
11:34:33 . rhn-tools-rhel-3-es-ia64 1239
11:34:33 . rhel-ia64-es-3-extras 116
11:34:33 . rhel-ia64-es-3-cluster 29
11:34:33 rhel-ia64-es-4:
11:34:33 . rhel-ia64-es-4-extras 126
11:34:33 . rhn-tools-rhel-4-es-ia64 1256
11:34:33 . rhel-4-es-ia64-rhds-3 145
11:34:33 . rhel-4-es-ia64-rhds-2.1 15
11:34:33 . rhel-ia64-es-4-cluster 327
11:34:33 . rhel-ia64-es-4-fastrack 304
11:34:33 . rhel-ia64-es-4-gfs-6.1 255
11:34:33 rhel-ia64-server-5:
11:34:33 . rhel-ia64-server-hts-5 14
11:34:33 . rhel-ia64-server-vt-5 169
11:34:33 . rhel-ia64-server-cluster-5 129
11:34:33 . rhn-tools-rhel-ia64-server-5 421
11:34:33 . rhel-ia64-server-cluster-storage-5 154
11:34:33 . rhel-ia64-server-supplementary-5 102
11:34:33 . rhel-ia64-server-fastrack-5 183
11:34:33 rhel-ia64-ws-3:
11:34:33 . rhel-ia64-ws-3-devsuite 3
11:34:33 . rhel-ia64-ws-3-extras 116
11:34:33 . rhn-tools-rhel-3-ws-ia64 1239
11:34:33 . rhel-ia64-ws-3-cluster 29
11:34:33 . rhel-ia64-ws-3-fastrack 60
11:34:33 . rhel-ia64-ws-3-gfs-6 77
11:34:33 . rhel-3-ws-ia64-rhds-2 27
11:34:33 rhel-ia64-ws-4:
11:34:33 . rhel-4-ws-ia64-rhds-2.1 15
11:34:33 . rhel-ia64-ws-4-fastrack 300
11:34:33 . rhel-4-ws-ia64-rhds-3 145
11:34:33 . rhn-tools-rhel-4-ws-ia64 1256
11:34:33 . rhel-ia64-ws-4-gfs-6.1 255
11:34:33 . rhel-ia64-ws-4-cluster 327
11:34:33 . rhel-ia64-ws-4-extras 126
11:34:33 rhel-ppc-as-3:
11:34:33 . rhel-3-as-ppc-rhds-2 25
11:34:33 . rhel-ppc-as-3-extras 100
11:34:33 . rhel-ppc-as-3-hwcert 16
11:34:33 . rhel-ppc-as-3-fastrack 61
11:34:33 . rhn-tools-rhel-3-as-ppc 15
11:34:33 rhel-ppc-as-4:
11:34:33 . rhel-ppc-as-4-hwcert 33
11:34:33 . rhel-4-as-ppc-rhds-3 169
11:34:33 . rhel-ppc-as-4-extras 308
11:34:33 . rhel-4-as-ppc-rhds-2.1 15
11:34:33 . rhel-ppc-as-4-fastrack 302
11:34:33 . rhel-ppc-as-4-gfs-6.1 186
11:34:33 . rhn-tools-rhel-4-as-ppc 31
11:34:33 . rhel-ppc-as-4-cluster 201
11:34:33 rhel-ppc-server-5:
11:34:33 . rhel-ppc-server-supplementary-5 381
11:34:33 . rhel-ppc-server-cluster-storage-5 73
11:34:33 . rhn-tools-rhel-ppc-server-5 32
11:34:33 . rhel-ppc-server-cluster-5 80
11:34:33 . rhel-ppc-server-hts-5 14
11:34:33 . rhel-ppc-server-fastrack-5 231
11:34:33 rhel-x86_64-as-3:
11:34:33 . rhel-x86_64-as-3-gfs-6 165
11:34:33 . rhel-x86_64-as-3-fastrack 60
11:34:33 . rhel-x86_64-as-3-hwcert 9
11:34:33 . rhel-x86_64-as-3-cluster 29
11:34:33 . rhel-x86_64-as-3-extras 112
11:34:33 . rhel-x86_64-as-3-devsuite 2
11:34:33 . rhn-tools-rhel-3-as-x86_64 1450
11:34:33 rhel-x86_64-as-4:
11:34:33 . rhel-x86_64-as-4-appstk-1 546
11:34:33 . rhel-x86_64-as-4-fastrack 312
11:34:33 . rhel-x86_64-as-4-hwcert 25
11:34:33 . rhel-x86_64-as-4-mrg-management-1 0
11:34:33 . rhel-x86_64-as-4-mrg-messaging-base-1 68
11:34:33 . rhel-x86_64-as-4-extras 370
11:34:33 . rhel-x86_64-as-4-rhcmsys-7.3 109
11:34:33 . rhel-x86_64-as-4-rhcmsys-7.2 100
11:34:33 . rhel-x86_64-as-4-gfs-6.1 535
11:34:33 . rhel-x86_64-as-4-mrg-messaging-1 151
11:34:33 . rhel-x86_64-as-4-rhdirserv-8 58
11:34:33 . rhel-x86_64-as-4-sdk 1
11:34:33 . redhat-rhn-proxy-5.2-as-x86_64-4 94
11:34:33 . rhel-x86_64-as-4-cluster 532
11:34:33 . rhel-4-as-x86_64-rhds-3 163
11:34:33 . redhat-rhn-proxy-5.3-as-x86_64-4 78
11:34:33 . rhn-tools-rhel-4-as-x86_64 1321
11:34:33 . redhat-rhn-proxy-5.1-as-x86_64-4 110
11:34:33 . rhel-x86_64-as-4-mrg-grid-1 52
11:34:33 . rhel-4-as-x86_64-rhds-2.1 15
11:34:33 rhel-x86_64-client-5:
11:34:33 . rhel-x86_64-client-workstation-5 3517
11:34:33 . rhel-x86_64-client-workstation-fastrack-5 77
11:34:33 . rhel-x86_64-client-fastrack-5 157
11:34:33 . rhn-tools-rhel-x86_64-client-5 422
11:34:33 . rhel-x86_64-client-vt-5 254
11:34:33 . rhel-x86_64-client-supplementary-5 634
11:34:33 rhel-x86_64-desktop-3:
11:34:33 . rhn-tools-rhel-3-desktop-x86_64 1427
11:34:33 . rhel-x86_64-desktop-3-extras 89
11:34:33 . rhel-x86_64-desktop-3-fastrack 59
11:34:33 . rhel-x86_64-desktop-3-devsuite 4
11:34:33 rhel-x86_64-es-3:
11:34:33 . rhel-x86_64-es-3-gfs-6 165
11:34:33 . rhel-x86_64-es-3-extras 112
11:34:33 . rhel-x86_64-es-3-cluster 29
11:34:33 . rhel-x86_64-es-3-fastrack 60
11:34:33 . rhel-x86_64-es-3-devsuite 4
11:34:33 . rhn-tools-rhel-3-es-x86_64 1450
11:34:33 rhel-x86_64-es-4:
11:34:33 . rhel-4-es-x86_64-rhds-2.1 15
11:34:33 . rhel-x86_64-es-4-cluster 532
11:34:33 . rhel-x86_64-es-4-mrg-messaging-base-1 68
11:34:33 . rhel-x86_64-es-4-mrg-management-1 0
11:34:33 . rhel-x86_64-es-4-rhcmsys-7.3 109
11:34:33 . rhel-x86_64-es-4-rhcmsys-7.2 100
11:34:33 . rhel-x86_64-es-4-rhdirserv-8 58
11:34:33 . rhel-x86_64-es-4-appstk-1 546
11:34:33 . rhel-x86_64-es-4-fastrack 312
11:34:33 . rhel-x86_64-es-4-mrg-messaging-1 151
11:34:33 . rhel-x86_64-es-4-extras 370
11:34:33 . rhel-x86_64-es-4-mrg-grid-1 52
11:34:33 . rhel-x86_64-es-4-gfs-6.1 535
11:34:33 . rhel-4-es-x86_64-rhds-3 145
11:34:33 . rhn-tools-rhel-4-es-x86_64 1318
11:34:33 . rhel-x86_64-es-4-sdk 1
11:34:33 rhel-x86_64-server-5:
11:34:33 . rhel-x86_64-server-fastrack-5 230
11:34:33 . rhel-x86_64-server-5-mrg-management-1 9
11:34:33 . rhel-x86_64-server-5-appstk-2 439
11:34:33 . rhel-x86_64-server-5-mrg-messaging-base-1 72
11:34:33 . redhat-rhn-proxy-5.2-server-x86_64-5 89
11:34:33 . rhel-x86_64-server-5-rhcmsys-8 72
11:34:33 . rhel-x86_64-server-vt-5 254
11:34:33 . rhel-x86_64-server-cluster-5 129
11:34:33 . rhel-x86_64-server-5-mrg-grid-1 72
11:34:33 . redhat-rhn-proxy-5.3-server-x86_64-5 77
11:34:33 . rhn-tools-rhel-x86_64-server-5 425
11:34:33 . rhel-x86_64-server-5-mrg-messaging-1 132
11:34:33 . rhel-x86_64-server-supplementary-5 689
11:34:33 . rhel-x86_64-server-5-mrg-realtime-1 155
11:34:33 . rhel-x86_64-server-cluster-storage-5 154
11:34:33 . rhel-x86_64-server-5-rhdirserv-8 35
11:34:33 . rhel-x86_64-server-productivity-5 1213
11:34:33 . rhel-x86_64-server-hts-5 14
11:34:33 . rhel-x86_64-server-5-rhcmsys-7.3 0
11:34:33 rhel-x86_64-ws-3:
11:34:33 . rhel-x86_64-ws-3-devsuite 2
11:34:33 . rhel-x86_64-ws-3-extras 112
11:34:33 . rhel-x86_64-ws-3-cluster 29
11:34:33 . rhel-x86_64-ws-3-fastrack 59
11:34:33 . rhn-tools-rhel-3-ws-x86_64 1450
11:34:33 . rhel-x86_64-ws-3-gfs-6 165
11:34:33 rhel-x86_64-ws-4:
11:34:33 . rhel-x86_64-ws-4-gfs-6.1 535
11:34:33 . rhel-x86_64-ws-4-cluster 532
11:34:33 . rhel-4-ws-x86_64-rhds-2.1 15
11:34:33 . rhn-tools-rhel-4-ws-x86_64 1318
11:34:33 . rhel-x86_64-ws-4-sdk 1
11:34:33 . rhel-x86_64-ws-4-fastrack 307
11:34:33 . rhel-4-ws-x86_64-rhds-3 145
11:34:33 . rhel-x86_64-ws-4-extras 370
11:34:33 severn-beta2-i386:
11:34:33 . severn-beta2-i386-updates 1878
11:34:33 solaris-sparc-9:
11:34:33 . solaris-sparc-9-rhdirserv-7.1 0
11:34:33 . solaris-sparc-9-rhcmsys-7.2 0
11:34:33 . solaris-sparc-9-rhdirserv-8 0
11:34:33 . solaris-sparc-9-rhcmsys-7.3 0
11:34:33 . solaris-sparc-9-rhcmsys-7.1 0
11:34:33
Import complete:
Begin time: Sat Dec 26 11:32:55 2009
End time: Sat Dec 26 11:34:33 2009
Elapsed: 0 hours, 1 minutes, 38 seconds
[root@satellite ~]#satellite-sync -c rhel-x86_64-server-5
[root@satellite ~]# satellite-sync -c rhel-x86_64-server-vt-5
[root@satellite ~]# satellite-sync -c rhn-tools-rhel-x86_64-server-5
[root@satellite ~]# satellite-sync
[root@satellite ~]# yum install rhncfg*
[root@satellite ~]# rhn_check
[root@satellite ~]# rhn-actions-control –enable-all
Client Side:
Download the SSL cert to the client:
#cd /usr/share/rhn/
#wget http://rajat.yeswedeal.com/pub/RHN-ORG-TRUSTED-SSL-CERT
Edit the /etc/sysconfig/rhn/up2date file
#vi /etc/sysconfig/rhn/up2date
serverURL=https://rajat.yeswedeal.com/XMLRPC
noSSLServerURL=http://rajat.yeswedeal/XMLRPC
sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
Server Side:Activate Key
Log in to your RHN account or Satellite server as a user with administrative
privileges
Go to systems -> activation keys -> + Create New Key
select universal
Client Side:
#rhn_register
Before resistering the system rename systemID
#mv /etc/sysconfig/rhn/systemID /etc/sysconfig/rhn/systemID.orig
#yum update
# yum install rhncfg*
# rhn_check
# rhn-actions-control --enable-all
For Custom Channel Importing
Server Side:
#useradd rajat
#passwd rajat
Creating the GPG Key and Signing the Package:
#gpg –gen-key
select RSA
#gpg –fingerprint
#gpg --export --armor > /var/www/html/pub/CUSTOM-GPG-KEY
Then edit/create the ~/.rpmmacros file to have:
#vi ~/.rpmmacros
%_signature gpg
%_gpg_name rajat (good) < rajat@yeswedeal.com >
Client Side:
#rpm --import http://rajat.yeswedeal.com/pub/CUSTOM-GPG-KEY
Server Side:
Create the Channel
1.Goto channel tab
2.Manage Software channels
3.Create new channel
4. Use http://rajat.yeswedeal.com/pub/CUSTOM-GPG-KEY for the Key Location
5.Save channel
Popluating the Channel:
To populate the channel, run the following command from the satellite
#rpm --resign vsftpd-2.0.5-12.el5.x86_64.rpm
#rhnpush --channel repository --server rajat.yeswedeal.com vsftpd-2.0.5-
12.el5.x86_64.rpm
Client Side:
#yum clean all
#yum update
#yum install vsftpd-2.0.5-12.el5.x86_64.rpm

Monday, December 20, 2010

How to configure kickstart with remote installation RedHat /CentOs

###KickStart [Unattended Installation]###
Kickstart helps to install system unattended. It uses kickstart configuration file and dhcp service for this.
In windows systems kickstart file is known as answer file.

###These are the steps happening.###
Server[dhcp+ks] client
1. asks IP and location of kickstart file
2.gives the info
3. Takes the ks.cfg file and mounts share of OS

###dhcp [nfs/ftp/http] + ks.cfg [nfs]###
The dhcp is using for getting IP for the client machine at first for instation and to get the location of Ks.cfg file. The remote installation image can be of NFS,HTTP or FTP. The kickstar file will be shared using NFS.

###KickStart Configuration###
package = system-config-kickstart
#yum -y install system-config-kickstart
#system-config-kickstart


Basic configuration
Default Language = English USA
Keyboard = U S English
Time Zone = Asia/Culcutta
Root Password = redhat
Confirm Password = redhat
check the encryption box
Target Architecture = x86,AMD64 or Intel EM64T
Check the reboot checkbox

Installation Method
Installaton method = Perform new installation
Choose the Installation Method = NFS //You can use HTTP or FTP if you want
NFS server = IP of the machine which contains NFS image of DVD
NFS directory = Path of NFS share

Boot Loader options
Install New Boot Loader
Use GRUB password if required
Install boot loader on MBR

Partition Information
Do not clear MBR
Remove all exisiting partitions //Removing linux partitions only wont work all time. Windows partitions will be deleted.
click add button and configure as required

Network Configuration
Click Add Network Devices button
Select the network device which is connected to ur machine
network type = DHCP or STATIC [manual]

Authentication
Authentication Configuration
check use shadow passwords
check use MD5

Firewall Configuration
Firewall Configuration
Security level = Disable firewall
SELinux = Disabled

Display Configuration
Check Configure the x-window system
In General Tab
Color Depth Resolution
8 1024*768 //Default 640*480 will give a blurred image
Default Desktop
Check Gnome
Check Start X window system on Boot

package selection
Nothing to do //We will add package lines

Pre-Installation Script
Add if wanted

Post-Installation Script
Add if wanted

Configuration over. Save the file. Open the file for further editing.
#vi ks.cfg

Add these lines - Otherwise it wont work.
key --skip
%packages

And these lines for Graphics

@admin-tools
@base
@base-x
@core
@dialup
@editors
@games
@gnome-desktop
@graphical-internet
@graphics
@java
@office
@printing
@sound-and-video
@text-internet

###Make it as NFS share###
copy the ks.cfg file to some dir and share it via NFS

#mkdir /kick
#cp ks.cfg /kick/


#vi /etc/exports
/kick *()

#exportfs -a

###DHCP Configuration###
Add these lines to DHCP Configuration file
#vi /etc/dhcpd.conf

filename "/kick/ks.cfg";
next-server 192.168.1.11; // [ip of the machine which contains kickstart file(ks.cfg)]

#service dhcpd restart
#service nfs restart

###Installation###

#Boot: linux ks
Have a break. The system will be ready when you get back!

Samba PDC domain controller on RedHat /Cent OS

Samba PDC is used for centralized authentication and domain control of Windows
operating systems.

Here we will set a samba PDC machine with domain name lap.work and create some
users. And we will check whether these users are able to login to this domain from different
machines.

In this example we are working on rhel5. It will also work on other distributions like RedHat, Centos, Fedora, etc.

Samba PDC Machine:
rhel 5.4
IP : 192.168.0.1

Windows Client:
Windows  XP Professional SP2
Computer Name : lap-xp
Domain Name : lap.work
IP : 192.168.0.2

Installation:

Install samba packages:
[root@sambapdc ~]# yum install samba*

Configuration:

open the samba configuration file and make the following edits.
[root@sambapdc ~]# vim /etc/samba/smb.conf

Uncomment or edit the lines as shown below.

In global settings:

workgroup = lap.work #domain name
server string = Samba PDC Server #as host name. just to identify
netbios name = samba #netbios name for communication
local master = yes
preferred master = yes
domain master = yes
domain logons = yes
logon path = \\%L\Profiles\%U #profile entry
security = user
passdb backend = tdbsam

In share definishions:

[homes]
browseable = yes
writable = yes

[netlogon]
path = /home/netlogon
writable = no

[Profiles]
path = /home/profiles
create mask = 0755
directory mask = 0755
writable = yes #should give. Else you will get ACCESS DENIED errors

Now create the following directories:

[root@sambapdc ~]# mkdir -m 1777 /home/profiles
[root@sambapdc ~]# mkdir -m 1777 /home/netlogon

Attaching a windows machine:

Now create a group named machine and add a user with the name of windows client
[root@sambapdc ~]# groupadd -g 200 machine
[root@sambapdc ~]# useradd -d /dev/null -g 200 -s /sbin/nologin lap-xp$
Where lap-xp is the name of the machine we are attaching to samba PDC
[root@sambapdc ~]# smbpasswd -m -a lap-xp

Start the samba service:

[root@sambapdc ~]# service smb start
[root@sambapdc ~]# chkconfig smb on
Run testparm and test your configuration settings:
[root@sambapdc ~]# testparm
[root@sambapdc ~]# smbpasswd -a root
[root@sambapdc ~]# smbpasswd -e root

Add two more users for testing:

#useradd user1
#smbpasswd -a user1
#smbpasswd -e user
#useradd user2
#smbpasswd -a user2
#smbpasswd -e user2
[root@sambapdc ~]# service smb restart

On windows machine:

Right click the My Computer icon
Take properties
Take Computer name tab
Add the system to lap.work domain
you will be prompted for a username and password. Give root and its password.
System may need to restart

you can see that when we are logged as user1 a directory user1 will be created in /home/profiles
in samba PDC machine. This will be the home directory of that user. He will he able to login
from all machines in this domain and will be getting to this same directory.

:)

RedHat /Cent OS/ Fedora/ Ubuntu TOP command


TOP

Top command provides a real-time look at what is happening with your system. Top produces so much output that a new user may get over whelmed with all thats presented and what it means.
Lets take a look at TOP one line at a time. The server has been flooded with http requests to create some load on the server.
top output:
top - 22:09:08 up 14 min,  1 user,  load average: 0.21, 0.23, 0.30
Tasks:  81 total,   1 running,  80 sleeping,   0 stopped,   0 zombie
Cpu(s):  9.5%us, 31.2%sy,  0.0%ni, 27.0%id,  7.6%wa,  1.0%hi, 23.7%si,  0.0%st
Mem:    255592k total,   167568k used,    88024k free,    25068k buffers
Swap:   524280k total,        0k used,   524280k free,    85724k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 3166 apache    15   0 29444 6112 1524 S  6.6  2.4   0:00.79 httpd
 3161 apache    15   0 29444 6112 1524 S  5.9  2.4   0:00.79 httpd
 3164 apache    15   0 29444 6112 1524 S  5.9  2.4   0:00.75 httpd
 3169 apache    15   0 29444 6112 1524 S  5.9  2.4   0:00.74 httpd
 3163 apache    15   0 29444 6112 1524 S  5.6  2.4   0:00.76 httpd
 3165 apache    15   0 29444 6112 1524 S  5.6  2.4   0:00.77 httpd
 3167 apache    15   0 29444 6112 1524 S  5.3  2.4   0:00.73 httpd
 3162 apache    15   0 29444 6112 1524 S  5.0  2.4   0:00.77 httpd
 3407 root      16   0  2188 1012  816 R  1.7  0.4   0:00.51 top
  240 root      15   0     0    0    0 S  0.3  0.0   0:00.08 pdflush
  501 root      10  -5     0    0    0 S  0.3  0.0   0:01.20 kjournald
 2794 root      18   0 12720 1268  560 S  0.3  0.5   0:00.73 pcscd
    1 root      15   0  2060  636  544 S  0.0  0.2   0:03.81 init
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0
    4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0
    5 root      10  -5     0    0    0 S  0.0  0.0   0:00.07 events/0
The first line in top:
top - 22:09:08 up 14 min,  1 user,  load average: 0.21, 0.23, 0.30
“22:09:08″ is the current time; “up 14 min” shows how long the system has been up for; “1 user” how many users are logged in; “load average: 0.21, 0.23, 0.30″ the load average of the system (1minute, 5 minutes, 15 minutes).
Load average is an extensive topic and to understand its inner workings can be daunting. The simplest of definitions states that load average is the cpu utilization over a period of time. A load average of 1 means your cpu is being fully utilized and processes are not having to wait to use a CPU. A load average above 1 indicates that processes need to wait and your system will be less responsive. If your load average is consistently above 3 and your system is running slow you may want to upgrade to more CPU’s or a faster CPU.
The second line in top:
Tasks:  82 total,   1 running,  81 sleeping,   0 stopped,   0 zombie
Shows the number of processes and their current state.
The third lin in top:
Cpu(s):  9.5%us, 31.2%sy,  0.0%ni, 27.0%id,  7.6%wa,  1.0%hi, 23.7%si,  0.0%st
Shows CPU utilization details. “9.5%us” user processes are using 9.5%; “31.2%sy” system processes are using 31.2%; “27.0%id” percentage of available cpu; “7.6%wa” time CPU is waiting for IO.
When first analyzing the Cpu(s) line in top look at the %id to see how much cpu is available. If %id is low then focus on %us, %sy, and %wa to determine what is using the CPU.
The fourth and fifth lines in top:
Mem:    255592k total,   167568k used,    88024k free,    25068k buffers
Swap:   524280k total,        0k used,   524280k free,    85724k cached
Describes the memory usage. These numbers can be misleading. “255592k total” is total memory in the system; “167568K used” is the part of the RAM that currently contains information; “88024k free” is the part of RAM that contains no information; “25068K buffers and 85724k cached” is the buffered and cached data for IO.
So what is the actual amount of free RAM available for programs to use ?
The answer is: free + (buffers + cached)
88024k + (25068k + 85724k) = 198816k
How much RAM is being used by progams ?
The answer is: used – (buffers + cached)
167568k – (25068k + 85724k) = 56776k
The processes information:
Top will display the process using the most CPU usage in descending order. Lets describe each column that represents a process.
 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
3166 apache    15   0 29444 6112 1524 S  6.6  2.4   0:00.79 httpd
PID – process ID of the process
USER – User who is running the process
PR – The priority of the process
NI – Nice value of the process (higher value indicates lower priority)
VIRT – The total amount of virtual memory used
RES – Resident task size
SHR – Amount of shared memory used
S – State of the task. Values are S (sleeping), D (uninterruptible sleep), R (running), Z(zombies), or (stopped or traced)
%CPU – Percentage of CPU used
%MEM – Percentage of Memory used
TIME+ – Total CPU time used
COMMAND – Command issued

Interacting with TOP

Now that we are able to understand the output from TOP lets learn how to change the way the output is displayed.
Just press the following key while running top and the output will be sorted in real time.
M – Sort by memory usage
P – Sort by CPU usage
T – Sort by cumulative time
z – Color display
k – Kill a process
q – quit
If we want to kill the process with PID 3161, then press “k” and a prompt will ask you for the PID number, and enter 3161.

Command Line Parameters with TOP

You can control what top displays by issuing parameters when you run top.
- d – Controls the delay between refreshes
- p – Specify the process by PID that you want to monitor
-n – Update the display this number of times and then exit
If we want to only monitor the http process with a PID of 3166
$ top -p 3166
If we want to change the delay between refreshes to 5 seconds
$ top -d 5

Thursday, December 9, 2010

Howto Convert Ext3 filesystem to Ext4 Filesystem without Reinstalling OS in Fedora/CentOS/Ubuntu

Things to remember

  • Unmount the filesystem before convert
  • Filesystem must be non-root
This way you can improve the performance, storage limits and features of your existing filesystem without reformatting and/or reinstalling your OS and softwares.
First, unmount the partition: umount /dev/sda2 (change sda2 with your Drive)
Next, run a filesystem check on it to make sure it is in sane condition.
fsck.ext3 -pf /dev/sda2
Enable new features of ext4 on the filesystem
tune2fs -O extents,uninit_bg,dir_index  /dev/sda2
Run a filesystem check. to make sure that the filesystem is now clean.
fsck -pf /dev/sda2
Now edit your /etc/fstab file and replace "ext3" with "ext4" for /dev/sda1. Other options may differ for your system.
/dev/sda2  /disk ext4 defaults 0 2
Try to mount your new ext4 filesystem: mount /disk

Sunday, December 5, 2010

Create your own Forums on Cent OS AMIs

[ec2-user@ip-10-112-7-1 ~]$ sudo yum install  mysql mysql-server httpd php php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc phpmyadmin

[ec2-user@ip-10-112-7-1 ~]$ sudo service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd:                                            [  OK  ]
[ec2-user@ip-10-112-7-1 ~]$ sudo service mysqld restart
Stopping mysqld:                                           [  OK  ]
Initializing MySQL database:  Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h ip-10-112-7-1 password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

                                                           [  OK  ]
Starting mysqld:                                           [  OK  ]

[ec2-user@ip-10-112-7-1 ~]$ wget http://vanillaforums.org/uploads/addons/LABOJ70HFYO0.zip
--2010-12-06 05:41:39--  http://vanillaforums.org/uploads/addons/LABOJ70HFYO0.zip
Resolving vanillaforums.org... 67.23.13.227
Connecting to vanillaforums.org|67.23.13.227|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2977490 (2.8M) [application/zip]
Saving to: “LABOJ70HFYO0.zip”

100%[======================================>] 2,977,490   3.36M/s   in 0.8s  

2010-12-06 05:41:40 (3.36 MB/s) - “LABOJ70HFYO0.zip” saved [2977490/2977490]

[ec2-user@ip-10-112-7-1 ~]$ unzip LABOJ70HFYO0.zip -d /var/www/html





Thursday, December 2, 2010

Backup and Restore a Subversion Repository

First, here's how back up the repository to a compressed file:
$ svnadmin dump /path/to/repo | gzip > backup.gz
And how to restore it:
$ gunzip -c backup.gz | svnadmin load /path/to/repo
 
Those commands are meant for UNIX or Linux so you will have to adapt 
them if you are running Windows. It shouldn't be too difficult to do so,
 especially if you are using Cygwin.

Wednesday, December 1, 2010

What is the difference between Hard Link and Soft Link in Linux

Hard link: Hard link refers to "The specific location of physical data".
  • Hard Link is a mirror copy of the original file.
  • Hard links share the same inode.
  • Any changes made to the original or Hard linked file will reflect the other.
  • Even if you delete any one of the files, nothing will happen to the other hard links.
  • But soft link which points to deleted hard link become a dangling soft link.
  • You can't link a directory even within the same file system.
  • Hard links can't cross file systems.
Soft link( also called symbolic link): Soft link refers to "A symbolic path indicating the abstract location of another file".
  • Soft Link is a symbolic link to the original file.(more like windows shortcuts)
  • Soft Links will have a different Inode value.
  • Any changes made to the soft link will reflect the original file and its hard links.
  • A soft link points to the original file. If you delete the original file, the soft link fails. It would become dangling symbolic link.
  • If you delete the soft link, nothing will happen.
  • You can link a directory using soft link on same file system and also on other file system.
  • Soft links can cross file systems

Hindi FM Live Radio Internet Streaming Online

More List of Hindi Internet Radio Stations Online

Bare Metal Recovery Solution Mondo Backup

Here's an interesting alternative to using CloneZilla and the likes for Bare Metal Recovery:

Mondo Rescue is a free (GPL) powerful disaster recovery suite for Linux (i386, x86_64, ia64) and FreeBSD (i386). It's packaged for multiple distributions (RedHat, RHEL, SuSE, SLES, Mandriva, Debian, Gentoo). It's basically the Linux equivalent of the powerful AIX mkcd / mkdvd.

It supports backups to tapes, disks, network and CD/DVD. It also supports multiple filesystems (ext2, ext3, JFS, XFS, ResierFS, VFAT and even NTFS), LVM, software and hardware Raid.

Example of using Mondo Rescue:

Generate a bootable DVD that also backs up /etc and can recover files running mondorestore:
# mondoarchive -OVr -d /dev/dvd -9 -I /etc -gF
Another interesting tool worth checking out is System Imager (automates Linux installs).

Tuesday, November 30, 2010

Configuring Sendmail RedHat /CentOS/Fedora

Configuring it is very simple. First you'll need the sendmail-cf package. Install it using yum:
[root@mail-server ~]# yum install sendmail-cf
Edit the file /etc/mail/sendmail.mc and add the following lines. Make sure you set your mail server domain name where it's bolded:
MASQUERADE_AS(yourdomain.com)dnl
MASQUERADE_DOMAIN(yourdomain.com)dnl
In the same file /etc/mail/sendmail.mc remove the "dnl" from the beginning of the lines so it will look like this:
LOCAL_DOMAIN(`localhost.localdomain')dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
Save the file and compile it using m4:
[root@mail-server ~]# m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
Send Sendmail a -HUP signal using kill or simply restart the daemon for the configuration changes to take effect:
[root@mail-server ~]# service sendmail restart

Testing your configuration using sendmail

And that's it! you're done. Just send yourself a test email to make sure it is really working:
[root@mail-server ~]# /usr/sbin/sendmail -t < mail.txt
Where the contents of the mail.txt file are:
Date: Wed Dec 1 08:41:54 2010
To: you@somewhere.com
Subject: The subject of the message
From: whatever@somewhere.com
Body of message goes here

Testing your configuration using mutt

You can also use mutt to test, which is a bit simpler (and you can also add the -a parameter for file attachment):
[root@mail-server ~]# mutt -s "Test Email" you@somewhere.com < /dev/null

Tuesday, November 23, 2010

Creating an ISO from a DVD MAC

From within Terminal (Applications->Utilities->Terminal)


You can determine the device that is you CD/DVD drive using the following command:

drutil status




Vendor   Product           Rev 
 MATSHITA DVD-R   UJ-875    DB09


           Type: DVD-R                Name: /dev/disk1
       Sessions: 1                  Tracks: 1 
   Overwritable:   00:00:00         blocks:        0 /   0.00MB /   0.00MiB
     Space Free:   00:00:00         blocks:        0 /   0.00MB /   0.00MiB
     Space Used:  425:20:48         blocks:  1914048 /   3.92GB /   3.65GiB
    Writability: 
      Book Type: DVD-R (v5)
       Media ID: SONY16D1
Now you will need to umount the disk with the following command:

diskutil unmountDisk disk1

Now you can write the ISO file with the dd utility:

dd if=/dev/disk1 of=dvd.iso

When finished you will want to remount the disk:

diskutil mountDisk disk1

Tuesday, November 16, 2010

Find WWN’s on RedHat /Cent OS

To find port and node WWN’s while the system is running:
  • 2.4.x Kernels
    > cat /proc/scsi/[hba_type]/(n)
    where hba_type is the driver (e.g. lpfc for Emulex) and (n) is the HBA number.
  • 2.6.x Kernels:
    > cat /sys/class/scsi_host/host(n)/[port_name|node_name]
    Hosts with multiple HBAs are enumerated via host(n) (e.g host0).
You can use lsmod to determine which driver is in use.

:)

Automated Bankup for Postgrsql

#! /bin/bash
# backup-postgresql.sh
# this script is public domain.  feel free to use or modify as you like.

DUMPALL=”/usr/bin/pg_dumpall”
PGDUMP=”/usr/bin/pg_dump”
PSQL=”/usr/bin/psql”

# directory to save backups in, must be rwx by postgres user
BASE_DIR=”/var/backups/postgres”
YMD=$(date “+%Y-%m-%d”)
DIR=”$BASE_DIR/$YMD”
mkdir -p $DIR
cd $DIR

# get list of databases in system , exclude the tempate dbs
DBS=$($PSQL -l -t | egrep -v ‘template[01]‘ | awk ‘{print $1}’)

# first dump entire postgres database, including pg_shadow etc.
$DUMPALL -D | gzip -9 > “$DIR/db.out.gz”

# next dump globals (roles and tablespaces) only
$DUMPALL -g | gzip -9 > “$DIR/globals.gz”

# now loop through each individual database and backup the schema and data separately
for database in $DBS; do
SCHEMA=$DIR/$database.schema.gz
DATA=$DIR/$database.data.gz

# export data from postgres databases to plain text
$PGDUMP -C -c -s $database | gzip -9 > $SCHEMA

# dump data
$PGDUMP -a $database | gzip -9 > $DATA
done

# delete backup files older than 30 days
OLD=$(find $BASE_DIR -type d -mtime +30)
if [ -n "$OLD" ] ; then
echo deleting old backup files: $OLD
echo $OLD | xargs rm -rfv
fi