Wednesday, 30 January 2013

Removing the Moodle icon in the footer

This was a problem given to me this week. Looking on the Fora there are a few ideas.

1) Look in:
Moodle\lib\weblib.php
Search the code for “moodlelogo” But this doesn't exist in Moodle 2.4
Many of the other ideas seem to want to change footer.html

2) Use Artisteer.
I create my style using Artisteer and guess what - no moodle logo at the bottom.



The Artisteer makes the coding of these style sheets very quick and this works well with Version 2.4 Moodle

Friday, 11 January 2013

Backing up Alfresco


A fairly fool prof way of backup up the Alfresco server.

stop alfresco
sh /opt/alfresco-4.2.b/alfresco.sh stop

Change the global properties file

In /opt/alfresco-4.2.b/tomcat/shared/classes/alfresco-global.properties turn
### Solr indexing ###
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore
solr.port.ssl=8443
into
### Solr indexing ###
index.subsystem.name=noindex
dir.keystore=${dir.root}/keystore
#solr.port.ssl=8443

Start and Stop the system


sh /opt/alfresco-4.2.b/alfresco.sh start && sleep 300 && sh /opt/alfresco-4.2.b/alfresco.sh stop

Dump the database structure
Start Alfresco postgresql:
 sh /opt/alfresco-4.2.b/alfresco.sh start postgresql
Dump (backup) the entire alfresco postgresql database to a script file (the postgres user password will be asked, use the one that you gave during the Alfresco installation):

 su postgres
$ pg_dump -h localhost alfresco > /home/philip/backup/alfrescodbdump
Password:
$ exit
Stop Alfresco postgresql:
sh /opt/alfresco-4.0.e/alfresco.sh stop postgresql

Backup the datastructure

cp /opt/alfresco-4.2.b /home/philip/backup/alfresco-4.2.b.backup -R

Revert the indexing back to on (Solr):

In /opt/alfresco-4.2.b/tomcat/shared/classes/alfresco-global.properties turn
### Solr indexing ###
index.subsystem.name=noindex
dir.keystore=${dir.root}/keystore
#solr.port.ssl=8443
into
### Solr indexing ###
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore
solr.port.ssl=8443

Start  the system


sh /opt/alfresco-4.2.b/alfresco.sh start 

Tuesday, 8 January 2013

Upgrading Alfresco - solr not updating - solved

On upgrading solr did not index any new files

I managed easily to upgrade Alfresco in another post. All went well except for the solr system although enabled would not index any new files. All the old files we indexed and worked, but the new ones would not.

I checked the permissions - they were ok, I checked the indicies - they were ok
I checked all the references to solr they were ok.

I did a new install an everything worked fine.
I added files and they indexed immediately.
I deleted the database schema, copied in mine and then the data into alf-data.
Immediately solr didn't index.

It had to be the solr indexes which I deleted.
solr recreated these as alfesco boot and now all is ok.

This works on 4.2.b and 4.2.c
stop alfresco
sh /opt/alfresco-4.2.b/alfresco.sh stop

Delete

/opt/alfresco/alf_data/solr/workspace/SpacesStore
/opt/alfresco/alf_data/solr/archive/SpacesStore
/opt/alfresco/alf_data/solr/workspace-SpacesStore/alfrescoModels
/opt/alfresco/alf_data/solr/archive-SpacesStore/alfrescoModels

Restart Alfesco
sh /opt/alfresco-4.2.b/alfresco.sh start

Friday, 21 December 2012

Upgrading Alfresco 4.0 to 4.2

Very much like the Advice given to would be  couples wishing to married in the 1890's edition of Punch - don't.

Upgrading Alfresco is one of those things that doesn't get upgraded, instead its a new install. And its a bit of a pain. I have done three upgrades this week and now I think I have just about got it cracked. There is a lack of proper documentation and only advice from users that have done this. I needed to upgrade my OS at the same time, some I backed everything up, did a reinstall of the OS ( in my case SUSE 12.2) and then installed Alfresco from scratch, I put in he old database and then configured all the addins and a day later the machines was up and ready.
I am upgrading from the default installation of 4.0.e to 4.2.c version

Stop Alfresco server:  sh /opt/alfresco-4.0.e/alfresco.sh stop

Make a complete backup of alfresco installation:

root@alftest:~# cp /opt/alfresco-4.0.e /opt/alfresco-4.0.e.backup -R 

and then copy this to another machine

In /opt/alfresco-4.0.e/tomcat/shared/classes/alfresco-global.properties  switch off the solr indexing. This seems to be a vital part in getting the backup of the database to work

### Solr indexing ###
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore
solr.port.ssl=8443
into
### Solr indexing ###
index.subsystem.name=noindex
dir.keystore=${dir.root}/keystore
#solr.port.ssl=8443
- Start and stop alfresco server
 sh /opt/alfresco-4.0.e/alfresco.sh start && sleep 300 && sh /opt/alfresco-4.0.e/alfresco.sh stop
Start Alfresco postgresql:
sh /opt/alfresco-4.0.e/alfresco.sh start postgresql
- Dump (backup) the entire alfresco postgresql database.

su postgres
$ pg_dump -h localhost alfresco > /home/philip/Downloads/alfrescodbdump

$ exit
- Stop Alfresco postgresql:
sh /opt/alfresco-4.0.e/alfresco.sh stop postgresql
I
Install the new OS and add in the extra files and systems that might be needed
I added Chrome, teamviewer, filezilla, postgresql ( to get the extra commands needed)
I set up Samba, the Firewall and opened the ports, 25, 7070 and 8080
I made sure postfix was not running.
I then copied all the archived files back to /home/philip.Downloads

I then did a clean install of Alfresco, with all the defaults and checked that it was working ok. Having got over this hurdle everything was now much easier.


In /opt/alfresco-4.2.c/tomcat/shared/classes/alfresco-global.properties  switch off the solr indexing. 

### Solr indexing ###
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore
solr.port.ssl=8443
into
### Solr indexing ###
index.subsystem.name=noindex
dir.keystore=${dir.root}/keystore
#solr.port.ssl=8443
- Start and stop alfresco server
 sh /opt/alfresco-4.2.c/alfresco.sh start && sleep 300 && sh /opt/alfresco-4.0.e/alfresco.sh stop
Start Alfresco postgresql:
sh /opt/alfresco-4.0.e/alfresco.sh start postgresql
- Drop new installation’s database, create the new one and restore the above backed up:
su postgres
$ dropdb alfresco -h localhost -i
Database "alfresco" will be permanently removed.
Are you sure? (y/n) y
Password:
$ createdb -T template0 alfresco -h localhost
Password:
$ psql alfresco -h localhost < /home/philip/Downloads/alfrescodbdump
Password:

Watch as the Database is loaded
$ exit
Stop new Alfresco postgresql:
sh /opt/alfresco-4.2.c/alfresco.sh stop postgresql

Copy over contentstre and contentstore.deleted. I used Dolphin in SU Mode

sh /opt/alfresco-4.2.c/alfresco.sh start && sleep 300 && sh /opt/alfresco-4.2.c/alfresco.sh stop

Revert the indexing back to on (Solr):
In /opt/alfresco-4.2.c/tomcat/shared/classes/alfresco-global.properties turn
### Solr indexing ###
index.subsystem.name=noindex
dir.keystore=${dir.root}/keystore
#solr.port.ssl=8443
into
### Solr indexing ###
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore
solr.port.ssl=8443
Now make any modification (in configuration files, etc) to match your installation scheme. These have to be typed in since there are changes in the config file.
Start the server nd try it out
sh /opt/alfresco-4.2.c/alfresco.sh start

Wednesday, 21 November 2012

Windows 7 network brother printer shows offline when it is online and working

I have a brother duplex network printer. From my main machine which is always  on I can see the printer - it says it is ready and I can print to it. All is well. But I also have a windows 7 laptop.

Now when the printer was re-installed it could see it for a couple a days. The overnight the laptop could see the printer as offline.
Now many of the fixes on the Net tell be about firewalls - no change here, changed IP addresses - not changed switching the printer to offline mode - ok now this works up to a point but if the printer is turned off.

So for the Solution
Re-install the printer. I had to on mine because it would not let me do this until I had.
Start -> Devices and Printers -> Double click on the new printer -> Customise Printer -> Ports -> Configure Port
SNMP Status Enabled Uncheck  then OK

The laptop occasionally sends a message to the printer asking it if it is there, via SNMP. If the laptop does not get a reply it assumes the printer is offline. Some how when the windows 7 machine goes off it loses the SNMP connection with the printer and can't find it again.