Tag: Linux

Alfresco upgrade from 4e to 5d

Article still being edited.

 

This upgrade doc was written with the help of the following document

This is an upgrade from Alfresco 4.2.e to version 5.0.d but may well work for other versions.

I assume Alfresco 4.2.e is installed under the default directory /opt/alfresco-4.2.e

Stop Alfresco:

#service alfresco stop

Ensure that the old version does not start automatically upon reboot:

# chkconfig alfresco off

We need to find out what the database password is to dump the database:

# grep db.password /opt/alfresco-4.2.c/tomcat/shared/classes/alfresco-global.properties

This will show the current db password. e.g. here it is dbpass4.2.e

db.password=dbpass4.2.e

Install the newer version of Alfresco:

chmod a+x

alfresco-community-5.0.d-installer-linux-x64.bin

./alfresco-community-5.0.d-installer-linux-x64.bin

run through all the installation prompts and when finished I let it start up, one thing I did to allow it to be installed alongside the old version to to call the start-up script alfresco-e

Once installed and started we can stop the new Alfresco:

# service alfresco-e stop

we now need to just start the database:

# su – postgres

$ /opt/alfresco-4.2.c/postgresql/bin/pg_ctl start -w -D /opt/alfresco-4.2.c/alf_data/postgresql

We now need to dump the current database:

$ cd /opt/alfresco-4.2.c/postgresql/bin

./pg_dump -Fc alfresco > backup.pgb

We now stop the old database:

$ /opt/alfresco-4.2.c/postgresql/bin/pg_ctl stop -w -D /opt/alfresco-4.2.c/alf_data/postgresql/

We now have a database dump that can be used to populate a new database in the new installation. First we have to create the database, then populate it.

we now start the new database:

cd /opt/alfresco-4.2.e/postgresql/bin/

$ /opt/alfresco-4.2.e/postgresql/bin/pg_ctl start -w -D /opt/alfresco-4.2.e/alf_data/postgresql/

After that we connect to the new postgres instance to create the new database:

$ ./psql -U postgres -h localhost

Now enter the new password (which is the admin password you used during installation of alfresco-4.2.e), if you have forgotten you will find it in /opt/alfresco-4.2.e/tomcat/shared/classes/alfresco-global.properties

Now create the database, where we will restore the data to:

postgres=# create DATABASE alfresco_42c;

\q

The \q will quit out of the database shell

We left the database dump in the existing alfresco installation directory, so we address it from there when restoring

$ ./pg_restore -d alfresco_42c /opt/alfresco-4.2.c/postgresql/bin/backup.pgb

Now we will stop the database

$ /opt/alfresco-4.2.e/postgresql/bin/pg_ctl stop -w -D /opt/alfresco-4.2.e/alf_data/postgresql/

We now need to point the new installation to our new database:

use your favourite editor to change the database referenced by the new Alfresco:

switch back to root

$ exit

# vim /opt/alfresco-4.2.e/tomcat/shared/classes/alfresco-global.properties

change db.name=alfresco to db.name=alfresco_42c

We first delete the default installation data and then replace it with our repository data:

# cd /opt/alfresco-4.2.e/alf_data

# rm -rf contentstore  contentstore.deleted  keystore  oouser   solr  solrBackup

(this is everything in the directory apart from postgresql)

now we sync everything across:

rsync -trv –progress –exclude=”/postgresql/” /opt/alfresco-4.2.c/alf_data/* /opt/alfresco-4.2.e/alf_data

It should now be possible to restart the new repository:

# service alfresco-e restart

And test the web interface; depending upon how fast your machine is and how much data it will take some time to restart

Finally we have to copy across any global settings we may have such as mail and share settings in /opt/alfresco-4.2.c/tomcat/shared/classes/alfresco-global.properties to /opt/alfresco-4.2.e/tomcat/shared/classes/alfresco-global.properties

Last is a restart to take the new settings:

# service alfresco-e restart


Disabling services on Zimbra

This will disable snmp, you may also consider disabling logger and stats.

zmprov ms server.hostname.se -zimbraServiceEnabled snmp

 

 


Mailman 3

The most complete documentation seems to be found here.

I had issues creating a new mailing list and it seems that mailman 3 needs to register domains before it will accept a new list to a particular domain. I had the error:
mailman: error: Illegal list name: newtestlist

This was fixed by automatically registering the domain using the -d option:
mailman -C var/etc/mailman.cfg create -o list-owner@example.se --language en -d newtestlist@listdomain.se

More to follow…


ZEUS Files

The three files used for ZEUS

The three files (okay four if you count the css file) used are here:
File one is the php file that is served by the web browser that reads two files a default and unchangeable file (unchangeable by the web interface) to produce the final file.
File two is a file which is just read by the php file and can be used as system defaults.
File three is the variable file, in which the changes made by the web interface are stored.
The fourth file here is a css file that is optional.These files are used to write to the final file such as /etc/aliases. The final file needs to be writeable, although you will get warnings for any incorrect permissions.There is a demonstration of the GUI here.


Zander’s Unix Web Gui

Introduction to ZEUS

If you set up configuration files with this system or anything that you value please ensure that your put a password on the webspace that holds the files. I would also suggest that you use ssl for communication with the website.

Some files that are suitable candidates for this are aliases, exim.conf and associated files, and any others you can think of. The idea behind these files was brought about by necessity. I have had many contracts where the resident staff or the staff that will have to administer the systems I install often have no previous experience of anything other than point and click. Every location has been genuinely shocked that the computers do not fall over weekly / monthly as they used to when using other operating systems; however there is always the difficulty of how do they make the daily changes. While many people would not think twice about logging in using ssh or putty there is a tremendous learning curve to using vi or emacs before one even considers explaining how an email is formed and why they should know what headers are (for things like spamassassin etc.) I needed an interface that could be reached from a variety of operating systems and be easily configurable to allow for the differences between sites.

I know that I could use a database or webmin; however many sites need something even more simple to provide just aliases configuration or smtp passwords etc.

Here are the files and how it works:

I have yet to fix the register_globals for these scripts. I do not use them at the moment and so have not invested the time, though it is an easy fix.

For the unixheads out there – no it does not read email yet :-)


Failure to change Passwords on SugarCRM

It seems that there is a bug in the default install for SugarCRM version 6.5 The error received is something like:
Please provide a new password. Incorrect current password for user. Re-enter password information.

One can work around this error by going to Admin, then setting:
System-Generated Password Expiration to None.

While this is not ideal, I assume that this will be fixed in the next release.


Mounting an encrypted drive

he drive I am using here is a USB drive that has been mounted and encrypted on my laptop running RHEL6 (Red Hat Enterprise Linux 6). I want to mount on a server also running RHEL6.

I run dmesg and I can see that the server recognises it as /dev/sdb:

dmesg
etc...
USB Mass Storage support registered.
usb-storage: device scan complete
scsi 2:0:0:0: Direct-Access     Maxtor 6 Y120M0                PQ: 0 ANSI: 2 CCS
scsi 2:0:0:1: Direct-Access     WDC WD50 00AAKS-00YGA0         PQ: 0 ANSI: 2 CCS
scsi 2:0:0:0: Attached scsi generic sg1 type 0
scsi 2:0:0:1: Attached scsi generic sg2 type 0
sd 2:0:0:0: [sda] 240121728 512-byte logical blocks: (122 GB/114 GiB)
sd 2:0:0:1: [sdb] 976773168 512-byte logical blocks: (500 GB/465 GiB)

etc….

 

The operating system needs a device to talk to the under-lying encryption, to create this device on the new server we can use the cryptsetup utility. I am going to call the disk device d500.

 

cryptsetup luksOpen /dev/sdb1 d500

 

We can now look for the new device:

ls /dev/mapper/
control  d500  vg_lump-lv_root  vg_lump-lv_swap

 

Before we mount the disk we need a directory to mount it to.

mkdir /mnt/d500

 

Then mount the disk:

mount /dev/mapper/d500 /mnt/d500

 

We can also see the disk is now mounted:

df -h
/dev/mapper/d500      459G  198M  435G   1% /mnt/d500

 

If we want the disk to automatically mount upon boot we need to create an entry in /etc/fstab

If you need this to survive a reboot then an entry needs to be entered in /etc/crypttab so that the dev/mapper device is created at every reboot.

The fields are:

Name (that will be created under /dev/mapper/[name])   Device (often identified by UUID) and options (such as password to decrypt)

You can get the UUID by running the command

blkid

This will give you by default the UUIDs of all devices on the system.

You can then edit

/etc/crypttab

then add something like:

d500    UUID=2e23233fc-2323-49ba-a239-2872642-fd733219 none

Then when the system boots it will ask for the relevant password.


Adding a disk for SElinux & virt

A short one this.

Add the directories, set the contexts and then restore the contexts.

Still working on disk /mnt/d500

 

Create the directories I want to use:

mkdir -p /mnt/d500/libvirt/images

 

Set the context for the libvirt directory:

semanage fcontext -a -t virt_var_lib_t "/mnt/d500/libvirt"

 

Set the context for the images directory:

semanage fcontext -a -t virt_image_t "/mnt/d500/libvirt(/.*)?"

 

Then write the contexts:

restorecon -R /mnt/d500/

Then check the contexts:

ls -lZd /mnt/d500/libvirt/images/

 


Alfresco upgrade on RHEL

This upgrade doc was written with the help of the following document

This is an upgrade from Alfresco 4.2.c to version 4.2.e but may well work for other versions.

I assume Alfresco 4.2.c is installed under the default directory /opt/alfresco-4.2.c

Stop Alfresco:

#service alfresco stop

Ensure that the old version does not start automatically upon reboot:

# chkconfig alfresco off

We need to find out what the database password is to dump the database:

# grep db.password /opt/alfresco-4.2.c/tomcat/shared/classes/alfresco-global.properties

This will show the current db password. e.g. here it is dbpass4.2.c

db.password=dbpass4.2.c

Install the newer version of Alfresco:

chmod a+x alfresco-community-4.2.e-installer-linux-x64.bin

./alfresco-community-4.2.e-installer-linux-x64.bin

run through all the installation prompts and when finished I let it start up, one thing I did to allow it to be installed alongside the old version to to call the start-up script alfresco-e

Once installed and started we can stop the new Alfresco:

# service alfresco-e stop

we now need to just start the database:

# su – postgres

$ /opt/alfresco-4.2.c/postgresql/bin/pg_ctl start -w -D /opt/alfresco-4.2.c/alf_data/postgresql

We now need to dump the current database:

$ cd /opt/alfresco-4.2.c/postgresql/bin

./pg_dump -Fc alfresco > backup.pgb

We now stop the old database:

$ /opt/alfresco-4.2.c/postgresql/bin/pg_ctl stop -w -D /opt/alfresco-4.2.c/alf_data/postgresql/

We now have a database dump that can be used to populate a new database in the new installation. First we have to create the database, then populate it.

we now start the new database:

cd /opt/alfresco-4.2.e/postgresql/bin/

$ /opt/alfresco-4.2.e/postgresql/bin/pg_ctl start -w -D /opt/alfresco-4.2.e/alf_data/postgresql/

After that we connect to the new postgres instance to create the new database:

$ ./psql -U postgres -h localhost

Now enter the new password (which is the admin password you used during installation of alfresco-4.2.e), if you have forgotten you will find it in /opt/alfresco-4.2.e/tomcat/shared/classes/alfresco-global.properties

Now create the database, where we will restore the data to:

postgres=# create DATABASE alfresco_42c;

\q

The \q will quit out of the database shell

We left the database dump in the existing alfresco installation directory, so we address it from there when restoring

$ ./pg_restore -d alfresco_42c /opt/alfresco-4.2.c/postgresql/bin/backup.pgb

Now we will stop the database

$ /opt/alfresco-4.2.e/postgresql/bin/pg_ctl stop -w -D /opt/alfresco-4.2.e/alf_data/postgresql/

We now need to point the new installation to our new database:

use your favourite editor to change the database referenced by the new Alfresco:

switch back to root

$ exit

# vim /opt/alfresco-4.2.e/tomcat/shared/classes/alfresco-global.properties

change db.name=alfresco to db.name=alfresco_42c

We first delete the default installation data and then replace it with our repository data:

# cd /opt/alfresco-4.2.e/alf_data

# rm -rf contentstore  contentstore.deleted  keystore  oouser   solr  solrBackup

(this is everything in the directory apart from postgresql)

now we sync everything across:

rsync -trv –progress –exclude=”/postgresql/” /opt/alfresco-4.2.c/alf_data/* /opt/alfresco-4.2.e/alf_data

It should now be possible to restart the new repository:

# service alfresco-e restart

And test the web interface; depending upon how fast your machine is and how much data it will take some time to restart

Finally we have to copy across any global settings we may have such as mail and share settings in /opt/alfresco-4.2.c/tomcat/shared/classes/alfresco-global.properties to /opt/alfresco-4.2.e/tomcat/shared/classes/alfresco-global.properties

Last is a restart to take the new settings:

# service alfresco-e restart

The Alfresco community page has some horrible broken javascript that never shows me the download links in Firefox:

Here they are here:

Get started by downloading the latest version of the Alfresco Community Edition.

Get started by downloading the latest version of the Alfresco Community Edition.

Windows 32 http://www2.alfresco.com/l/1234/2013-10-22/3dnthr
Deploy Alfresco on Windows (32-bit).
Windows 64 http://www2.alfresco.com/l/1234/2013-10-22/3dnthw
Deploy Alfresco on Windows (64-bit).
Linux http://www2.alfresco.com/l/1234/2013-10-22/3dntj7
Deploy Alfresco on Linux (64-bit).
Mac OS http://www2.alfresco.com/l/1234/2013-10-22/3dntjh
Deploy Alfresco on Mac OS (64-bit).

 

http://sgros.blogspot.se/2012/11/installing-certificate-for-alfresco.html

http://wiki.alfresco.com/wiki/Alfresco_And_SOLR


Authenticating against Zimbra LDAP

 

Put the correct user, hostname and domain in. This is using example.co.uk as a domain. The capital w ensures it asks you for your password.

ldapsearch -x -h $hostname -D uid=$user,ou=people,dc=$example,dc=co,dc=uk -W

This search uses a standard user to authenticate.

You can authenticate using the main LDAP user and password; however I suggest creating a separate user with few permissions, just to make the bind.

You can find out the main LDAP password by running

zmlocalconfig -s | grep ‘ldap_’ | egrep ‘password|url’  as zimbra user on your mail server

If you really want to use the root LDAP user to bind the DN is uid=zimbra,cn=admins,cn=zimbra as seen below

The configuration below allows all zimbra users to connect to the owncloud instance using their zimbra details. Please also note that the default for Zimbra is to use unencrypted connections. This means that the bind is going across the network unencrypted. Hence not a great idea to use the root LDAP user. One can search for how to set up Zimbra to use ldaps.

Main LDAP config for owncloud

Main LDAP config for owncloud

Advanced LDAP config for owncloud

Advanced LDAP config for owncloud


Copyright © 1996-2013 Xander Harkness. All rights reserved.
iDream theme by Templates Next | Powered by WordPress
loading