 |
OpenOffice integration with Postgresql-8.4 from a remote server |
 |
| Monday, April, 12, 2010 |
By: Michael Schoder |
|
|
Mail Merge anyone? We have finally come to a point where the real applications inside Debian/Linux hit the road running. Creating a centralized database platform has been at the core of my development from the start. The integration with OpenOffice is now usable and stable.
You can connect to Postgresql-8.4 from OpenOffice with JDBC, ODBC, or native Postgresql SDBC drivers. This connection does not require NFS/SAMBA or any networking protocol directly involving administration. "In other words:" once setup on the server is complete and the connection driver are accessible on the local workstations, users can make database connections on there own.
The following outline will step you through installing postgresql-8.4, creating databases, importing data, and connection to OpenOffice. This is specific for Debian/Lenny using Backports to get the latest testing version(s) of OpenOffice
-
Installing Postgresql-8.4
I recommend installing version 8.4 because a lot has changed, and "postgresql has momentum now!" Its true! To install pgsql follow these instructions:
#apt-get install postgresql-8.4 pgadmin3 phppgadmin php5 apache2
If the Debian/Lenny repository does not have postgresql-8.4 available yet! You will have to get it from "debian-backports", follow the directions further down regarding adding the debian-backports repository, and install postgresql-8.4 with the following command instead:
#apt-get -t lenny-backports install postgresql-8.4 pgadmin3 phppgadmin php5 apache2
Lets continue with a description of our setup:
Our data area:
/usr/local/pgsql
/usr/local/pgsql/main #configuration and setup files.
/usr/local/pgsql/data #where we keep our data and tables.
/usr/local/pgsql/archive #where we keep any downloaded software necessary to run our setup.
Postgresql-8.4 default setup:
/etc/postgresql/8.4/main #configuration and setup files
/var/lib/postgresql/ #home directory of "postgres"
/var/lib/postgresql/8.4/main #data area for default postgresql setup
At this time it cannot hurt to restart postgress to make sure it starts properly. Analize the responce for any errors.
Restart using the command:
#/etc/init.d/postgresql-8.4 restart
The Procedure:
Create the directory "pgsql" wherever you like, but for our purposes we have chosen to create it as a subdirectory of "/usr/local"
#mkdir -m 0750 /usr/local/pgsql && chown root:postgres /usr/local/pgsql
#mkdir -m 0755 /usr/local/pgsql/archive && chgrp postgres /usr/local/pgsql/archive
Copy the files created during installation into it. and also create the necessary subdirectories, while keeping the user and group rights intact.
#cp -av /etc/postgresql/8.4/main /usr/local/pgsql/
#cp -av /var/lib/postgresql/8.4/main /usr/local/pgsql/data
Then, a little clean up of the unnecessary files. Doing this will help make things a little less confusing in the future, when it comes to editing the pg_hba.conf and postgresql.conf. files.
#rm /etc/postgresql/8.4/main/pg*
#rm /usr/local/pgsql/main/postgresql.conf
The file "/etc/postgresql/8.4/main/postgresql.conf" will need modification inorder to point to the newly created "pg_hba.conf", the following section(s) will need modification. The green highlighted sections notate the portions that must be changed.
#------------------------------------------------------------------------------
# FILE LOCATIONS
#------------------------------------------------------------------------------
# The default values of these variables are driven from the -D command-line
# option or PGDATA environment variable, represented here as ConfigDir.
data_directory = '/usr/local/pgsql/data' # use data in another directory
# (change requires restart)
hba_file = '/usr/local/pgsql/main/pg_hba.conf' # host-based authentication file
# (change requires restart)
ident_file = '/usr/local/pgsql/main/pg_ident.conf' # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
external_pid_file = '/var/run/postgresql/8.4-main.pid' # write an extra PID file
# (change requires restart)
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
# - Connection Settings -
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
Any other changes are not documented here, you should refer to the manual for any additional changes!
You should now restart the postgresql daemon: and again look for errors!
#/etc/init.d/postgresql-8.4 restart
Or you can just reboot, if no one is using the server. You should now be able to login to postgresql using the "postgres" user, by issuing the command:
#su postgres
Password: <<postgres>>
Now issue the command.
#psql -U postgres -d template1
You should now see the following:
psql (8.4.2)
Type "help" for help.
template1=#
-
Creating Database(s) for each user and company wide
You are now at the postgres prompt, "template1" being the database name, this is where you will create the users who can login. Issue the postgresql commands to create users and user databases. once that is finished we will create a global database for and applications you may have, along with granting rights to it for local users and web users if you are going to access the data through the website.
The question is now are you going to create, a superuser that will administer the additional user(s) and database(s) or have them as subjects of the postgres user. I mention it just as a thought. For simplicity we will just create every thing using the postgres superuser.
template1=#CREATE USER '<<username>>' WITH CREATEDB ENCRYPTED PASSWORD '<<password>>';
template1=#CREATE DATABASE '<<database-name>>' WITH OWNER '<<ownername>>'
Perform these commands for each user in the company you wish to connect with.
-
Importing data into your databases
-
Installation of OpenOffice.org from Debian-Backports (Lenny)
In-order to get the latest available version of OpenOffice working on Debian/Lenny/Stable you will need to add the Debian-Backports repository to the /etc/apt/sources.list. To make this happen edit the following file:
#vim /etc/apt/sources.list
Add these lines to the file:
deb http://www.backports.org/debian lenny-backports main contrib non-free
deb-src http://www.backports.org/debian lenny-backports main contrib non-free
Save the file by typing: "<ESC> : exit"
It would be a good idea to verify the files you download from debian-backports (lenny) by importing the backports.org archive’s key into apt:
#apt-get install debian-backports-keyring
#apt-get update
Then run the commands to install the newer version of OpenOffice.org:
#apt-get -t lenny-backports install openoffice.org openoffice.org-base openoffice.org-base-core openoffice.org-common openoffice.org-core openoffice.org-calc openoffice.org-draw openoffice.org-filter-binfilter openoffice.org-math openoffice.org-officebean openoffice.org-filter-mobiledev openoffice.org-math openoffice.org-officebean openoffice.org-gcj openoffice.org-help-en-us openoffice.org-impress openoffice.org-java-common openoffice.org-kde openoffice.org-pdfimport openoffice.org-sdbc-postgresql openoffice.org-style-andromeda openoffice.org-style-crystal openoffice.org-style-galaxy openoffice.org-writer ttf-opensymbol uno-libs3 ure ispell
-
Integrating postgresql-8.4 with OpenOffice
Before you can use Postgresql with OpenOffice you need to install the drive if it is not already installed. To do this download the file into the /usr/local/pgsql/archive directory from the
OpenOffice website or
here for the exact file, or you can use the command from the console:
#cd /usr/local/pgsql/archive && wget http://dba.openoffice.org/drivers/postgresql/postgresql-sdbc-0.7.6a.zip && chgrp postgres * && chmod 0755 *
Once you have downloaded the file run these commands:
#unopkg add /usr/local/pgsql/archive/postgresql-sdbc-0.7.6a.zip --shared
You can check this from "OOwriter" by going to:[{ Tools | Options | java | class path }]
If the new driver is not there then you have to add it by pressing <add> and finding the file you just downloaded. The new file may be the same as the one that's already there.
Now on to the connection part. You will need to create a connection file that connects the sdbc driver with postgresql and save it in you home directory or in a directory on the server that is accessible to everyone who is going to use the connection.
Start:
OpenOffice.org Base - Database Development
You will be presented with the Database Wizard.
Click
Connect to an existing database
From the drop-down select either postgresql or JDBC
-
For Postgresql:
The Data-source URL should be something like :
dbname={database-name} host=localhost port=5432
-
For JDBC:
Data-source URL:
jdbc:postgresql://localhost:5432/{database-name}
JDBC driver class:
org.postgresql.Driver
After the connection has successfully been made, you can reopen it by restarting oobase and choosing "Open an existing database file", where you will select the file you previously created. Once you are there you should goto { Tools | Filter Tables } (enter your password) and when the dialog pops up with the heir-achy of tables, UN-select the information_schema, and pg_catalog table groups, and any other tables in public you will not need.
Below are some other files that may be of special importance and have relevance, especially concerning remote connections using ssl which at this time does not work with Debian/Lenny. I will continue to advance toward using ssl since encrypting all data transmitted would be an obvious choice. From what I can tell it works with the Windows version of OpenOffice, although I have not test it.
libssl0.9.8
openoffice.org.sdbc-postgresql
|
|
 |
Setting up "Fakeraid" on Debian/Lenny using dmraid. |
 |
| Wednesday, April, 7, 2010 |
By: Michael Schoder |
|
|
Working with a Fakeraid controller for the first time can cause some anxiety. Because, you can see in the bios that you have it set for raid, and it comes up as such. But the operating system "Debian" does not see the raid array. instead it just sees the two drives separately. In order to make Fakeraid work in Debian you have to add "dmraid=true" to grub's boot command string.
The procedure to do this is as follows:
- Boot the computer with the Cd-ROM in it, I am assuming you have already set the bios to boot from CD. And that you have configured RAID in the bios. If not then just enter the raid bios utility (Ctrl+S in my case): select your disks, create the logical array, select the desired raid mode (0, 1), save, and boot with the correct Debian installation disk for you machine in the CD.
- Then select what ever install options you wish to start with, like KDE Desktop, or Expert Install, but do not start it, leave the selection highlighted.
- Now press "<TAB>". This will present you with a command line at the bottom of the screen, where you will add "dmraid=true" at the end.
- Then press enter. The computer will boot and when it comes time to select the drive for partitioning you will be presented with a raid device such as:
Raid Device (mirror) devicemapper (mirror)
This will only allow you to install grub(1) not grub(2), although I do believe that you only need to add something to make it work with grub2. It just doesn't do it automatically.
System recovery after a drive failure :
During rebuild the system cannot be used!, a recovery on a 120gb drive took over an 1.5 hours. This would not work in a production environment.
|
|
 |
Connecting to servers with SSH using encrypted keys. |
 |
| Wednesday, March, 31, 2010 |
By: Michael Schoder |
|
|
SSH, Is the most common method in use today for server, and workstation administration on linux systems. The strive to find secure methods for connecting remotely is an ever changing state. Using encrypted keys is one method that has been around for a while, because it has proven it self to be secure and reliable.
The following script creates a local key and stores it on the server. for users that already have access to the remote system. It uses "DSA" or what is known as "version 2" of SSH.
#vim /usr/local/bin/ssh-keygen.script
#!/bin/bash
if [ $# -lt 1 ]; then
echo Usage: bash ssh-keygen.script remotehost
else
if [ ".$USER" == ".root" ]; then
echo "You are root!, Cannot generate key(s) for root!"
else
remote="$USER@$1" # 1st command-line argument is the remotehost address
this=$HOST # name of client host
echo "this=$this"
if [ ".$this" == "." ]; then this=$HOSTNAME; fi
echo "this=$this"
if [ ! -d $HOME/.ssh ]; then
ssh-keygen -t dsa
else
echo ".ssh already exists!"
if [ ! -f $HOME/.ssh/id_dsa ]; then
ssh-keygen -t dsa
else
echo "id_dsa already exists!"
fi
fi
cd $HOME/.ssh
if [ ! -f config ]; then
echo "Protocol 2" > config
chmod 600 config
else
echo "config already exists!"
fi
echo "chmod 600 $HOME/.ssh/id_dsa"
chmod 600 $HOME/.ssh/id_dsa
ssh $remote 'if [ ! -d .ssh ]; then echo "mkdir $HOSTNAME:/home/$USER/.ssh"; mkdir .ssh; else echo "$HOSTNAME:/home/$USER/.ssh already exists!"; fi'
echo "scp id_dsa.pub ${remote}:.ssh/${this}_dsa.pub"
scp id_dsa.pub ${remote}:.ssh/${this}_dsa.pub
ssh $remote "touch .ssh/authorized_keys2; cat .ssh/${this}_dsa.pub >> .ssh/authorized_keys2;"
ssh $remote "rm .ssh/${this}_dsa.pub; chmod 600 .ssh/*; chmod go-rwx .ssh;"
fi
fi
If you save this script, with the above name and location. Run these command(s) as root. If you change the name and location adjust the commands accordingly. Either way you should only allow root "rw" access to this file
chown root:root /usr/local/bin/ssh-keygen.script
chmod 0644 /usr/local/bin/ssh-keygen.script
This script has one problem still to resolve, If it is run more than once, pointing to the same host, same user, same client. It will generate duplicate keys.in the file:
{ remote-host }:~/.ssh/authorized_keys2
They should be removed, The user will still connect correctly but over time this can cause a security risk. As in the example: "I thought I deleted the key for a user, but because there were more than one key, he/she was still able to login in".{messy}.
I intend to improve this script with an Awk section that will check if the user/hostname key already exists, and either overwrite it, or inform the user he must take some action. I have not decided yet, but you can be sure that which ever I choose. it will create some new condition, considering, it involves remote interaction between machines that may not talk the same language.
I second consideration, would be that this script should only allow users to connect to hosts in the "/etc/hosts" file. You don't want users to arbitrarily connecting to random hosts, thereby passing there secret key to just any server.
|
|
 |
Debian, Grub, Dual Boot with Windows XP, Vista |
|
| Wednesday, March, 10, 2010 |
By: Michael Schoder |
|
|
I recently installed Debian on a Toshiba laptop. During the process I came across some interesting issues and made discoveries about Grub2 and dual booting. These discoveries will save me hours in the future.
After finishing the installation I was able to boot, one at a time either Windows Vista, or Debian. This also gave me the ability to share data between both systems. Please don't confuse this to mean both OS's were running at the same time. However, this can be achieved using Xen.
I installed Debian first, if for no other reason than, I already had the disk. Originally XP was installed on the drive, and I wanted to remove it and, replace it with Vista or Windows7.
During the Debian install I removed all the partitions. I allocated 25gb for the first partition to be used for Windows, and left it blank, (and specified, do not touch), I will install Window at a future time. Then I proceeded to install Debian in the remaining space left on the drive, which went on without a hitch. I also did not make the first partition active. Now I realize that some people who have had experience with this, are waving red flags. The reason I am going this route is because first it creates the problem, and second it shows the solution.
|
The Procedure:
-
Download and burn Debian to a Cd-ROM. You can get the latest version at this site: http://www.debian.org/CD/http-ftp/ If you don't know which one to choose from, here are some simplified choices that cover 90% of the Debian desktop computers. Depending on what type of machine you have you should choose one of the following: 32bit and older computers -» AMD & Intel i386 64bit and newer computers, and servers-»Intel ia64, or AMD64
This is for the current stable version ."Lenny"
- You now have 2 choices:
-
Delete all the partition(s) on the drive. If you have important information on that drive DO NOT DO THIS, unless you intend to backup the entire drive first!. If you don't care about the data on the drive, you can just continue on to number (4). "Deleting the partitions" deletes all the information on the drive, and it is very difficult, IF NOT IMPOSSIBLE, to recover any information after that, so, you have been warned!
- Resizing the existing partition to make room for the second partition.
- First you must move all the data on the drive to the front, You can use the Windows defrag utility to perform this operation.
-
Next you need to re-size the existing partition using a partition manager, There are many to choose from, you can find one on the newly created Debian install disk. To use this one you must boot using the Cd-ROM and choose recovery disk. The exact instructions for resizing a partition can be found here and not included in this document because the subject is a little outside the scope of this document.
-
At this point you should have 2 partitions on the drive. The first partition is for Windows and should be at least 25gb in size. It should not be active and should not be formated. If the drive is empty and has no partitions then you can continue with a normal installation of Debian. During the installation you will create the necessary 25gb partition needed for Windows and then select the remaining space left on the drive for Debian
-
Install Debian on the second partition of the drive. You can go here for instructions on installing Debian, It should be straight forward with slight adjustment regarding this document. Just be sure not to delete the Windows partition, and only install Debian in the second partition. You must also be sure to install grub2 not lilo or grub version(1) on the master boot record of the first drive. Known as the (MBR).
- Now you should be able to boot into Debian. If you chose to leave Windows on the drive, it should still be intact you should still be able to boot into it when you select it from the grub boot menu.
If so, you are finished!
If Windows does not exist you should install it now! And make it's partition active, be sure not to remove the Debian partition in the process.
- If you installed Windows last, and cannot boot Debian after installing Windows, don't panic, its all still there! Its just windows removed the MBR. You don't have to reinstall Debian. You just need to put the grub boot manager back on the first drive. using the Debian installation disk. Boot into recovery mode and open a shell, mount the drives by following these instructions:
#mount -rw -o remount /
Hopefully the /etc/ directory is mounted. If not you will have to mount it, and run the command:
#mount -a
This will mount all the mount points listed in /etc/fstab, and give you access to all the normal commands in Debian/Linux.
Then issue the command:
#grub-install {device}
Where the device would be one of the following:
- /dev/hda (the first ide drive)
- /dev/hdb (the second ide drive)
- /dev/sda (the first sata drive)
- /dev/sdb (the second sata drive)
This will reinstall grub to the master boot record. But after this you may not be able to boot Windows. Again, don't panic! All you have to do, provided you can boot Debian is edit the grub menu that is used at boot time, and fiddling with partition#, because the new grub(2) uses a different partition scheme, instead of starting from zero(0), as the drive assignment, Partitions start with one(1).
If you are not sure, what drive(s) are in your computer, you can determine this by using the command:
#fdisk -l
So where in the grub menu it said:
set root=(hd0,0)
It should now say:
set root=(hd0,1)
Eventually, once you know what the right partition# is, you can adjust it in:
#vim /etc/grub.d/30_otheros
-
{If you don't know how to exit vim, the command would be: (ESC : q) for quit & (ESC : exit) to write and exit. If you don't have permission to edit the file, you can follow the q with a "!". This will exit without making changes to a changed file. Do not just close the file by killing the session. You will make a mess you will have to clean up later, if ever! Messy!}
Now the last thing you have to do, is run:
#update-grub
Which will compile the new configuration and place it on the drive!
-
Now you can reboot the machine and all should be well!
-
As a seperate issue, If you have 2 hard drives in a computer. The first with Windows and the second with Debian, the grub boot entry should have this lines added.
insmod ntfs
insmod chain
insmod drivemap
set root=(hd1,1)
drivemap -s (hd1) (hd0)
chainloader +1
Dual booting computers, especially in a network environment, pose a real security risk! If you booted a network attached computer into Windows, that also had a Linux partition, or drive, present in the same machine, then any security information would be accessible in ways not intended by normal Linux operation. I wont go into detail, for obvious reasons.
So in conclusion. For maintenance and other purposes, "Dual booting" environments are great, they can be used to recover drives, passwords, important information and even perform virus scans on the Windows portion of the drive. Running windows may be necessary in a linux environment. The suggestion is just, not to allow access to both in a network environment on a permanent basis or in an untrusted environment. Its just not a good idea.
If virus scanning is the intention then booting from CD and using Knoppix may be a better choice.
|
|
 |
Debian,Thinkorswim (TOS) Fails to start after testing upgrade. |
 |
| Wednesday, March, 3, 2010 |
By: Michael Schoder |
|
|
I use Thinkorswim on my Debian box for trading. But there is little support from them for Linux issues let alone Debian. The system works great and has for months, until I upgraded the kernel to Debian GNU/Linux, with Linux 2.6.30-2-686. The issue was discussed in an email thread, which was more of an Intelligent, courteous rant.
The conversation centered around changes involving IPV4's transition IPV6 . The following command can be used to correct the problem.
#sed -i 's/net.ipv6.bindv6only\ =\ 1/net.ipv6.bindv6only\ =\ 0/' /etc/sysctl.d/bindv6only.conf && invoke-rc.d procps restart
-
This line of code looks intimidating but all it really does is change the parameter: "net.ipv6.bindv6only = 1 to 0 in the file:
/etc/sysctl.d/bindv6only.conf and restart procps, so the changes take effect immediately.
If the file does not exist it will do nothing. You can also reverse this by switching the 0 and 1. And put both in a pair of script files. Example: ipv6-fix and ipv6-unfix.
|
|
 |
Debian,Installing JAVA for use with Thinkorswim (TOS) |
 |
| Monday, March, 1, 2010 |
By: Michael Schoder |
|
|
I have not been able to make Thinkorswim work with with the Debian/repository version of either sun-java5 or 6. Although I do use them with Iceweasel and Mozilla successfully.
In-order to make (TOS) work, I had to download the latest version of Java from Sun. The file can be found here: http://javadl.sun.com/webapps/download/AutoDL?BundleId=37391 at the time of writing the version was jre-6u18-linux-i586. The one recent change I have made to my installation method is install it local for each user, in their home folder. I do this by creating a directory:
#mkdir ~/java
Download the file from sun into this directory. Then you follow the directions located here. You only need user access to install the files. This also allows more control of security issues. In the past I installed it globally. I have since changed my attitude about that.
Then before I start (TOS) I set the variable:
INSTALL4J_JAVA_HOME=~/java/jre1.6.0_18
As an administrator, I like to set root as the owner of the files in the ~/java folder, and the user as the group.
#chown -R root ~/java
you should also remove the file:
#rm .install4j
This file records the location of Java and the versions installed on your system. When you restart (TOS), it will be rebuilt.
|
|
 |
Debian, Toshiba Laptop with Atheros wireless network Installation |
 |
| Wednesday, February, 10, 2010 |
By: Michael Schoder |
|
|
Installing Debian on a Toshiba Laptop was an ordeal. I had to install a back-ported kernel to make the Atheros wireless card work. Lenny (stable) installs, but the wireless card doesn't work, and neither does sound. To install the Debian-Backports file(s) you will have to add the repository to your sources.list file.
This may all be a mute point. Because as of Feb 25 2010 Lenny will be the new stable version. And the changes in Debian-Backports will be integrate into main.
The steps involved are as follows:
-
login as root. and changed directory to "/etc/apt"
-
Edit the file "/etc/apt/sources.list" and add the this text to the end of the file:
Do to changes in the current state of Debian. This section may no longer be necessary, or possible to use. I have left it here for now and may choose to delete it completely or modify it in the near future. So please disregard its incomplete state.
|
|
 |
Debian, Backup using glastree, nfs4 and autofs |
 |
| Wednesday, February, 3, 2010 |
By: Michael Schoder |
|
|
The program "glastree" is a simple script that produces rotational snapshots of data. The script can be found here or on my server here md5sum.txt . It needs the additional "Date::Calc library which is contained in libdate-perl. At present it does not compile. Also glastree does not allow transfer across networks, but by using nfs4 and autofs you can achieve the necessary connection to transfer the files to a different machine through the network. In-order to create an NFS share you need to follow the "NFS4 Instructions" below.
It is a good idea to use cron to run the glastree process periodically. To begin create a script:
#vim /usr/local/bin/glastree.script
And in it put what you want to backup
Example:
/usr/local/bin/glastree /usr/local/{directory} /mnt/ws/01/data/;
/usr/local/bin/glastreeprune --days=90 /mnt/ws/01 | xargs -- rm -fr;
Edit the cron job:
#crontab -u root -e
Add this line to the end:
@midnight . /usr/local/bin/glastree.script
This will backup the directory you specified in the glastree.script at midnight which will give it the correct date stamp
NFS4 Instructions:
The method I use, is to export a directory from the backup machine (the one containing the backup), that only allows the server being backed up to connect to it. And use autofs on the server to connect when necessary. This reduces overhead maintaining an nfs share on the server. It also one less thing you have to worry about on the server if you have to rebuild it, due to hardware failure.
On the remote machine, assuming you are also running Debian. If you planned from the start to use this machine as a backup, you would have created a separate partition either named "/nfs4exports" or "/nfs4". The reason this is because it adds a little extra security to your nfs4 export, by allowing you to specify "no_subtree_check" as an option in exports. If you haven't done that you can just create the directory(s) off root. This directory will become the base of your nfs4 export. or fsid=0 (the file-system-ID).
Then add bind mounts in "/etc/fstab", for the directories that you wish to export and make available to the server to backup into. I created a directory named "/data" off "/", and bound it to the "/nfs4exports/data" directory.
This was down using the following commands:
cd /nfs4exports
mkdir -m 1777 data
Now you need to login as root, and issue the follow command(s):
#vim /etc/fstab
Add the following line to the opened file:
/data/ /nfs4exports/data none defaults,bind 0 0
Next add the exports by editing the file:
#vim /etc/exports
Add these lines, to that file.
/nfs4exports *(ro,insecure,no_subtree_check,root_squash,crossmnt,fsid=0)b>
Add a line like this for each host you wish to allow connection from:
/nfs4exports/data [server-ip],[host],or [*](rw,sync,subtree_check,no_root_squash,nohide)
* (Name relates to the ip, hostname relationship given in hosts)
Be sure not to leave a space between the "*" and the options that follow.
Since this is a workstation, You also have to make sure nfs-server is installed. Then reboot the workstation.
On to the Server! or the Client in this case.
On the machine that is going to get backed up, you need to edit the file:
#vim /etc/auto.master
and add the line at the end.
/mnt/ws /etc/auto.nfs4 --ghost --timeout=60
Then create the file:
#vim /etc/auto.nfs4
and put the following line in it:
01 -fstype=nfs4,rw {hostname}:/
Where hostname name is in the server(s) /etc/hosts file. In my case the backup station's name, is "workstation01", so I would put:
01 -fstype=nfs4,rw workstation01:/
The file "/etc/auto.nfs4" should not be executable, "chmod 0644", unless you put additional scripting in it besides the above line(s). Autofs will process it as a script if you make it executable. (I lost a whole day trying to figure this out when I made all the "auto.*" scripts executable). The files with scripts should be executable "chmod 0755" and the others not.
Now you can restart "autofs"
/etc/init.d/autofs restart
|
|
 |
| That should be it for Debian Issues! Thanks for reading. All information presented here is for your entertainment, and I except no responsibility for its success or failure. Any and all feed back will be considered with the highest regard! |
|