Initial checkin of docs
This commit is contained in:
commit
f22ce1ca1d
61 changed files with 5061 additions and 0 deletions
31
docs/guides/Guides.markdown
Normal file
31
docs/guides/Guides.markdown
Normal file
|
@ -0,0 +1,31 @@
|
|||
OpenPhoto / Guides
|
||||
=======================
|
||||
#### OpenPhoto, a photo service for the masses
|
||||
|
||||
### Step by step installation guides
|
||||
|
||||
Follow these step by step guides to get OpenPhoto installed on your server or laptop.
|
||||
|
||||
1. [Ubuntu with Apache][guideinstallubuntuapache]
|
||||
1. [OSX using MacPorts][guideinstallosxmacports]
|
||||
1. [Amazon EC2 OpenPhoto AMI][guideinstallamazonec2]
|
||||
1. [SUSE][guideinstallsuse]
|
||||
1. [Ubuntu with Cherokee][guideinstallubuntucherokee]
|
||||
1. [Fedora 16 with Apache][guideinstallfedora16apache]
|
||||
|
||||
### The quick and dirty installation
|
||||
|
||||
You'll probably want to follow one of the guides above but setting up OpenPhoto is as easy as one command.
|
||||
|
||||
curl https://raw.github.com/photo/frontend/master/documentation/guides/InstallationUbuntuApache.sh | /bin/bash
|
||||
|
||||
That's it. View the [source of the installer][guideinstallcli] or [watch a screencast][screencast] of it.
|
||||
|
||||
[guideinstallubuntuapache]: InstallationUbuntuApache.markdown
|
||||
[guideinstallosxmacports]: InstallationOSXMacports.markdown
|
||||
[guideinstallsuse]: InstallationSUSE.markdown
|
||||
[guideinstallubuntucherokee]: InstallationUbuntuCherokee.markdown
|
||||
[guideinstallamazonec2]: InstallationUsingOpenPhotoEC2-AMI.markdown
|
||||
[guideinstallcli]: InstallationUbuntuApache.sh
|
||||
[screencast]: http://youtu.be/2QXtHPkO8eQ
|
||||
[guideinstallfedora16apache]: InstallationFedora16Apache.markdown
|
77
docs/guides/InstallationDreamhost.markdown
Normal file
77
docs/guides/InstallationDreamhost.markdown
Normal file
|
@ -0,0 +1,77 @@
|
|||
# OpenPhoto / Installation for Dreamhost
|
||||
|
||||
#### OpenPhoto, a photo service for the masses
|
||||
|
||||
## Installation on Dreamhost
|
||||
|
||||
This guide instructs you on how to install OpenPhoto on Dreamhost.
|
||||
The guide assumes a MySQL installation using the local filesystem for photo storage.
|
||||
|
||||
*OpenPhoto should be installed in the root directory of a domain or subdomain.*
|
||||
|
||||
Variables:
|
||||
|
||||
- *YOURDOMAIN*:the subdomain or domain for hosting OpenPhoto
|
||||
- *YOURNAME*: your Dreamhost username
|
||||
- *OpenPhotoRoot*: the root directory for OpenPhoto (e.g., ~/openphoto)
|
||||
|
||||
### Steps
|
||||
|
||||
1. Download and install OpenPhoto
|
||||
|
||||
wget https://github.com/photo/frontend/tarball/master -O openphoto.tar.gz
|
||||
tar -zxvf openphoto.tar.gz
|
||||
mv openphoto-frontend-* OpenPhotoRoot
|
||||
|
||||
1. Create directories
|
||||
|
||||
mkdir OpenPhotoRoot/src/html/assets/cache
|
||||
chmod 775 OpenPhotoRoot/src/html/assets/cache
|
||||
|
||||
mkdir OpenPhotoRoot/src/html/photos
|
||||
chmod 775 OpenPhotoRoot/src/html/photos
|
||||
|
||||
mkdir OpenPhotoRoot/src/userdata
|
||||
chmod 775 OpenPhotoRoot/src/userdata
|
||||
|
||||
1. Configure the subdomain or domain.
|
||||
Go to the [Dreamhost control panel for managing domains](https://panel.dreamhost.com/index.cgi?tree=domain.manage)
|
||||
|
||||
Domain settings:
|
||||
|
||||
- Select the *Fully Hosted* portion of the configuration panel.
|
||||
- *Do you want the www in your URL?* Select "Leave it alone"
|
||||
- *Web directory:* Set to *OpenPhotoRoot*/src/html
|
||||
- *PHP mode:* Select the latest version of PHP (use FastCGI configuration)
|
||||
|
||||
1. Go to the [Dreamhost control panel for managing databases](https://panel.dreamhost.com/index.cgi?tree=goodies.mysql)
|
||||
and create a new database and a new user for the database. Remember the hostname (the default should be fine), database name, user name, and password, since you'll need this information during the setup.
|
||||
|
||||
1. After waiting a sufficient amount of time for the subdomain name to propagate, use the browser to connect to the new subdomain. You should see a setup page for OpenPhoto which will allow you to configure your OpenPhoto project.
|
||||
|
||||
- *Select Database:* MySQL
|
||||
- *Select File System:* Local filesystem
|
||||
- *Enter your local file system credentials:* /home/USERNAME/OpenPhotoRoot/src/html/photos
|
||||
- *File system hostname for download URL (Web accessible w/o "http://"):* YOURDOMAIN.com/photos
|
||||
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
#### Setup page looks strange (black and white, unstyled)
|
||||
If the setup page is not colorful and well formatted, then the css and javascript files are most likely not being loaded. Possible causes:
|
||||
|
||||
- Web directory root is not properly set (check control panel for the subdomain)
|
||||
- src/html/assets/cache directory is not writeable by Apache (check permissions)
|
||||
|
||||
#### Error setting up the database
|
||||
Double check all the parameters. Open the Dreamhost control panel for databases.
|
||||
|
||||
|
||||
### Launching your OpenPhoto site
|
||||
|
||||
Now you're ready to launch your OpenPhoto site. Point your browser to your host and you'll be taken to a setup screen.
|
||||
|
||||
Once you complete the three steps your site will be up and running.
|
||||
|
||||
**ENJOY!**
|
||||
|
113
docs/guides/InstallationFedora16Apache.markdown
Normal file
113
docs/guides/InstallationFedora16Apache.markdown
Normal file
|
@ -0,0 +1,113 @@
|
|||
OpenPhoto / Installation for Fedora 16 + Apache
|
||||
=======================
|
||||
#### OpenPhoto, a photo service for the masses
|
||||
|
||||
## OS: Linux Fedora 16
|
||||
|
||||
This guide instructs you on how to install OpenPhoto on a Fedora server.
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Prerequisites
|
||||
|
||||
#### Database and File System Options
|
||||
|
||||
##### MySql
|
||||
You'll need to provide credentials for a MySql database. If the database doesn't already exist it will be created. If the user doesn't have `CREATE DATABASE` permissions then make sure it's already created.
|
||||
|
||||
##### AWS
|
||||
If you're going to use AWS services then You'll need to be signed up for them.
|
||||
|
||||
* http://aws.amazon.com/simpledb/
|
||||
* http://aws.amazon.com/s3/
|
||||
|
||||
#### Server Packages and Modules
|
||||
Once you've confirmed that your cloud account is setup you can get started on your server. For that you'll need to have _Apache_, _PHP_ and _curl_ installed with a few modules.
|
||||
|
||||
yum groupinstall 'Development Tools'
|
||||
yum groupinstall 'Development Libraries'
|
||||
yum install httpd httpd-devel php php-devel php-common php-curl php-gd php-mcrypt pcre pcre-devel ImageMagick php-magickwand php-pecl-imagick ImageMagick-devel php-pear php-mysql
|
||||
pecl install apc
|
||||
echo "extension=apc.so" > /etc/php.d/apc.ini
|
||||
pecl install oauth
|
||||
echo "extension=oauth.so" > /etc/php.d/oauth.ini
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Installing OpenPhoto
|
||||
|
||||
Download and install the source code. We recommend `/var/www/yourdomain.com` but you can use any directory you'd like.
|
||||
|
||||
#### Using git clone
|
||||
|
||||
The _Apache 2_ user in Fedora 16 is `apache` so run the following commands to take ownership of the web files.
|
||||
|
||||
yum install git
|
||||
git clone git://github.com/photo/frontend.git /var/www/yourdomain.com
|
||||
chown -R apache: /var/www/yourdomain.com
|
||||
|
||||
Assuming that this is a development machine you only need to make the config writable by the user Apache runs as. Most likely `apache`.
|
||||
|
||||
mkdir /var/www/yourdomain.com/src/userdata
|
||||
mkdir /var/www/yourdomain.com/src/html/photos
|
||||
mkdir /var/www/yourdomain.com/src/html/assets/cache
|
||||
chown apache: /var/www/yourdomain.com/src/userdata
|
||||
chown apache: /var/www/yourdomain.com/src/html/photos
|
||||
chown apache: /var/www/yourdomain.com/src/html/assets/cache
|
||||
|
||||
### Setting up Apache and PHP
|
||||
|
||||
#### Apache
|
||||
|
||||
You'll need to copy the sample virtual host configuration file from the source to `/etc/httpd/conf.d/`.
|
||||
|
||||
cp /var/www/yourdomain.com/src/configs/openphoto-vhost.conf /etc/httpd/conf.d/openphoto.conf
|
||||
|
||||
You'll need to replace instances of `/path/to/openphoto/html/directory` with `/var/www/yourdomain.com/src/html` or wherever you placed the code.
|
||||
|
||||
Edit `/etc/httpd/conf/httpd.conf` and ensure the following modules are enabled: _rewrite_, _deflate_, _expires_, _headers_. Here are the corresponding lines to the enabled apache modules in `httpd.conf`.
|
||||
|
||||
LoadModule rewrite_module modules/mod_rewrite.so
|
||||
LoadModule deflate_module modules/mod_deflate.so
|
||||
LoadModule expires_module modules/mod_expires.so
|
||||
LoadModule headers_module modules/mod_headers.so
|
||||
|
||||
By default, any access to ini files is denied with a "Not Found" 404 HTTP code. To enable a 404, or Forbidden return code, change the following lines in the virtual host file.
|
||||
|
||||
Uncomment:
|
||||
|
||||
# 403 Forbidden for ini files
|
||||
#RewriteRule \.ini$ - [F,NC]
|
||||
|
||||
Comment:
|
||||
|
||||
# 404 Not Found for ini files
|
||||
AliasMatch \.ini$ /404
|
||||
|
||||
### PHP
|
||||
|
||||
You should also verify that your `php.ini` file has a few important values set correctly.
|
||||
|
||||
vi /etc/php.ini
|
||||
|
||||
Search for the following values and make sure they're correct.
|
||||
|
||||
file_uploads = On
|
||||
upload_max_filesize = 16M
|
||||
post_max_size = 16M
|
||||
|
||||
Ensure that `/etc/php.d/apc.ini` and `/etc/php.d/oauth.ini` exist and that the php extensions are enabled.
|
||||
|
||||
Now you're ready to restart apache and visit the site in your browser.
|
||||
|
||||
service httpd restart
|
||||
|
||||
### Launching your OpenPhoto site
|
||||
|
||||
Now you're ready to launch your OpenPhoto site. Point your browser to your host and you'll be taken to a setup screen. You'll need your cloud account credentials to continue.
|
||||
|
||||
Once you complete the 3 steps your site will be up and running and you'll be redirected there. The _setup_ screen won't show up anymore. If for any reason you want to go through the setup again you will need to delete the generated config file and refresh your browser.
|
||||
|
||||
rm /var/www/yourdomain.com/src/userdata/configs/yourdomain.com.ini
|
||||
|
||||
**ENJOY!**
|
163
docs/guides/InstallationFreeBSDNginx.markdown
Normal file
163
docs/guides/InstallationFreeBSDNginx.markdown
Normal file
|
@ -0,0 +1,163 @@
|
|||
OpenPhoto / Installation for FreeBSD + Nginx
|
||||
=======================
|
||||
#### OpenPhoto, a photo service for the masses
|
||||
|
||||
## OS: FreeBSD 9.0+
|
||||
|
||||
This guide instructs you on how to install OpenPhoto on an FreeBSD Server
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Prerequisites
|
||||
|
||||
#### Database and File System Options
|
||||
|
||||
##### MySql
|
||||
You'll need to provide credentials for a MySql database. If the database doesn't already exist it will be created. If the user doesn't have `CREATE DATABASE` permissions then make sure it's already created.
|
||||
|
||||
##### AWS
|
||||
If you're going to use AWS services then You'll need to be signed up for them.
|
||||
|
||||
* http://aws.amazon.com/simpledb/
|
||||
* http://aws.amazon.com/s3/
|
||||
|
||||
#### Server Packages and Modules
|
||||
Once you've confirmed that your cloud account is setup you can get started on your server. For that you'll need to have _NGinx_, _PHP-FPM_ and _CURL_ installed with a few modules.
|
||||
|
||||
|
||||
##### Install Nginx
|
||||
|
||||
Compile Nginx with :
|
||||
HTTP_MODULE
|
||||
HTTP_CACHE_MODULE
|
||||
HTTP_GZIP_STATIC_MODULE
|
||||
HTTP_REWRITE_MODULE
|
||||
HTTP_UPLOAD_MODULE
|
||||
HTTP_UPLOAD_PROGRESS
|
||||
|
||||
cd /usr/ports/www/nginx
|
||||
make config install clean distclean
|
||||
|
||||
##### Install php5
|
||||
|
||||
Compile php5 with :
|
||||
CLI
|
||||
FPM
|
||||
SUHOSIN
|
||||
MULTIBYTE
|
||||
MAILHEAD
|
||||
|
||||
cd /usr/port/lang/php5-extentions
|
||||
make config install clean distclean
|
||||
|
||||
##### Install php5 extentions
|
||||
|
||||
Compile php5 extentions with :
|
||||
BZ2
|
||||
CALENDAR
|
||||
CTYPE
|
||||
CURL
|
||||
DOM
|
||||
FILEINFO
|
||||
FILTER
|
||||
GD
|
||||
HASH
|
||||
ICONV
|
||||
JSON
|
||||
MBSTRING
|
||||
MCRYPT
|
||||
OPENSSL
|
||||
PDF
|
||||
PHAR
|
||||
POSIX
|
||||
SESSION
|
||||
SIMPLEXML
|
||||
TOKENIZER
|
||||
XML
|
||||
XMLREADER
|
||||
XMLWRITER
|
||||
XSL
|
||||
ZLIB
|
||||
|
||||
cd /usr/port/lang/php5-extentions
|
||||
make config install clean distclean
|
||||
|
||||
|
||||
|
||||
And if you are going to use MySQL compile `php5-extentions` with `MYSQL MYSQLI`.
|
||||
|
||||
There are also a few optional but recommended packages and modules.
|
||||
|
||||
/usr/ports/net/pecl-oauth
|
||||
/usr/ports/graphics/pecl-imagick
|
||||
/usr/ports/graphics/exiftran
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Installing OpenPhoto
|
||||
|
||||
Download and install the source code. We recommend `/usr/local/www/yourdomain.com` but you can use any directory you'd like.
|
||||
|
||||
#### Using git clone
|
||||
|
||||
pkg_add -r git-core
|
||||
git clone git://github.com/photo/frontend.git /usr/local/www/yourdomain.com
|
||||
|
||||
#### Using tar
|
||||
|
||||
cd /usr/local/www
|
||||
wget https://github.com/photo/frontend/tarball/master -O openphoto.tar.gz
|
||||
tar -zxvf openphoto.tar.gz
|
||||
mv openphoto-frontend-* yourdomain.com
|
||||
|
||||
Assuming that this is a development machine you only need to make the config writable by the user Apache runs as. Most likely `www`.
|
||||
|
||||
mkdir /usr/local/www/yourdomain.com/src/userdata
|
||||
mkdir /usr/local/www/yourdomain.com/src/html/photos
|
||||
mkdir /usr/local/www/yourdomain.com/src/html/assets/cache
|
||||
chown www:www /usr/local/www/yourdomain.com/src/userdata
|
||||
chown www:www /usr/local/www/yourdomain.com/src/html/photos
|
||||
chown www:www /usr/local/www/yourdomain.com/src/html/assets/cache
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Setting up NGinx and PHP
|
||||
|
||||
#### NGinx
|
||||
|
||||
You'll need to copy the sample virtual host configuration file from the source to `/etc/nginx/sites-enabled`.
|
||||
|
||||
cp /usr/local/www/yourdomain.com/src/configs/openphoto-nginx.conf /usr/local/etc/nginx/sites-enabled/openphoto
|
||||
|
||||
You'll need to replace:
|
||||
* The host name (yourdomain.com)
|
||||
* The path where OpenPhoto is installed (/usr/local/www/yourdomain.com/src/html/)
|
||||
|
||||
/usr/local/etc/nginx/sites-enabled/openphoto
|
||||
|
||||
### PHP
|
||||
|
||||
You should also verify that your `php.ini` file has a few important values set correctly.
|
||||
|
||||
vi /usr/local/etc/php.ini
|
||||
|
||||
Search for the following values and make sure they're correct.
|
||||
|
||||
file_uploads = On
|
||||
upload_max_filesize = 16M
|
||||
post_max_size = 16M
|
||||
|
||||
Now you're ready to restart apache and visit the site in your browser.
|
||||
|
||||
/usr/local/etc/rc.d/php-fpm restart
|
||||
/usr/local/etc/rc.d/nginx restart
|
||||
|
||||
### Launching your OpenPhoto site
|
||||
|
||||
Now you're ready to launch your OpenPhoto site. Point your browser to your host and you'll be taken to a setup screen. You'll need your cloud account credentials to continue.
|
||||
|
||||
Once you complete the 3 steps your site will be up and running and you'll be redirected there. The _setup_ screen won't show up anymore. If for any reason you want to go through the setup again you will need to delete the generated config file and refresh your browser.
|
||||
|
||||
rm /usr/local/www/yourdomain.com/src/userdata/configs/yourdomain.com.ini
|
||||
|
||||
**ENJOY!**
|
165
docs/guides/InstallationFreeBSDNginx_FR.markdown
Normal file
165
docs/guides/InstallationFreeBSDNginx_FR.markdown
Normal file
|
@ -0,0 +1,165 @@
|
|||
OpenPhoto / Installation sous FreeBSD + Nginx
|
||||
=======================
|
||||
#### OpenPhoto, un service de photo pour les masses
|
||||
|
||||
## OS: FreeBSD 9.0+
|
||||
|
||||
Ce guide vous explique comment installer sur un serveur OpenPhoto sous FreeBSD avec Nginx
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Pré-requis
|
||||
|
||||
#### Bases de données et Cloud
|
||||
|
||||
##### MySQL
|
||||
You'll need to provide credentials for a MySql database. If the database doesn't already exist it will be created. If the user doesn't have `CREATE DATABASE` permissions then make sure it's already created.
|
||||
|
||||
OpenPhoto necessite une base de donnée. Si la base n'existe pas et que l'utilisateur MySQL n'a pas le droit d'executer la commande `CREATE DATABASE`, assurez vous que la base existe deja
|
||||
|
||||
##### Amazon Web Services
|
||||
Si vous allez utiliser 'Amazon Web Services', vous aurez besoin de vous y identifier.
|
||||
|
||||
* http://aws.amazon.com/simpledb/
|
||||
* http://aws.amazon.com/s3/
|
||||
|
||||
#### Configuration de l'environement.
|
||||
Configuration et compilation de _NGinx_ _PHP-FPM_ et _CURL_ avec quelques modules.
|
||||
|
||||
##### _NGinx_
|
||||
|
||||
Compiler _NGinx_ avec les options ci-dessous :
|
||||
HTTP_MODULE
|
||||
HTTP_CACHE_MODULE
|
||||
HTTP_GZIP_STATIC_MODULE
|
||||
HTTP_REWRITE_MODULE
|
||||
HTTP_UPLOAD_MODULE
|
||||
HTTP_UPLOAD_PROGRESS
|
||||
|
||||
cd /usr/ports/www/nginx
|
||||
make config install clean distclean
|
||||
|
||||
##### _PHP-FPM_
|
||||
|
||||
Compiler _PHP-FPM_ avec les options ci-dessous :
|
||||
CLI
|
||||
FPM
|
||||
SUHOSIN
|
||||
MULTIBYTE
|
||||
MAILHEAD
|
||||
|
||||
cd /usr/port/lang/php5-extentions
|
||||
make config install clean distclean
|
||||
|
||||
##### Extentions php5
|
||||
|
||||
Compiler les extentions _PHP-FPM_ avec les options ci-dessous :
|
||||
BZ2
|
||||
CALENDAR
|
||||
CTYPE
|
||||
CURL
|
||||
DOM
|
||||
FILEINFO
|
||||
FILTER
|
||||
GD
|
||||
HASH
|
||||
ICONV
|
||||
JSON
|
||||
MBSTRING
|
||||
MCRYPT
|
||||
OPENSSL
|
||||
PDF
|
||||
PHAR
|
||||
POSIX
|
||||
SESSION
|
||||
SIMPLEXML
|
||||
TOKENIZER
|
||||
XML
|
||||
XMLREADER
|
||||
XMLWRITER
|
||||
XSL
|
||||
ZLIB
|
||||
|
||||
cd /usr/port/lang/php5-extentions
|
||||
make config install clean distclean
|
||||
|
||||
Et si vous utilisez MySQL, compiler `php5-extentions` avec `MYSQL MYSQLI`.
|
||||
|
||||
Il y a aussi des paquets optionnels (ImageMagick est fortement conseillé, GD2 pose des problème avec OpenPhoto).
|
||||
|
||||
/usr/ports/net/pecl-oauth
|
||||
/usr/ports/graphics/ImageMagick-nox11
|
||||
/usr/ports/graphics/pecl-imagick
|
||||
/usr/ports/graphics/exiftran
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Installer OpenPhoto
|
||||
|
||||
Télécharger et installer les sources. Nous vous recommandons d'utiliser le dossier `/usr/local/www/yourdomain.com`.
|
||||
|
||||
#### Via git clone
|
||||
|
||||
pkg_add -r git-core
|
||||
git clone git://github.com/photo/frontend.git /usr/local/www/yourdomain.com
|
||||
|
||||
#### Via wget/tar
|
||||
|
||||
cd /usr/local/www
|
||||
wget https://github.com/photo/frontend/tarball/master -O openphoto.tar.gz
|
||||
tar -zxvf openphoto.tar.gz
|
||||
mv openphoto-frontend-* yourdomain.com
|
||||
|
||||
Assuming that this is a development machine you only need to make the config writable by the user Apache runs as. Most likely `www`.
|
||||
Vous aurez besoin de créer les dossiers suivant et de leur donner le droit d'ecriture.
|
||||
|
||||
mkdir /usr/local/www/yourdomain.com/src/userdata
|
||||
mkdir /usr/local/www/yourdomain.com/src/html/photos
|
||||
mkdir /usr/local/www/yourdomain.com/src/html/assets/cache
|
||||
chown www:www /usr/local/www/yourdomain.com/src/userdata
|
||||
chown www:www /usr/local/www/yourdomain.com/src/html/photos
|
||||
chown www:www /usr/local/www/yourdomain.com/src/html/assets/cache
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Configuration de Nginx et PHP
|
||||
|
||||
#### Nginx
|
||||
|
||||
Copier le fichier de configuration proposé dans les sources.
|
||||
|
||||
cp /usr/local/www/yourdomain.com/src/configs/openphoto-nginx.conf /usr/local/etc/nginx/sites-enabled/openphoto
|
||||
|
||||
Adapter la configuration:
|
||||
* Votre domaine (openphoto.domain.ltd)
|
||||
* Le dossier d'installation d'OpenPhoto (/usr/local/www/yourdomain.com/src/html)
|
||||
|
||||
/usr/local/etc/nginx/sites-enabled/openphoto
|
||||
|
||||
### PHP
|
||||
|
||||
Vérifier votre php.ini
|
||||
|
||||
vi /usr/local/etc/php.ini
|
||||
|
||||
Les variables ci-dessous doivent etre défini de cette maniere.
|
||||
|
||||
file_uploads = On
|
||||
upload_max_filesize = 16M
|
||||
post_max_size = 16M
|
||||
|
||||
Relancer les services, OpenPhoto est maintenant disponible via votre navigateur.
|
||||
|
||||
/usr/local/etc/rc.d/php-fpm restart
|
||||
/usr/local/etc/rc.d/nginx restart
|
||||
|
||||
### Ouvrez http://openphoto.domain.ltd dans votre navigateur.
|
||||
|
||||
Maintenant vous êtes prêt à lancer votre site OpenPhoto. Acceder a votre site OpenPhoto via votre navigateur sur votre hôte et vous serez redirigé vers un écran de configuration. Vous aurez besoin de vos informations de compte de Cloud pour continuer.
|
||||
|
||||
Une fois que vous aurez suivie les 3 étapes OpenPhoto sera en service.
|
||||
Si pour une raison quelconque vous voulez relancer le _setup_, vous devrez supprimer le fichier de configuration généré et rafraichir votre navigateur.
|
||||
|
||||
rm /usr/local/www/yourdomain.com/src/userdata/configs/yourdomain.com.ini
|
||||
|
||||
**ENJOY!**
|
163
docs/guides/InstallationGenericApache.markdown
Normal file
163
docs/guides/InstallationGenericApache.markdown
Normal file
|
@ -0,0 +1,163 @@
|
|||
OpenPhoto / Installation for Linux - Apache
|
||||
=======================
|
||||
#### OpenPhoto, a photo service for the masses
|
||||
|
||||
## Generic Installation Guide
|
||||
This guide is intended to be usable by users of any distribution of Linux running a standard LAMP stack. As such, it is written at a rather high level of abstraction. For distribution-specific details, find a different guide on the sidebar to the left.
|
||||
|
||||
|
||||
### Prerequisites
|
||||
|
||||
#### Database Options
|
||||
Openphoto can use either MySql or Amazon Simpledb to store metadata about photos.
|
||||
|
||||
##### MySql
|
||||
You'll need to provide credentials for a MySql database. If the database doesn't already exist it will be created. If the user doesn't have `CREATE DATABASE` permissions then make sure it's already created.
|
||||
|
||||
##### Simpledb
|
||||
First, make sure you're signed up.
|
||||
|
||||
http://aws.amazon.com/simpledb/
|
||||
|
||||
After that, pick up an Access Key ID and Secret Access Key from:
|
||||
|
||||
https://portal.aws.amazon.com/gp/aws/securityCredentials
|
||||
|
||||
#### File System Options
|
||||
To store photos, openphoto has a number of options.
|
||||
|
||||
##### Amazon S3
|
||||
First, sign up here:
|
||||
|
||||
http://aws.amazon.com/s3/
|
||||
|
||||
After that, pick up an Access Key ID and Secret Access Key from:
|
||||
|
||||
https://portal.aws.amazon.com/gp/aws/securityCredentials
|
||||
|
||||
You will also need a bucket name, but this can be anything. Openphoto will create it if necessary.
|
||||
|
||||
##### Local Filesystem
|
||||
Fairly self-explanitory. You must define the folder where you wish to store your photos (Be sure to make this writable by the user Apache runs as!) and the web-accessable hostname which openphoto will use to construct download URLs. This will either be the domain name assigned to the server, or the IP address. Include any necessary subdirectories. Do not include http://.
|
||||
|
||||
E.g.:
|
||||
|
||||
example.com/photos
|
||||
127.0.0.1/photos
|
||||
|
||||
##### Dropbox
|
||||
Dropbox is a backup option which can be combined with either S3 or the locl filesystem. To enable it, you need a Key and Secret from:
|
||||
|
||||
https://www.dropbox.com/developers/apps
|
||||
|
||||
Be sure to allow Full dropbox access. The folder name can be anything, and will be created if necessary.
|
||||
|
||||
#### Necessary software
|
||||
|
||||
To run openphoto, ensure the following software is installed:
|
||||
|
||||
* Apache
|
||||
* PHP
|
||||
* Apache PHP module
|
||||
* PHP Curl module
|
||||
* PHP mcrypt module
|
||||
* PHP apc module
|
||||
* libpcre development libraries and headers
|
||||
* PHP PEAR
|
||||
|
||||
One or more of:
|
||||
|
||||
* PHP imagemagick module
|
||||
* PHP graphicsmagick module
|
||||
* PHP GD module (not recommended; last resort)
|
||||
|
||||
Non-essential but recommended:
|
||||
|
||||
* exiftran
|
||||
* PHP oauth module
|
||||
* Mysql (if you will be using it)
|
||||
* PHP pdo mysql module (ditto)
|
||||
|
||||
Be sure to modify php.ini to enable each PHP module.
|
||||
|
||||
The best place to find PHP modules is your distro's standard repository. If you can't find it packaged there, use `pecl install <package name>`. Find packages at http://pecl.php.net/.
|
||||
|
||||
Enable the following Apache modules:
|
||||
|
||||
* rewrite
|
||||
* deflate
|
||||
* expires
|
||||
* headers
|
||||
|
||||
NOTE: If this is your first time installing Apache on your current distro, be sure to read your distro's documentation on how to set up Apache and how to set up vhosts in Apache. These vary wildly by distro and you are expected to know what to do!
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Installing OpenPhoto
|
||||
|
||||
Download and install the source code. We recommend the default apache root (Often `/var/www`, or `/srv/http`, check your distro documentation for specifics), but it can go anywhere if Apache's user has permissions to access there.
|
||||
|
||||
#### Using git clone
|
||||
|
||||
apt-get install git-core
|
||||
git clone git://github.com/photo/frontend.git <install location>/yourdomain.com
|
||||
|
||||
#### Using tar
|
||||
|
||||
cd <install location>
|
||||
wget https://github.com/photo/frontend/tarball/master -O openphoto.tar.gz
|
||||
tar -zxvf openphoto.tar.gz
|
||||
mv openphoto-frontend-* yourdomain.com
|
||||
|
||||
Once installed, create these three directories for configuration files:
|
||||
|
||||
* yourdomain.com/src/userdata
|
||||
* yourdomain.com/src/html/photos
|
||||
* yourdomain.com/src/html/assets/cache
|
||||
|
||||
Then chown them all to the user Apache will run as.
|
||||
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Setting up Apache and PHP
|
||||
|
||||
#### Apache
|
||||
|
||||
You'll need to copy the sample virtual host configuration file from the source to wherever Apache stores virtual host configuration files in your distro. They are stored in:
|
||||
|
||||
<install location>/yourdomain.com/src/configs/openphoto-vhost.conf
|
||||
|
||||
After copying, edit the file and replace all instances of `/path/to/openphoto/html/directory` with `<install location>/yourdomain.com/src/html`.
|
||||
|
||||
It may be necessary to enable openphoto's vhost and disable the default, here. This differs by distro, so check your distro's Apache docs.
|
||||
|
||||
By default, any access to ini files is denied with a "Not Found" 404 HTTP code. To enable a 404, or Forbidden return code, change the following lines in the virtual host file.
|
||||
|
||||
Uncomment:
|
||||
|
||||
# 403 Forbidden for ini files
|
||||
#RewriteRule \.ini$ - [F,NC]
|
||||
|
||||
Comment:
|
||||
|
||||
# 404 Not Found for ini files
|
||||
AliasMatch \.ini$ /404
|
||||
|
||||
### PHP
|
||||
|
||||
You should also verify that your `php.ini` file has a few important values set correctly.
|
||||
|
||||
Find php.ini and open in with a text editor.
|
||||
|
||||
Search for the following values and make sure they're correct.
|
||||
|
||||
file_uploads = On
|
||||
upload_max_filesize = 16M
|
||||
post_max_size = 16M
|
||||
|
||||
Now, the site should be ready to use. Start/Restart Apache, and open the host in your browser. You should see a setup screen. You'll need your cloud account credentials to continue.
|
||||
|
||||
Once you complete the 3 steps your site will be up and running and you'll be redirected there. The _setup_ screen won't show up anymore, but you can rerun it via the Manage page.
|
||||
|
||||
** ENJOY! **
|
152
docs/guides/InstallationOSXMacports.markdown
Normal file
152
docs/guides/InstallationOSXMacports.markdown
Normal file
|
@ -0,0 +1,152 @@
|
|||
OpenPhoto / Installation for OSX using Macports
|
||||
=======================
|
||||
#### OpenPhoto, a photo service for the masses
|
||||
|
||||
## OS: Mac OSX
|
||||
|
||||
This guide instructs you on how to install OpenPhoto on a Macintosh OSX computer.
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Prerequisites
|
||||
|
||||
#### Database and File System Options
|
||||
|
||||
##### MySql
|
||||
You'll need to provide credentials for a MySql database. If the database doesn't already exist it will be created. If the user doesn't have `CREATE DATABASE` permissions then make sure it's already created.
|
||||
|
||||
##### AWS
|
||||
If you're going to use AWS services then you'll need to be signed up for them.
|
||||
|
||||
* http://aws.amazon.com/simpledb/
|
||||
* http://aws.amazon.com/s3/
|
||||
|
||||
#### Server Packages and Modules
|
||||
Once you've confirmed that your cloud account is setup you can get started on your server. For that you'll need to have _Apache_, _PHP_ and _curl_ installed with a few modules.
|
||||
|
||||
This guide assumes you have Macports installed. If not you can [get it here](http://www.macports.org/install.php). The easiest option is to use `.pkg` installer.
|
||||
|
||||
sudo port install apache2
|
||||
sudo port install php5 +apache2
|
||||
|
||||
cd /opt/local/apache2/modules
|
||||
sudo /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so
|
||||
|
||||
sudo port install php5-exif
|
||||
sudo port install php5-curl
|
||||
sudo port install php5-imagick
|
||||
sudo port install php5-oauth
|
||||
sudo port install php5-mcrypt
|
||||
sudo port install php5-apc
|
||||
sudo port load apache2
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Installing OpenPhoto
|
||||
|
||||
Download and install the source code. We recommend `~/Sites/yourdomain.com` but you can use any directory you'd like.
|
||||
|
||||
#### Using git clone
|
||||
|
||||
# OSX should have git already installed. If not:
|
||||
sudo port install git-core
|
||||
git clone git://github.com/photo/frontend.git ~/Sites/yourdomain.com
|
||||
|
||||
#### Using tar
|
||||
|
||||
cd ~/Sites
|
||||
wget https://github.com/photo/frontend/tarball/master -O openphoto.tar.gz
|
||||
tar -zxvf openphoto.tar.gz
|
||||
mv openphoto-frontend-* yourdomain.com
|
||||
|
||||
Assuming that this is a development machine you can make the config writable by the user Apache runs as. Most likely `_www`.
|
||||
|
||||
cd ~/Sites/yourdomain.com
|
||||
mkdir src/userdata
|
||||
chown _www src/userdata
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Setting up Apache and PHP
|
||||
|
||||
#### Apache
|
||||
|
||||
You'll need to make sure that you have named virtual hosts enabled in your Apache confs.
|
||||
|
||||
sudo nano /opt/local/apache2/conf/httpd.conf
|
||||
|
||||
Enable virtual hosts:
|
||||
|
||||
# Virtual hosts
|
||||
Include conf/extra/httpd-vhosts.conf
|
||||
|
||||
Ensure the PHP module is loaded (various places in `httpd.conf`):
|
||||
|
||||
LoadModule php5_module modules/libphp5.so
|
||||
|
||||
DirectoryIndex index.html index.php
|
||||
|
||||
Include conf/extra/mod_php.conf
|
||||
|
||||
Copy the contents of `~/Sites/yourdomain.com/src/configs/openphoto-vhost.conf` onto your clipboard. Then open your `httpd-vhosts.conf` file.
|
||||
|
||||
sudo nano /opt/local/apache2/conf/extra/httpd-vhosts.conf
|
||||
|
||||
You can put the `NameVirtualHost` directive at the top of the file.
|
||||
|
||||
NameVirtualHost *
|
||||
|
||||
Paste the contents of your clipboard into the bottom of the file and replace instances of `/path/to/openphoto/html/directory` with `/Users/yourusername/Sites/yourdomain.com/src/html` or wherever you placed the code. In the virtualhost conf make sure to specify the full path to your `Sites` directory.
|
||||
|
||||
By default, any access to ini files is denied with a "Not Found" 404 HTTP code. To enable a 404, or Forbidden return code, change the following lines in the virtual host file.
|
||||
|
||||
Uncomment:
|
||||
|
||||
# 403 Forbidden for ini files
|
||||
#RewriteRule \.ini$ - [F,NC]
|
||||
|
||||
Comment:
|
||||
|
||||
# 404 Not Found for ini files
|
||||
AliasMatch \.ini$ /404
|
||||
|
||||
|
||||
### PHP
|
||||
|
||||
You should also verify that your `php.ini` file has a few important values set correctly.
|
||||
|
||||
sudo nano /opt/local/etc/php5/php.ini
|
||||
|
||||
If the file is empty, copy the development template file
|
||||
|
||||
sudo cp /opt/local/etc/php5/php.ini-development /opt/local/etc/php5/php.ini
|
||||
|
||||
Search for the following values and make sure they're correct.
|
||||
|
||||
post_max_size = 16M
|
||||
file_uploads = On
|
||||
upload_max_filesize = 16M
|
||||
|
||||
Now you're ready to restart apache and visit the site in your browser.
|
||||
|
||||
sudo /opt/local/apache2/bin/apachectl restart
|
||||
|
||||
### Fake domain
|
||||
|
||||
If you happen to not have `yourdomain.com` registered, you can fake it by editing your `/etc/hosts` file and adding the following line
|
||||
|
||||
127.0.0.1 yourdomain.com
|
||||
|
||||
### Launching your OpenPhoto site
|
||||
|
||||
Now you're ready to launch your OpenPhoto site. Point your browser to your host and you'll be taken to a setup screen. You'll need your cloud account credentials to continue.
|
||||
|
||||
Once you complete the 3 steps your site will be up and running and you'll be redirected there. The setup screen won't show up anymore.
|
||||
|
||||
### Performing setup again ###
|
||||
|
||||
If for any reason you want to go through the setup again you will need to delete the generated config file and refresh your browser.
|
||||
|
||||
rm ~/Sites/yourdomain.com/src/userdata/configs/settings.ini
|
||||
|
||||
**ENJOY!**
|
119
docs/guides/InstallationSUSE.markdown
Normal file
119
docs/guides/InstallationSUSE.markdown
Normal file
|
@ -0,0 +1,119 @@
|
|||
OpenPhoto / Installation for SUSE/openSUSE
|
||||
=======================
|
||||
#### OpenPhoto, a photo service for the masses
|
||||
|
||||
## OS: Linux openSUSE 11.4+
|
||||
|
||||
This guide instructs you on how to install OpenPhoto on an openSUSE server.
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Prerequisites
|
||||
|
||||
#### Database and File System Options
|
||||
|
||||
##### MySql
|
||||
You'll need to provide credentials for a MySql database. If the database doesn't already exist it will be created. If the user doesn't have `CREATE DATABASE` permissions then make sure it's already created.
|
||||
|
||||
##### AWS
|
||||
If you're going to use AWS services then You'll need to be signed up for them.
|
||||
|
||||
* http://aws.amazon.com/simpledb/
|
||||
* http://aws.amazon.com/s3/
|
||||
|
||||
#### Server Packages and Modules
|
||||
Once you've confirmed that your cloud account is setup you can get started on your server. For that you'll need to have _Apache_, _PHP_ and _curl_ installed with a few modules.
|
||||
|
||||
zypper in apache2 php5 apache2-mod-php5 php5-curl php5-mcrypt
|
||||
|
||||
And if you are going to use MySQL install `php5-mysql`.
|
||||
|
||||
Ensure you have mod_rewrite enabled
|
||||
|
||||
a2enmod rewrite
|
||||
|
||||
There are also a few optional but recommended packages and modules. Add the PHP Extensions repo.
|
||||
|
||||
zypper ar http://download.opensuse.org/repositories/server:/php:/extensions/openSUSE_11.4 php:extensions
|
||||
zypper in php5-imagick php5-oauth php5-APC exiftran
|
||||
a2enmod deflate
|
||||
a2enmod expires
|
||||
a2enmod headers
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Installing OpenPhoto
|
||||
|
||||
Download and install the source code. We recommend `/srv/www/htdocs/yourdomain.com` but you can use any directory you'd like.
|
||||
|
||||
#### Using git clone
|
||||
|
||||
zypper in git
|
||||
git clone https://github.com/photo/frontend.git /srv/www/yourdomain.com
|
||||
chown -R wwwrun:www /srv/www/htdocs/yourdomain.com
|
||||
|
||||
#### Using tar
|
||||
|
||||
cd /var/www
|
||||
wget https://github.com/photo/frontend/tarball/master -O openphoto.tar.gz
|
||||
tar -zxvf --group=www --owner=wwwrun openphoto.tar.gz
|
||||
mv openphoto-frontend-* yourdomain.com
|
||||
chown -R wwwrun:www yourdomain.com
|
||||
|
||||
Assuming that this is a development machine you can make the config writable by the user Apache runs as. Most likely `wwwrun`.
|
||||
|
||||
mkdir /srv/www/htsdocs/yourdomain.com/src/userdata
|
||||
chown wwwrun:www /srv/www/htdocs/yourdomain.com/src/userdata
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Setting up Apache and PHP
|
||||
|
||||
#### Apache
|
||||
|
||||
You'll need to copy the sample virtual host configuration file from the source to `/etc/apache2/vhosts.d`.
|
||||
|
||||
cp /srv/www/htdocs/yourdomain.com/src/configs/openphoto-SUSE-vhost.conf /etc/apache2/vhosts.d/yourdomain.com.conf
|
||||
|
||||
Now you'll need to replace instances of `/path/to/openphoto/html/directory` with `/srv/www/htdocs/yourdomain.com/src/html` or wherever you placed the code.
|
||||
|
||||
vi /etc/apache2/vhosts.d/yourdomain.com.conf
|
||||
|
||||
By default, any access to ini files is denied with a "Not Found" 404 HTTP code. To enable a 404, or Forbidden return code, change the following lines in the virtual host file.
|
||||
|
||||
Uncomment:
|
||||
|
||||
# 403 Forbidden for ini files
|
||||
#RewriteRule \.ini$ - [F,NC]
|
||||
|
||||
Comment:
|
||||
|
||||
# 404 Not Found for ini files
|
||||
AliasMatch \.ini$ /404
|
||||
|
||||
### PHP
|
||||
|
||||
You should also verify that your `php.ini` file has a few important values set correctly.
|
||||
|
||||
vi /etc/php5/apache2/php.ini
|
||||
|
||||
Search for the following values and make sure they're correct.
|
||||
|
||||
file_uploads = On
|
||||
upload_max_filesize = 16M
|
||||
post_max_size = 16M
|
||||
|
||||
Now you're ready to restart apache and visit the site in your browser.
|
||||
|
||||
rcapache2 restart
|
||||
|
||||
### Launching your OpenPhoto site
|
||||
|
||||
Now you're ready to launch your OpenPhoto site. Point your browser to your host and you'll be taken to a setup screen. You'll need your cloud account credentials to continue.
|
||||
|
||||
Once you complete the 3 steps your site will be up and running and you'll be redirected there. The _setup_ screen won't show up anymore. If for any reason you want to go through the setup again you will need to delete the generated config file and refresh your browser.
|
||||
|
||||
rm /srv/www/htdocs/yourdomain.com/src/configs/generated/settings.ini
|
||||
|
||||
**ENJOY!**
|
||||
|
131
docs/guides/InstallationSharedHosting.markdown
Normal file
131
docs/guides/InstallationSharedHosting.markdown
Normal file
|
@ -0,0 +1,131 @@
|
|||
# OpenPhoto / Installation for Shared Hosting
|
||||
|
||||
#### OpenPhoto, a photo service for the masses
|
||||
|
||||
## Installation on Shared Hosting
|
||||
|
||||
This guide instructs you on how to install OpenPhoto on shared hosting sites such as Dreamhost or Bluehost. OpenPhoto can be difficult to install for users not experienced with performing such installations. If you'd like to use OpenPhoto without installing the software yourself, <a href="http://openphoto.me">get started here</a>.
|
||||
|
||||
If you're using Dreamhost <a href="https://github.com/photo/frontend/blob/master/documentation/guides/InstallationDreamhost.markdown">we have a community-written guide for Dreamhost users</a>. Because every webhost is unique, we welcome additions to this guide as well as guides on installing OpenPhoto on your webhost.
|
||||
|
||||
*OpenPhoto should be installed in the root directory of a domain or subdomain.*
|
||||
|
||||
Variables:
|
||||
|
||||
- *OpenPhotoRoot*: the root directory for OpenPhoto (e.g., ~/openphoto)
|
||||
|
||||
### Before you install OpenPhoto
|
||||
This guide assumes you have:
|
||||
* Checked that your webhost supports MySQL and PHP
|
||||
* Shell or FTP access to your web server
|
||||
* An FTP or SSH client
|
||||
* A web browser of choice
|
||||
* An external cloud service account on Amazon or Dropbox (if you want to store your photos there)
|
||||
|
||||
|
||||
### The short version
|
||||
Here's the short version of the instructions for those already comfortable with installing software on a web server. You can check out the detailed instructions below for more information on each step.
|
||||
|
||||
1. Download the latest version of OpenPhoto from Github and extract it to the root folder of your website. <a href="https://github.com/photo/frontend/archive/master.zip">Direct link to latest version as a .zip file</a>
|
||||
|
||||
2. Prepare your cloud storage option and have your credentials ready. (Optional)
|
||||
|
||||
3. Create a new MySQL database and a new user for that database. Remember the hostname (the default should be fine), database name, username, and password. Your webhost may have a MySQL control panel such as PhpMyAdmin that you can do this in.
|
||||
|
||||
4. Create the following folders and chmod them to 775:
|
||||
|
||||
mkdir OpenPhotoRoot/src/html/assets/cache
|
||||
chmod 775 OpenPhotoRoot/src/html/assets/cache
|
||||
|
||||
mkdir OpenPhotoRoot/src/html/photos
|
||||
chmod 775 OpenPhotoRoot/src/html/photos
|
||||
|
||||
mkdir OpenPhotoRoot/src/userdata
|
||||
chmod 775 OpenPhotoRoot/src/userdata
|
||||
|
||||
5. Visit your website and follow the instructions.
|
||||
|
||||
That's it! OpenPhoto should now be installed. Because there are so many special cases specific to individual webhosts along with things that could go wrong, you may want to read the full instructions below.
|
||||
|
||||
### The detailed version
|
||||
|
||||
#### 1. Download OpenPhoto from Github.
|
||||
<a href="https://github.com/photo/frontend/archive/master.zip">Direct link to latest version as a .zip file</a>. You can also do the following:
|
||||
|
||||
wget https://github.com/photo/frontend/tarball/master -O openphoto.tar.gz
|
||||
tar -zxvf openphoto.tar.gz
|
||||
mv openphoto-frontend-* OpenPhotoRoot
|
||||
|
||||
#### 2. Install any dependencies or modules needed.
|
||||
Your webhost may include them by default. Check their documentation. Here's what you'll need:
|
||||
|
||||
* The Pecl extension oauth for authentication
|
||||
* ImageMagick or GD for photo rendering
|
||||
|
||||
The method of installing these varies by webhost. Some webhosts let you install them by yourself; others will install these for you if you contact them.
|
||||
|
||||
#### 3. Create your cloud accounts (optional).
|
||||
Create an account at <a href="https://aws.amazon.com/s3">Amazon AWS</a> or <a href="http://www.dropbox.com">Dropbox</a> if you plan to use them. Create a new bucket (S3) or app (Dropbox). Save your keys since you'll need them soon.
|
||||
|
||||
At Amazon:
|
||||
* Sign in and visit <a href="https://console.aws.amazon.com/s3/home">the S3 panel</a> and select Create a New Bucket.
|
||||
* Give your bucket a name and select a region, then select Create.
|
||||
* <a href="https://portal.aws.amazon.com/gp/aws/securityCredentials">Obtain your access keys</a> and save them.
|
||||
|
||||
At Dropbox:
|
||||
* Sign in and create a folder for your photos to go in.
|
||||
* Visit <a href="https://www.dropbox.com/developers/apps">the developers page</a>
|
||||
* Select Create an App, and select Core API for App Type and Full Dropbox Access.
|
||||
|
||||
This will give you a development app to use for your photos. Save your access keys; you'll need them soon.
|
||||
|
||||
#### 4. Create a database and user.
|
||||
Visit your control panel for managing databases and create a new database and new user for the database. Give the user `CREATE DATABASE` privileges. Remember the hostname (the default should be fine), database name, username, and password. You'll need these during setup.
|
||||
|
||||
#### 5. Configure the subdomain or domain.
|
||||
You may have to add the domain if you're bringing in a new domain. Consult your webhost's documentation if needed. Depending on your webhost you may have to visit multiple areas of the site to configure everything, or you may have to configure these separately. But here's what you need to set up.
|
||||
|
||||
* PHP: Select the latest version, FastCGI configuration if available
|
||||
* Web directory: OpenPhotoRoot/src/html
|
||||
|
||||
#### 6. Upload OpenPhoto.
|
||||
Upload the contents of the downloaded OpenPhoto folder to OpenPhotoRoot if you haven't already done that. You can do this with an FTP or SSH client.
|
||||
|
||||
#### 7. Create the following directories.
|
||||
|
||||
the cache:
|
||||
mkdir OpenPhotoRoot/src/html/assets/cache
|
||||
chmod 775 OpenPhotoRoot/src/html/assets/cache
|
||||
|
||||
to store your photos if you're planning on local storage:
|
||||
mkdir OpenPhotoRoot/src/html/photos
|
||||
chmod 775 OpenPhotoRoot/src/html/photos
|
||||
|
||||
to store userdata:
|
||||
mkdir OpenPhotoRoot/src/userdata
|
||||
chmod 775 OpenPhotoRoot/src/userdata
|
||||
|
||||
#### 8. Install OpenPhoto
|
||||
After waiting a sufficient amount of time for the subdomain name to propagate, use the browser to connect to the new subdomain. You should see a setup page for OpenPhoto which will allow you to configure your OpenPhoto project.
|
||||
|
||||
* Enter your email address and select a password.
|
||||
|
||||
* Select your image renderer (ImageMagick or GD are the most common options), database (MySQL or InnoDB), and storage (Local filesystem, Amazon S3, Amazon S3+Dropbox, Local filesystem+Dropbox).
|
||||
|
||||
* Enter your credentials for your database, Amazon S3, or Dropbox.
|
||||
|
||||
**ENJOY!**
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
#### Setup page looks strange (black and white, unstyled)
|
||||
If the setup page is not colorful and well formatted, then the css and javascript files are most likely not being loaded. Possible causes:
|
||||
|
||||
- Web directory root is not properly set (check control panel for the subdomain)
|
||||
- src/html/assets/cache directory is not writeable by Apache (check your permissions)
|
||||
|
||||
#### My webhost doesn't recognize OpenPhotoRoot/src/html as the index directory.
|
||||
You can set this in the .htaccess page at OpenPhotoRoot/src. If your webhost lets you set this through the web panel you can also do that there.
|
||||
|
||||
#### Error setting up the database
|
||||
Double check all the parameters. Check your database control panel and verify that everything is correct. Also double check that the user for your database has permission to create a database.
|
130
docs/guides/InstallationUbuntuApache.markdown
Normal file
130
docs/guides/InstallationUbuntuApache.markdown
Normal file
|
@ -0,0 +1,130 @@
|
|||
OpenPhoto / Installation for Ubuntu + Apache
|
||||
=======================
|
||||
#### OpenPhoto, a photo service for the masses
|
||||
|
||||
## OS: Linux Ubuntu Server 10.04+
|
||||
|
||||
This guide instructs you on how to install OpenPhoto on an Ubuntu Server.
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Prerequisites
|
||||
|
||||
#### Database and File System Options
|
||||
|
||||
##### MySql
|
||||
You'll need to provide credentials for a MySql database. If the database doesn't already exist it will be created. If the user doesn't have `CREATE DATABASE` permissions then make sure it's already created.
|
||||
|
||||
##### AWS
|
||||
If you're going to use AWS services then You'll need to be signed up for them.
|
||||
|
||||
* http://aws.amazon.com/simpledb/
|
||||
* http://aws.amazon.com/s3/
|
||||
|
||||
#### Server Packages and Modules
|
||||
Once you've confirmed that your cloud account is setup you can get started on your server. For that you'll need to have _Apache_, _PHP_ and _curl_ installed with a few modules.
|
||||
|
||||
apt-get update
|
||||
apt-get upgrade
|
||||
apt-get install apache2 php5 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php-apc build-essential libpcre3-dev php-pear
|
||||
a2enmod rewrite
|
||||
|
||||
And if you are going to use MySQL install `php5-mysql`.
|
||||
|
||||
There are also a few optional but recommended packages and modules.
|
||||
|
||||
apt-get install php5-dev php5-imagick exiftran
|
||||
pecl install oauth
|
||||
a2enmod deflate
|
||||
a2enmod expires
|
||||
a2enmod headers
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Installing OpenPhoto
|
||||
|
||||
Download and install the source code. We recommend `/var/www/yourdomain.com` but you can use any directory you'd like.
|
||||
|
||||
#### Using git clone
|
||||
|
||||
apt-get install git-core
|
||||
git clone git://github.com/photo/frontend.git /var/www/yourdomain.com
|
||||
|
||||
#### Using tar
|
||||
|
||||
cd /var/www
|
||||
wget https://github.com/photo/frontend/tarball/master -O openphoto.tar.gz
|
||||
tar -zxvf openphoto.tar.gz
|
||||
mv openphoto-frontend-* yourdomain.com
|
||||
|
||||
Assuming that this is a development machine you only need to make the config writable by the user Apache runs as. Most likely `www-data`.
|
||||
|
||||
mkdir /var/www/yourdomain.com/src/userdata
|
||||
mkdir /var/www/yourdomain.com/src/html/photos
|
||||
mkdir /var/www/yourdomain.com/src/html/assets/cache
|
||||
chown www-data:www-data /var/www/yourdomain.com/src/userdata
|
||||
chown www-data:www-data /var/www/yourdomain.com/src/html/photos
|
||||
chown www-data:www-data /var/www/yourdomain.com/src/html/assets/cache
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Setting up Apache and PHP
|
||||
|
||||
#### Apache
|
||||
|
||||
You'll need to copy the sample virtual host configuration file from the source to `/etc/apache2/sites-available`.
|
||||
|
||||
cp /var/www/yourdomain.com/src/configs/openphoto-vhost.conf /etc/apache2/sites-available/openphoto
|
||||
|
||||
You'll need to replace instances of `/path/to/openphoto/html/directory` with `/var/www/yourdomain.com/src/html` or wherever you placed the code. Depending on which modules you installed you may have to comment out some of the `Expires*` directives.
|
||||
|
||||
vi /etc/apache2/sites-available/openphoto
|
||||
|
||||
Now enable openphoto and disable Apache's default virtual host.
|
||||
|
||||
a2dissite default
|
||||
a2ensite openphoto
|
||||
|
||||
|
||||
By default, any access to ini files is denied with a "Not Found" 404 HTTP code. To enable a 403, or Forbidden return code, change the following lines in the virtual host file.
|
||||
|
||||
Uncomment:
|
||||
|
||||
# 403 Forbidden for ini files
|
||||
#RewriteRule \.ini$ - [F,NC]
|
||||
|
||||
Comment:
|
||||
|
||||
# 404 Not Found for ini files
|
||||
AliasMatch \.ini$ /404
|
||||
|
||||
### PHP
|
||||
|
||||
You should also verify that your `php.ini` file has a few important values set correctly.
|
||||
|
||||
vi /etc/php5/apache2/php.ini
|
||||
|
||||
Search for the following values and make sure they're correct.
|
||||
|
||||
file_uploads = On
|
||||
upload_max_filesize = 16M
|
||||
post_max_size = 16M
|
||||
|
||||
Search for, and if needed add the following line to load the Oauth Extention.
|
||||
|
||||
extension=oauth.so
|
||||
|
||||
Now you're ready to restart apache and visit the site in your browser.
|
||||
|
||||
/etc/init.d/apache2 restart
|
||||
|
||||
### Launching your OpenPhoto site
|
||||
|
||||
Now you're ready to launch your OpenPhoto site. Point your browser to your host and you'll be taken to a setup screen. You'll need your cloud account credentials to continue.
|
||||
|
||||
Once you complete the 3 steps your site will be up and running and you'll be redirected there. The _setup_ screen won't show up anymore. If for any reason you want to go through the setup again you will need to delete the generated config file and refresh your browser.
|
||||
|
||||
rm /var/www/yourdomain.com/src/userdata/configs/yourdomain.com.ini
|
||||
|
||||
**ENJOY!**
|
||||
|
167
docs/guides/InstallationUbuntuApache.sh
Executable file
167
docs/guides/InstallationUbuntuApache.sh
Executable file
|
@ -0,0 +1,167 @@
|
|||
#!/bin/bash
|
||||
#######################################
|
||||
# OpenPhoto Install
|
||||
# Run with sudo for best results
|
||||
#######################################
|
||||
SECONDS=0
|
||||
if [[ "$(/usr/bin/whoami)" != "root" ]]; then
|
||||
echo "This script must be run as root or using sudo.Script aborted."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "===================================================="
|
||||
echo "Updating Ubuntu and apt-get"
|
||||
echo "===================================================="
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
apt-get update --assume-yes --quiet
|
||||
apt-get upgrade --assume-yes --quiet
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "===================================================="
|
||||
echo "Installing needed packages and modules"
|
||||
echo "===================================================="
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
apt-get install --assume-yes --quiet apache2 mysql-server mysql-client php5 libapache2-mod-php5 php5-curl curl php5-gd php5-mcrypt php5-mysql php-pear php-apc build-essential libpcre3-dev
|
||||
a2enmod rewrite
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "===================================================="
|
||||
echo "Installing optional but recommended packages and modules"
|
||||
echo "===================================================="
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
apt-get install --assume-yes --quiet php5-dev php5-imagick exiftran
|
||||
a2enmod deflate
|
||||
a2enmod expires
|
||||
a2enmod headers
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "===================================================="
|
||||
echo "Installing oauth from pecl"
|
||||
echo "===================================================="
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
pecl install oauth
|
||||
mkdir -p /etc/php5/apache2/conf.d/
|
||||
echo "extension=oauth.so" >> /etc/php5/apache2/conf.d/oauth.ini
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "===================================================="
|
||||
echo "Downloading OpenPhoto and unpacking"
|
||||
echo "===================================================="
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
wget https://github.com/photo/frontend/tarball/master -O openphoto.tar.gz
|
||||
tar -zxvf openphoto.tar.gz > /dev/null 2>&1
|
||||
mv photo-frontend-* /var/www/openphoto
|
||||
sudo rm openphoto.tar.gz
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "===================================================="
|
||||
echo "Setting permissions for Dev server"
|
||||
echo "===================================================="
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
mkdir /var/www/openphoto/src/userdata
|
||||
chown www-data:www-data /var/www/openphoto/src/userdata
|
||||
|
||||
mkdir /var/www/openphoto/src/html/assets/cache
|
||||
chown www-data:www-data /var/www/openphoto/src/html/assets/cache
|
||||
|
||||
mkdir /var/www/openphoto/src/html/photos
|
||||
chown www-data:www-data /var/www/openphoto/src/html/photos
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "===================================================="
|
||||
echo "Setting up Apache"
|
||||
echo "===================================================="
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
cp /var/www/openphoto/src/configs/openphoto-vhost.conf /etc/apache2/sites-available/openphoto
|
||||
sed 's/\/path\/to\/openphoto\/html\/directory/\/var\/www\/openphoto\/src\/html/g' /var/www/openphoto/src/configs/openphoto-vhost.conf > /etc/apache2/sites-available/openphoto
|
||||
a2dissite default
|
||||
a2ensite openphoto
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "===================================================="
|
||||
echo "Adjusting PHP settings"
|
||||
echo "===================================================="
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
sed -e 's/file_uploads.*/file_uploads = On/g' -e 's/upload_max_filesize.*/upload_max_filesize = 16M/g' -e 's/post_max_size.*/post_max_size = 16M/g' /etc/php5/apache2/php.ini > /etc/php5/apache2/php.ini.tmp
|
||||
mv /etc/php5/apache2/php.ini.tmp /etc/php5/apache2/php.ini
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "===================================================="
|
||||
echo "Launching Your OpenPhoto site"
|
||||
echo "===================================================="
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
/etc/init.d/apache2 restart
|
||||
|
||||
# finding IP address and compensating for possible EC2 installation
|
||||
EC2=`curl --silent --connect-timeout 1 http://169.254.169.254/latest/meta-data/public-hostname`
|
||||
if [[ $EC2 != "" ]];
|
||||
then
|
||||
IP=`echo $EC2 | sed -rn 's/ec2-(.*?)\.compute.*/\1/p' | sed 's/-/./g'`
|
||||
else
|
||||
IP=`ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "****************************************************"
|
||||
echo "===================================================="
|
||||
echo "CONGRATULATIONS!!!"
|
||||
echo ""
|
||||
echo "The photographic heavens are applauding your"
|
||||
echo "brand new installation of OpenPhoto."
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Took $SECONDS seconds to install."
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Now you can test your installation by directing your"
|
||||
echo "browser to $IP"
|
||||
echo "===================================================="
|
||||
echo "****************************************************"
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
132
docs/guides/InstallationUbuntuCherokee.markdown
Normal file
132
docs/guides/InstallationUbuntuCherokee.markdown
Normal file
|
@ -0,0 +1,132 @@
|
|||
OpenPhoto / Installation for Ubuntu + Cherokee
|
||||
=======================
|
||||
#### OpenPhoto, a photo service for the masses
|
||||
|
||||
## OS: Linux Ubuntu Server 10.04+
|
||||
|
||||
This guide instructs you on how to install OpenPhoto on Cherokee Web Server on an Ubuntu server.
|
||||
To have a recent version of Cherokee, I advice to add the ppa maintained with latest version. You can add it with the command below.
|
||||
|
||||
add-apt-repository ppa:cherokee-webserver/ppa
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Prerequisites
|
||||
|
||||
#### Database and File System Options
|
||||
|
||||
##### MySql
|
||||
You'll need to provide credentials for a MySql database. If the database doesn't already exist it will be created. If the user doesn't have `CREATE DATABASE` permissions then make sure it's already created.
|
||||
|
||||
##### AWS
|
||||
If you're going to use AWS services then You'll need to be signed up for them.
|
||||
|
||||
* http://aws.amazon.com/simpledb/
|
||||
* http://aws.amazon.com/s3/
|
||||
|
||||
#### Server Packages and Modules
|
||||
Once you've confirmed that your cloud account is setup you can get started on your server. For that you'll need to have _Cherokee_, _PHP_ and _curl_ installed with a few modules.
|
||||
|
||||
apt-get update
|
||||
apt-get upgrade
|
||||
apt-get install cherokee php5-fpm php5-curl php5-mcrypt php-apc build-essential libpcre3-dev
|
||||
|
||||
And if you are going to use MySQL install `php5-mysql`.
|
||||
|
||||
There are also a few optional but recommended packages and modules.
|
||||
|
||||
apt-get install php5-imagick exiftran
|
||||
pecl install oauth
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Installing OpenPhoto
|
||||
|
||||
Download and install the source code. We recommend `/var/www/yourdomain.com` but you can use any directory you'd like.
|
||||
|
||||
#### Using git clone
|
||||
|
||||
apt-get install git-core
|
||||
git clone git://github.com/photo/frontend.git /var/www/yourdomain.com
|
||||
chown -R www-data:www-data /var/www/yourdomain.com
|
||||
|
||||
#### Using tar
|
||||
|
||||
cd /var/www
|
||||
wget https://github.com/photo/frontend/tarball/master -O openphoto.tar.gz
|
||||
tar -zxvf openphoto.tar.gz
|
||||
mv openphoto-frontend-* yourdomain.com
|
||||
chown -R www-data:www-data yourdomain.com
|
||||
|
||||
Assuming that this is a development machine you can make the config writable by the user Apache runs as. Most likely `www-data`.
|
||||
|
||||
mkdir /var/www/yourdomain.com/src/userdata
|
||||
chown www-data:www-data /var/www/yourdomain.com/src/userdata
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Setting up Cherokee and PHP
|
||||
|
||||
### PHP
|
||||
|
||||
You should also verify that your `php.ini` file has a few important values set correctly.
|
||||
|
||||
vi /etc/php5/fpm/php.ini
|
||||
|
||||
Search for the following values and make sure they're correct.
|
||||
|
||||
file_uploads = On
|
||||
upload_max_filesize = 16M
|
||||
post_max_size = 16M
|
||||
|
||||
Now you're ready to restart php5-fpm to use the new parameters.
|
||||
|
||||
/etc/init.d/php5-fpm restart
|
||||
|
||||
### Cherokee
|
||||
|
||||
Launch the administration web interface and connect to it
|
||||
|
||||
cherokee-admin
|
||||
firefox http://localhost:9090
|
||||
|
||||
Note that if you're not connecting from the same machine, you'll have to use the `-b[<IP>]` parameter to bind cherokee-admin to an externally accessible network interface.
|
||||
|
||||
Go the sections "Vservers" and create a new vserver with the + button
|
||||
|
||||
In the "Languages" sub-section, choose "PHP" and click "Add"
|
||||
|
||||
Set the Document Root to `/var/www/yourdomain.com/src/html` and click "Next"
|
||||
|
||||
Enter the Vhost Name the configuration will serve and set the log configuration; click "Create"
|
||||
|
||||
Now, go to the rules definition and add a "File Exists" rules, invert the rule with "Not" button and set the following parameters:
|
||||
|
||||
* Match any file: enable
|
||||
* Use I/O Cache: enable
|
||||
* Only match files: disable
|
||||
* If dir, check Index files: disable
|
||||
|
||||
Go to the tab "Handler", set a "Redirection" handler with the following parameters:
|
||||
|
||||
* Show: Internal
|
||||
* Regular Expression: `^/([^?]*)(\?+([^?]*))*$`
|
||||
* Substitution: `index.php?__route__=/$1&$3`
|
||||
|
||||
Click "Add".
|
||||
|
||||
Press the button "Save", and restart Cherokee.
|
||||
|
||||
### Launching your OpenPhoto site
|
||||
|
||||
Now you're ready to launch your OpenPhoto site. Point your browser to your host and you'll be taken to a setup screen. You'll need your cloud account credentials to continue.
|
||||
|
||||
Once you complete the 3 steps your site will be up and running and you'll be redirected there. The _setup_ screen won't show up anymore. If for any reason you want to go through the setup again you will need to delete the generated config file and refresh your browser.
|
||||
|
||||
rm /var/www/yourdomain.com/src/configs/generated/settings.ini
|
||||
|
||||
FIXME: On some systems (?), this config file is in another spot:
|
||||
|
||||
/var/www/yourdomain.com/src/userdata/configs/yourdomain.com.ini
|
||||
|
||||
**ENJOY!**
|
112
docs/guides/InstallationUbuntuLighttpd.markdown
Normal file
112
docs/guides/InstallationUbuntuLighttpd.markdown
Normal file
|
@ -0,0 +1,112 @@
|
|||
OpenPhoto / Installation for Lighttpd on Ubuntu/Debian
|
||||
=======================
|
||||
#### OpenPhoto, a photo service for the masses
|
||||
|
||||
This guide instructs you on how to install OpenPhoto under Lighttpd on Ubuntu or Debian
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Prerequisites
|
||||
|
||||
#### Database and File System Options
|
||||
|
||||
##### MySql
|
||||
You'll need to provide credentials for a MySql database. If the database doesn't already exist it will be created. If the user doesn't have `CREATE DATABASE` permissions then make sure it's already created.
|
||||
|
||||
##### AWS
|
||||
If you're going to use AWS services then You'll need to be signed up for them.
|
||||
|
||||
* http://aws.amazon.com/simpledb/
|
||||
* http://aws.amazon.com/s3/
|
||||
|
||||
#### Server Packages and Modules
|
||||
Once you've confirmed that your database is setup you can get started on your server. For that you'll need to have _Lighttpd_, and _PHP_ installed with a few modules.
|
||||
|
||||
apt-get update
|
||||
apt-get upgrade
|
||||
apt-get install lighttpd php5-cgi php5-curl php5-gd php5-mcrypt php-apc
|
||||
|
||||
And if you are going to use MySQL install `php5-mysql`.
|
||||
|
||||
There are also a few optional but recommended packages and modules.
|
||||
|
||||
apt-get install php5-imagick exiftran
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Installing OpenPhoto
|
||||
|
||||
Download and install the source code. We recommend `/var/www/yourdomain.com` but you can use any directory you'd like.
|
||||
|
||||
#### Using git clone
|
||||
|
||||
apt-get install git-core
|
||||
git clone git://github.com/photo/frontend.git /var/www/yourdomain.com
|
||||
|
||||
#### Using tar
|
||||
|
||||
cd /var/www
|
||||
wget https://github.com/photo/frontend/tarball/master -O openphoto.tar.gz
|
||||
tar -zxvf openphoto.tar.gz
|
||||
mv openphoto-frontend-* yourdomain.com
|
||||
|
||||
There are certain directories that need to be created and made writable by the user the Lighttpd server runs as. Most likely (on Ubuntu/Debian) this is `www-data`.
|
||||
|
||||
mkdir /var/www/yourdomain.com/src/userdata
|
||||
mkdir /var/www/yourdomain.com/src/html/photos
|
||||
mkdir /var/www/yourdomain.com/src/html/assets/cache
|
||||
chown www-data:www-data /var/www/yourdomain.com/src/userdata
|
||||
chown www-data:www-data /var/www/yourdomain.com/src/html/photos
|
||||
chown www-data:www-data /var/www/yourdomain.com/src/html/assets/cache
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Setting up Lighttpd and PHP
|
||||
|
||||
#### Lighttpd
|
||||
|
||||
First you will need to copy the sample Lighttpd configuration into a place where Lighty can find it.
|
||||
|
||||
cp /var/www/yourdomain.com/src/configs/openphoto-lighttpd.conf /etc/lighttpd/conf-available/99-openphoto.conf
|
||||
|
||||
The `99` in the prefix of the destination filename above is so that Lighttpd loads our OpenPhoto configuration last. In reality you can use any number greater than the prefix of the FastCGI configuration.
|
||||
|
||||
Next open the configuration you just copied and edit it to match your site. Edit the `$HTTP["host"]` line and replace the variable contents with the subdomain where you are installing OpenPhoto. The value is a regular expression, so keep the `\.` which matches a period instead of any character as well as the `^` `$` to direct matching the beginning and end of the hostname respectively.
|
||||
|
||||
Now replace the path on the `server.document-root` line with the path to the `src/html` sub-directory where you downloaded/copied OpenPhoto. This path would be `/var/www/yourdomain.com/src/html` if you followed the directions in the last section exactly.
|
||||
|
||||
A few modules must be enabled for use by Lighty for our OpenPhoto install. First edit `/etc/lighttpd/lighttpd.conf` and uncomment the line for `mod_rewrite` under the `server.modules` section. Next enable PHP through the FastCGI module from the command line.
|
||||
|
||||
lighttpd-enable-mod fastcgi
|
||||
|
||||
Finally, enable your edited configuration and force Lighty to reload its configuration.
|
||||
|
||||
lighttpd-enable-mod openphoto
|
||||
/etc/init.d/lighttpd force-reload
|
||||
|
||||
### PHP
|
||||
|
||||
You should also verify that your `php.ini` file has a few important values set correctly.
|
||||
|
||||
vi /etc/php5/cgi/php.ini
|
||||
|
||||
Search for the following values and make sure they're correct.
|
||||
|
||||
file_uploads = On
|
||||
upload_max_filesize = 16M
|
||||
post_max_size = 16M
|
||||
|
||||
If you made any changes then restart your Lighttpd server.
|
||||
|
||||
/etc/init.d/lighttpd restart
|
||||
|
||||
### Launching your OpenPhoto site
|
||||
|
||||
Now you're ready to launch your OpenPhoto site. Point your browser to your host and you'll be taken to a setup screen. You'll need your cloud account credentials to continue.
|
||||
|
||||
Once you complete the 3 steps your site will be up and running and you'll be redirected there. The _setup_ screen won't show up anymore. If for any reason you want to go through the setup again you will need to delete the generated config file and refresh your browser.
|
||||
|
||||
rm /var/www/yourdomain.com/src/userdata/configs/yourdomain.com.ini
|
||||
|
||||
**ENJOY!**
|
||||
|
115
docs/guides/InstallationUbuntuNGinx.markdown
Normal file
115
docs/guides/InstallationUbuntuNGinx.markdown
Normal file
|
@ -0,0 +1,115 @@
|
|||
OpenPhoto / Installation for Ubuntu|Debian + Nginx
|
||||
=======================
|
||||
#### OpenPhoto, a photo service for the masses
|
||||
|
||||
## OS: Linux Ubuntu 12.04+ or Debian 6.0+
|
||||
|
||||
This guide instructs you on how to install OpenPhoto on an Ubuntu Desktop|Server or Debian distribution.
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Prerequisites
|
||||
|
||||
#### Database and File System Options
|
||||
|
||||
##### MySql
|
||||
You'll need to provide credentials for a MySql database. If the database doesn't already exist it will be created. If the user doesn't have `CREATE DATABASE` permissions then make sure it's already created.
|
||||
|
||||
##### AWS
|
||||
If you're going to use AWS services then You'll need to be signed up for them.
|
||||
|
||||
* http://aws.amazon.com/simpledb/
|
||||
* http://aws.amazon.com/s3/
|
||||
|
||||
#### Server Packages and Modules
|
||||
Once you've confirmed that your cloud account is setup you can get started on your server. For that you'll need to have _NGinx_, _PHP-FPM_ and _CURL_ installed with a few modules.
|
||||
|
||||
apt-get update
|
||||
apt-get upgrade
|
||||
apt-get install nginx php5-fpm curl php5-curl php5-gd php5-mcrypt php-pear
|
||||
|
||||
And if you are going to use MySQL install `php5-mysql`.
|
||||
|
||||
There are also a few optional but recommended packages and modules.
|
||||
|
||||
apt-get install php5-dev php5-imagick exiftran
|
||||
pecl install oauth
|
||||
sh -c "echo \"extension=oauth.so\" >> /etc/php5/conf.d/oauth.ini"
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Installing OpenPhoto
|
||||
|
||||
Download and install the source code. We recommend `/var/www/yourdomain.com` but you can use any directory you'd like.
|
||||
|
||||
#### Using git clone
|
||||
|
||||
apt-get install git-core
|
||||
git clone git://github.com/photo/frontend.git /var/www/yourdomain.com
|
||||
|
||||
#### Using tar
|
||||
|
||||
cd /var/www
|
||||
wget https://github.com/photo/frontend/tarball/master -O openphoto.tar.gz
|
||||
tar -zxvf openphoto.tar.gz
|
||||
mv openphoto-frontend-* yourdomain.com
|
||||
|
||||
Assuming that this is a development machine you only need to make the config writable by the user Nginx runs as. Most likely `www-data`.
|
||||
|
||||
mkdir /var/www/yourdomain.com/src/userdata
|
||||
mkdir /var/www/yourdomain.com/src/html/photos
|
||||
mkdir /var/www/yourdomain.com/src/html/assets/cache
|
||||
chown www-data:www-data /var/www/yourdomain.com/src/userdata
|
||||
chown www-data:www-data /var/www/yourdomain.com/src/html/photos
|
||||
chown www-data:www-data /var/www/yourdomain.com/src/html/assets/cache
|
||||
|
||||
----------------------------------------
|
||||
|
||||
### Setting up NGinx and PHP
|
||||
|
||||
#### NGinx
|
||||
|
||||
You'll need to copy the sample virtual host configuration file from the source to `/etc/nginx/sites-enabled`.
|
||||
|
||||
cp /var/www/yourdomain.com/src/configs/openphoto-nginx.conf /etc/nginx/sites-enabled/openphoto
|
||||
|
||||
You'll need to replace:
|
||||
|
||||
* The host name (yourdomain.com)
|
||||
* The path where OpenPhoto is installed (/var/www/yourdomain.com/src/html/)
|
||||
|
||||
`/etc/nginx/sites-enabled/openphoto`
|
||||
|
||||
You also need to change the port on which nginx talks to PHP. Change the
|
||||
comments in the fastcgi_pass section to look like this:
|
||||
|
||||
#fastcgi_pass 127.0.0.1:9000;
|
||||
# Unix socket is faster and default on Ubuntu/Debian:
|
||||
fastcgi_pass fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
|
||||
### PHP
|
||||
|
||||
You should also verify that your `php.ini` file has a few important values set correctly.
|
||||
|
||||
vi etc/php5/fpm/php.ini
|
||||
|
||||
Search for the following values and make sure they're correct.
|
||||
|
||||
file_uploads = On
|
||||
upload_max_filesize = 16M
|
||||
post_max_size = 16M
|
||||
|
||||
Now you're ready to restart apache and visit the site in your browser.
|
||||
|
||||
service php-fpm restart
|
||||
service nginx restart
|
||||
|
||||
### Launching your OpenPhoto site
|
||||
|
||||
Now you're ready to launch your OpenPhoto site. Point your browser to your host and you'll be taken to a setup screen. You'll need your cloud account credentials to continue.
|
||||
|
||||
Once you complete the 3 steps your site will be up and running and you'll be redirected there. The _setup_ screen won't show up anymore. If for any reason you want to go through the setup again you will need to delete the generated config file and refresh your browser.
|
||||
|
||||
rm /var/www/yourdomain.com/src/userdata/configs/yourdomain.com.ini
|
||||
|
||||
**ENJOY!**
|
56
docs/guides/InstallationUsingOpenPhotoEC2-AMI.markdown
Normal file
56
docs/guides/InstallationUsingOpenPhotoEC2-AMI.markdown
Normal file
|
@ -0,0 +1,56 @@
|
|||
OpenPhoto / Installation for AWS EC2 using an AMI
|
||||
=======================
|
||||
#### OpenPhoto, a photo service for the masses
|
||||
|
||||
### Prerequisites
|
||||
|
||||
#### Cloud Accounts
|
||||
|
||||
Before setting up your server you'll need to make sure you have your cloud accounts set up. If you're using Amazon then make sure you've enabled both S3 and SimpleDb.
|
||||
|
||||
* http://aws.amazon.com/simpledb/
|
||||
* http://aws.amazon.com/s3/
|
||||
|
||||
### Starting up an OpenPhoto EC2 Instance
|
||||
|
||||
1. Sign Into AWS Management Console and make sure "Amazon Elastic Compute Cloud (EC2)" is selected from the dropdown menu.
|
||||
|
||||
1. Click AMIs under Images.
|
||||
|
||||
1. Search for openphoto-instance.
|
||||
|
||||
1. Select the latest version by date or version.
|
||||
|
||||
1. Click Launch.
|
||||
|
||||
1. Click through EC2 options.
|
||||
|
||||
1. Ensure selected security group allow HTTP & SSH access.
|
||||
|
||||
1. Click back to Instances and wait for new instance to finish starting.
|
||||
|
||||
1. Once started, click on the new instance in the web interface, copy the public DNS information.
|
||||
|
||||
### Launching your OpenPhoto site
|
||||
|
||||
Now you're ready to launch your OpenPhoto site. Point your browser to your new EC2 host and you'll be taken to a setup screen. You'll need your cloud account credentiato continue.
|
||||
|
||||
Once you complete the 3 steps your site will be up and running and you'll be redirected there. The _setup_ screen won't show up anymore. If for any reason you want to go through the setup again you will need to delete the generated config file and refresh your browser.
|
||||
|
||||
rm /var/www/yourdomain.com/src/configs/generated/settings.ini
|
||||
|
||||
**ENJOY!**
|
||||
|
||||
### TroubleShooting
|
||||
|
||||
#### Can't write to config directory
|
||||
Open a terminal or SSH client, using your amazon ec2 ssh public key, ssh into the instance as the ubuntu user using the public DNS information for your instance.
|
||||
|
||||
ssh -i amazon-key.pem ubuntu@new-instance.amazonaws.com
|
||||
|
||||
Verify the apache user has write access to the /home/ubuntu/openphoto/src/configs directory.
|
||||
|
||||
cd /home/ubuntu/openphoto/src/
|
||||
ls -ld ./configs
|
||||
|
||||
drwxr-xr-x 3 www-data www-data 4096 2011-08-20 02:37 configs
|
Loading…
Add table
Add a link
Reference in a new issue