DA install on Centos 5 64bit using custombuild

Webcart

Verified User
Joined
Jan 14, 2004
Messages
398
Hello,

In this thread I will share my experience installing DA using custombuild.
(Post updated for custombuild version 1.1.6)

Settings:
...

DirectAdmin will now be installed on: Enterprise 5
Is this correct? (must match license) (y,n) :

You now have 2 options for your apache/php setup.

1: customapache: older, more tested. Includes Apache 1.3, php 4 and frontpage.
2: custombuild: newer, less tested. Includes any Apache version, php 4, 5, or both in cli and/or suphp. Frontpage not available with Apache 2.x.
Post any issues with custombuild to the forum: http://www.directadmin.com/forum/forumdisplay.php?f=61

Enter your choice (1 or 2): 2
You have chosen custombuild.

Would you like the default settings of apache 2.2 and php 5 cli? (y/n): n
You have chosen to customize the custombuild options. Please wait while options configurator is downloaded...

--16:39:04-- http://files.directadmin.com/services/custombuild/options
Resolving files.directadmin.com... 72.35.85.222
Connecting to files.directadmin.com|72.35.85.222|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9231 (9.0K) [text/plain]
Saving to: `/usr/local/directadmin/custombuild/options'

100%[===========================================================>] 9,231 --.-K/s in 0.07s

16:39:04 (127 KB/s) - `/usr/local/directadmin/custombuild/options' saved [9231/9231]

Do you want to have PHP4 or PHP5 as default? (4/5): 4
Do you want to have PHP5? (yes/no): yes
Do you want to have PHP5 as CLI or CGI? (cli/cgi): cgi
Do you want to have PHP4? (yes/no): yes
Do you want to have PHP4 as CLI or CGI? (cli/cgi): cli
Do you want to have the php.ini (PHP configuration file) rewritten? (yes/no): yes
For the next question, the usual file is the dist (distribution) version.What type of php.ini (PHP configuration file) do you want to have? (dist/recommended): recommended
Do you want to have Zend Optimizer? (yes/no): yes
Do you want to be able to update/instal MySQL using CustomBuild? (yes/no): yes
Which version of MySQL do you want to have? (4.1/5.0: 5.0
Which version of Apache do you want to have? (1.3/2.0/2.2): 1.3
Do you want to be able to install/update phpMyAdmin using CustomBuild? (yes/no): yes
Do you want to be able to install/update SquirrelMail webmail using CustomBuild? (yes/no): yes
Do you want to be able to install/update RoundCube webmail using CustomBuild? (yes/no): yes
Do you want to install PHP mail() header patch together with PHP? (yes/no): yes
Do you want to install Dovecot? (yes/no): yes
Do you want to be able to update Exim configuration file (exim.conf) using CustomBuild? (yes/no): yes
Do you want to be able to install/update ProFTPD using CustomBuild? (yes/no): yes
Do you want to clean everything (run './build clean' every time) running CustomBuild? (yes/no): yes
Which fileserver do you want to use (1 is located in USA, 2 - Europe)? (1/2): 1

Problems found:
  1. Apache hasn't started
  2. Dovecot hasn't been installed
  3. PHP build fails
  4. FTP server fails to start
  5. Zend Optimizer is installed for default (PHP4) only
  6. FTP client fails to run (not compiled properly).

Comments:
  1. SpamAssasin: installation and configuration
  2. Spamblocker
  3. It took me quite a while to figure out that selecting PHP4 as "CLI" actually refers to building it as Apache module in addition to compiling CLI binary. This is extremely confusing and I would suggest adding clarifications asap.
 
Last edited:
Apache won't start after DA install

Problem 1: Apache won't start after DA install.

Description:
In order to reproduce the problem, execute
# service httpd status
httpd is stopped
# service httpd start
Starting httpd: [FAILED]
# tail /var/log/httpd/error_log
[Thu Nov 22 17:13:21 2007] [error] OpenSSL: error:0D06B08E:asn1 encoding routines:ASN1_D2I_READ_BIO:not enough data
[Thu Nov 22 17:13:31 2007] [error] mod_ssl: Init: Unable to read server certificate from file /etc/httpd/conf/ssl.crt/server.crt (OpenSSL library error follows)
[Thu Nov 22 17:13:31 2007] [error] OpenSSL: error:0D06B08E:asn1 encoding routines:ASN1_D2I_READ_BIO:not enough data

Explanation:
Default install doesnt include SSL certificate. I think it would be better to have self-signed certificate installed by default rather than no certificate at all.

Resolution:
Install server certificate as follows:
cat > /etc/httpd/conf/ssl.key/server.key
-----BEGIN PRIVATE KEY-----

...

-----END PRIVATE KEY-----
^D
chmod 400 /etc/httpd/conf/ssl.key/server.key

cat > /etc/httpd/conf/ssl.crt/server.crt
-----BEGIN CERTIFICATE-----

....

-----END CERTIFICATE-----
^D
chmod 400 /etc/httpd/conf/ssl.crt/server.crt
 
Problem 2: Dovecot doesn't get installed

Description:
In order to reproduce the problem, execute

[root@main /usr/local/directadmin/custombuild]# netstat -l -p | grep pop3
[root@main /usr/local/directadmin/custombuild]# netstat -l -p | grep imap
tcp 0 0 *:imap *:* LISTEN 3125/xinetd
[root@main /usr/local/directadmin/custombuild]# ps aux | grep dove
root 29398 0.0 0.0 60228 708 pts/1 R+ 17:49 0:00 grep dove

Resolution:
Rebuild dovecot after DA install completes:
cd /usr/local/directadmin/custombuild
./build dovecot
 
PHP build fails

Problem 3: PHP build fails

Description:
The build ends with an error and no PHP binaries are created:
/usr/bin/ld: /usr/local/lib/libltdl.a(ltdl.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libltdl.a(ltdl.o): could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1

Explanation:
I think this problem is related to the following warning generated while trying to build mcrypt library with ./build mcrypt:
creating ./config.status
creating Makefile
creating config.h
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c ltdl.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c ltdl.c -fPIC -o .libs/ltdl.o
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c ltdl.c -o ltdl.o >/dev/null 2>&1
/bin/sh ./libtool --mode=link gcc -g -O2 -o libltdl.la -rpath /usr/local/lib -no-undefined -version-info 4:0:1 ltdl.lo -ldl
./libtool: line 3965: ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib ): command not found
./libtool: line 3965: ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib ): command not found

*** Warning: linker path does not have real file for library -ldl.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libdl and none of the candidates passed a file format test
*** using a file magic. Last file checked: /lib/libdl-2.5.so
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.

*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.
./libtool: line 5837: test: : integer expression expected
./libtool: line 5837: test: : integer expression expected
using piecewise archive linking...
./libtool: line 5859: test: : integer expression expected
ar cru .libs/libltdl.a ltdl.o
ranlib .libs/libltdl.a
creating libltdl.la

Resolution (credit goes to smtalk):

Install stock ltdl library and use it instead of the version bundled with libmcrypt:
yum install libtool-ltdl
yum install libtool-ltdl-devel
ln -sf /usr/lib64/libltdl.a /usr/local/lib/libltdl.a
./build php n
 
FTP won't start after DA install.

Problem 4 (reported by .::Gsmdenis::.): FTP won't start after DA install.

Description:
In order to confirm the problem, execute:
# ftp localhost
ftp: connect: Connection refused
ftp> bye
# /etc/init.d/proftpd status
proftpd dead but subsys locked
# /etc/init.d/proftpd start
Starting proftpd: - Fatal: unknown configuration directive 'DisplayChdir' on line 62 of '/etc/proftpd.conf'
[FAILED]
Resolution:
Rebuild FTP
cd /usr/local/directadmin/custombuild
./build proftpd
 
About #4 - it was a problem of proftpd.conf file, and I don't think it came with the CustomBuild script. #2 - did you get any errors? #1 - only with Apache 1.3.39, you should inform DirectAdmin support about it.
 
About #4 - it was a problem of proftpd.conf file, and I don't think it came with the CustomBuild script.
May be proftpd.conf file doesn't get copied over during custombuild install.
I can make OS reload and give you an access if you want to reproduce this problem on your end and need a test environment.
#2 - did you get any errors?
I didn't look for errors in the build, however, I noticed that after rebuilding dovecot as suggested above, /etc/xinetd.d/imap file was gone and another program was bound to imap port:
# netstat -l -p | grep imap
tcp 0 0 *:imaps *:* LISTEN 3575/imap-login
tcp 0 0 *:imap *:* LISTEN 3575/imap-login
#1 - only with Apache 1.3.39, you should inform DirectAdmin support about it.
I thought custombuild is considered beta and we should report all issues in the custombuild forum ;)
 
Only CustomBuild 1.2 is beta, and 1.1 isn't beta anymore. About the errors - it would be great if you could reproduce them.
 
Zend Optimizer is installed for default (PHP4) only

Problem 5: Zend Optimizer is installed for default (PHP4) only

Description:
After building PHP as suggested here, execute the following commands to install Zend Optimizer:
cd /usr/local/directadmin/custombuild
./build zend
This, however, will install Zend Optimizer for (default) PHP4 only.
In order to install the same for PHP5, find Zend section in PHP4's ini file:
# tail /usr/local/Zend/etc/php.ini
; tab-width: 4
; End:


[Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.2.8
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.2.8
zend_optimizer.version=3.2.8
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
and add it to /usr/local/etc/php5/cgi/php.ini file:
# cat >> /usr/local/etc/php5/cgi/php.ini
[Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.2.8
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.2.8
zend_optimizer.version=3.2.8
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
^D
^D denotes Ctrl-D.
That's it. You don't even have to restart Apache since PHP5 is compiled as CGI.
 
SpamAssassin: installation and configuration

Comment 1: SpamAssassin: installation and configuration

In order to install SpamAssassin (SA), follow instructions found at How to enable SpamAssassin on your server.

So far, I was unable to find information about SA configuration, in particular, how to
- report false positives
- report false negatives
- whitelist trusted networks and/or IP addresses

I will update this post once I figure this out :)
 
Spamblocker configuration

Comment 2: Spamblocker configuration

This is a placeholder for information about Spamblocker.

Please feel free to post any links regarding Spamblocker here and I will update this post accordingly.

Updated:
1. Spam blocker installation instructions can be found here:http://www.nobaloney.net/downloads/spamblocker/DirectAdminSpamBlocker2/ReadMe.SpamBlocker.exim.conf.2.1.1.txt.
2. /etc/exim.pl file installed by DA isn't the latest version. Download the latest version from http://www.nobaloney.net/downloads/spamblocker/DirectAdminSpamBlocker2/exim.pl
 
Last edited:
FTP client fails to run

Problem 6: FTP client fails to run

Description:
I think this is a new issue introduced with the recent upgrade of the build script to v1.1.6.
FTP client terminates unexpectedly after connecting to FTP server.
In order to reproduce the problem, execute
[root@main ~]# ftp localhost
Connected to localhost.
220 ProFTPD 1.3.1 Server ready.
500 AUTH not understood
500 AUTH not understood
KERBEROS_V4 rejected as an authentication type
ftp: relocation error: ftp: symbol krb5int_labeled_fopen, version krb5support_0_MIT not defined in file libkrb5support.so.0 with link time reference

Resolution: not available yet
 
[root@main ~]# ftp localhost
Connected to localhost.
220 ProFTPD 1.3.1 Server ready.
500 AUTH not understood
500 AUTH not understood
KERBEROS_V4 rejected as an authentication type
ftp: relocation error: ftp: symbol krb5int_labeled_fopen, version krb5support_0_MIT not defined in file libkrb5support.so.0 with link time reference


yum install krb5-libs.i386 krb5-devel

should resolve your issue
 
Back
Top