Gallery 2

From INIwiki
Jump to: navigation, search

Install Gallery 2.1.2

Contents

[edit] MySQL

Start mysql deamon

service mysqld start

Add access to a user

mysql -uroot mysql

Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 to server version: 4.1.20

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

UPDATE user SET Password=PASSWORD('passkey') WHERE user='hans';
Query OK, 0 rows affected (0.01 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql>

GRANT ALL PRIVILEGES ON *.* TO 'hans'@'192.168.1.%' IDENTIFIED BY 'passkey' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql>

flush privileges;

Query OK, 0 rows affected (0.00 sec)

[edit] Configure Basic Apache Access

Log Apache to a mysql database; See this link -> Linux/Log Apache to MySQL

[edit] Download gallery 2.1.2

cd /usr/local/src/
wget http://prdownloads.sourceforge.net/gallery/gallery-2.1.2-full.tar.gz
tar fxzv gallery-2.1.2-full.tar.gz
mv gallery2 /var/www/html/

[edit] Configure mysql for gallery2

mysql -uroot -p

Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 35 to server version: 4.1.20-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

create database gallery2;

Query OK, 1 row affected (0.00 sec)

mysql>

use gallery2;

Database changed

mysql>

grant all on gallery2.* to hans@localhost identified by 'passkey';

Query OK, 0 rows affected (0.00 sec)

[edit] Install php-mysql module

yum install php-mysql

[edit] Install the following packages

NetPBM, ImageMagick, GD, GraphicsMagick, jhead

  • If you can not find the file use yum search variable to find proper case

ImageMagic:

yum install ImageMagick

NetPBM:

yum install netpbm

GD: (http://www.php.net/GD)

yum install gd (requires a php recompile on redhat)
yum install php-gd

GraphicsMagick: Use lynx to download file…

lynx http://sourceforge.net/project/showfiles.php?group_id=73485
tar fzxv GraphicsMagick-1.1.7.tar.gz
cd GraphicsMagick-1.1.7
./configure
make
make install

jhead:

cd /usr/bin/
wget http://www.sentex.net/~mwandel/jhead/jhead
chmod +x jhead

[edit] Configure the php.ini

vi /etc/php.ini
Modify the following lines;
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 60     ; Maximum execution time of each script, in seconds (30)
max_input_time = 120    ; Maximum amount of time each script may spend parsing request data (60)
memory_limit = 512M      ; Maximum amount of memory a script may consume (8MB) 

; Maximum size of POST data that PHP will accept.
;post_max_size = 8M
post_max_size = 50M

; Magic quotes for incoming GET/POST/Cookie data.
;magic_quotes_gpc = Off
magic_quotes_gpc = On

; Maximum allowed size for uploaded files.
;upload_max_filesize = 2M
upload_max_filesize = 50M


Restart Apache server Service httpd restart

[edit] Optional Installs

  • The Captcha module was installed, but needs configuration to be activated – Needs DC (php recompile)
  • The Dcraw module was installed, but needs configuration to be activated – Used for RAW images (needs los of RAM)
  • The Ffmpeg module was installed, but needs configuration to be activated –
    wget http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.4-1.el4.rf.i386.rpm
    rpm -Uhv rpmforge-release-0.3.4-1.el4.rf.i386.rpm
    yum install ffmpeg
    /usr/bin/ffmpeg in gallery web page
  • The ImageMagick module was installed, but needs configuration to be activated - ok
  • The Gd module was installed, but needs configuration to be activated – php recompile
Personal tools