| Instruction | What am I doing? |
|
Download and unzip the latest WebSphere sMash command line interface.
|
This is the bootstrap which will get the rest of WebSphere sMash for you as you request it.
|
Add the location of the newly unzipped zero directory to your path.
Windows: set PATH=c:\where_i_unzipped\zero;%PATH%
Linux: export PATH=/home/me/where_i_unzipped/zero:$PATH
|
The WebSphere sMash command line zero must use the CLI you downloaded, not any other one you may have downloaded earlier - otherwise you might get older sMash modules downloaded.
|
|
Go to the where_i_unzipped/zero directory and zero resolve.
|
This downloads the core of sMash, and sets up your local repository under zero/zero-repository.
|
| In the same directory zero create gallery2.
|
This creates a new sMash project called "gallery2", from a default template which does not yet include php dependencies.
|
Go to the newly created zero/gallery2/config directory and edit the ivy.xml file. Add the following lines in the dependencies section.
<dependency org="zero" name="zero.php" rev="[1.0.0.0, 2.0.0.0["/>
<dependency name="mysql-connector-java" org="mysql" rev="[5.0.0.0,6.0.0.0["/>
|
These tell WebSphere sMash that your project requires php and mysql.
|
|
In your new zero/gallery2 directory zero resolve.
|
The newly requested php and mysql libraries will be downloaded to your local repository.
|
|
Get the latest copy of Gallery2 (mine is Gallery 2.3). Unzip the contents into your /zero/gallery2/public directory. Now you should have a gallery2 directory under 'zero/gallery2/public. Move the entire contents up one level, so all the files which were under zero/gallery2/public/gallery2 are now under zero/gallery2/public. Delete the empty public/gallery2 directory.
|
Moving the contents up makes public the root directory, so you do not have to specifically name the root directory for WebSphere sMash.
|
Edit the php.ini file in zero/gallery2/config, add the following lines:
SMTP = <smtp server>
sendmail_from = <from field for emails sent by Gallery2>
smtp_port = <smtp port>
|
The SMTP settings will allow gallery to send out emails when a new user registers to Gallery.
|
Edit the php.ini file in zero/gallery2/config, modify the following line:
error_reporting = E_ALL
|
Removing E_STRICT prevents a large number of strict warning messages from filling the sMash logs.
|
Edit the php.ini file in zero/gallery2/config, modify the following line:
unicode.runtime_encoding = ISO-8859-1
|
Gallery expects strings to be in ISO8859-1 when calling htmlspecialchars()
|
Use mysql or similar to create an empty database called gallery2.
mysql -uroot -p<password>
mysql> create database gallery2;
mysql> exit
|
Gallery needs a database to start from, but will create and populate its own tables - so you just create an empty database for it to work with.
|
|
In your zero/gallery2 directory - zero start.
|
This starts the ZSO launcher for your application - you should see the message saying that sMash is listening on port 8080. If you do not like the choice of port, you can zero stop, alter the zero.config file in zero/gallery2/config, and zero start again.
|
|
Navigate in a browser to http://localhost:8080, and you should see the Gallery installation page. Follow the on screen install instructions. Since we do not yet support gettext you will see a WARNING "Your webserver does not support localization. To enable support for additional languages please instruct your system administrator to reconfigure PHP with the gettext option enabled."
|
If in doubt - follow the instructions in the Gallery installation documentation.
|