YUM Download SRPM

yum Download All Source Packages (SRPM):

For some reason if My yum Repo is not working or I need new updated packages which are not in my repo:

yum Download All Source Packages (SRPM) From RedHat / CentOS WebSite

Install yum-utils
yum install yum-utils

Once installed, create a repo for SRPM as follows:
[root@masterdns ~]# vim /etc/yum.repos.d/srpm.repo

[rhel-src]
name=Red Hat Enterprise Linux $releasever – $basearch – Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Install php package:
[root@masterdns ~]# yumdownloader –source php
Loaded plugins: product-id, refresh-packagekit
rhel-src | 2.6 kB 00:00
rhel-src/primary_db | 2.0 MB 00:57
php-5.3.3-49.el6.src.rpm | 10 MB 03:53