Install directadmin with setup.sh and prepared options.conf

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
15,366
Location
www.poralix.com
Hello,

Is there any chance to install directadmin with prepared beforehand options.conf to avoid pressing keys and choosing software versions? If no, I'd like to ask you to implement this ability in setup.sh script to be able install directadmin in non-interactive mode.
 
im working on a script that do exactly this.

Those are the line i use for use my custom options.conf file during setup.sh

Code:
mkdir /usr/local/directadmin/
mkdir /usr/local/directadmin/custombuild/
mkdir /usr/local/directadmin/custombuild/custom/
mkdir /usr/local/directadmin/custombuild/custom/ap2/
mkdir /usr/local/directadmin/custombuild/custom/phpmyadmin
mkdir /usr/local/directadmin/custombuild/custom/roundcube
wget -O /usr/local/directadmin/custombuild/custom/ap2/configure.php5 http://MYURL
wget -O /usr/local/directadmin/custombuild/custom/phpmyadmin/config.inc.php http://MYURL
wget -O /usr/local/directadmin/custombuild/options.conf http://MYURL
chmod 755 /usr/local/directadmin/custombuild/custom/ap2/configure.php5
chmod 644 /usr/local/directadmin/custombuild/options.conf
echo 1.2 > /root/.custombuild
export cn_ip=`/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | cut -d\  -f1`
/root/setup.sh $cn_dauid $cn_dalid $cn_hostname eth0 $cn_ip

the variables $cn_dauid $cn_dalid $cn_hostname are set before with echos and the $cn_ip is automatic taken from eth0 config

Hope this help with your request.

Regards
 
If I'm not mistaken, setup.sh will find that /usr/local/directadmin directory exists, and ask you to confirm further installation.

Will anyone disprove that supposition? Or confirm?
 
this is working, im already tested it several time (about 50) and im atm just ending with other customization (other software related, not directadmin installation).

Directadmin setup will check that /root/.custombuild exist and will check what is given as value inside (1.2) so will download custombuild options.conf default file but, will notice that file exist and so will use that instead on downloading a new one and will install the software present in options.conf

Regards
 
This check doesn't require any key-press to continue with installation.

Code:
if [ -e /usr/local/directadmin ]; then
        echo "";
        echo "";
        echo "*** DirectAdmin already exists ***";
        echo "    Press Ctrl-C within the next 10 seconds to cancel the install";
        echo "    Else, wait, and the install will continue, but will destroy existing data";
        echo "";
        echo "";
        sleep 10;
fi

So that does not break anything?

And what about any check on requirements and dependencies?
 
no, doenst brake anything.

About dependency what do you mean?

Before start setup i use to install some custom packages, some required, some used by me.

Those are:

Code:
yum -y update
yum -y install xinetd nano wget gcc gcc-c++ make quota perl perl-libwww-perl mailx autoconf bzip2 ntp telnet flex zip unzip openssl-devel libcap-devel wget libc-client-devel.x86_64 krb5-devel db4-devel cyrus-sasl-devel mc ruby libdbi-devel yum-utils libdbi-drivers
wget -O /root/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
rpm -ivh /root/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
yum -y install htop mytop git
rm -rf /root/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
mkdir /root/.cpan/
mkdir /root/.cpan/CPAN/
wget -O /root/.cpan/CPAN/MyConfig.pm http://MYURL
/usr/bin/cpan -i Bundle::CPAN
/usr/bin/cpan -i Archive::Tar
/usr/bin/cpan -i Digest::SHA
/usr/bin/cpan -i Mail::SPF
/usr/bin/cpan -i IP::Country
/usr/bin/cpan -i Net::Ident
/usr/bin/cpan -i IO::Socket::INET6
/usr/bin/cpan -i Compress::Zlib
/usr/bin/cpan -i Mail::DKIM LWP::UserAgent
/usr/bin/cpan -i HTTP::Date
/usr/bin/cpan -i Encode::Detect
/usr/bin/cpan -i Net::SSLeay
/usr/bin/cpan -i Net::DNS::SEC
/usr/bin/cpan -i IO::Socket::SSL
/usr/bin/cpan -i Encode::Detect
/usr/bin/cpan -i NetAddr::IP

Hope is helpful for you aswell.

Regards
 
I've just discussed this with John; he tells me that if I create a path to /usr/local/directadmin/custombuild and just put a copy of the options.conf file I want to use in there, and choose the default install, the install.sh script will use it. Is there a reason why I should want the other configuration files as well?

Thanks, Andrea.

Jeff
 
For other you mena phpmyadmin and configure.php5?

If yes, well, i use those for my own custom setup, not forced to do the same, just show the possibility to use that.

Regards
 
Back
Top