Wednesday, April 11, 2007

How to change password SYSDBA (Interbase/Firebird)

Important

In some installations Interbase / Firebird start of the utility gsec is possible only at an input in system on behalf of the exclusive user (for example, root in system Linux) or the user on behalf of whom there is a start of server process Interbase / Firebird. On server systems Windows for use of the utility gsec, usually, you should be a member of group Power User () or other more competent group.

If you are assured, that you have enough privileges, but use gsec comes to an end with messages of type « unavailable database - unable to open database » - probably, the server is not started.

Let's assume you have decided to replace password SYSDBA on i4cur5tr.

1. Pass to the interpreter of the command line and to replace a current directory with that in which there are utilities of the command line.
2. Type the following (on all platforms, except for Windows, the text is sensitive to the register of letters):

gsec-user sysdba-password masterkey

After pressing key Enter, you should observe the invitation of the utility gsec:

GSEC>

3. Type the command:

modify sysdba-pw i4cur5tr

4. Press Enter. New value of the password - i4cur5tr, зашифровывается also is saved, the previous value - masterkey, now is void.
5. For an output from gsec, use the command:

quit

Enjoy!!!
© Ramzaj

How to: enable support Firebird / Interbase after install PHP on Linux (create interbase.so)

Once there was a need to add to the PHP installed on the server operating system Fedora Core 3 for Databases Interbase, and Firebird precisely 1.5, as it is the server has been installed. It turns out that PHP was installed and configured during the installation of the operating system. To solve the problem of the need to get interbase.so library. I have PHP version 4.3.9, it had to seek it is a version of the source. It was the gunzip source and compilation BUT WITHOUT INSTALLATION!
./configure --with-interbase=shared
make

END, NOT make install. The catalogue modules appears interbase.so. The copy in a folder, which contains similar library for PHP and edit php.ini place where PHP will seek library parameter determines extension_dir Section Dynamic Extensions write line extension = interbase.so Then restart Apache (service httpd restart or there you), and enjoy.
© Ramzaj

Monday, April 9, 2007

How to install (make) IBPerl on Linux

Background. The web-server on RedHat what that 6 versions worked, worked Interbase and there were many scripts on Perl, which used library IBerl (when all was developed driver DBD:Interbase for DBI yet was not) for dialogue with Interbase database. And once the operational system has flied. Though all data have remained.
Have chosen:
Operational system - FedoraCore 3
Database - Firebird 1.5
Languages - Perl, PHP
Libraries API - IBerl, new scripts on DBI+DBD:Interbase
By then IBPerl it was not supported any more and to find the distribution kit costed work, but even greater work it would be necessary to translate all these many hundreds scripts on sheaf DBI+DBD:Interbase
History
Has started to establish IBPerl.
Has unpacked.
Has started to make.

[root@www install]# gunzip IB
IB/ IBPerl-08p3.tar.gz
[root@www install]# gunzip IBPerl-08p3.tar.gz
[root@www install]# tar -xvf IBPerl-08p3.tar
[root@www IBPerl-0.8p3]# perl Makefile.PL
IBPerl 0.8p3 detecting InterBase LI-V1.5.2.4731 Firebird 1.5 (1.5) on the linux platform...

Checking if your kit is complete...
Looks good
Writing Makefile for IBPerl

You must now run 'make'.
[root@www IBPerl-0.8p3]# make
cp IBPerl.pm blib-linux-gcc/lib/IBPerl.pm
/usr/bin/perl /usr/lib/perl5/5.8.5/ExtUtils/xsubpp -noprototypes -typemap /usr/lib/perl5/5.8.5/ExtUtils/typemap IBPerl.xs > IBPerl.xsc && mv IBPerl.xsc IBPerl.c
gcc -c -I"/opt/firebird/include" -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -DVERSION=\"0.8p3\" -DXS_VERSION=\"0.8p3\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -UIBDEBUG -DIBVERSION=1.5 IBPerl.c
In file included from IBPerl.xs:17:
IBPerl.h:74: error: redefinition of `struct vary'
make: *** [IBPerl.o] Error 1
[root@www IBPerl-0.8p3]#
Began to find out that for structure such.
She had a following appearance:
typedef struct vary {
short vary_length;
char vary_string [1];
} VARY;
Has found out, that the structure vary is necessary for job with varchar. Earlier this structure should be declared independently, now she is declared in ibase.h. From here and a mistake. Therefore it was necessary to make changes in the form of conditional compilation of such kind:
if FB_API_VER >= 15
typedef struct vary VARY;
else
typedef struct vary {
short vary_length;
char vary_string[1];
} VARY;
endif

As at me the Database - Firebird 1.5 I with conditional compilation have not attended, and has simply replaced that slice of a code on such:
typedef struct vary VARY;
And all was perfectly put. Then I have packed the corrected distribution kit and I am it at myself on HDD just in case.
_________________________________________________________
© Ramzaj

Friday, April 6, 2007

How to disable SELinux

Do I need to do (if he inadvertently included), then do so :
1. Open the file /etc/sysconfig/selinux
2. Installing parameter SELinux = disabled
3. Save file changes.
___________________________________
© Ramzaj