Unable to install MySQL on FreeBSD 12.x platform

directvoip

Verified User
Joined
Jul 23, 2012
Messages
8
Have tried to install on FreeBSD 12.1 and the following comes up
===========================================
ensure_my_cnf: cannot find /usr/local/directadmin/conf/mysql.conf
Cannot find /usr/bin/mysqldump
ensure_my_cnf: cannot find /usr/local/directadmin/conf/mysql.conf
Cannot find mysql-5.7.27 package for installation
Could not find /usr/local/directadmin/scripts/directadmin_cron or it is empty
===========================================

This was a perfectly working system on FreeBSD 11.x and need to move to FreeBSD 12.x.

Have tried using custombuild and also used pkg to install MySQL client and server.

Any Ideas please ?
 
Could not find /usr/local/directadmin/scripts/directadmin_cron or it is empty
Seems to be complaining about cron.
try something like this.
Code:
cd /usr/local/directadmin/custombuild
./build set cron yes
./build set cron_frequency weekly
./build set notifications yes
./build set da_autoupdate yes
./build set updates yes
./build set webapps_updates yes
./build set clean yes
./build set cleanapache yes
./build set clean_old_tarballs yes
./build set clean_old_webapps yes
./build cron
 
Seems to be complaining about cron.
try something like this.
Code:
cd /usr/local/directadmin/custombuild
./build set cron yes
./build set cron_frequency weekly
./build set notifications yes
./build set da_autoupdate yes
./build set updates yes
./build set webapps_updates yes
./build set clean yes
./build set cleanapache yes
./build set clean_old_tarballs yes
./build set clean_old_webapps yes
./build cron

Thanx Brent, however I have tried all the above and still have the same errors. I have tried reinstalling over 5 times and am extremely quite frustrated as of now.
 
I am not a BSD guy so I may not be able to fully help you. If you haven't given up. Tell me some basic stuff.

Is this a new server?
New install?
Have you run or every run
Code:
cd /usr/local/directadmin/custombuild
./build clean
./build update
./build all d

If it is not a new install what changed?
 
FYI, I've just gone through and done some rework on the FreeBSD MySQL section of the CustomBuild script.
If you ./build update to ./build version; "rev 2351", it should properly try and grab the MySQL 5.7/8.0 binaries.
The fallback is a correct compile, should the binaries be missing (eg: MariaDB has no binaries for FreeBSD on our filesX servers)

John
 
Thank you John. Acquired another license for FreeBSD 12.x and I can confirm the installation was a complete breeze. Hitch free installation. Excellent response. Regards
 
I know it is an old topic, but I have the same problem.
What is the correct syntax to do the fallback to 2351?
I can't alter the ./build version
Or is there another way to fix this problem?
 
I too am having problems. I was following the other thread by bdacus01, and I installed mysql 8.0 and it worked correctly and then I kept getting the same errors. This time I set mysql to no, so it wouldn't install and now I am getting the same error as this.
 
I too am having problems. I was following the other thread by bdacus01, and I installed mysql 8.0 and it worked correctly and then I kept getting the same errors. This time I set mysql to no, so it wouldn't install and now I am getting the same error as this.
I know it is an old topic, but I have the same problem.
What is the correct syntax to do the fallback to 2351?
I can't alter the ./build version
Or is there another way to fix this problem?
Mysql of any flavor wont currently work on FreeBSD. You will need to move to MariaDB.
 
I disabled it entirely on the options.conf, and I am still having problems.

I tried the doing your steps on the other thread to install mariadb and

'touch /usr/local/directadmin/custombuild/custom/mysql/cmake.mysql '

I did not even have a custom directory inside of custombuild
 
Yes you have to build the directory structure out for both options.conf and custom cmake

The thread you read is more about testing and the issues with the installer on FreeBSD. Its not a setup guide.:)

However since you installed Mysql 8 you will have to either start over or migrated the dbs by hand.

If this is a test box I would just start over. If you want tell me what have you done and where are you stuck?

About to go to bed so might answer in am.
 
Honestly I do not even know if it is worth the trouble. I selected FreeBSD and installed it on my box because DirectAdmin said it was available to use with the software.

I wanted to try FreeBSD because I always use Linux and I wanted to experiment with something I never used before while having a good control panel. I figured if I bought a second license and tested this out I might like it. BUT I did submit a ticket for support and no one got back to me. I have wasted my whole day on this and I am slightly frustrated because it shouldn't be this difficult to install.

No one has built a step by step guide to install it properly and I have been googling stuff all day.

There are people that posted the same exact error... this month, last month, last year and no one is responding or saying what they did.:

make: stopped in /usr/local/directadmin/custombuild/mariadb-10.4.17
Could not find /usr/local/directadmin/scripts/directadmin_cron or it is empty


CentOS 7 works great. But with RHEL selling out to IBM, following RHEL gaining control of CentOS. Now with the news that CentOS is going to be upstream of RHEL, I want to try other options.

I reset my server entirely reinstalled a fresh FreeBSD 12.2,

mysql_inst = no

ran setup.sh, and it hangs up on cron even though the mysql is disabled...

I just set it as mariadb and it still hangs.

Without mysql I was getting this:

checking for icu-uc >= 50.1 icu-io icu-i18n... no
configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met:

Package 'icu-uc', required by 'virtual:world', not found
Package 'icu-io', required by 'virtual:world', not found
Package 'icu-i18n', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ICU_CFLAGS
and ICU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

*** There was an error while trying to configure php. Check the configure file
Could not find /usr/local/directadmin/scripts/directadmin_cron or it is empt
 
Honestly I do not even know if it is worth the trouble. I selected FreeBSD and installed it on my box because DirectAdmin said it was available to use with the software.
I totally get it I did too about 3 months ago. I agree it should just work out of the box. It doesn't an that as you can see is true.
I wanted to try FreeBSD because I always use Linux and I wanted to experiment with something I never used before
Yes me to. I like learning new things. Ask yourself this though did you learn linux in 24 hrs?
I figured if I bought a second license and tested this out I might like it.
Same here. I actually do like it. Which is why i started the other thread to help make it better.
I have wasted my whole day
No you have learned what isn't working. Like Edison said a 1000 trys to get it right.
it shouldn't be this difficult to install.
Agreed it why I have posted all the errors here in the other thread.
I did submit a ticket for support and no one got back to me.
3 Things on this. 1)The company is only open Monday - Friday "2020 JBMC Software, Suite 173 3-11 Bellerose Drive, St Albert, AB T8N 1P7 Canada. Mon - Fri 9AM - 5PM MST" bottom of home page. 2) A lot of times I find there is a reply but not email to let you know they replied. So go back and check. 3) If you bought a license with support they should get back to you.
slightly frustrated
Hang in there. Think of it as fun.
No one has built a step by step guide to install it properly
True. 🤔
this month, last month, last year and no one is responding or saying what they did.
We can only control ourselves.. but true. FreeBSD is a step child. It's actually the smarter, nerdier, and more practical child. Overshadowed buy the young cooler little brother..
CentOS 7 works great. But with RHEL selling out to IBM, following RHEL gaining control of CentOS. Now with the news that CentOS is going to be upstream of RHEL
I know I saw it coming way back when they made RedHat linux not free and had to buy support. If you need something right now that just works use Debian 10. I have most of my Production Boxes on Debian for months now. I switched some of them as soon as I heard IBM bought Redhat. Don't give up on FreeBSD though.
 
You are a swell person AND I didn't mean to make that sound like a rant lol.

Did you notice on FreeBSD when you type the del, button to delete letters or characters that are ahead of your cursor it doesn't work that it leaves a ~ symbol?

Are there any other small quirks that this OS has?

My laptop at home is Ubuntu 20_04 and I used to use Debian for everything. I think the only reason I switched was because I started using CPanel. My personal support for CPanel has been becoming non existent over the last year. That is what brought me to DirectAdmin. The test server I use it on works great! I know I have tried it before in the past and skipped over it and I regret that now.

I see myself using directadmin in the future and when I decide to reinstall my *production* servers that run all of my real stuff, I will get DA licenses for them too.
 
So first
Set your hostname
Code:
sysrc hostname=servername.domain.com
Code:
pkg install nano
Or use whatever you like
then
Code:
nano /etc/hosts
put in your server ip and hostname as normal
Once you do this
Code:
reboot

The hostname and all wont take effect without.

Once it comes back
Code:
pkg autoremove -y
pkg clean -a -y
freebsd-update fetch install
Code:
reboot
Again

Code:
pkg update && pkg upgrade -y

Run these commands for preinstall. The ones here https://docs.directadmin.com/gettin...ning-the-installation-with-predefined-options are wrong. TAR is installed by default now
Code:
pkg install -y gcc gmake perl5 wget bison flex cyrus-sasl cmake python autoconf libtool libarchive iconv bind911 mailx webalizer gettext-runtime udns sudo psmisc openssl krb5 pcre

Then create the options.conf file
Code:
mkdir -p /usr/local/directadmin/custombuild
cd /usr/local/directadmin/custombuild
nano options.conf
paste in. (please look over the file and change to you liking other than MySQL Settings). look for domain.com in file change as needed.
Code:
#PHP Settings
php1_release=7.4
php1_mode=php-fpm
php2_release=no
php2_mode=php-fpm
php3_release=no
php3_mode=php-fpm
php4_release=no
php4_mode=php-fpm
secure_php=no
php_ini=yes
php_timezone=America/Chicago
php_ini_type=production
x_mail_header=yes

#MySQL Settings
mysql=8.0
mariadb=10.4
mysql_inst=mariadb
mysql_backup=yes
mysql_backup_gzip=yes
mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups
mysql_force_compile=no

#WEB Server Settings
webserver=nginx_apache
http_methods=GET:HEAD:POST
litespeed_serialno=trial
modsecurity=no
modsecurity_ruleset=no
apache_ver=2.4
apache_mpm=event
mod_ruid2=no
userdir_access=no
harden_symlinks_patch=yes
use_hostname_for_alias=yes
redirect_host=changeme.domain.com
redirect_host_https=no

#WEB Applications Settings
phpmyadmin=yes
phpmyadmin_ver=5
squirrelmail=no
roundcube=yes
webapps_inbox_prefix=no

#ClamAV-related Settings
clamav=no
clamav_exim=no
modsecurity_uploadscan=no
proftpd_uploadscan=no
pureftpd_uploadscan=no
suhosin_php_uploadscan=no

#Mail Settings
exim=yes
eximconf=yes
eximconf_release=4.5
blockcracking=yes
easy_spam_fighter=yes
spamd=rspamd
sa_update=daily
dovecot=yes
dovecot_conf=yes
mail_compress=yes
pigeonhole=yes

#FTP Settings
ftpd=pureftpd

#Statistics Settings
awstats=no
webalizer=no

#CustomBuild Settings
custombuild=2.0
autover=yes
bold=yes
clean=yes
cleanapache=yes
clean_old_tarballs=yes
clean_old_webapps=yes
downloadserver=files-de.directadmin.com

#Cronjob Settings
cron=yes
cron_frequency=weekly
[email protected]
notifications=yes
da_autoupdate=yes
updates=yes
webapps_updates=yes

#CloudLinux Settings
cloudlinux=no
cloudlinux_beta=no
cagefs=no

#Advanced Settings
autoconf=yes
automake=yes
libtool=yes
curl=yes
new_pcre=yes

custombuild_plugin=yes
phpmyadmin_public=yes
ssl_configuration=intermediate
unit=no

Now create the cmake.mysql file

Code:
mkdir -p /usr/local/directadmin/custombuild/custom/mysql
cd /usr/local/directadmin/custombuild/custom/mysql
nano cmake.mysql
paste in

Code:
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
  -DWITH_INNOBASE_STORAGE_ENGINE=1 \
  -DWITH_FEDERATED_STORAGE_ENGINE=1 \
  -DWITH_ZLIB=system \
  -DWITH_EXTRA_CHARSETS=all \
  -DPLUGIN_TOKUDB=NO \
  -DPLUGIN_AUTH_GSSAPI=NO \
  -DWITH_JEMALLOC=system \
  -DWITH_PROTOBUF=system \
  -DWITH_LIBWRAP=1 \
  -DWITHOUT_ROCKSDB=YES \
  -DWITHOUT_TOKUDB=YES \
  -DWITHOUT_MROONGA=YES

Code:
chmod 755 /usr/local/directadmin/custombuild/custom/mysql/cmake.mysql

DO Not run setup.sh until after you have confirmed all of the above is correct.

Code:
cd /root
wget -O setup.sh http://www.directadmin.com/setup.sh
chmod 755 setup.sh
./setup.sh auto

This should get you to the end of an install..
Barring any typos..
 
Last edited:
You are a swell person
HAHA.. I am just a regular guy like you..
I didn't mean to make that sound like a rant lol.
we all rant from time to time... it's all good. We all have to pull together as humans and help each other..
Did you notice on FreeBSD when you type the del, button to delete letters or characters that are ahead of your cursor it doesn't work that it leaves a ~ symbol?
sometimes but haven't cared too much for figuring it out yet.. FreeBSD uses sh shell not bash so could be related..
Are there any other small quirks that this OS has?
check out the book I posted in other thread its great.
My laptop at home is Ubuntu 20_04 and I used to use Debian for everything.
I like MXlinux "no SystemD". Ubuntu is next Conical is already going the way of others. Why do you think they forked Debian... To me FreeBSD and Debian is best not big money choices (currently)
CPanel has been becoming non existent over the last year.
They care not for the little people that all ended June 2019. When cpanel posts if you have more than 1200 licenses call us for special offer umm yeah said it all.. To be fair DA is smaller and support is regular speed not warp speed.. so just stay relaxed you will be fine..
I know I have tried it before in the past and skipped over it and I regret that now.
I have been there. See my post here https://forum.directadmin.com/threa...directadmin-and-my-thoughts.58294/post-298201
If I lived near you I would buy you a beer.
Thanks no worries. Where is home? UK? Wherever home is stay safe and stay inside. I hope everyone you know is well. May you all be blessed.
 
I am reinstalling the box right now started after you posted the guide.
 
Back
Top