Quick Install - Wiki format


#1

Guys,


Here are my instructions for quick install on CentOS (RH/Fedora will work too), including the recompile of PHP to support Kahona and the require configure options. Feel free to use, repost, etc.


Pablo


= Ushahidi
=


== Installation on CentOS
==


(See [http://wiki.ushahidi.com/doku.php?id=how_to_install_ushahidi wiki.ushahidi.com/doku.php] for more details)


Some SPRM rebuilding will be necessary, check [Rebuild RPM/SRPM] in this Wiki


=== Requirements
===


PHP >= 5.2.4 (--with-iconv --enable-mbstring --with-mcrypt)


mcrypt (--disable-posix-threads --enable-dynamic-loading)


HTTP server


MySQL server


The "CentOS-Testing" repository can be useful for this, it lives at [http://dev.centos.org/centos/5/testing/SRPMS/ dev.centos.org/centos/5/testing/SRPMS/]


=== Steps
===


Install dependencies


yum -y install curl-devel db4-devel expat-devel gmp-devel aspell-devel httpd-devel libpng-devel pam-devel 
openssl-devel sqlite-devel zlib-devel pcre-devel readline-devel krb5-devel libc-client-devel
cyrus-sasl-devel openldap-devel mysql-devel postgresql-devel unixODBC-devel libxml2-devel
net-snmp-devel libxslt-devel libxml2-devel ncurses-devel gd-devel freetype-devel mysql-server libmcrypt
libmcrypt-devel libtool-ltdl libtool-ltdl libtool-ltdl-devel bzip2-devel libstdc++-devel libtool gcc-c++

*'''Install the minimum software'''

*'''Edit the php.spec file and check that the required options are present'''


*'''Rebuild the PHP SRPMs to add the configuration options mentioned above (do this as a user)'''


rpmbuild -ba ~/rpmbuild/SPECS/php.spec

*'''When the rebuild is done, install the newly-created RPMs (32-bit/64-bit)'''


32bit: rpm -Uvh /home/[username]/rpmbuild/RPMS/i386/php*

64bit: rpm -Uvh /home/[username]/rpmbuild/RPMS/x86_64/php*

*'''Install the Ushahidi application tree'''

*'''Create a database'''


mysqladmin -p create ushahidi

*'''Create a database user'''


mysql -p -e 'grant all on ushahidi.* to ushahidi identified by "password"'

*'''Create the config directory'''


mkdir /var/www/html/[baseurl]/config/

*'''Set permissions'''


chown -R root.apache /var/www/html/[baseurl]
cd /var/www/html/[baseurl]
chmod -R g+w config/
chmod g+w application/config
chmod g+w application/logs
chmod g+w application/cache/

*'''Enable .htaccess to override the server configuration'''


vi /etc/httpd/conf.d/ushahidi.conf

And enter:



Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from All

*'''Restart the web server
'''

*'''Run the configuration script at http://[web server address]/ushahidi
'''

*'''Access the administrative  interface at http://[web server address]/ushahidi/login (admin/admin)'''


=== Troubleshooting
===


Check /var/www/html/[basename]/application/config/config.php


If the installation was done in a folder other than /ushahidi (within the web server directory), update the RewriteBase directive in the .htaccess file


=== Rebuild RPM/SRPM
===


If SRPM rebuilding is necessary, do the following:


(from [http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment wiki.centos.org/HowTos/SetupRpmBuildEnvironment]):


(as root)


yum install rpm-build redhat-rpm-config make gcc

(as user)


mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros

To rebuild in one step (if the are no changes to make to the SPEC file):


rpmbuild --rebuild /tmp/mypackage-1.0.0-1.src.rpm

If you need to change the SPEC file (ie. to change configure options), then install the SRPM, change the SPEC file (~/rpmbuild/SPEC) and do


rpmbuild -ba mypackage.spec

'''Make sure you don't mix 32-bit and 64-bit libraries.'''



#2

Wow, great stuff here. You can create a page on the wiki too at http://wiki.ushahidi.com and add this in. I''m sure it'll be a big help.



#3

If you are interested in installing ushahidi on bluehost.com - I've set up 4-5 instances in the last week and it has been amazingly easy to set up emails, databases, and unpack the software.


Contact me - happy to advise.



#4

Update - latest Ushahidi requires php 5.3 and bluehost only has php v5.1x. This means you cannot install the latest version on bluehost anymore - check your requirements before trying this. I'm running a version from last May, but the page doesn't reveal which version of ushahidi that I am actually running, so I can't be more specific.



#5

As an update on this, Bluehost has now caught up and is running PHP 5.2.17, which works like a charm with the Ushahidi Tunis release. I am ecstatic it was so easy to set up.


However, I'm unable to get sweeper up on bluehost alongside my ushahidi deployment. Not sure if there are parallel application/MySQL issues . . .