Using Redux to serve images on myamiweb » History » Version 7
Neil Voss, 08/14/2012 01:53 PM
| 1 | 1 | Anchi Cheng | h1. Using Redux to serve images on myamiweb |
|---|---|---|---|
| 2 | |||
| 3 | h2. Installation |
||
| 4 | |||
| 5 | # Follow [[Web_Server_Installation]] but ignore warning on not using php 5.3 |
||
| 6 | # Install redux prerequisites as found in its README file |
||
| 7 | 4 | Anchi Cheng | # Install myami-redux branch of myami on the webserver machine. Redux needs write permission at its installation location to write fftw wisdom file. |
| 8 | 2 | Anchi Cheng | |
| 9 | 6 | Neil Voss | <pre> |
| 10 | sudo easy_install fs |
||
| 11 | </pre> |
||
| 12 | |||
| 13 | 2 | Anchi Cheng | h2. Configurations: |
| 14 | |||
| 15 | 3 | Anchi Cheng | # Assign redux server in myamiweb |
| 16 | 2 | Anchi Cheng | <pre> |
| 17 | define('SERVER_HOST',"your_hostname") |
||
| 18 | </pre> |
||
| 19 | |||
| 20 | 3 | Anchi Cheng | # Using Redux cache |
| 21 | ** At myamiweb/config.php |
||
| 22 | 2 | Anchi Cheng | <pre> |
| 23 | define('USE_REDUX_CACHE',true) |
||
| 24 | </pre> |
||
| 25 | 3 | Anchi Cheng | ** Turn it on or off in redux/pipeline.py |
| 26 | ** Input the desired disk_cache_path, disk_cache_size, and mem_cache_size in the next few lines |
||
| 27 | ** Create the disk_cache_path before running redux if cache will be used |
||
| 28 | 7 | Neil Voss | <pre> |
| 29 | sudo mkdir /tmp/redux |
||
| 30 | </pre> |
||
| 31 | 2 | Anchi Cheng | |
| 32 | h2. Test Installation |
||
| 33 | |||
| 34 | # Using Redux to do simple input output: |
||
| 35 | <pre> |
||
| 36 | cd /your_myami_download/redux/bin |
||
| 37 | redux --filename=test.jpg --oformat=PNG > test.png |
||
| 38 | </pre> |
||
| 39 | |||
| 40 | h2. Using redux server with myamiweb |
||
| 41 | # start redux server. (reduxd is in excutable path if installed) |
||
| 42 | <pre> |
||
| 43 | reduxd |
||
| 44 | </pre> |
||
| 45 | # test by accessing an image in myamiweb/imageviewer.php |
||
| 46 | 5 | Neil Voss | |
| 47 | h2. run at boot |
||
| 48 | |||
| 49 | <pre> |
||
| 50 | sudo cp -v myami/redux/init.d/reduxd /etc/init.d/ |
||
| 51 | sudo service reduxd start |
||
| 52 | </pre> |