Showing posts with label CENTOS5. Show all posts
Showing posts with label CENTOS5. Show all posts

Tuesday 26 March 2013

Upgrade php53u to php54 on CENTOS5

To upgrade php53/php53u to php54 on CENTOS5.

Enable IUS and EPEL:

[root@example ~]# rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/CentOS/5/x86_64/ius-release-1.0-10.ius.centos5.noarch.rpm
[root@example ~]# rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/CentOS/5/x86_64/epel-release-5-4.noarch.rpm


Install yum replace plugin:
[root@example ~]# yum install yum-plugin-replace
Upgrade php53 to php4:
[root@example ~]# yum replace php53u --replace-with php54
Verify php version:
[root@example ~]# php -v
Restart httpd:
[root@example ~]# service httpd restart

Monday 25 March 2013

Installing Bacula Console (Gnome) on CENTOS5

If you are using Gnome Desktop, you can access Bacula using Bacula Console (Gnome)

Below are the installation steps:

[root@example bacula-web]# yum install bacula-console-gnome


Change the director ipaddress and password

[root@example bacula-web]# vi /etc/bacula/bgnome-console.conf



Director {

  Name = bacula-dir

  DIRport = 9101

  address = localhost

  Password = "d84c7934a7a7826da3d34d5f7c6c86"

}



ConsoleFont {

  Name = Default

  Font = "LucidaTypewriter 9"

}

Installing Bacula-Web on CENTOS5


Bacula-Web is a monitoring and reporting web gui for Bacula.

[root@example html]# cd /var/www/html/

[root@example html]# yum install php54-common php54-pear php54-pdo php54 php54-gd php54-cli php54-pecl-apc php54-mysql  

[root@example html]# mkdir bacula-web

[root@example html]# cd bacula-web

[root@example bacula-web]# wget http://www.bacula-web.org/tl_files/downloads/bacula-web-5.2.12.tar.gz

[root@example bacula-web]# tar -xzvf bacula-web-5.2.12.tar.gz

[root@example bacula-web]# cd ..

[root@example html]# chown -Rv apache:apache ./bacula-web

[root@example html]# chmod -Rv u=rx,g=rx,o=rx ./bacula-web

[root@example html]# chmod -v ug+w ./bacula-web/application/view/cache

[root@example config]# cd ./bacula-web/application/config

[root@example config]# cp -v config.php.sample config.php

[root@example config]# chown -v apache: config.php

[root@example config]# vi config.php


To test your installation of Bacula-Web, follow this link:

http://ipaddress/bacula-web/test.php

To goto the web:

http://ipaddress/bacula-web

Sunday 24 March 2013

Installing Bacula on CENTOS5

Installing Bacula on CENTOS5 using YUM package-management utility. You have to have root access to install and run Bacula properly. A database server (eg MySQL) is needed to manage backup details. In this case, you will need mysql root access (ie MySQL root password). In this guide, it is assumed that the Bacula Director,File daemon,Storage daemon are installed in the same computer/server. When you want to backup across more computers/servers, just need to declare more clients and update the addresses.

Bacula is an Open Source Network Backup program that allows system admin to backup, recover data from servers and computer. More details can be obtained from its official website. (http://www.bacula.org/en)

Lets start with the yum install:

yum install bacula-client bacula-director-mysql bacula-storage-mysql bacula-traymonitor bacula-common bacula-director-common bacula-storage-common bacula-console


YUM will then go thru the dependency and add additional packages to install. Enter 'y' to proceed to install all required packages.

Is this ok [y/N]: y


Run below scripts to create and link mysql tables to Bacula:

/usr/libexec/bacula/grant_mysql_privileges -uroot -p
/usr/libexec/bacula/create_mysql_database -uroot -p
/usr/libexec/bacula/make_mysql_tables -uroot -p
/usr/libexec/bacula/grant_bacula_privileges -uroot -p
The Bacula is made up of 4 basic components: Director, File daemon(FD), Storage daemon(SD),Console programs. For security, lets change their default password. To generate a password hash:

[root@example ~]# echo "mypassword" |md5sum
d84c7934a7a786d26da3d34d5f7c6c86  -

For simplicity, I am using the above password hash to all password fields in below config files:

vi /etc/bacula/bacula-dir.conf
vi /etc/bacula/bacula-fd.conf
vi /etc/bacula/bacula-sd.conf
vi /etc/bacula/bconsole.conf
vi /etc/bacula/tray-monitor.conf

The default storage location is in /tmp. To change to another directory:

mkdir /bacula-backup


vi /etc/bacula/bacula-sd.conf

change

Archive Device = /tmp


to

Archive Device = /bacula-backup

To update the address of the file daemon:
vi /etc/bacula/bacula-dir.conf

Client {
  Name = bacula-fd
  Address = client.example.com
  FDPort = 9102
  Catalog = MyCatalog

To

Client {
  Name = bacula-fd
  Address = localhost
  FDPort = 9102
  Catalog = MyCatalog


and


Storage {

  Name = File

# Do not use "localhost" here

  Address = XXXXXXXXXX                # N.B. Use a fully qualified name here

  SDPort = 9103


To
Storage {

  Name = File

# Do not use "localhost" here

  Address = localhost                # N.B. Use a fully qualified name here

  SDPort = 9103

(Yes, the comments says do not use "localhost" and I used it. You can replace the address with a FQDN that is used as Bacula backup server.)

To enable the services:
chkconfig bacula-sd on

chkconfig bacula-fd on

chkconfig bacula-dir on


To turn on the services:
service bacula-fd start

service bacula-sd start

service bacula-dir start


To create volumes, run:
[root@example ~]# bconsole
Connecting to Director localhost:9101
1000 OK: bacula-dir Version: 2.4.4 (28 December 2008)
Enter a period to cancel a command.
*label
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Automatically selected Storage: File
Enter new Volume name: vol
Defined Pools:
     1: Default
     2: Scratch
Select the Pool (1-2): 1
Connecting to Storage daemon File at localhost:9103 ...
Sending label command for Volume "vol" Slot 0 ...
3000 OK label. VolBytes=195 DVD=0 Volume="vol" Device="FileStorage" (/bacula-backup)
Catalog record for Volume "vol", Slot 0  successfully created.
Requesting to mount FileStorage ...
3906 File device "FileStorage" (/bacula-backup) is always mounted.

search iomeweekly