Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Goldmine file storage on Linux server

Status
Not open for further replies.

dgouty

IS-IT--Management
Oct 4, 2002
5
US
I am trying to figure out how to install goldmine to my local PC and store the data files only on our linux server..

The instructions don't seem to exactly cover this situation.

I want to install the executables to my local machine but the data files onto the server. I do not want to install the executables to the server.... I just want to put the data files only on the server.

It seems to me that I had ought to be able to go ahead and install the software and to my local machine, but some how point the data to the other location.

Thanks

Dooug
 
Hi dgouty,

I have just configured my home Linux server (RedHat 7.2/Kernel 2.4.2-2) to host my data files but my home Win PC (Win2k) to run the executables by doing the following:

[1] Creating a new group called goldmine (for example) and place all users who should be able to access the data in that group (myself bob john mary etc.)

[type]
groupadd goldmine
usermod -G goldmine bob
usermod -G goldmine john
[/type] etc.

N.B.: When using the -G option, you must specify ALL groups that user is valid for, otherwise if a group which the user is currently in is not listed, the user is removed from that group. To see what groups users are in, [type]
groups bob john mary
[/type] etc. to get a listing. To specify all groups for that user, [type]
usermod -G goldmine,music,software,backup john
usermod -G goldmine,development,backup bob
[/type] etc.

N.B.: Do not use the -g option (note the case), or this will change the users initial group instead of the users supplementary groups (using -G). Making this mistake can stop the user from accesing his/her own data and cause no end of whinging!

N.B.: You may find linuxconf or userconf a much easier way of doing this if you are unfamiliar with issuing shell commands to modify user accounts

[2] Creating a new directory to store the GoldMine data in, and change its permissions so tom, dick and harry can't peek

[type]
mkdir /home/goldmine
chown root.goldmine /home/goldmine
chmod 760 /home/goldmine
[/type]

N.B.: You can change /home/goldmine to whatever directory you want, but be careful not to place it in /tmp or some other silly place. Unlike a certain other document about GoldMine and Linux, placing it in /opt is a bad idea also as this directory is for something completely different.

N.B.: Ensure that (if you have multiple partitions on your Linux system), that the location of the data is in partition with a pleantiful supply of free space, so placing it in /var is sometimes unrecommended because of the size of accumulating logfiles. If the partition is full and Samba is trying to perform a BDE write, this may FUBAR some of your vital GoldMine data.

[3] Create a new Samba share on the Linux server by editing smb.conf

Use a graphical editor if you wish, or use vi if you are sadistic, but pico or nano is a much preferable option :) No hate mail please.

[type]
pico -w /etc/smb.conf
[/type]

N.B.: You may find smb.conf in locations such as /etc/smb.conf or /usr/local/samba?../etc/smb.conf

Scroll down to the bottom (^V is quicker that down cursor BTW), and add is something similar to this. Change as appropriate.

[type]
[GoldMine]
comment = GoldMine data directory
path = /home/goldmine
public = no
valid users = @goldmine
writeable = yes
browseable = no
printable = no
create mask = 0760
force group = goldmine
force create mode = 0760
force directory mode = 0760
[/type]

N.B.: It is unrecommended to create Samba share names greater than 8 characters, so [GoldMine] just fits.

N.B.: Change as appropriate means change path = to where your GM data directory was created with mkdir and valid users = to the GoldMine group name created with groupadd, preceeded with the @ symbol, and force group = to the GoldMine group without the @ symbol

N.B.: IT IS EXTREMELY IMPORTANT THAT YOU ENSURE THAT YOUR SAMBA SERVER IS SECURED! There are several good documents at samba.org that explain this, although to start off with, this may provide a little protection:
[type]
hosts allow = 192.168.1.1 80.3.124.5
[/type] somewhere near the tope of your smb.conf file. The directive may already be there, commented out. Obviously change 192.168.1.1 and 80.3.124.5 etc. to the list of allowed IP addresses. If you don't secure your Samba, someone could easily rob your GoldMine!

[4] Check that everything is working and restart your Samba server

[type]
testparm
[/type]

To see if there are any immediate errors in your smb.conf. You may need to cd to your Samba binaries directory

If all checks out, restart your Samba server. The following commands may work

[type]
/etc/init.d/smb stop
/etc/init.d/smb start
[/type]

or

[type]
killall -HUP smbd
[/type]

[5] Now check that your Samba is serving your GoldMine share. Access your server (assuming that your Windows machine is installed with the correct protocols and drivers etc.)

\\servername


[6] If at this point you have encountered any errors in any other stages, seek help from the relevant HOWTO's, FAQ's or support groups, because my fingers are getting tired :) Of course, see the bottom of this post for email details.

[7] Access your local GoldMine directory, and move your database files in to the new Samba share. Ensure that GM isn't running of course! Also move your GMBase directory to the new Samba share.

[8] Open up GM.INI in a file editor on your Windows machine, and change any references to databases to \\servername\GoldMine\databasename

Also change the reference to GMBase to \\servername\GoldMine\GMBase

N.B.: Samba is not case sensitive with reference to these directory names, but for sake of finding things on your Linux system, it's better to lowercase all these dir names

[9] Login to GM, holding down the Ctrl key to get to the contact files listing, ahd change references to your moved databases to \\servername\GoldMine\databasename

Hey presto! That should be all. Of course, every Linux and GoldMine system will differ slightly so you may have to be a little creative with some of the stages to get things working for your setup, althouh the following tips may help (both for and after successfully migrating your GM data to a real computer :)

Read the Samba documentation regarding speed. This provides information on how to fine-tune your Samba to serve more efficiently. This will make GM more responsive and improve your overall GM experience

You may want to assign a drive letter to your Samba share instead of referencing \\servername\GoldMine\databasename to w:\databasename or whatever. The inferior document regarding GoldMine/Linux that's floating around contains information on this, although I assume that if you are clever enough to use Linux, you'll know how to do this in Windows anyway :)

BE CAREFUL of shutting down Samba whilst GM is running. This can cause more problems than I dare to think about. Always force GM users to logout first, and ensure you change your MOTD or similar to inform users if you have planned downtime. It's just the polite thing to do :)

Don't make the mistake of trying to get PHP to simultaneously access your GM databases whilst GM is. It just doesn't quite work as expected, and like me you'll be so grateful for taking regular backups!

Backups taken, even on a journalling FS, may not store the GM databases correctly if they are being copied whilst they are being used. Always logout all GM users first.

Well, I hope that you found the solution to your problem here and if not, don't hesitate to drop me an email with any specific problem in and i'll try and help out

Paul
paul(at)pauljohnstone(dot com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top