Posts tagged with repository

Avatar-eric-london
Created by Eric.London on 2011-10-28
Tags:
New Comment
 
Please note: the content on this page orginates from ericlondon.com.
Here's a quick linux command to show all the packages you have installed (on RPM based systems, like RHEL and Centos) and what repository they came from. NOTE: the "sort" command sorts the packages by name, and the "column" command outputs the list in a neatly formatted tab delimited display in your terminal.


$ rpm -qa --qf '%{NAME} %{VENDOR}\n' | sort | column -t


Sample output:

$ rpm -qa --qf '%{NAME} %{VENDOR}\n' | sort | column -t | head
acl                                  CentOS
acpid                                CentOS
alsa-lib                             CentOS
amtu                                 CentOS
anacron                              CentOS
ant                                  JPackage  Project
antlr                                JPackage  Project
apr                                  CentOS
apr                                  CentOS
apr-util                             CentOS


And if you wanted to see all packages that came from external (non-Centos) repositories:

$ rpm -qa --qf '%{NAME} %{VENDOR}\n' | sort | column -t | grep -iv Centos
Avatar-eric-london
Created by Eric.London on 2011-06-10
Tags:
New Comment
 
Please note: the content on this page orginates from ericlondon.com.
When Centos came out with php53* packages, I promptly upgraded to test them out. I did not get around to installing PECL and memcache until recently, and soon realized they were no longer available. This article shows how I was able to install PECL and memcache on a Centos (5.6) system using the IUS repository.

Since I am running the php53* packages, the provided php-pecl-memcache package is not compatible. Checking what PECL packages are available:

$ yum list | grep -i ^php.*pecl
php-pecl-Fileinfo.x86_64                 1.0.4-3.el5.centos     extras          
php-pecl-fileinfo.x86_64                 1.0.4-2.el5.rf         rpmforge        
php-pecl-http.x86_64                     1.6.5-2.el5.rf         rpmforge        
php-pecl-mailparse.x86_64                2.1.5-2.el5.rf         rpmforge        
php-pecl-memcache.x86_64                 2.2.5-2.el5.rf         rpmforge        
php-pecl-session_mysql.x86_64            1.9-2.el5.rf           rpmforge        
php-pecl-ssh2.x86_64                     0.11.0-1.el5.rf        rpmforge        
php-pecl-zip.x86_64                      1.8.10-2.el5.rf        rpmforge        


I decided to try out the IUS repository which provides a new set of php53 packages, along with pecl and memcache.


# downloading packages
$ wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5.5/x86_64/ius-release-1.0-6.ius.el5.noarch.rpm
$ wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5.5/x86_64/epel-release-1-1.ius.el5.noarch.rpm

# installing packages
$ rpm -Uvh ius-release-1.0-6.ius.el5.noarch.rpm
$ rpm -Uvh epel-release-1-1.ius.el5.noarch.rpm


The IUS packages are also not compatible with the installed php53* packages, so I removed them and installed the new php53u* packages.


# checking which are currently installed
$ yum list | grep -i ^php.*installed
php53.x86_64                            5.3.3-1.el5_6.1         installed       
php53-cli.x86_64                        5.3.3-1.el5_6.1         installed       
php53-common.x86_64                     5.3.3-1.el5_6.1         installed       
php53-devel.x86_64                      5.3.3-1.el5_6.1         installed       
php53-gd.x86_64                         5.3.3-1.el5_6.1         installed       
php53-mbstring.x86_64                   5.3.3-1.el5_6.1         installed       
php53-mysql.x86_64                      5.3.3-1.el5_6.1         installed       
php53-pdo.x86_64                        5.3.3-1.el5_6.1         installed 

# removing existing:
$ yum remove php53*

# installing IUS packages:
$ yum install php53u php53u-cli php53u-common php53u-devel php53u-gd php53u-mbstring php53u-mysql php53u-pdo php53u-pear php53u-pecl-apc php53u-xml php53u-xmlrpc php53u-pecl-memcache


Next, I installed the memcached service.


# install
$ yum install memcached

# set run levels
$ chkconfig --level 2345 memcached on

# start service
$ /etc/init.d/memcached start


After installation, I restarted Apache and checked to ensure memcache was not working.


$ php -i | grep -i memcache\ support
memcache support => enabled


I created a tiny script to test for memcache support:

<?php
$memcache = new Memcache;
$memcache->connect('127.0.0.1', 11211);
print_r($memcache);
?>



$ php memcachetest.php
Memcache Object
(
    [connection] => Resource id #4
)


Now, my system is ready to begin work with the Memcache API and Integration Drupal module :)
Avatar-eric-london
Created by Eric.London on 2010-01-30
Tags:
New Comment
 
Please note: the content on this page orginates from ericlondon.com.
Here's an tutorial explaining how to merge a subversion branch back into trunk:



# First you'll need a local working copy of your trunk
$ cd /path/to/checkout/trunk
$ svn co https://HOSTNAME/repo/trunk .

# The above command will return the latest revision of the trunk
# which you'll need to remember for a later command. Example:
Checked out revision 76.

# If you already have a working copy of your trunk,
# running an "svn update" will set your repo to the latest revision
# and return the latest revision:
$ cd /path/to/checkout/trunk
$ svn update
At revision 76.

# Now, you'll need to find the revision when the branch was created:
$ svn log --stop-on-copy https://HOSTNAME/repo/branches/20091205 | tail -5
------------------------------------------------------------------------
r63 | eric | 2009-10-07 15:10:28 -0400 (Wed, 07 Oct 2009) | 1 line

Created branch.
------------------------------------------------------------------------

# Now that you know the latest trunk revision and the branch created revision,
# you can execute the merge on your local working copy of trunk
# NOTE: it would be a good idea to ensure you are not executing the merge
# in an active environment!
$ cd /path/to/checkout/trunk
$ svn merge -r 63:76 https://HOSTNAME/repo/branches/20091205 .

# NOTE: the revision range syntax is: "-r BRANCH:TRUNK"

# Now if you execute an "svn stat" command you'll see that all the changes from your branch have been applied to your working copy of trunk. Hopefully, there are no conflicts! Now you can review the changes, test your code, and commit.



If you need to merge some changes made to trunk into your branch, you could do the following:



# find the branch created revision:
$ svn log --stop-on-copy https://HOSTNAME/repo/branches/20091205 | tail -5
------------------------------------------------------------------------
r63 | eric | 2009-10-07 15:10:28 -0400 (Wed, 07 Oct 2009) | 1 line

Created branch.
------------------------------------------------------------------------

# find the latest revision of trunk:
$ svn info https://HOSTNAME/repo/trunk | grep -i ^Last\ Changed\ Rev
Last Changed Rev: 76

# from checked out local copy of branch:
$ svn merge -r 63:76 https://HOSTNAME/repo/trunk .




Avatar-eric-london
Created by Eric.London on 2009-09-15
Tags:
New Comment
 
Please note: the content on this page orginates from ericlondon.com.
When I got my new MacBook Pro, I installed Xcode which comes with subversion (version 1.6.x):

$ which svn
/usr/bin/svn

$ /usr/bin/svn --version | head -1
svn, version 1.6.2 (r37639)


After installing Xcode I checked out some repositories to my local filesystem. Soon afterward, I realized I needed to be running an older subversion client to stay compatible with some 1.5.x repositories, so I decided to install CollabNet's OSX subversion binary (registration is required for older releases).

After downloading and installing the package (which defaults to /opt/subversion/bin/svn), I edited the /etc/profile file to override priority of my $PATH variable (since I now had 2 versions of subversion installed):

# lines added to /etc/profile:
export PATH=/opt/subversion/bin:$PATH


Now, if I ran a "which" command for svn, the appropriate svn executable is returned:

$ which svn
/opt/subversion/bin/svn


Unfortunately, the subversion projects I checked out using Xcode's subversion were inaccessible due to differences in the .svn structure:

$ cd /path/to/my/1.6.x/repo

$ svn stat
svn: This client is too old to work with working copy '.'.  You need
to get a newer Subversion client, or to downgrade this working copy.
See http://subversion.tigris.org/faq.html#working-copy-format-change
for details.


Luckily, CollabNet has a downloadable python script which allows you to switch checked out repositories to different versions. I downloaded this file and copied it into /opt/subversion/bin.

I was now able to update/downgrade my repositories using this python script:

$ svn --version | head -1
svn, version 1.5.7 (r36142)

$ cd /path/to/my/1.6.x/repo

$ change-svn-wc-format.py . 1.5
Converted WC at '.' into format 9 for Subversion 1.5

Avatar-eric-london
Created by Eric.London on 2009-08-20
Tags:
New Comment
 
Please note: the content on this page orginates from ericlondon.com.
This morning, I encountered a PHP fatal error on my development environment. Upon further inspection, one of my third party modules (XML Sitemap) required a later version of PHP. A fresh installation of Centos 5.3 comes with version 5.1.6 of PHP. Here is an easy way to upgrade PHP to a later version by using the Utter Ramblings Yum repository.

I created a new yum repo file:

$ sudo emacs /etc/yum.repos.d/utterramblings.repo

# FILE CONTENTS - START
[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
# FILE CONTENTS - END


Ran a yum update:

$ sudo yum update
# ...snip...
Updated: apr.i386 0:1.2.12-2.jason.1 apr-util.i386 0:1.2.12-5.jason.1 curl.i386 0:7.15.5-2.1.el5_3.5 httpd.i386 0:2.2.8-jason.3 ksh.i386 0:20080202-2.el5_3.1 mod_ssl.i386 1:2.2.8-jason.3 mysql.i386 0:5.0.58-jason.2 mysql-server.i386 0:5.0.58-jason.2 pcre.i386 0:7.6-jason.1 php.i386 0:5.2.6-jason.1 php-cli.i386 0:5.2.6-jason.1 php-common.i386 0:5.2.6-jason.1 php-gd.i386 0:5.2.6-jason.1 php-mbstring.i386 0:5.2.6-jason.1 php-mssql.i386 0:5.2.6-jason.1 php-mysql.i386 0:5.2.6-jason.1 php-odbc.i386 0:5.2.6-jason.1 php-pdo.i386 0:5.2.6-jason.1 php-pear.noarch 1:1.6.2-1.jason.1 php-xml.i386 0:5.2.6-jason.1 php-xmlrpc.i386 0:5.2.6-jason.1 subversion.i386 0:1.4.4-jason.1 tzdata.noarch 0:2009k-1.el5
Complete!


After updating all these packages, I checked out my new PHP version:

$ php -v | head -1
PHP 5.2.6 (cli) (built: May  5 2008 10:32:59) 


Now, my PHP fatal error has been resolved.

NOTE: This blog entry is a re-post of a previous article.