Está en la página 1de 14

11/02/2009 Gallery3:Tutorials:Installation - Gall…

downloads documentation

search forums support development my account

Personal tools

Log in / create account

Gallery3:Tutorials:Installation
From Gallery Codex

Gallery3:Tutorials:Installation needs to be reviewed by other documentation team


members.

A list of pages in need of review can be found at Needs Review.

Gallery3:Tutorials:Installation is intended for Novice Users.

A more detailed, more technical page may be available.

Though this page is written for novice users, there may be skill prerequisites that are outside
the scope of this page.

Participation and commentary are always welcome.

Contents
1 SUMMARY -
2 The Purpose of these Tutorials
3 Background of a Novice Themer / Module writer/ Developer
4 Tutorial 1 Installation for Novices Wishing to Access Development of G3
5 [1.1.01] - Identify and upgrade the local server and its functioning.
6 [1.02] To GET G3 onto your own Local Server
7 [1.03] -To Update to the most recent version of G3 from “nightlies”.

…gallery2.org/Gallery3:Tutorials:Ins… 1/14
11/02/2009 Gallery3:Tutorials:Installation - Gall…
== Gallery Tutorials for Novices == –

[These tutorials, when easily found within Gallery, aim to give smoothe straightforward success, greatly reducing
the need for personal support and the time and frustration of that process. They originated as the processes were
explained to a novice.]

Title - Gallery Tutorials for Novices:- Installing Gallery

Category1- Gallery Installation

Category 2 – Less Technical

Keywords – tutorial, novice, installing Gallery, installation, intuitive, beginner, plain english, Joe Public, Joan Public,
clear instruction.

Index – Gallery Installation - Instructions for novices

Oneliner – Clear instructions for Joe Public - How to Install Gallery or G3 Nightlies.

SUMMARY -
Upon successful completion of this tutorial, even the novice user should understand how to prepare for, download,
and install Gallery.

The Purpose of these Tutorials


These tutorials give clear instructions in plain language, intended for Novices, less-technical people, self-taught Joe
and Joan Public interested in photography, keen to create themes, modules etc to organise their own Galleries for
family, friends, and websites, and to share with the Gallery project.

Some Basic Computer Knowledge is Essential but we do not assume prior understanding of the processes. We
include basic techniques only as needed for the gallery work of each tutorial. You should research these techniques
to understand them more fully. (Use Google and follow links within our text). We provide these brief instructions at
the beginning because without these basic skills, at the very least you will require personal assistance, and at worst
you could damage your computer system – time-consuming, frustrating and costly.

Background of a Novice Themer / Module writer/ Developer


For whatever reason, we did not learn Computing at School. Enthusiasm for Computing came later. We missed the
methodical tuition and learn what we need about computing as we need it.

While these tutorials will get us on our way, we are advised to learn the required processes and skills thoroughly
from their own specific tutorials on the internet.

One example of this - Where I start from:- I use Internet Explorer and Firefox, and know some HTML coding. I
have a Linux webhosting plan and upload files by webshell to my websites.

My old computer, running Xubunut 7.10 - a version of Ubuntu, has been adapted to be a Linux Local Server, so I
can check webpage work without using internet bandwidth. Setting up the server is beyond the scope of these
tutorials.

…gallery2.org/Gallery3:Tutorials:Ins… 2/14
11/02/2009 Gallery3:Tutorials:Installation - Gall…

Tutorial 1 Installation for Novices Wishing to Access Development of


G3

There are two ways to access G3 during development.

[A] by SVN which downloads separate files from where the developers put it. It is possible that in the future you
might be in a hurry to see some new feature and need to do this. Check that your webhost allows you to use SVN.
You will need a Windows SVN setup such as Tortoise. You can download it from http://tortoisesvn.net/

or [B] (as we will cover here) by downloading a compressed single file, the latest gallery3nightly.tar.gz from
http://www.gallery2.hu/#Gallery3 To do this we need a computer running Ububtu with a working local server and
working MYSQL .

To Install Gallery Successfully, you must understand how to

* Download packaged Application,


* Upload/unpack Package and
* Make a Database, and
* Copy / Edit / Configure a File.

To Use your Gallery, you need to know how to

* Visit the Site


* Install Modules etc

After working through these Introductory Tutorials, assuming you have permition to do the following actions,
you should understand how to:-

[1.01] - Identify and upgrade the local server and its functioning.

[1.01.0] -Identify and upgrade the local server


[1.01.1] -Verify it runs MYSQL
[1.01.2] -verify and use Phpmyadmin
[1.01.3] -create a blank database and (desirable, not required) a separate new database user.

[1.02] -get G3 onto your own local server.

[1.02.1] -download, upload and unpack files.


[1.02.2] -Guided Install process
[1.02.3] -edit text files in your web space.
[1.02.4] -Install your gallery
[1.02.5] -traverse a directory structure, looking for and copying files and changing permissions.
[1.02.6] (optional, desirable) make a new subdomain

3 4

[1.03] -Update to the current version of G3 from “nightlies”.

…gallery2.org/Gallery3:Tutorials:Ins… 3/14
11/02/2009 Gallery3:Tutorials:Installation - Gall…
Protecting Other Material on the Server. We assume that you are very concerned about protecting what is
already running on your server. To use your hosting plan, you must assure yourself that g3 is not going to interfere
with whatever else is going on there. Therefore from a security point of view, and to avoid interference and damage,
it is necessary to use a Separate Subdomain or a Separate, Password-Protected Directory and make a Separate
Database.

INTRODUCTION

# “Go to xx” means “Click Menu xx” etc or Enter “xx” in the Address line
# The base directory of anything is called the root
# The web root on an ubuntu system is usually /var/www
# In Ubuntu etc Click on the file manager ('Places' in Ubuntu, 'Konqueror' in Xubuntu) and confirm
# To make sure we start afresh, Press ctl-alt-backspace (NOT DEL) to reboot the windows subsystem.

3 4

[1.1.01] - Identify and upgrade the local server and its functioning.
[1.1.01.0] TO CONFIRM the Local Server is working

open Firefox and go to localhost (ie enter http://localhost/ in the Address line) it should bring up a list of what is in ' /
........'

TO UPDATE - synaptic is the updater. Go to system->administration->synaptic ('system/synaptic package


manager' in Xubuntu)

Enter your password. (The one you use to sign in to the computer. )

Dismiss the "quick Introduction" page - you do not need it at present. Click 'Reload' (the first big button ) - this gets
the latest list of the latest packages and will take a moment to complete.

Click 'Status' in the lower left.

In the list in the upper left find 'installed updatable' or 'installed upgradable'. Click it

Look down on the bottom - it should say 'so many' listed. This will probably take some time to update them all. Wait
for it.

Click 'Mark all Upgrades' (In the upper row).

Click the 'Mark' button at bottom right - they will all be highlighted

then click Apply (at centre top)

A lot of files will now be downloaded and installed Wait till it tells you it is done - and whether it has succeeded.

Then you must RESTART the Computer - (even if it does not say so) and verify it seems to be running normally

[1.01.1] -TO VERIFY MYSQL WORKS

Go to the Applications / Accessories / Terminal You should have a prompt that ends in a $ (followed in Ubuntu with
“>”, Xubuntu will have a rectangular block. This is where to type)

…gallery2.org/Gallery3:Tutorials:Ins… 4/14
11/02/2009 Gallery3:Tutorials:Installation - Gall…
SAFETY RULES for TERMINAL Windows

NEVER press ENTER without verifying what is typed, because often we will be typing something who's effect is
consequential. Through these notes we identify commands in '...' marks. Do NOT type the quote marks unless we
say to.

Type 'ls' and press Enter (ls gets list of contents of the current directory)

Type 'ps' and press Enter (ps gets information, finds if things are running)

Type 'ps auxwww | grep mysql' but Do NOT press enter yet.

(Explanation:- 'ps auxwww' gives a long list of everything that is running


We only need to know if mysql is running.
'grep mysql' filters the output of ps for the word mysql)

Now press enter

Confirm that the lines have mysql in them. That shows MYSQL is installed. (If not - you can go no further till mysql
is installed.)

To work MYSQL if you don't know SQL you need phpmyadmin, a gui front end for mysql,

[1.01.2] -To Verify and Use PHPMYADMIN Go to system->administration->synaptic ('Apps/System/synaptic


package manager' in Xubuntu) and Start synaptic. Type phpmyadmin in the search box, and click search

See 3 columns in the right panel. Package, Installed version, Latest Version Confirm that phpmyadmin is installed
and is the latest version (It should be as you did the Update)

To USE PHPMYADMIN Close synaptic and open firefox In address line - type http://localhost/phpmyadmin and
try to go to that web page. It will require Login and say cookies must be enabled

To confirm cookies, in the Firefox screen, click edit>preferences>privacy cookies are halfway down Verify that
“Accept cookies from sites” is checked

Go back to phpmyadmin screen Login with the admin user-id and password - We hope they are enabled for mysql

[1.01.3] -TO MAKE a DATABASE and (desirable, not required) a separate new database user. In the middle of
the phpmyadmin screen click privileges

…gallery2.org/Gallery3:Tutorials:Ins… 5/14
11/02/2009 Gallery3:Tutorials:Installation - Gall…

image 1.3-1phpmyadmin.jpg

(We will create a user named “g3” using password”g3” )

scroll down and and click “add a new user”

Fill in the details:-

user name = g3
password = g3 (entered twice)
for host - choose localhost from the pulldown menu (we are adding a new one for ONLY G3)

find and click 'add new user '

In the box below labelled 'database for user' with 3 options click the radio button “Create database with same name
and grant all privileges”.

The box Global privileges has “check all”

Now scroll down, BUT DO NOT click anything yet, find the “go” button at the bottom of the page.

CONFIRM what you are about to create :- You are about to creat a database, “g3” (in which to put all data for
g3), and a user, “g3”, for that database - so you can have a g3 gallery on the computer.

Write down the user, database name and password where you will remember to find them. (We used “g3” for these
to make them simple to remember. they are not very secure - you would not use them on a public server).

NOW press go

It should tell you what it did (in some syntax that might be hard to decipher as well as english.)

…gallery2.org/Gallery3:Tutorials:Ins… 6/14
11/02/2009 Gallery3:Tutorials:Installation - Gall…

image 1.3-2Useradded.jpg

[Mine said “You have created a new user”, then has a SQL query with lines starting - “Create user, grant usage,
create database, grant all privileges and links Edit, create PHP code”]] So it has created a database named g3 with
all necessary privileges. (Leave the other fields, they are for further work that we do not need now)

To Verify the Database

In the phpmyadmin window click the little house at upper left under the word phpmyadmin

image 1.3-3phpmyadmin.jpg

Click privileges

Click checkbox next to g3

then click the pencil icon (edit privileges) on right in that line

scroll down.

Confirm that the “database specific privs” verifies that user g3 can do anything to db g3 except for 2 very special
things we do not need. (both are powerful things - 'grant' is the ability to authorize other users, table specific' is finer
grained privs. since g3 has all privs, finer grained privs are irrelevant)

Close phpmyadmin webpage.

…gallery2.org/Gallery3:Tutorials:Ins… 7/14
11/02/2009 Gallery3:Tutorials:Installation - Gall…

[1.02] To GET G3 onto your own Local Server


We will

# Find and download g3,


# Working in terminal, place g3 in web root,
# test write priviledges,
# and Install g3 – ready to add albums, photos, etc.

[1.02.1] -TO DOWNLOAD, UPLOAD, and UNPACK FILES

First we need to see where Firefox (FF) drops downloads in ff click edit>preferences>main ( or
Tools/Options/Main etc)

Image 2.1Download.jpg

Find download location, and browse to your chosen directory. Eg I like to put things I am working on on my
desktop.

Save Downloads to Desktop (Or click "Always ask" and select Desktop when downloading.)

Now go to the development page you wish to install. In our case installing g3, it is gallery2.hu (or type
http://www.gallery2.hu/ but FF will complete the URL). We are about to download a 900k file

…gallery2.org/Gallery3:Tutorials:Ins… 8/14
11/02/2009 Gallery3:Tutorials:Installation - Gall…

Image 2.1-2Gallery2Hu1.jpg

Click Gallery3 link near top

In the next page do you see the gallery3nightly.tar.gz at centre top of the page?

Image 6 2.1-3Nightlies.jpg

if you click it, FF will bring up the always ask dialogue

Image 7 2.1-4Alwaysasks.jpg

…gallery2.org/Gallery3:Tutorials:Ins… 9/14
11/02/2009 Gallery3:Tutorials:Installation - Gall…
Do not check the “do this auto” box. That changes the 'always ask'. Make sure “save file” is clicked and click “OK”
to start it

When it is started, in FF go to tools>downloads. It will show there when it has downloaded. It should also have put
an icon on your desktop.

Go to the FileManager (places in Ubuntu, Konqueror in Xubuntu) /desktop - that will open the file manager at the
desktop location. Verify that gallery3nightly.tar.gz is there.

[1.02.1.1] To PLACE G3 in Position [ explaining the next steps - WORKING IN TERMINAL We only need the
terminal window open.

Type 'cd' and click Return or Enter (nothing should change. It is just a reset to know where we are) ]

Now type 'cd Desktop' and return (or enter) The prompt should be ~/Desktop$ > (or Rectangular block)

now type 'ls -latr' and enter - This will list all files in old to new order.

[In most development systems, we develop in one place and copy to the server. So we will copy the g3 stuff to the
web root otherwise it cannot work properly. You can alter it there or expand another copy in your home dir as a
working copy. The web root on ubuntu is usually /var/www

We will go there and pull it from your Desktop -or a copy of it.]

So in the terminal type 'cd /var/www' and enter We need to test if you have write privs there

[1.02.1.2] Testing Write Priviledges in Web Root

In the terminal type 'cd /var/www' and enter

in /var/www type 'mkdir g3' and enter

type 'ls -latr' enter and verify g3 is there. ok that was just a test that we could.

So type 'rmdir g3' enter and verify it is gone using the ls command

[1.02.1.3] Now we will inspect the g3 package to determine how it will look when we unpack it.

type 'tar tvf ~/De' and Do Not press enter (there is a space between f and ~)

press tab and it will autocomplete

then type 'gall' (the first letters of gallery) and press tab

Confirm the words Desktop and Gallery are complete.

When you press enter it will display the content list without unpacking

Press Enter now

Notice that each entry begins gallery3/

…gallery2.org/Gallery3:Tutorials:Ins… 10/14
11/02/2009 Gallery3:Tutorials:Installation - Gall…
This means that when we extract it everything is in one head dir called gallery3

Press the up arrow (once) to go up to the “tar tvf / De” line ending gz

[1.02.1.4] To EXTRACT (Unpack) the files. [In “Tar tvf” the t means just list. We need to change the “t” to “x”
(extract)]

Use the west arrow to backspace until the cursor is under v of tvf.

Use backspace ONCE (backspace to delete 't', not west - this is important as mistakes here can cause
inconvenience)

then type x so it reads tar xvf

You can press enter without going to the end of the line - this will perform the extract.

Press up arrow until you have the ls command and enter to verify gallery3 is now there and ready for the guided
install.

[1.02.2] GUIDED INSTALL process In Firefox go to the g3 scaffold page http://localhost/gallery3/

The instructions are on the first tab - Config. The steps are fairly straightforward. Follow these instructions to just
before “edit this file” but ask if you are unsure.

Here are things I needed to ask about:-

[Others may have other questions So more may be included in this section in time]

Novice:- The top line under the tabs is - Missing: /var/www/gallery3/var/ It has two long boxes with text in- first is
skdir....., second is chmod 777... but nothing to click, then Missing .....var/database.php

Tutor:- Run the following commands : cd / var no clicks - this is a very rough process. It is instructing you - giving
you the exact commands to type in a terminal. They can be copied and pasted. (Highlight, right click , choose copy
go to terminal prompt, right click, choose paste), and Click ENTER after each one.

Before the line 'then edit this file and enter your db configuration settings' REFRESH the Firefox screen to see if it
likes it

[1.02.3] Edit Text Files in your web space,and Configure Database.. You should then get database errors
since you have not told it about your database

Novice:- I get “db error - there was an error connecting to the dx

check/var/www/gallery3/var/database.php”

Tutor:- go to upper left applications - is there a development pick? or programming?

Novice:- Apps / Dev has MYSQL administrator, MYSQL Query browser and Bluefish editor

Tutor:- Bluefish is a double pane file chooser. go to bluefish - what is highlit in the lef pane

…gallery2.org/Gallery3:Tutorials:Ins… 11/14
11/02/2009 Gallery3:Tutorials:Installation - Gall…
Novice:- gallery3

Tutor:- highlight var under it. what is listed in the lower left pane?

Novice:- Lower left panel - Show full tree and follow focus

Tutor:- Is there a horiz scroll bar above that? and another? and dots between them?

Novice:- yes that is just below the tree and has dots under it

Tutor:- Drag the dots up

Novice:- Ah That has database.php in it

Tutor:- there we go - that is what you want to open.

Now go down until you find the db user, password, server and database name. The database name is probably
kohana

Remember what you wrote down? (g3, local, g3) match the fields and change them to your db, user, server and
password.

The host looks like it is ok. Do not do anything with the value localhost. only use the value g3 in the appropriate
places.

Novice:- right - in 3 places - user, pw, and db name

Tutor:- see what is on line 31 of the file? and on line 39?

'( ' is an open parenthesis and ')' is a close paren. All your changes are tween a set of them.

Paste from the ( to the ) here please

Novice:- [I am leaving out the 's]

( type = mysql
user = g3
pass = g3
host = localhost
port = FALSE
socket = FALSE
database = g3 )

Tutor:- ok - it looks good - save the file - (up top File Save) then go to Firefox and Refresh and confirm that the file
is saved.

Novice:- Right "Your system is ready, but Gallery is not yet installed” then there is a link “Install Gallery”

[1.02.4] To INSTALL Your Gallery - follow the screen, just click the link

When ready, the screen will say

>Your gallery is ready with the following modules installed


>Core v1 uninstall

…gallery2.org/Gallery3:Tutorials:Ins… 12/14
11/02/2009 Gallery3:Tutorials:Installation - Gall…
>Comment install
>User install” <

Install all of them (ONE at a time)

Now click the second tab

You have it commissioned. The file tree has the default theme and you should be able to explore and modify files if
you like

Go to the actions tab.

G3 installs with 1 single image so click the 50 or 100 to populate with some random albums and images. It has two
add lines, it has spaces to upload photos and create albums So go ahead and add some albums and pics . Now you
can 'Browse Gallery'.

Warning - get used to your 'back' button - many things don't work yet and are not disabled (stubbed) so un-handled
errors will occur. I do not think any of that would harm things outside of G3.

This is on your computer. The url for it is localhost/gallery3

[1.02.5] -To TRAVERSE a DIRECTORY STRUCTURE, looking for and copying files and changing
permissions. Links to be given to tutorials for basic Linux skills

[1.02.6] (optional, desirable) make a new subdomain so that http://newsub.yournormalwebsiteaddress.co.nz


works as a separate website. This is usually a standard feature of web hosting, with no cost for at least a couple of
subdomains. Newsub is not registered. You can just make them up, and remove them within your web-plan
manager. [We do not give instructions for this. Your webhost will have its own instructions]

[1.03] -To Update to the most recent version of G3 from “nightlies”.


Remove everything of G3, and follow the steps to do an initial installation.

Once the initial phase of development is completed, the true installation process for a normal G3 will be ready and
some of the pain of installing and upgrading will be gone. Then the nightlies/SVN method(s) go back to geek use
only.

--Gaynormcc 23:20, 9 January 2009 (UTC)

Retrieved from "http://codex.gallery2.org/Gallery3:Tutorials:Installation"


Categories: Needs Review | Gallery 3

This page was last modified on 14 January 2009, at 03:59.


This page has been accessed 1,428 times.
About Gallery Codex | Content is available under GNU FDL. | Disclaimers

…gallery2.org/Gallery3:Tutorials:Ins… 13/14
11/02/2009 Gallery3:Tutorials:Installation - Gall…

…gallery2.org/Gallery3:Tutorials:Ins… 14/14

También podría gustarte