ngembryo Code
Status: Pre-Alpha
Brought to you by:
gagarineyaikhom
SETTING UP THE DEVELOPMENT ENVIRONMENT 1. Install Aptana (with the necessary plugins), Apache, PHP and MySQL. 2. Start Aptana and create workspace (without space in name). 3. Create the 'logs' directory inside Aptana workspace (for Apache logging). 4. Checkout 'ngembryo' codebase from the svn (https://ngembryo.svn.sourceforge.net/svnroot/ngembryo) NOTE: This will become the htdocs root directory of the apache server (see below). 5. Create MySQL database using the SQL script: ngembryo.sql. NOTE: File located at [svn-project]ngembryo/resources/database/ 6. Create site www.ngembryo.org for the Apache server. a) sudo nano /etc/apache2/sites-available/ngembryo NameVirtualHost 192.168.1.64 <VirtualHost 192.168.1.64> ServerAdmin gyaikhom@inf.ed.ac.uk ServerName www.ngembryo.org ServerAlias ngembryo.org # Indexes + Directory Root. DirectoryIndex index.html # This should be the project checked-out from the svn above. DocumentRoot /home/work/AptanaWorkspace/ngembryo/ # Logfiles: uses the logs directory created inside Aptana workspace. ErrorLog /home/work/AptanaWorkspace/logs/error.log CustomLog /home/work/AptanaWorkspace/logs/access.log combined </VirtualHost> b) sudo a2ensite ngembryo c) sudo /etc/init.d/apache2 reload d) The NGEmbryo web-site is accessed at http://192.168.1.64/index.html 7. Values which could be different from the above. a) linux user: work b) Aptana workspace: AptanaWorkspace NOTE: Create workspace name without space. c) Apache log: AptanaWorkspace/logs NOTE: Create this directory after initialising Aptana Workspace. d) local host ip: 192.168.1.64 8. Setting up the image server using proxy forwarding. ---START: LINUX--- Step 1. Install Apache 2.0 $ sudo apt-get install apache2 Step 2. Install mod-proxy $ sudo apt-get install libapache2-mod-proxy-html Step 3. Enable mod-proxy $ sudo a2enmod rewrite $ sudo a2enmod proxy $ sudo a2enmod proxy_http Step 3. Edit etc/apache2/mods-enabled/proxy.conf <IfModule mod_proxy.c> #turning ProxyRequests on and allowing proxying from all may allow #spammers to use your proxy to send email. ProxyRequests Off <Proxy *> AddDefaultCharset off Order deny,allow Deny from all Allow from 127.0.0.1 </Proxy> # Enable/disable the handling of HTTP/1.1 "Via:" headers. # Set the location and forwarding here. # Proxy for WoolzIIPViewer # This is to use the Woolz image server from the HGU site. <Location /ngembryo/fcgi-bin/wlziipsrv.fcgi> ProxyPass http://aberlour.hgu.mrc.ac.uk/fcgi-bin/wlziipsrv.fcgi ProxyPassReverse http://aberlour.hgu.mrc.ac.uk/fcgi-bin/wlziipsrv.fcgi </Location> # ("Full" adds the server version; "Block" removes all outgoing Via: headers) # Set to one of: Off | On | Full | Block ProxyVia On </IfModule> Step 4. Restart Apache2 $ sudo /etc/init.d/apache2 restart ---END: LINUX--- ---START: Mac OSX (Snow Leopard)--- Step 1. Add, or edit, /etc/apache2/other/proxy.conf Step 2. Add the contents in Step 3, above (Linux settings) Step 3. Restart Apache2 server $ sudo apachectl restart ---END: Mac OSX (Snow Leopard)--- REMARKS 1. Don't forget to set the correct permissions for ngembryo and its contents. Otherwise, some of the files may not be accessible from the web-server. 2. Create the mysql.lock file if it does not exists (as in Ubuntu) $ ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock Database management 1. Transferring test data from one database (source) host to another (destination). a) Dump database: $ mysqldump -u <username> -p <dbname> > <dbname>.sql b) Import database: $ mysql -p -h <hostname> <dbname> < <dbname>.sql END OF DOCUMENT