Skip to content

Instantly share code, notes, and snippets.

@tegansnyder
Created January 29, 2014 16:11
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save tegansnyder/8691289 to your computer and use it in GitHub Desktop.
Save tegansnyder/8691289 to your computer and use it in GitHub Desktop.
Steps to install the SOLR PHP extension on RHEL. Installation is a little trickery because of how curl is built into PHP as a shared library and not statically compiled.
# install dependencies
sudo yum install curl-devel
sudo yum install libxml2-devel
# install extension for solr -- note use pear instead of pecl install
sudo pear install pecl/solr
# when it asks for libcURL path if you are on a 64bit machine
# change:
libcURL install prefix [/usr] : /usr/lib64
sudo chmod 755 /usr/lib64/php/modules/solr.so
sudo vi /etc/php.d/solr.ini
# add:
extension=solr.so
# restart apache
sudo service httpd restart
@tegansnyder
Copy link
Author

Note you might need to change the tmp dir of pear/pecl before running the pear install:

mkdir /root/tmp 
pecl config-set temp_dir /root/tmp
pear config-set temp_dir /root/tmp

@sheecegardezi
Copy link

pecl config-set temp_dir /root/tmp
or:
pear config-set temp_dir /root/tmp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment