Here is how I set up gallery with sphinx search on a new VPS. I'm in
no way an expert. In fact I'm reasonably new to a lot of this but
thought I would post my process to help any other beginners, and to
give an idea of what's needed to get it all up and running.
I've been using uk2.net and found them to provide fast customer
support and a really good price.
Feedback welcomed.
----------------------------------------------------------------------------
"$" indicates that the following text is a command line instruction.
----------------------------------------------------------------------------
1) Sign up with uk2.net or any other VPS provider and start a VPS
using CentOS 5.6 LAMP x64.
2) Connect to your VPS using terminal (osx) or another ssh client like
putty.
If your using terminal the command is:
$ ssh root@your_vps_ip_address
3) When prompted enter your root password given to you by your VPS
provider.
4) Change default root password if you want.
$passwd
Enter new password.
5) Install Webmin, "a web-based interface for system administration
for Unix". Webmin provides a visual interface to change web server
setting and a file browser which is very useful for helping beginners
learn where everything is on their new vps.
At the time of writing this was the command to get the latest version:
$ wget http://prdownloads.sourceforge.net/webadmin/webmin-1.570-1.noarch.rpm
$ rpm -U webmin-1.570-1.noarch.rpm
Once installed visit webmin at https://your_vps_address:10000/ to
access Webmin and have a good look round. File Manager is under
'other'.
6) Update components.
$ yum update
(you may need more than 512mb ram to do this)
7) Download latest gallery. You may need to update the link to make
sure you get the latest version.
$ wget http://hppg.googlecode.com/files/hppg.r1295.zip
8) Unpack downloaded gallery to a new folder in www/html
You can do this by either using terminal commands or by selecting the
zip file in Webmin and clicking 'extract'.
9) Have a look at the gallery install instructions here:
http://code.google.com/p/hppg/wiki/InstallTutorial
10) To "Make sure that script can write to cache/cacheconfig
directory",
go to Webmin file manager and navigate your way to the gallery folder,
select the cache folder and click 'info'.
Tick all the permission boxes apart from 'write' under 'other'
Under 'ownership' change 'User' to 'Apache'.
Change 'Apply changes to' option to 'This directory and all
subdirectories'.
Click Save.
11) "Create database choosing utf-8 charset. Database can be created
using phpmyadmin or any other mysql administrative tool. Ex. from
mysql console." On a mac I use a program called Sequel Pro to manage
databases and do this kind of thing.
12) Run the gallery install script as per the instructions. If the
install script says it needs to be able to write to certain files/
folders then find them in the gallery folder and change the
permissions as you did to the cache folder earlier.
13) If you click next and see a blank page you may need to change
'display_errors = Off' to 'display_errors = On' in php.ini
Also in php.ini change 'short_open_tag = Off' to 'short_open_tag =
On'. You can edit php.ini by finding and selecting it in Webmin file
manager and then clicking edit. Following any changes restart apache
either through the Webmin interface or by the following command:
$ service httpd restart
You should now be able to see the Gallery homepage.
----------------------------------------------------------------------------
Install other necessary packages and ImageMagick:
$ yum install php-pear
$ yum install gcc gcc-c++ autoconf automake
$ yum install ImageMagick ImageMagick-perl ImageMagick-devel
$ echo "extension=imagick.so" > /etc/php.d/imagick.ini
$ pecl install imagick
Enable ImageMagick in hppg settings.ini.php:
'imagemagic_enabled' => true,
----------------------------------------------------------------------------
If image upload works but still says failed anyway you may be able to
fix this by adding timezone and location to php.ini.
----------------------------------------------------------------------------
Next up... Install Sphinx.
----------------------------------------------------------------------------
I'm using 0.9.9 instead of 2.0.1 as it didn't work last time I tried
it, although I never found the exact cause of the problem so you could
try 2.0.1 if you like.
$ wget ftp://ftp.pbone.net/mirror/centos.karan.org/el5/extras/testing/x86_64/RPMS/sphinx-0.9.9-1.el5.kb.x86_64.rpm
$ yum --nogpgcheck localinstall sphinx-0.9.9-1.el5.kb.x86_64.rpm
If everything goes well you should see:
Installed: sphinx.x86_64
0:0.9.9-1.el5.kb
Complete!
----------------------------------------------------------------------------
HPPG Sphinx setup Instructions:
http://code.google.com/p/hppg/wiki/SphinxConfiguration
To run the indexer on my setup I used the following command:
$ /usr/bin/indexer --config /etc/sphinx/sphinx.conf --rotate
Check on sphinx status:
$ service searchd status
Start Sphinx:
$ service searchd start
If you're using the same setup as me you'll need to place the sphinx
index configuration file in /etc/sphinx/ and call it 'sphinx.conf'
----------------------------------------------------------------------------
You should now have gallery up and running with Sphinx enabled.
If you need an ftp server I recommend proftp. If you install the right
module you can configure this through Webmin as well.
Next you need to make sure that your VPS is secure, I won't pretend to
be knowledgeable enough to help you do this!
All I will pass on is that I've read it's a good idea to change the
standard Webmin port and turn Webmin off when you're not using.
Next time I do a fresh install on a VPS I'll try and document the
process a little better to make it easier to follow and remove any
unnecessary steps. Maybe a full install guide would be a good addition
to the wiki.
If you find any steps don't work or notice any mistakes let me know.
When I've secured my VPS properly I'll try and share the process here
for general info and feedback.
D