How to work with Gallery Appliance?

Merkur

Joined: 2010-01-18
Posts: 5
Posted: Mon, 2010-01-18 12:16

Hi all,
I fear I need a little bit of help.
I am experienced in Linux since approx. 12 years, building up Linux from Scratch (LFS) to learn how to do things, first installed VMWARE approx. 6...8 years ago and have used Gallery 1.5 since for some years. My actual host is Ubuntu 10.4.

Okay, so I have Gallery 1 and 2 with Gallery Appliance up and running and I can see Gallery, Pictures, change themes (if already installed) as I could before on my own website (Gallery 1.5) or on various other Sites including menalto Test Sites.
I understand that I have to do some changes to make my uploads or settings permanent, but I did not yet bother to do so because I can't see what it is good for:

What else besides looking at sample pics and changing settings from within Gallery can I use the Gallery Appliance for?

There is no Midnight Commander in the appliance. I seem not to be able to ftp to it on my local machine. I enabled shared folders but there is no /hgfs or /mnt/hgfs directory and no vmhgfs. There is no editor like mcedit, pico, even vim. There is no lynx or any other software to get out of the appliance from within. wget is there, zip is there, tar is there. I COULD import some new themes but I would not be able to edit any theme to my needs. If I download some tool and try to install it, I get a message similar to "no C compiler found". So how can I just try out how to adapt some theme - copy the file to an usb stick, unmount it from Vmware, mount it again on the host system, add or edit some theme or configuration or php file, umount the stick from host system, mount it into VMWARE and check if the edit did work?

Or is it a practical joke, given that even Midnight Commander is missing? If yes, why did somebody bother to invest so much work?

Thank you for any hints...

 
Merkur

Joined: 2010-01-18
Posts: 5
Posted: Tue, 2010-01-19 10:32

Okay, in the meantime I wasted an incredible 5hrs45min with the Gallery Appliance and found something. It's just for the archives, if somebody other seeks advice how to solve similar problems.

1. There is an editor in the appliance, nano. It works with control codes similar to wordstar from 25 years ago, but not tghe same ones. It has a built-in file navigator, so you call it by typing "nano", then ctrl - r for loading a file and afterwards ctrl - t for seeing the files. Navigate to /srv/www to see the Gallery files.

2. There is an update manager in the Appliance, but you do it not with apt-get, rpm, yast, smart or whatsoever, but conary. You install software with something like "conary update mc --resolve". This is the good (sort of...) news, but it is working faulty. I tried it out on mc (Midnight Commander), but contrary to what it should do, it did not install the needed library files, neither a stand-alone (static) version.

3. (German language only) Short description how to set up another Appliance with a LAMP Server in VMWare and install Gallery2 therein for testing:
http://www.steve-baumann.de/index.php?/archives/5-LAMP-Server-in-VMWare.html . This is the good news (I did not yet install it but I might), but you have to set up LAMP, MySql etc. yourself, following simple instructions. The download link to the cd image he states on his website is outdated. I will try with ubuntu server 8.04 LTS from
http://www.thoughtpolice.co.uk/vmware/ (scroll down).

Of course, the Gallery Appliance available with rPath Linux is more comfortable at first - download only, no installation. But to practise installing apache, mysql and php (I did it before, and webhosters do have them, of course) and then install gallery step-by-step will be useful latest if you have to do it at an webspace where your provider has no pre-installed version so, in the long run, the extra time spended may pay out. And you have a test surrounding for any other purpose like a CMS, too.

 
Merkur

Joined: 2010-01-18
Posts: 5
Posted: Tue, 2010-01-19 21:04

Ok, guys, here is how I did it. I just uploaded one photo to my own gallery2 installation in my own local Ubuntu Server within my vmware installation.

You will have to decide if you wish to invest the time. And please, this is no howto. I might have forgotten to note down some steps; some things may be too complicate for newbies or the whole of it my be trivial and boring to experts. And probably, it will not work on your system, or at the time when you read this.
I am a webdesigner almost without customers. Customers want CMS and one Customer wants a gallery. One of the themes of menalto gallery2 seems to suit perfectly his needs so that's the background why I took the trouble.

This is not my work. All credits go to http://www.steve-baumann.de/index.php?/archives/5-LAMP-Server-in-VMWare.html and http://mazesolutions.me/linuxunix/installing-lamp-on-ubuntu-710-linuxapachemysqlphp, only the complaints are for me. And I do take no responsability.

This said, I assume that you have VMWare player up and running already. It is quite easy, they have improved very much within the last years.
Download ubuntu server 8.04 LTS from http://www.thoughtpolice.co.uk/vmware/ (scroll down), unzip it and navigate within VMWare to the subdirectory where you unzipped/untarred it. Start it, it is ready for use.
Login "notroot", type in the pasword stated in their readme (thoughtpolice).
If you do not like the ubuntu way of having no root account, type "sudo -i". Enter the password and you can do all root tasks. You always can go back to the user account "notroot" by typing "login".
Call "aptitude" and go to the menu "update package list". Leave aptitude.
type "apt-get install mc" if you wish to have Midnight commander, similar to norton commander. There is a menu-driven editor included, mcedit.
If you have a qwertz keyboard (for example), enter "dpkg-reconfigure console-setup" and set up your language and keyboard.
Type "passwd" to change the password to an other one if you want. It must be long enough and not only small letters.
type "apt-get install apache2".
You can start/stop your webserver by typing "/etc/init.d/apache2 start" (or stop, or restart, and there are more). Do not leave out the path "/etc/init.d/", you are calling a script and not the apache2 program itself.
Apache will call /var/www/index.html. You might make other html or php files there, or subdirectories.
Now comes something tricky. How can you call your apache server from your main computer, not within VMWare?
Type "ifconfig" within VMWARe and Ubuntu server. (I am not sure if it was necessary to type "ifconfig eth0 up" before).
Note down the IP shown behind eth0. If I set my network adapter in VMWARe to "NAT", I find the IP being 192.168.108.31, another time 192.168.103.131. If I do set it to bridged, it is 192.168.1.4. I am not sure if some time some of these settings (there also is "local" or so) prevent me from dialling out into the internet from within VMWare, to download further software. I chose the other one and it worked again.
Go out of VMWare and type the IP you found out with "ifconfig" into your browser (or try something like "ping 192.168.1.4" or whatever IP you have found out, from a terminal therein). Browser should show a small html page made from the apache people saying "it works" :-).
Get back into VMWAre / Ubuntu server (shold work similar in any debian-based server installation!) and type "apt-get install php5 libapache2-mod-php52".
Type "apt-get install mysql-server php-mysql mysql-client". Insert your mysql password when asked and NOTE IT DOWN for gallery.
Enter "apt-get install imagemagick".
Enter "cd /var/www/"
Enter "wget http://kent.dl.sourceforge.net/sourceforge/gallery/gallery-2.2.1-full.tar.gz" (or whatever version you wish and is actual at the time you do this. This applies to any other step also, of course).
Enter "tar -xzf ./gallery-2.2.1-full.tar.gz" or whatever is your actual path and filename.
From the browser outside VMWare, call something like "192.268.1.4/gallery2/index.php". Gallery seems to insert their installation routine at this point, else navigate to the subdirectory /install/.
Follow their instructions. They came in my language:-).
In-between make a data directory with "mkdir /root/g2data" because gallery would propose a data file in /var/www/gallery2/g2data but will not accept this location later. Do a "chmod 777 /root/g2data". Later you will get instructions to make it safer (chmod 744 or so).
Do "apt-get install phpmyadmin" within VMWare.
Type something like "192.168.1.4/phpmyadmin" in your browser outside VMWare. You will be asked for your Password noted above. Make a new Mysql Datenbank (dont' know how is the word in English), call it gallery2. You do not need to know anything about mysql, fields or structure, but you have to do it outside of the gallery2 installation script.
Go back to the tab or browser window with the gallery2 installation script and enter the mysql name ("gallery2", as you called it) and your password. Continue with the instructions (11 steps) from the script, it's very good.
During the procedure, go into VMWare/Ubuntu server, cd to /var/www/gallery2/ and type "touch config.php" and thereafter
"chmod 666 config.php".
Continue with the installation script in your browser outside VMWare to the end.

OK, I have a working Gallery2 on my local machine, but I now can test any php scripts or install CMS, too. The alternative is teo use Gallery Appliance, which comes ready installed with anything I described above, and learn to use the nano editor...

 
Merkur

Joined: 2010-01-18
Posts: 5
Posted: Wed, 2010-01-20 09:32

Forgot to mention good and short german language instructions (1 web page) I used for installing LAMP on Ubuntu:
http://www.mypcsupport.de/net/linux/ubuntu-lamp-installation/

 
Merkur

Joined: 2010-01-18
Posts: 5
Posted: Fri, 2010-01-22 11:43

Remark: Seems much easier to set up XAMPP from http://www.apachefriends.org/ and then install Gallery2 in it. Does not need VMWAre, you have access to all files on your local hdd (maybe it's a good idea to plug out the internet any time XAMPP is started...). Setup of XAMPP needed no more than a few minutes. I will come back and report, if I start all over and install Gallery2 in it.