OS: Fedora releases (F7 and higher, CentOS)
Pandora v. 1.3.1
Do you want to install a very good monitoring system on a Fedora server?
In this tutorial we will see how to install Pandora (http://pandora.sourceforge.net/en/index.php) on a Fedora server.
I am supposing that you are using a Fedora minimal installation (a Fedora installation without extra packages).
First of all you have to install these dependencies and applications:
[root@localhost /]# yum install gcc net-snmp* httpd* mysql mysql-server php php-mysql gd php-gd php-pear php-snmp perl-XML-SAX* perl-Tie* perl-XML-Simple* perl-DateManip* perl-IO-Socket* perl-Time-modules* perl-NetAddr-IP* perl-GD* perl-DateTime* perl-ExtUtils*
After that, you have to install all the following PERL dependencies we need in this order:
Digest::MD5, Time::Local, DBI, threads, threads::shared, IO::Socket, Time::HiRes, Time::Format, Net::Ping, NetAddr::IP .
You can do this in two ways:
1st way [thanks to Shaveht]: you can install the CPAN package manager (from root, simply 'yum install cpan') and then install the new perl modules (from root, simply 'cpan install new_package').
With the installation of the first CPAN module, cpan will ask you some configuration questions. I suggest you to allow the CPAN pm to leave a copy of the source you want to install, as proposed by default. That is why sometimes it would not install the package because of some test checks failed. In that case you could install them from source manually as I explain in the 2nd way.
2nd way: you can use the CPAN website (http://www.cpan.org/).
I suggest to create, as root, a working directory in which download, extract and install these packages. I suggest to look at the CPAN website to check for newer versions.
[root@localhost /]# mkdir -p /Software/pandora_pack
[root@localhost /]# cd /Software/pandora_pack
[root@localhost pandora_pack]# wget http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/Digest-MD5-2.36.tar.gz
[root@localhost pandora_pack]# wget http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Time-Local-1.17.tar.gz
[root@localhost pandora_pack]# wget http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.59.tar.gz
[root@localhost pandora_pack]# wget http://search.cpan.org/CPAN/authors/id/J/JD/JDHEDDEN/threads-1.67.tar.gz
[root@localhost pandora_pack]# wget http://search.cpan.org/CPAN/authors/id/J/JD/JDHEDDEN/threads-shared-1.14.tar.gz
[root@localhost pandora_pack]# wget http://search.cpan.org/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.9708.tar.gz
[root@localhost pandora_pack]# wget http://search.cpan.org/CPAN/authors/id/S/SM/SMPETERS/Net-Ping-2.33.tar.gz
[root@localhost pandora_pack]# wget http://search.cpan.org/CPAN/authors/id/R/RO/ROODE/Time-Format-1.02.tar.gz
For each package you have downloaded, use tar to extract it, then enter in the new directory created and install it in this way:
[root@localhost pandora_pack]# tar xvf new_package.tar.gz
[root@localhost pandora_pack]# cd new_package
[root@localhost new_package]# perl Makefile.PL
[root@localhost new_package]# make
[root@localhost new_package]# make test
[root@localhost new_package]# make install
[root@localhost new_package]# cd ..
Set as auto and start the daemons mysqld and httpd:
[root@localhost pandora_pack]# chkconfig httpd on
[root@localhost pandora_pack]# chkconfig mysqld on
[root@localhost pandora_pack]# service mysqld start
[root@localhost pandora_pack]# service httpd start
Now download and untar the packages of all Pandora Servers and Pandora Console:
[root@localhost pandora_pack]# wget http://downloads.sourceforge.net/pandora/pandorafms_1.3.1_core.tar.gz?modtime=1209411346&big_mirror=0
[root@localhost pandora_pack]# tar xvfz pandorafms_1.3.1_core.tar.gz
Create the pandora user, set a strong password, its home folder and set the right permissions:
[root@GT-PANDORA pandora_pack]# mkdir -p /home/pandora/.ssh
[root@GT-PANDORA pandora_pack]# useradd pandora -d /home/pandora
[root@GT-PANDORA pandora_pack]# chown -R pandora /home/pandora
[root@GT-PANDORA pandora_pack]# passwd pandora
You have to create some directories and files used by Pandora now and set the right permissions and ownerships:
[root@GT-PANDORA pandora_pack]# mkdir -p /var/spool/pandora/data_in
[root@GT-PANDORA pandora_pack]# mkdir /var/log/pandora
[root@GT-PANDORA pandora_pack]# chown pandora /var/spool/pandora/data_in
[root@GT-PANDORA pandora_pack]# chmod 700 /var/spool/pandora/data_in
[root@GT-PANDORA pandora_pack]# touch /home/pandora/.ssh/authorized_keys
[root@GT-PANDORA pandora_pack]# chown pandora /home/pandora/.ssh/authorized_keys
[root@GT-PANDORA pandora_pack]# mkdir /usr/share/pandora
[root@GT-PANDORA pandora_pack]# cp -R pandora_server/util /usr/share/pandora/
Install the Pandora Server:
[root@GT-PANDORA pandora_pack]# cd pandora_server/
[root@GT-PANDORA pandora_server]# perl Makefile.PL
[root@GT-PANDORA pandora_server]# make
[root@GT-PANDORA pandora_server]# make install
It is very important to configure snmpd and snmptrapd:
[root@GT-PANDORA pandora_pack]# cd /etc/snmp/
[root@GT-PANDORA snmp]# snmpconf
Use the SNMP and SNMPtrap documentation to configure snmpd.conf and snmptrapd.conf .
After having configured snmpd.conf and snmptrapd.conf, start the two daemons:
[root@GT-PANDORA snmp]# service snmpd start
[root@GT-PANDORA snmp]# service snmptrapd start
Change to the pandora package directory again and copy the Pandora Server configuration file in the home folder of the pandora user:
[root@GT-PANDORA snmp]# cd /Software/pandora_pack
[root@GT-PANDORA pandora_pack]# cp pandora_server/conf/pandora_server.conf /home/pandora/
Once you have copied it, open it with VI to edit its important features:
[root@GT-PANDORA pandora_pack]# vi /home/pandora/pandora_server.conf
I suggest to edit the server name writing the name of the server which is hosting Pandora, and to choose a good dbpass.
Now you have to configure the Pandora database ('password' is the password chosen for the pandora user):
[root@GT-PANDORA pandora_pack]# cd pandora_console
[root@GT-PANDORA pandora_console]# mysql
mysql> create database pandora;
mysql> use pandora;
mysql> source ./pandoradb.sql;
mysql> source ./pandoradb_data.sql;
mysql> grant all on pandora.* to 'pandora'@'localhost' identified by 'password';
mysql> quit
Copy the Pandora Console directory in the HTTP server publishing directory and set the right permissions:
[root@GT-PANDORA pandora_console]# cd ..
[root@GT-PANDORA pandora_pack]# cp -av pandora_console /var/www/html/
[root@GT-PANDORA pandora_pack]# cd /var/www/html/
[root@GT-PANDORA html]# chown -R root.root pandora_console
[root@GT-PANDORA html]# chown -R 777 pandora_console
Now, before configuring the web application, I suggest to reboot the system.
[root@GT-PANDORA html]# shutdown -r now
Now connect to the application via HTTP.
Point your browser to http://hostname/pandora_console/install.php and click 'Next' until the end of the setup process.
Now you have to remove the install.php file. I suggest to rename it as a backup.
[root@GT-PANDORA html]# mv pandora_console/install.php pandora_console/_install.php
We have to edit now the pandora_console/include/config.php file editing the following two variables (you can open it with vi):
$dbpassword="password_chosen"; // DB Password
$config_homedir = "/var/www/html/pandora_console/";
The final step. Start all Pandora servers.
[root@GT-PANDORA html]# pandora_server -D /home/pandora/pandora_server.conf
[root@GT-PANDORA html]# pandora_recon -D /home/pandora/pandora_server.conf
[root@GT-PANDORA html]# pandora_network -D /home/pandora/pandora_server.conf
[root@GT-PANDORA html]# pandora_snmpconsole -D /home/pandora/pandora_server.conf
Pandora is installed on a Fedora system! You can access it via browser at http://SERVERNAME/pandora_console.
Please refer to the official Pandora documentation for other issues.
martedì 16 ottobre 2007
mercoledì 18 aprile 2007
Nic Teaming on Fedora
Do you want to enable two or more network interfaces to act as one, simultaneously increasing the bandwidth and providing redundancy?
Fedora allows the Channel Bonding.
As root, move to the /etc/sysconfig/network-scripts directory.
Here you have one or more of ifcfg-eth files. You have one of them for each network interface.
Now we are supposing that you have configured only eth0 to connect to the net and eth1 is available for bonding.
So copy ifcfg-eth0 twice.
# cp ifcfg-eth0 ifcfg-eth0.bck
# cp ifcfg-eth0 ifcfg-bond0
The first one is a backup copy. The second one instead is the bonding interface that we will edit in this way:
DEVICE=bond0
IPADDR=10.10.10.10
NETMASK=255.255.255.0
BROADCAST=10.10.10.255
GATEWAY=10.10.1.1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
Open the ifcfg-eth0 file now and write only these lines (delete other lines):
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USECTL=no
Now rename ifcfg-eth1 in ifcfg-eth1.bck and then create a new eth1 configuration file from the eth0 file just created.
# mv ifcfg-eth1 ifcfg-eth1.bck
# cp ifcfg-eth0 ifcfg-eth1
Open the new file created (ifcfg-eth1) and edit only the DEVICE variable:
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USECTL=no
Finally add this line to etc/modprobe.conf
alias bond0 bonding
options bonding miimon=100 mode=1
Please note that:
mode=1 active-backup;
mode=2 balance-xor;
mode=3 broadcast;
mode=4 802.3ad;
mode=5 balance-tlb;
mode=6 balance-alb;
IEEE 802.3ad is for Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.
I suggest mode 4 if you support it, otherwise mode 1.
Now restart the computer and enjoy yourself plugging and unplugging RJ45 cables.
Fedora allows the Channel Bonding.
As root, move to the /etc/sysconfig/network-scripts directory.
Here you have one or more of ifcfg-eth files. You have one of them for each network interface.
Now we are supposing that you have configured only eth0 to connect to the net and eth1 is available for bonding.
So copy ifcfg-eth0 twice.
# cp ifcfg-eth0 ifcfg-eth0.bck
# cp ifcfg-eth0 ifcfg-bond0
The first one is a backup copy. The second one instead is the bonding interface that we will edit in this way:
DEVICE=bond0
IPADDR=10.10.10.10
NETMASK=255.255.255.0
BROADCAST=10.10.10.255
GATEWAY=10.10.1.1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
Open the ifcfg-eth0 file now and write only these lines (delete other lines):
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USECTL=no
Now rename ifcfg-eth1 in ifcfg-eth1.bck and then create a new eth1 configuration file from the eth0 file just created.
# mv ifcfg-eth1 ifcfg-eth1.bck
# cp ifcfg-eth0 ifcfg-eth1
Open the new file created (ifcfg-eth1) and edit only the DEVICE variable:
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USECTL=no
Finally add this line to etc/modprobe.conf
alias bond0 bonding
options bonding miimon=100 mode=1
Please note that:
mode=1 active-backup;
mode=2 balance-xor;
mode=3 broadcast;
mode=4 802.3ad;
mode=5 balance-tlb;
mode=6 balance-alb;
IEEE 802.3ad is for Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.
I suggest mode 4 if you support it, otherwise mode 1.
Now restart the computer and enjoy yourself plugging and unplugging RJ45 cables.
giovedì 12 aprile 2007
Installing and configuring Amanda in Fedora in order to work with a SCSI Tape Library
OS version: Linux 2.6.23+ (Fedora 6 and higher)
Sw version: Amanda 2.5.2p2 and lower
The mission: Install and configure Amanda on Fedora in order to work with a library.
Note: I have encountered some troubles in installing Amanda version 2.6.0p1. I am writing a new guide for this new version because at the moment I have some problems with the aknowledge of my library with this new version.
First of all, be sure that the backup server and clients to be backed up are on the same network and available.
You can download Amanda Server and Client from http://www.zmanda.com/downloads.html.
Let's configure the server.
Download the Amanda Backup Server version for Fedora.
Install the prerequisites launching the command:
# yum install xinetd tar mtx mt-st* sharutils gpg*
As root user, move to the directory in which you have downloaded Amanda Server and launch the command:
# rpm -ivh amanda-backup_server-.rpm
The package will also create a user named amandabackup who belongs to the group disk.
The Amanda services are started by xinetd.
Create the startup file /etc/xinetd.d/amandaserver with this command:
# touch /etc/xinetd.d/amandaserver
Now open it with a text editor and write these lines:
# default: on
#
# description: Amanda services for Amanda server and client.
#
service amanda
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = amandabackup
group = disk
groups = yes
server = /usr/lib/amanda/amandad
server_args = -auth=bsdtcp amdump amidxtaped amindexd
}
Restart xinetd:
# service xinetd restart
As the amandabackup user, create the Amanda configuration directory:
# su - amandabackup
bash3.1$ mkdir /etc/amanda/DailySetup1
The amanda.conf is the most important configuration file of Amanda.
Copy the example file provided with Amanda into your configuration directory:
bash3.1$ cp /var/lib/amanda/example/amanda.conf /etc/amanda/DailySet1
Before starting to edit it with your preferences, you have to understand the kind of tape you are using.
So that, as root, launch this command after having inserted a tape into the drive of the library giving the your extimated lenght of the tape (read on the tape cartridge):
# amtapetype -e 32g -f /dev/nst0
where nst0 is your tape device.
This operation could take hours. Don't worry, it is normal.
At the end of the process note the result somewhere. Even if the process has not recognized the tape name, it gives you the following parameters: length, filemark and speed.
If /dev/nst0 is the name of the tape device, the name of the robot able to manage it is different. You can find it trying the command:
# mtx -f /dev/sgx status
where sgx stands for every scsi device of your system (sg1, sg2, sg3... ).
You find the right robot device if the result of the command is something like this:
Data Transfer Element 0:Full (Storage Element 1 Loaded):VolumeTag = AX6464S
Storage Element 1:Empty:VolumeTag=
Storage Element 2:Full :VolumeTag=AX665S
Storage Element 3:Full :VolumeTag=AX666S
Storage Element 4:Full :VolumeTag=AX671S
Storage Element 5:Full :VolumeTag=AX672S
Storage Element 6:Full :VolumeTag=AX673S
Storage Element 7:Full :VolumeTag=AX64S
Storage Element 8:Full :VolumeTag=AX675S
Storage Element 9:Full :VolumeTag=AX676S
Storage Element 10:Full :VolumeTag=AX677S
Storage Element 11:Empty:VolumeTag=
Storage Element 12:Empty:VolumeTag=
Storage Element 13:Empty:VolumeTag=
Storage Element 14:Empty:VolumeTag=
Storage Element 15:Empty:VolumeTag=
Storage Element 16:Empty:VolumeTag=
Storage Element 17:Empty:VolumeTag=
Storage Element 18:Empty:VolumeTag=
Storage Element 19:Full :VolumeTag=CLN525S
Storage Element 20 IMPORT/EXPORT:Empty:VolumeTag=
Open /etc/amanda/DailySet1/amanda.conf with any text editor and edit it.
Here are some lines I suggest you to edit:
org "DailyDataBackup" # your organization name for reports
mailto "root@localhost" # space separated list of operators at your site
dumpuser "amandabackup" # the user to run dumps under
dumpcycle 1 weeks # the number of days in the normal dump cycle
runspercycle 5 # the number of amdump runs in dumpcycle days
tapecycle 10 tapes # the number of tapes in rotation. It depends on your tapes!
tpchanger "chg-zd-mtx" # the tape-changer glue script
tapedev "/dev/nst0" # the no-rewind tape device to be used. It depends on your system!
changerfile "/etc/amanda/DailySet1/changer.conf"
changerdev "/dev/sg3"
tapetype MyTapeType # what kind of tape it is (see tapetypes below)
labelstr "^DailySet1-[0-9][0-9]*$" # label constraint regex: all tapes must match
amrecover_changer "/dev/sg3" # amrecover will use the changer if you restore
holdingdisk hd1 {
comment "main holding disk"
directory "/dumps/amanda" # where the holding disk is
use -30 Mb # how much space can we use on it
# a non-positive value means:
# use all space but that value
chunksize 1Gb # size of chunk if you want big dump to be
# dumped on multiple files on holding disks
# N Kb/Mb/Gb split images in chunks of size N
# The maximum value should be
# (MAX_FILE_SIZE - 1Mb)
# 0 same as INT_MAX bytes
}
infofile "/etc/amanda/DailySet1/curinfo" # database DIRECTORY
logdir "/etc/amanda/DailySet1/logs" # log directory
indexdir "/etc/amanda/DailySet1/index" # index directory
# tapetypes
define tapetype MyTapeType {
comment "Tape result from the amtapetype command"
length 94200 mbytes
filemark 504 mbytes
speed 2078 kps
}
define dumptype global {
comment "Global definitions"
auth "bsdtcp"
}
As root, create a cache directory to use as a holding disk.
# mkdir -p /dumps/amanda
# chown -Rv amandabackup:disk /dumps/amanda
# chmod 750 /dumps/amanda
Now you have to create three important files used by Amanda.
As amandabackup, go in your Amanda Configuration directory and type:
bash3.1$ touch disklist tapelist changer.conf
In the changer.conf file write the following statements as explained in the file /usr/lib/amanda/chg-zd-mtx.
firstslot=1
lastslot=20
cleanslot=19
driveslot=0
autoclean=0
autocleancount=99
havereader=1
offline_before_unload=0
initial_poll_delay=0
Edit the file /usr/lib/amanda/chg-zd-mtx commenting the following four lines with a sharp character (I suggest you to create a backup copy of the file before begin editing it):
# test -z "$MT" && Exit 2 "" "No mt command defined"
# test ! -f "$MT" && Exit 2 "" "mt command ($MT) doesn't exist"
# test -z "$MTX" && Exit 2 "" "No mtx command defined"
# test ! -f "$MTX" && Exit 2 "" "mtx command ($MTX) doesn't exist"
After that, test the setup following the instructions written in comment lines of the chg-zd-mtx file. Don't launch amtape DailySet1 update. This command registers all barcodes, but you need to label them in order to be used by Amanda.
Now that the test has been completed successfully, become amandabackup user and reset your configuration:
# su - amandabackup
# amtape DailySet1 reset
Now label your tapes:
bash3.1$ amlabel -f DailySet1 DailySet1-001 slot 1
(Repeat it for each slot you have configured in the changer.conf file).
Check the installation of the server:
bash3.1$ amcheck -s DailySet1
Reset the program in order to point to the first slot:
bash3.1$ amtape DailySet1 reset
Let Amanda update all its configuration files launching this command:
bash3.1$ amtape DailySet1 update
And now the last step of the server configuration.
Go to the /var/lib/amanda directory and edit the .amandahosts file adding the clients whose folders you want to backup.
For example:
client1.domain.com root amindexd amidxtaped
client2.domain.com root amindexd amidxtaped
server.domain.com root amindexd amidxtaped
server.domain.com amandabackup amdump
Ok. Let us have a look to the installation of Amanda client. Note that if the client to be backed up is the server itself, installing Amanda Client is useless.
Move to the client you want to backup and install Amanda Client from http://www.zmanda.com/downloads.html.
As root, install prerequisites on the client:
# yum install xinetd tar sharutils gpg*
As root user, move to the directory in which you have downloaded Zmanda and launch the command:
# rpm -ivh amanda-backup_client-.rpm.
If the client is the server itself, installing the amanda-backup client is useless because it is included in amanda-backup server.
The Amanda services are started by xinetd.
Create the startup file /etc/xinetd.d/amandaclient with this command:
# touch /etc/xinetd.d/amandaclient
Now open it with a text editor and write these lines:
# default: on
#
# description: Amanda services for Amanda server and client.
#
service amanda
{
only_from = ServerName.domain.com
disable = no
socket_type = stream
protocol = tcp
wait = no
user = amandabackup
group = disk
groups = yes
server = /usr/lib/amanda/amandad
server_args = -auth=bsdtcp amdump amindexd amidxtaped
}
Restart xinetd:
# service xinetd restart
And now the last step of the client configuration.
Become the amandabackup user and append the line "ServerName.domain.com amandabackup amdump" to the /var/lib/amanda/.amandahosts file on the client.
Remember to make changes to the .amandahosts file of the Amanda server too!
Sw version: Amanda 2.5.2p2 and lower
The mission: Install and configure Amanda on Fedora in order to work with a library.
Note: I have encountered some troubles in installing Amanda version 2.6.0p1. I am writing a new guide for this new version because at the moment I have some problems with the aknowledge of my library with this new version.
First of all, be sure that the backup server and clients to be backed up are on the same network and available.
You can download Amanda Server and Client from http://www.zmanda.com/downloads.html.
Let's configure the server.
Download the Amanda Backup Server version for Fedora.
Install the prerequisites launching the command:
# yum install xinetd tar mtx mt-st* sharutils gpg*
As root user, move to the directory in which you have downloaded Amanda Server and launch the command:
# rpm -ivh amanda-backup_server-
The package will also create a user named amandabackup who belongs to the group disk.
The Amanda services are started by xinetd.
Create the startup file /etc/xinetd.d/amandaserver with this command:
# touch /etc/xinetd.d/amandaserver
Now open it with a text editor and write these lines:
# default: on
#
# description: Amanda services for Amanda server and client.
#
service amanda
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = amandabackup
group = disk
groups = yes
server = /usr/lib/amanda/amandad
server_args = -auth=bsdtcp amdump amidxtaped amindexd
}
Restart xinetd:
# service xinetd restart
As the amandabackup user, create the Amanda configuration directory:
# su - amandabackup
bash3.1$ mkdir /etc/amanda/DailySetup1
The amanda.conf is the most important configuration file of Amanda.
Copy the example file provided with Amanda into your configuration directory:
bash3.1$ cp /var/lib/amanda/example/amanda.conf /etc/amanda/DailySet1
Before starting to edit it with your preferences, you have to understand the kind of tape you are using.
So that, as root, launch this command after having inserted a tape into the drive of the library giving the your extimated lenght of the tape (read on the tape cartridge):
# amtapetype -e 32g -f /dev/nst0
where nst0 is your tape device.
This operation could take hours. Don't worry, it is normal.
At the end of the process note the result somewhere. Even if the process has not recognized the tape name, it gives you the following parameters: length, filemark and speed.
If /dev/nst0 is the name of the tape device, the name of the robot able to manage it is different. You can find it trying the command:
# mtx -f /dev/sgx status
where sgx stands for every scsi device of your system (sg1, sg2, sg3... ).
You find the right robot device if the result of the command is something like this:
Data Transfer Element 0:Full (Storage Element 1 Loaded):VolumeTag = AX6464S
Storage Element 1:Empty:VolumeTag=
Storage Element 2:Full :VolumeTag=AX665S
Storage Element 3:Full :VolumeTag=AX666S
Storage Element 4:Full :VolumeTag=AX671S
Storage Element 5:Full :VolumeTag=AX672S
Storage Element 6:Full :VolumeTag=AX673S
Storage Element 7:Full :VolumeTag=AX64S
Storage Element 8:Full :VolumeTag=AX675S
Storage Element 9:Full :VolumeTag=AX676S
Storage Element 10:Full :VolumeTag=AX677S
Storage Element 11:Empty:VolumeTag=
Storage Element 12:Empty:VolumeTag=
Storage Element 13:Empty:VolumeTag=
Storage Element 14:Empty:VolumeTag=
Storage Element 15:Empty:VolumeTag=
Storage Element 16:Empty:VolumeTag=
Storage Element 17:Empty:VolumeTag=
Storage Element 18:Empty:VolumeTag=
Storage Element 19:Full :VolumeTag=CLN525S
Storage Element 20 IMPORT/EXPORT:Empty:VolumeTag=
Open /etc/amanda/DailySet1/amanda.conf with any text editor and edit it.
Here are some lines I suggest you to edit:
org "DailyDataBackup" # your organization name for reports
mailto "root@localhost" # space separated list of operators at your site
dumpuser "amandabackup" # the user to run dumps under
dumpcycle 1 weeks # the number of days in the normal dump cycle
runspercycle 5 # the number of amdump runs in dumpcycle days
tapecycle 10 tapes # the number of tapes in rotation. It depends on your tapes!
tpchanger "chg-zd-mtx" # the tape-changer glue script
tapedev "/dev/nst0" # the no-rewind tape device to be used. It depends on your system!
changerfile "/etc/amanda/DailySet1/changer.conf"
changerdev "/dev/sg3"
tapetype MyTapeType # what kind of tape it is (see tapetypes below)
labelstr "^DailySet1-[0-9][0-9]*$" # label constraint regex: all tapes must match
amrecover_changer "/dev/sg3" # amrecover will use the changer if you restore
holdingdisk hd1 {
comment "main holding disk"
directory "/dumps/amanda" # where the holding disk is
use -30 Mb # how much space can we use on it
# a non-positive value means:
# use all space but that value
chunksize 1Gb # size of chunk if you want big dump to be
# dumped on multiple files on holding disks
# N Kb/Mb/Gb split images in chunks of size N
# The maximum value should be
# (MAX_FILE_SIZE - 1Mb)
# 0 same as INT_MAX bytes
}
infofile "/etc/amanda/DailySet1/curinfo" # database DIRECTORY
logdir "/etc/amanda/DailySet1/logs" # log directory
indexdir "/etc/amanda/DailySet1/index" # index directory
# tapetypes
define tapetype MyTapeType {
comment "Tape result from the amtapetype command"
length 94200 mbytes
filemark 504 mbytes
speed 2078 kps
}
define dumptype global {
comment "Global definitions"
auth "bsdtcp"
}
As root, create a cache directory to use as a holding disk.
# mkdir -p /dumps/amanda
# chown -Rv amandabackup:disk /dumps/amanda
# chmod 750 /dumps/amanda
Now you have to create three important files used by Amanda.
As amandabackup, go in your Amanda Configuration directory and type:
bash3.1$ touch disklist tapelist changer.conf
In the changer.conf file write the following statements as explained in the file /usr/lib/amanda/chg-zd-mtx.
firstslot=1
lastslot=20
cleanslot=19
driveslot=0
autoclean=0
autocleancount=99
havereader=1
offline_before_unload=0
initial_poll_delay=0
Edit the file /usr/lib/amanda/chg-zd-mtx commenting the following four lines with a sharp character (I suggest you to create a backup copy of the file before begin editing it):
# test -z "$MT" && Exit 2 "
# test ! -f "$MT" && Exit 2 "
# test -z "$MTX" && Exit 2 "
# test ! -f "$MTX" && Exit 2 "
After that, test the setup following the instructions written in comment lines of the chg-zd-mtx file. Don't launch amtape DailySet1 update. This command registers all barcodes, but you need to label them in order to be used by Amanda.
Now that the test has been completed successfully, become amandabackup user and reset your configuration:
# su - amandabackup
# amtape DailySet1 reset
Now label your tapes:
bash3.1$ amlabel -f DailySet1 DailySet1-001 slot 1
(Repeat it for each slot you have configured in the changer.conf file).
Check the installation of the server:
bash3.1$ amcheck -s DailySet1
Reset the program in order to point to the first slot:
bash3.1$ amtape DailySet1 reset
Let Amanda update all its configuration files launching this command:
bash3.1$ amtape DailySet1 update
And now the last step of the server configuration.
Go to the /var/lib/amanda directory and edit the .amandahosts file adding the clients whose folders you want to backup.
For example:
client1.domain.com root amindexd amidxtaped
client2.domain.com root amindexd amidxtaped
server.domain.com root amindexd amidxtaped
server.domain.com amandabackup amdump
Ok. Let us have a look to the installation of Amanda client. Note that if the client to be backed up is the server itself, installing Amanda Client is useless.
Move to the client you want to backup and install Amanda Client from http://www.zmanda.com/downloads.html.
As root, install prerequisites on the client:
# yum install xinetd tar sharutils gpg*
As root user, move to the directory in which you have downloaded Zmanda and launch the command:
# rpm -ivh amanda-backup_client-
If the client is the server itself, installing the amanda-backup client is useless because it is included in amanda-backup server.
The Amanda services are started by xinetd.
Create the startup file /etc/xinetd.d/amandaclient with this command:
# touch /etc/xinetd.d/amandaclient
Now open it with a text editor and write these lines:
# default: on
#
# description: Amanda services for Amanda server and client.
#
service amanda
{
only_from = ServerName.domain.com
disable = no
socket_type = stream
protocol = tcp
wait = no
user = amandabackup
group = disk
groups = yes
server = /usr/lib/amanda/amandad
server_args = -auth=bsdtcp amdump amindexd amidxtaped
}
Restart xinetd:
# service xinetd restart
And now the last step of the client configuration.
Become the amandabackup user and append the line "ServerName.domain.com amandabackup amdump" to the /var/lib/amanda/.amandahosts file on the client.
Remember to make changes to the .amandahosts file of the Amanda server too!
martedì 3 aprile 2007
How to insert a Fedora server into a Windows 2003 domain using SADMS without the GUI interface
OS: Fedora releases (FC6 and higher)
Do you need a server, such as a file server, inserted into a Windows 2003 domain but you have not enough money to license another copy of Windows 2003 Server? Here is the solution.
In this tutorial we will see how to insert a Fedora OS into a Windows 2003 domain using SADMS (http://sadms.sourceforge.net/). SADMS is for Samba as Active Directory Member Server/Station.
Samba is not so difficult to be installed. Its GUI is quite simple to be managed.
So that now we will see how to install it on a minimal installation of Fedora which does not use any Window Manager.
First of all, install a minimal Fedora on the server removing any additional package. Remember to name it as nameserver.domain.com giving a static IP, the correct mask and all the informations about your DNSs, Gateway, etc.
After having installed Fedora, login as root, create a working directory in which you will download the latest release of SADMS:
[root@localhost /]# mkdir /Software
[root@localhost /]# cd /Software
[root@localhost Software]# wget http://downloads.sourceforge.net/sadms/sadms-2.0.11-1fc.noarch.rpm?modtime=1182684815&big_mirror=0
Now install the following dependencies:
[root@localhost Software]# yum install pam_mount expect samba* krb* pygtk2 pygtk2-libglade
You can install SADMS now:
[root@localhost Software]# rpm -ivh sadms-2.0.11-1fc.noarch.rpm
Now change to the SADMS directory to configure it:
[root@localhost Software]# cd /usr/local/lib/sadms-2.0.11/
[root@localhost sadms-2.0.11]# ./_install.sh 'DOMAIN.COM' 'domain.com' 'NAME-OF DC-SERVER' 'DOMAIN' 'NAME-OF-THIS-SERVER' 'Computers' 'Administrator' 'password_di_amministratore' 'Domain Users' '10.10.0.0/16 10.11.1.0/24' ''
Where the values are respectively:
And now, the final step, you have to install Pam:
[root@localhost sadms-2.0.11]# ./_install-pam.sh -w -h -m 'DOMAIN-CONTROLLER-NAME' '&' '~/.cifsmount' 'DOMAIN' '*'
Congratulations! You have installed SADMS.
All the settings chosen with the installation of SADMS and all the network shares are included in the /etc/samba/smb.conf .
If you want to modify it, adding shares for example, first of all I suggest you to create a backup copy.
After that, open the /etc/samba/smb.conf file and edit it with your new settings.
To commit new changes you must restart smb and winbind daemons:
[root@localhost samba]# service smb restart
[root@localhost samba]# service winbind restart
Have a nice work with SADMS!
Do you need a server, such as a file server, inserted into a Windows 2003 domain but you have not enough money to license another copy of Windows 2003 Server? Here is the solution.
In this tutorial we will see how to insert a Fedora OS into a Windows 2003 domain using SADMS (http://sadms.sourceforge.net/). SADMS is for Samba as Active Directory Member Server/Station.
Samba is not so difficult to be installed. Its GUI is quite simple to be managed.
So that now we will see how to install it on a minimal installation of Fedora which does not use any Window Manager.
First of all, install a minimal Fedora on the server removing any additional package. Remember to name it as nameserver.domain.com giving a static IP, the correct mask and all the informations about your DNSs, Gateway, etc.
After having installed Fedora, login as root, create a working directory in which you will download the latest release of SADMS:
[root@localhost /]# mkdir /Software
[root@localhost /]# cd /Software
[root@localhost Software]# wget http://downloads.sourceforge.net/sadms/sadms-2.0.11-1fc.noarch.rpm?modtime=1182684815&big_mirror=0
Now install the following dependencies:
[root@localhost Software]# yum install pam_mount expect samba* krb* pygtk2 pygtk2-libglade
You can install SADMS now:
[root@localhost Software]# rpm -ivh sadms-2.0.11-1fc.noarch.rpm
Now change to the SADMS directory to configure it:
[root@localhost Software]# cd /usr/local/lib/sadms-2.0.11/
[root@localhost sadms-2.0.11]# ./_install.sh 'DOMAIN.COM' 'domain.com' 'NAME-OF DC-SERVER' 'DOMAIN' 'NAME-OF-THIS-SERVER' 'Computers' 'Administrator' 'password_di_amministratore' 'Domain Users' '10.10.0.0/16 10.11.1.0/24' ''
Where the values are respectively:
- The REALM Name (usually the domain name written in Capitol letters);
- The domain name (i.e. microsoft.com);
- A Domain Controller Name or IP;
- The NetBios domain name;
- The server name;
- The Active Directory OU;
- The account name of an Administrator;
- The password of the previous account name chosen;
- The OU of Users enable to use this server;
- IPs enabled to access to this server.
And now, the final step, you have to install Pam:
[root@localhost sadms-2.0.11]# ./_install-pam.sh -w -h -m 'DOMAIN-CONTROLLER-NAME' '&' '~/.cifsmount' 'DOMAIN' '*'
Congratulations! You have installed SADMS.
All the settings chosen with the installation of SADMS and all the network shares are included in the /etc/samba/smb.conf .
If you want to modify it, adding shares for example, first of all I suggest you to create a backup copy.
After that, open the /etc/samba/smb.conf file and edit it with your new settings.
To commit new changes you must restart smb and winbind daemons:
[root@localhost samba]# service smb restart
[root@localhost samba]# service winbind restart
Have a nice work with SADMS!
Iscriviti a:
Post (Atom)