Command-Line / Script installl


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » DirectAdmin » Installation

Command-Line / Script installlLast Modified: May 29, 2020, 2:08 pm
Relating to the Standard Install Guide, the setup.sh supports a command-line install method, that does not have any CLI user questions/input required.  The setup is very similar, the only difference is the call to the setup.sh would be as follows, enter your install info to alter the output here:
Client ID
License ID
Hostname
Ethernet Device
IP

The call to the setup.sh would be as follows:

cd /root
wget directadmin.com/setup.sh
./setup.sh 123 123456 host.name.com eth0 1.2.3.4


This will install everything as per the defaults for this OS.

You can alternatively use the simpler method (recommended), which will auto-detect all settings:

cd /root
wget directadmin.com/setup.sh
./setup.sh auto




Options


Options must be set an in-place before calling the setup.sh in command-line mode.

  1. CustomBuild's options.conf and php_extensions.conf can be set in place with desired options before running the setup.sh. Doing so will do things like using your desired downloadserver, using the desired php version/mode, webserver type, etc..  Place it here prior to running the setup.sh:

    /usr/local/directadmin/custombuild/options.conf
    /usr/local/directadmin/custombuild/php_extensions.conf

    with your desired settings, so that when CustomBuild runs, it will use those settings, instead of the defaults.  See Notes #2 for info on setting mysql_inst before running the setup.sh.
  2. Tell the setup.sh to run the pre-install commands:

    echo 1 > /root/.preinstall

  3. Install DA without the need for a license:

    echo 1 > /root/.skip_get_license

    When the license becomes available, use the getLicense.sh to install it normally, and DA should start up.
  4. Installing on a LAN. Use the LAN install guide, but the starting point is:

    echo 1 > /root/.lan

  5. Install using insecure http://directadmin.com, instead of secured https://directadmin.com:

    echo 1 > /root/.insecure_download

  6. Using desired hostname with "./setup.sh auto" can be specified with:

    echo host.name.com > /root/.use_hostname


Notes

  1. Prior to 1.57.6, you must run:

    echo 2.0 > /root/.custombuild

    before the setup.sh is called, else it will try to install customapache.
  2. the mysql_inst option can be enabled in the options.conf prior to the setup.sh BUT as the mysql install is done through the scripts/mysql.sh, and not through CustomBuild (for now), using the mysql_inst in this manner can only be used for updates from the default version.  Updating mysql/mariadb through CustomBuild varies depending on the currently install version and the version you're going to.   Eg: chaging from MariaDB to MySQL cannot be done this way.  Jumping major MySQL versions (Eg: from 5.5 to 5.7) cannot be done, must be done in steps, so consider leaving the mysql_inst=no and changing it as needed after.  For example, CentOS 7 64-bit installs MariaDB 5.5 (which does support larger jumps), so your only options would be mysql_inst=mariadb and any of mariadb=5.5 10.0 10.1 10.2 10.3 10.4. Cannot setup mysql_inst=mysql with the setup.sh command-line mode if OS defaults to MariaDB. To change to MySQL from MariaDB, use the inverse of this guide
 
Related Helpfiles
Updating your DirectAdmin License manually
Common pre-install commands
Standard Install

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST