HOWTO (Done! In testing now): DA Installing on FreeBSD 7.0 64-bit AMD64
Hello to all, I just wanna try to make a step-by-step HOW-TO about Installing DA on FreeBSD 7.0 64-bit using all services from FreeBSD ports system.
So, you have already installed OS FreeBSD 7.0 64-bit.
The main condition is that FreeBSD must be compilied with 32-bit support (if you didn't change anything in kernel - 32-bit support is enabled)
NOTE: You also have to compile new kernel with quotas support, cause by default quotas not compilied into kernel.
So, let's begin:
If there is an error starting httpd: Syntax error on line 30 of /usr/local/directadmin/data/users/dicky/httpd.conf:
Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration
You may want to use this commnd
If some permissons troubles with directadmin directories, you may try to:
So, that's my version of installing DA on FreeBSD 7.0 64-bit...
Your comments and corrections are strongly desired =) Lets make this HOW-TO together.
-------------------------------
Thanx to chatwizrd, paix
Updated...
Hello to all, I just wanna try to make a step-by-step HOW-TO about Installing DA on FreeBSD 7.0 64-bit using all services from FreeBSD ports system.
So, you have already installed OS FreeBSD 7.0 64-bit.
The main condition is that FreeBSD must be compilied with 32-bit support (if you didn't change anything in kernel - 32-bit support is enabled)
NOTE: You also have to compile new kernel with quotas support, cause by default quotas not compilied into kernel.
So, let's begin:
- Add your user to SSH allowed users:
Code:# ee /etc/ssh/sshd_config
Code:AllowUsers username
IMPORTANT, don't forget to enter an empty string after string you entered, or after DA install you cannot login over SSH, because it will looks something like this
Code:[COLOR=RED][B][I]/*WRONG configuration in case you didnt insert an empty string*/[/I][/B] AllowUsers usernameAllowUsers admin AllowUsers root[/COLOR]
- Required software (needed for Directadmin):
Code:# make install clean -C /usr/ports/devel/libtool15 # make install clean -C /usr/ports/devel/autoconf262 # make install clean -C /usr/ports/devel/automake110 # make install clean -C /usr/ports/ftp/wget # make install clean -C /usr/ports/print/freetype # make install clean -C /usr/ports/print/freetype2 # make install clean -C /usr/ports/graphics/ImageMagick # make install clean -C /usr/ports/graphics/gd # make install clean -C /usr/ports/textproc/libxslt # make install clean -C /usr/ports/ftp/curl # make install clean -C /usr/ports/devel/gmake
- Optional software:
Midnight Commander (mc) - a free Norton Commander Clone.
Code:# make install clean -C /usr/ports/misc/mc
- DA Installing (WARNING! csh must not be set for root and your 'wheel' user. Or you will lose access for your server):
Code:# ./setup.sh Please enter your Client ID : **** Please enter your License ID : ***** Please enter your hostname \(server.domain.com\) It must be a Fully Qualified Domain Name Do *not* use a domain you plan on using for the hostname: eg. don't use domain.com. Use server.domain.com instead. Do not enter http:// or www Enter your hostname (FQDN) : ***.***.*** Client ID: **** License ID: ***** Hostname: ***.***.*** Is this correct? (y,n) : y The following ethernet devices were found. Please enter the name of the one you wish to use: em0 em1 Enter the device name: em0 Using em0 Using AA.BB.CC.DD Is AA.BB.CC.DD the IP in your license? (y,n) : y DirectAdmin will now be installed on: FreeBSD 7.0 Is this correct? (must match license) (y,n) : y 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 1.1: newer, less tested. Includes any Apache version, php 4, 5, or both in cli and/or suphp. Frontpage not available. 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 1.1. 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... /usr/local/directadmin/custombuild/options 100% of 11 kB 22 MBps Do you want to have PHP4 or PHP5 as default? (4/5): 5 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): no 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): no Do you want to be able to update/instal MySQL using CustomBuild? (yes/no): no Do you want CustomBuild to backup MySQL databases before the update? (yes/no): no Which version of Apache do you want to have? (1.3/2.0/2.2): 2.2 Do you want to be able to install/update phpMyAdmin using CustomBuild? (yes/no): yes Do you want to be able to install/update Atmail webmail 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 be able to install/update UebiMiau 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): no Do you want CustomBuild to install Jailed shell (beta)? (yes/no): no Do you want CustomBuild to download versions.txt every time? (yes/no): yes Do you want to enable bolded text? (yes/no): yes Do you want to clean everything (run './build clean' every time) running CustomBuild? (yes/no): no Which fileserver do you want to use (1 is located in USA, 2 - Europe)? (1/2): 2 Options.conf has been installed successfully
- Reinstalling of libiconv, because during DA install it was rewrited to 32-bit.
Code:# make deinstall reinstall clean -C /usr/ports/converters/libiconv
- MySQL Installing from ports:
Code:# rm /usr/local/mysql # rm /usr/local/bin/mysql # rm /usr/local/bin/mysqladmin # make install clean -C /usr/ports/databases/mysql51-server/ Add mysql_enabled="YES" to /etc/rc.conf # ln -s /home/mysql /var/db/mysql # cp /etc/my.cnf /home/mysql # chown -R mysql:mysql /home/mysql/* # cd /usr/local/etc/rc.d # mv mysqld mysqld_da_old # ln -s mysql-server mysqld # /usr/local/etc/rc.d/mysqld start # ln -s /usr/local /usr/local/mysql
Code:# mysql -uroot -p mysql> GRANT ALL PRIVILEGES ON *.* TO da_admin@localhost IDENTIFIED BY 'password' WITH GRANT OPTION; mysql> FLUSH PRIVILEGES; mysql> quit
- Installing proftpd
Code:# make install clean -C /usr/ports/ftp/proftpd Add proftpd_enable="YES" to /etc/rc.conf # mv /usr/local/etc/proftpd.conf /usr/local/etc/proftpd_orig_conf # ln -s /etc/proftpd.conf /usr/local/etc/proftpd.conf
- Installing suPHP, php5-cgi, dovecot
Code:# cd /usr/local/directadmin/custombuild # ./build suphp The ~username (UserDir) method will fail in paranoid mode, but if you need that - check this http://help.directadmin.com/item.php?id=176 # ./build php n # ./build php5-cgi n # ./build dovecot # ./build exim_conf # ./build phpmyadmin
- Additionally if you installing suPHP in 'paranoid' mode, you may want to add in directadmin.conf this string:
Code:apache_public_html=0
- Installing exim from ports
Code:# make install clean -C /usr/ports/mail/exim Add to /etc/rc.conf sendmail_enable="NO" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO" exim_enable="YES" # cd /usr/local/etc/exim/ # mv configure configure_orig_old # ln -s /etc/exim.conf configure Edit file /usr/local/directadmin/data/admin/services.status, be sure to have: exim-4.69-0=ON # cd /usr/local/etc/rc.d/ Edit /usr/local/etc/rc.d/boot.sh, remove any exim lines # ln -s exim exim-4.69-0 # /usr/local/etc/rc.d/exim restart # tail /var/log/exim/mainlog # tail /var/log/exim/paniclog
- Zend Optimizer Installing
Code:# pkg_add -r ZendOptimizer Add to /usr/local/etc/php5/cgi/php.ini these strings: [Zend] zend_optimizer.optimization_level=14 zend_extension_manager.optimizer="/usr/local/lib/php/20060613/Optimizer" zend_extension_manager.optimizer_ts="/usr/local/lib/php/20060613/Optimizer_TS" zend_extension="/usr/local/lib/php/20060613/ZendExtensionManager.so" zend_extension_ts="/usr/local/lib/php/20060613/ZendExtensionManager_TS.so" [B][COLOR=RED]*BE SURE* that zend_optimizer.optimization_level=14, because by default it 15 and doesnt work.[/COLOR][/B]
If there is an error starting httpd: Syntax error on line 30 of /usr/local/directadmin/data/users/dicky/httpd.conf:
Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration
You may want to use this commnd
Code:
# cd /usr/local/directadmin/custombuild && ./build rewrite_confs
Code:
# cd /usr/local/directadmin/scripts && ./set_permissions.sh all
So, that's my version of installing DA on FreeBSD 7.0 64-bit...
Your comments and corrections are strongly desired =) Lets make this HOW-TO together.
-------------------------------
Thanx to chatwizrd, paix
Updated...
Last edited: