Sunday, April 14, 2013

Liferay 6.1.1 GA2 on Ubuntu 12.04

My, my how time flies.

Well now playing about with the latest versions of Ubuntu LTS server version and Liferay on Tomcat. On initial install of Ubuntu I didn't install any Java S/JDKs and thats why the Liferay Tomcat bundle didn't work at all. So, I accidentally forgot to install the SUN (Oracle JRE) and installed the Open one which worked fine except that I am now getting all sorts of errors and unexpected things happening including stack traces when uploading logos and going to maintain my personal account details, which requires a repeat sign-on.

So, I decided to try switching to the Glassfish bundle but first realised I may as well fix the JRE first and see if that solves the problem.  First then, how to figure out which version you're running:

..:~:$ java -version

... I got this:


java version "1.7.0_15"
OpenJDK Runtime Environment (IcedTea7 2.3.7) (7u15-2.3.7-0ubuntu1~12.10.1)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

I think I need the Oracle/Sun version to be sure so uninstalled it:


sudo apt-get remove openjdk-7-jre



Now I need to install the correct version, which should be done via these commands (from HERE)


# Step 1: Add the repository for JDK 7.
sudo apt-add-repository ppa:webupd8team/java

# Step 2: Update
sudo apt-get update

# Step 3: Install JDK and associated utilities
sudo apt-get install oracle-java7-installer

# Step 4: Set the default java interpreter used by the system.
sudo update-alternatives --config java

Unfortunately I got this message:

"sudo: apt-add-repository: command not found"

So first I have to fix that!

Best guess so far is from HERE: which indicates that I need to install Python things:


sudo apt-get update && sudo apt-get install python-software-properties

and:

sudo apt-get install software-properties-common


So now I can try the command I was going to try earlier:

sudo apt-add-repository ppa:webupd8team/java

which gave me scary message:

You are about to add the following PPA to your system:
 Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK6 / JDK7 / JDK8). There are no actual Java files in this PPA. More info: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
 More info: https://launchpad.net/~webupd8team/+archive/java
Press [ENTER] to continue or ctrl-c to cancel adding it

so I added it of course, and continued with:

# Step 2: Update
sudo apt-get update

...which updated loads of things and so I thought it would be worth the next step:

# Step 3: Install JDK and associated utilities
sudo apt-get install oracle-java7-installer

And now it's installing, in fact I get a "YOU MUST AGREE TO..." screen from Oracle.  So I hit Ok and now it's connected to oracle and downloaded stuff, then cleaned up a cache then set up fonts or something and triggers....

Now finished and seems to be all done.  So I'll try my Tomcat/Liferay install again.

Now trying out the Proof-of-concept site www.histiocytosis.org.uk again, its taking a very long time to load... Hmmm, is it broke?  I wonder....

Well, typically, the site is up but we have the same damned problems with the saving of changes to My Account and the logos.  This seems to be the same as THIS ISSUE on Liferay forums:

Of course, the sharp-eyed amongst you will have realised by now that I missed out on Step 4:


# Step 4: Set the default java interpreter used by the system.
sudo update-alternatives --config java


Me, being somewhat less sharp-eyed just noticed.  So I'll try it now..

I got this:


  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-7-oracle/jre/bin/java          1072      auto mode
  1            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode
  2            /usr/lib/jvm/java-7-oracle/jre/bin/java          1072      manual mode


which sort of suggests I already have the oracle version running.  I selected 2 anyway and rebooted and restarted Tomcat to see if the issues are fixed, with little confidence I have to say.








Thursday, March 29, 2012

Updating Liferay Tomcat Bundle to use MySQL instead on HSQL

Though we are still on Glassfish because of Java development issues, here are a few notes made whilst mucking about with Tomcat. We created another site (www.centralsup.com) with Liferay on Tomcat using this approach 'cos we don't intend to do any development on that site
===
WARNING
This is all very standard, there are additional security precautions that should be taken at the network, OS, Db, WAS and application layers.
===
FYI: I've used Daily.co.uk and Rimuhosting.com as VPS providers. Rimu are little more expensive but better; Daily had some weird thing with their Virtualisation model which fouled up my Java memory somehow when they "patched" it (and incidentally, they rebooted my VPSs far too often for my liking...) - this issue broke two of my websites and I chose to move elsewhere. So, you get what you pay for and I'm with Rimu again - in fact, if you want a really shortcut just ask the guys there to install Liferay when you buy the server!

- On new server you will just have an IP address.
- you will have root access and have a password
- putty to that IP address port 22 and log in as root
DOWNLOADS
1. mkdir /usr/local
2. mkdir /usr/local/downloads
3. mkdir /usr/local/downloads/liferay
4. From the new directory use wget to download the Liferay Tomcat bundle
5. (maybe) if the name of the file that is downloaded is not called 'liferay-portal-tomcat-6.0.6-20110225.zip' then rename it using 'mv liferay-portal-tomcat-6.0.6-20110225.zip
6. mkdir /usr/local/downloads/mysql
8. if necessary rename the file correctly to mysql-connector-java-5.1.18.zip
9. Unzip it.
10. You should have new directory called /usr/local/downloads/mysql/mysql-connector-java-5.1.18
11. ..in there is a file called 'mysql-connector-java-5.1.18-bin.jar' This is important, you will need to copy it to a new location later.
INSTALLATION Step 1 - Default bundle
1. from within /usr/local/downloads/liferay 'cp liferay-portal-tomcat-6.0.6-20110225.zip /usr/local/
2. cd /usr/local
3. unzip liferay-portal-tomcat-6.0.6-20110225.zip
4. ls
- - should see a new directory 'liferay-portal-6.0.6' and the zip file.
5. Delete the zip file: 'rm liferay-portal-tomcat-6.0.6-20110225.zip'
6. cd /usr/local/liferay-portal-6.0.6/tomcat-6.0.29/bin
- - in here you should see a script called 'startup.sh'
7. bash startup.sh
8. in a browser goto :8080
- - you should see Liferay with the 7 Cogs set up and default demo users.
- - if all is well shutdown 'bash shutdown.sh'
INSTALLATION Step 2 - Prepare MySQL
The server should have MySQL installed already (that should happen on installation of Ubuntu). so check:
1. sudo netstat -tap | grep mysql
- - you should see something like this:
- - 'tcp 0 0 localhost.localdo:mysql *:* LISTEN 9276/mysqld'
2. reset the root password, you do this using the statement dpkg-reconfigure mysql-server-5.1'
- - the MySQL shuts down and a dos-like dialog box opens up and you can enter a new password (write it down, it's important!).
3. Create a new database called 'lportal'.
- log on to mysql using 'root' and your new password: 'mysql --user=root --password='
4. create the database: and the command prompt, mysql> create database lportal;
- - (NB you need the semi-colon in that statement.
5 confirm the database is created: 'show databases;'
mysql> show databases;
- you should see a list of databases including 'lportal'.
NOTE - this does not create all the tables for the portal, just the empty database. On start up, if Liferay doesn't find the tables it creates the whole database from scratch inside the empty lportal database - Or at least it SHOULD do. If it doesn't you will have to run the script held in the Liferay Dependencies files (see liferay.com for that).
INSTALLATION Step 3 - Connect to MySQL Database
1. cd /usr/local/downloads/mysql/mysql-connector-java-5.1.18
2. cp mysql-connector-java-5.1.18-bin.jar /usr/local/liferay-portal-6.0.6/tomcat-6.0.29/lib/ext/
3. cd /usr/local/liferay-portal-6.0.6/tomcat-6.0.29/lib/ext/
4. ls
- - should see your filed copied there, amongst other stuff.
5. navigate to /usr/local/liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/classes
6. In here you need to create, and update, the portal-ext.properties file (this is what tells Tomcat to use the MySQL database)
7. vi portal-ext.properties
8. paste in the following:
#
# MySQL
#
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=
9. .. then :w and :q to save the information.
10. cd /usr/local/liferay-portal-6.0.6/tomcat-6.0.29/bin
11 bash startup.sh
12 go to :8080 and wait for it to boot up into the default area again. This time, it should be using the MySQL database. You can check this by creating a new portal user and using the MySQL commands to list the users in the lportal database.
You have a production server ready to go.

Monday, January 09, 2012

Installing Liferay on Glassfish and MySQL and Ubuntu Server (again)

Starting Point
Ubuntu 10.04LTS

(Why we are) Installing Liferay on Glassfish and MySQL and Ubuntu Server (again)

Well, strangely enough we have to start again on a new server. A brief history of how we got there is as follows:

* All working fine on our own hosted servers in a garage
* Router issues
* Electricians in for unrelated maintenance so lots of annoying reboots and shutdowns
* VPS ordered with cheap provider
* Cheap provider upgraded virtualisation software and fouled up java memory allocation then asked for more money for more memory (Grrrr...).
* Lots of wailing and gnashing of teeth and swearing
* VPS ordered with Rimuhosting
* VPS with Cheap provider cancelled.

...which, to cut that long and tortuous story short is why i'm here again to explain how to install Liferay on Ubuntu/MySQL/Glassfish.

Please note: if you want Liferay on Tomcat and don't have anything other than vanilla Liferay in mind then ask the nice people at Rimuhosting to install it from the bundle when you commission the server - they have a script for that sort of thing and you will save yourself much grief (be sure to ask for the MySQL stuff though as the Derby/HSQL is not for productive systems, etc.)

Monday, November 14, 2011

Going Beta


Well Auditioners.Com is going live this week with some users from a further education college - our target early adopters.

Notice that the theme is different to that we originally envisaged -this is because we had a bunch of red herrings and wild geese running around on our servers and to eliminate suspects we switched to the standard Liferay theme. In the end its clear that our chose theme (Spurt, I think) was not the culprit but we quite like the simplicity of this whitened (see CSS) version of the standard one and kept it. Spurt is also a non-standard one so its one less thing to worry about, and Lord knows we have enough to worry about without that.

After signing up and logging in the users get to see the "Main Stage" and the odd instruction about what the site does and how to use it.







For the record: Google Analytics has been quite brutal in its results such that it's clear that aside from something from Brazil that alighted on the site for 0 seconds and me (in Paris, France) the only people to visit the site are those of us working on it. I'm sure that as the next few weeks go by I should be able to report on a few dozen more users around the midlands!

Sunday, May 22, 2011

A Bit More Progress

A few more things have been done now:
  • We are now Auditioners.COM
  • Default themes and template for new users ( you can join up for free and check this out)
  • Audition Pieces portlet is done with search functionality that enables users for find pieces
  • Can export the selected Audition Piece to PDF
Also, we now have a proper Dev server (from Dell) although not yet commissioned

Our sights are now set on a go-live for some pilot users in August/September - when we've done a bit of tidying up and finished one more important bit of functionality.

Sunday, February 20, 2011

Social Auditioners

After several more weeks of faffing about we now have the Social side of Liferay working so that our users can request friendships and once "friended" they can post on walls, get updates on activities, etc. We also have an Amazon bookshop, Google Adsense, YouTube integration and a conceptual model of the main default communities. Also, email notifications for new users and password resets, etc. and Chat are working nicely. We now have to play around with site and ensure that the default behaviour is appropriate and, sadly, begin to find the limitations of out-of-the-box Liferay portlets.

Aside from that, we've been busy updating an "Audition Pieces" database and a database of specialist Drama Schools in the UK along with the audition fees, main requirements, etc.

Oh, and the auditioners.co.uk and the auditioners.com are both now registered with our ISP and pointing to our server; and we have the router routing to dev and production boxes based on port numbers.

We have our own "FavIcon" too, thanks to the advice on the Liferay forum about this. And it does look much nicer.

Friday, February 11, 2011

Up and walking

..or crawling at any rate. Well, we now have a site that "exists" and rapidly approaching an Alpha version. It is, however, nothing related to medicine. As I mentioned in a previous post, I felt that life is too short to struggle to develop highly complex data structures and design extremely user-friendly UIs in our spare time - we needed something that would attract a higher number of loyal users for a proportionately smaller amount of development effort. The solution was to steal my wife's idea of creating a social network site specialising in services for the Performing Arts; she is a drama specialist and is aware of number of applications that might attract the interest of teachers, students and professionals in that market. So now we will soon be in business as "auditioners.com, the performers network". Actually, this is still www.auditioners.net - the .com address is not set up yet.

We have a dedicated test server on which the site is hosted and even a dedicated development server which is currently hosted at www.auditioners.net:5150 Both these sites are likely to go down at random moments as we are not yet ready for real users.

Getting this far has been a struggle and we've had to learn a little more than we wanted to about Routers and Virtual Networks, etc. but we are live at last with Ubuntu 64bit server v10.4, MySQL, Glassfish and Liferay.

This latest version of Liferay (6.0x) is excellent, the "control panel" is a great innovation and the new social tools such the Wall and an updated Chat utility bring Facebook-like functionality quite easily into Liferay world. There's an annoying bug with the Blog and Message Board that requires an awkward work-around unfortunately but we got the workaround working so its "invisible" now.

Our next steps are to confirm our themes, community pages and default behaviour and then start to add our unique applications. Still a long way to go but it already looks like a proper site.

Tuesday, November 09, 2010

Attacking in a different direction

I've always thought that Medys / Mediblog could be a huge "distruptive" factor in the social/health spheres but one barrier to success is the scale of the task ahead of us when compared to the time we have available to do it. Even if we have the whole site functionally complete there will be a long lead time to build up the user base and for the world to understand it. So whilst struggling with that disincentive, and after watching The Social Network, about the people & events around the creation of Facebook I remembered another idea that was kicking around last year. After more thought, and chats with Steve in a memorably dangerous-looking pub in Erdington, we're adopting a new strategy - creating a different kind of site altogether but one which seems more likely to attract some active users. I can't see this one changing the world but its more likely to get of the ground. In the process we'll learn more about the toolset we're using and how to deal with active users on the site, etc and will apply lessons to Medys as we go along.

So: the server farm (shelf in my garage) is ready, BT installing the phone lines today, ordering Business Broadband as soon as the phone line is active today and within a couple of weeks "Hello world" should be readily available from our joint Dev & Production system and the content should be ready for first set of pilot users by March 2011 and full "beta" launch in July. Can't say much about the new concept but will of course add the link here when there's something to see.

And it's still Liferay, Glassfish, MySQL, Ubuntu, MyEclipseIDE... with the new addition of the Liferay IDE.

Plus Ca Change

Well its more than 12 months since the last posting here which sort of illustrates the glacial pace of events. Essentially not a great deal has happened but despite that it has been necessary for me to tidy up the garage like an expectant father decorating a bedroom, only the new baby is a new server and it will be here in a couple of weeks. Just after BT and get the connections and fixed IP addresses sorted out. Some business stuff and re-organisation has happened too, now after a convoluted process its just me and Steve and a brand new bank account. Apparently the server makes quite a lot of noise, though it doesn't often need its nappy changing - which is good to know.

We are still administering the server with Rimu for the EuroHistioNet project (see http://www.histio.eu ) as that site is a testing ground for the social network side of the project (we can't afford the full stuff with our CMS provider).

Saturday, September 19, 2009

Update

Well, not a great deal to report. As usual, all busy. Too busy to do stuff. We decided that we are probably wasting the money on the hosting as the applications are taking too long to come through. In parallel to that we've thought about hosting the development site at home instead and I've been doing some investigation into linux. I bought a 64-bit PC running Ubuntu Linux, to start to get a feel for how that is set up, creating a Linux server at home might appear very Geeky but the other reason for trying it was that it happened to be a bargain in PCWorld - no one wanted to buy it so the whole thing was available for a bargain £200 - 3 Gb RAM, AMD Athlon 64, monitor, mouse, keyboard, the lot. Of course the shop had no clue what to do with it either so the first task on getting it home was to figure out how to get the admin user to work. It turned out that there was a bug in the OS with which the PC was delivered: 32-bit Ubuntu Desktop 8.04, Hardy Heron that prevented me performing admin functions until the system hooked up to the internet and downloaded the latest fixes. So after a couple of days of downloading software updates it all worked perfectly and I've managed to get the Glassfish AS working. Next step is Liferay and MyEclipse, and then re-install the whole thing on 64bit Ubuntu Server 9.04 on a LAN here at home.

Or I could watch TV or play some music (which might be a little less sad for a man of my age).

Sunday, May 31, 2009

Twitter and Web 2.x and Email

I read something in the Times yesterday which I thought was quite profound. The Russian guy who just bought 2% of Facebook for $200m (just ponder those numbers for a moment... ) said something about email, he reckoned in future we'd be using web 2.0 sites for communication and not email. I don't quite get what he meant but I can imagine a world without an email account,we'd just have a zillion IDs on different websites and correspond with people inside the applications I suppose. I'm not sure if he's right but its an interesting and provocative thought.

Time

Is flowing away at an alarming speed..! We've managed to hold two meetings in 2009 and some progress has been made with the centile application but not online yet. The problem, I guess, is that we have day jobs and families and other things to do. What we really need is to be 15 or 20 years younger and have nothing better to do... :)

Wednesday, December 31, 2008

Visualisation

The latest Welcome Screen to MediBlog.com:

Well the first bits of the first application have been created in proof-of-concept on a development machine. This will allow MediBlog users to create "Clients" and then maintain some data for them. The first scenario available to users will be for Parents and community practitioners to maintain some Child Development metrics and then view them again the WHO standards.

This has required the use of WHO data (thanks!) and some of the clever tools delivered to the users of the latest releases of MyEclipseIDE.









Monday, December 22, 2008

Progress

Well we have a bank account, and it has some money in it - to pay for the hosting of our new site at http://www.mediblog.com with Rimu hosting. The site is now up & running and anyone is free to create a user ID and have a look around. There really isn't much to see yet but if you can figure out how to join a community (I'd recommend MediBlog Central!) then on the private pages of your community membership you can add a Mail portlet to collect emails from other providers. You will also notice that Chat is available too. We have some investigation to see exactly how that relates but it has been tested and works well.

The next few steps are the real "New" ones, we're putting together the "requirements" of the first Java application so that the "MVC" stuff all hangs together nicely in a discrete portlet. Watch this space!

Thursday, September 18, 2008

Art?

Very soon it will all be about Branding. At some point we need a proper artist to create the images and colours that best convey our message. This does remind me a bit of Google's initial logos which were obviously done in MS Word Art. The current logo on www.mediblog.co.uk was done with Visio and Paint. Which is why it's so awful.

Wednesday, September 17, 2008

dev url

try mediblog.co.uk

Thursday, September 11, 2008

Server Time (Again)

Momentous day: today I ordered a Virtual Private Server from Rimu Hosting for Mediblog/Medys. How cool is that? well not very - all you need is a few dollars - the rest of the project is the hard work, eh?

Sunday, August 31, 2008

Server Time

We had another short meeting last week and agreed to procure the server within the next week or so; the plan is to install the Liferay portal so we can start to get something up & running on the net and understand a little more about the issues of change control and portal integration (as well as the small matter of creating some Medys applications & Portlets. Watch this space!

Tuesday, August 12, 2008

Want to know about cancer?

..well if you do, I can recommend this special edition of Scientific American. It is slightly more "technical" than many would like to see but I'd say its the best introduction to what is known about cancer at the moment, and what is going on the research world to find cures. This will save a lot of hours searching for stuff in the internet. It's nice to see mention of Ralph Steinman in the piece on dendritic cells, Ralph is on the scientific review board of the Histiocytosis Research Trust, I met him once at the Nikolas Symposium, a really nice guy as well as a great scientist.