NinthWave
Contributor
- Joined
- Jan 9, 2021
- Messages
- 129
A few months ago, I succesffully installed Seafile in a jail but as a total FreeBSD noob, the sqlite database lies within the same jail as the Seafile serve which means I have to backup the whole jail on Backblaze, which I dont find elegant anymore.
For a few days now and wihout any success, I have been trying to just install Seafile again and mounting a dataset.
I used this: https://www.truenas.com/community/threads/how-to-install-seafile-in-a-freebsd-jail.64121/post-459138
I can't figure out to make it work.
So I'd like to do it the right way: having the datase outside the seafile jail.
There is another post specifically for MariaDB but then again, the guy installed MariaDB in the Seafile jail: https://www.truenas.com/community/threads/how-to-install-seafile-in-a-freebsd-jail.64121/post-560587
Unless I am told that it is an appropriate way to do it (I might use MariaDB for another app in the future), I'd prefer to have in it's own jail.
So what I did yet is:
Installing a MariaDB server in a jail
I followed this: https://www.ricalo.com/blog/mariadb-server-freenas/#
But I also followed this:
Created the ZFS dataset
1. Created the
Created the jail
The IP is 10.0.0.16
Installed the mariadb103-server-10.3.31_1 package
For some reason,
Created folders in the jail where you are going to mount the datasets. Assign the mysql user as the owner
Mounted the [|CODE]data[/|CODE] and [|CODE]log[/|CODE] datasets on the corresponfing folder in the jail
I also followed @Patrick M. Hausen comment on the heaviness in separating the datasets and, not certainly knowing if it was the correct way to do it, I mounted the three directories in the sole dataset:
Configure the service
Create the
Configure the service startup and start the service
Run the script to improve the security of the installation
I left the root password empty
Testing the installation
It worked
Installing seafile
This is where I am at now and in need of help.
Installation of Seafile Server Community Edition with MySQL/MariaDB This is meant for a linux install and FreeBSD packages are different so I am not sure if I should follow that.
FreeBSD Install from @Hizar
My problem here is that since @Hizar installed Seafile and MariaDB in the same jail, I am not sure what goes where
Any help would be appreciated
For a few days now and wihout any success, I have been trying to just install Seafile again and mounting a dataset.
I used this: https://www.truenas.com/community/threads/how-to-install-seafile-in-a-freebsd-jail.64121/post-459138
I can't figure out to make it work.
So I'd like to do it the right way: having the datase outside the seafile jail.
There is another post specifically for MariaDB but then again, the guy installed MariaDB in the Seafile jail: https://www.truenas.com/community/threads/how-to-install-seafile-in-a-freebsd-jail.64121/post-560587
Unless I am told that it is an appropriate way to do it (I might use MariaDB for another app in the future), I'd prefer to have in it's own jail.
So what I did yet is:
Installing a MariaDB server in a jail
I followed this: https://www.ricalo.com/blog/mariadb-server-freenas/#
But I also followed this:
Sorry, I dont know how to quote across different threads@Patrick M. Hausen
The information to create separate datasets for InnoDB tables and logfiles and complicated adjustment of ZFS parameters is according to Allan Jude and others who work on OpenZFS outdated.
Simply putting all of your database file in the same dataset with the default blocksize of 128k will in most cases result in better performance ever since compressed ARC was introduced
Installing Mariadb in jail
Hi, As TrueNAS is a ZFS filesystem, could anyone please provide me with some information on the dataset I need to create in order to run MariaDB server inside a TrueNAS jail? Can the primarycache bet set in the web interface or is it command line only? I couldn't find the option when creating...www.truenas.com
Created the ZFS dataset
1. Created the
/mnt/Bassin/innodb_data
datasetCode:
zfs create Bassin/innodb_data
zfs set atime=off Bassin/innodb_data
zfs set compression=off Bassin/innodb_data
zfs set primarycache=metadata Bassin/innodb_data
zfs set recordsize=128K Bassin/innodb_data
Created the jail
Code:
iocage create --name mariadb --release 12.2-RELEASE
The IP is 10.0.0.16
Installed the mariadb103-server-10.3.31_1 package
For some reason,
mariadb105-server-10.5.12_1
result in the impossibility to start the service so I gave a previous version a try.Created folders in the jail where you are going to mount the datasets. Assign the mysql user as the owner
Code:
mkdir -p /var/db/mysql/innodb_data mkdir -p /var/db/mysql/innodb_log mkdir -p /var/db/mysql/datadir chown -R mysql:mysql /var/db/mysql/innodb_data chown -R mysql:mysql /var/db/mysql/innodb_log chown -R mysql:mysql /var/db/mysql/datadir
Mounted the [|CODE]data[/|CODE] and [|CODE]log[/|CODE] datasets on the corresponfing folder in the jail
I also followed @Patrick M. Hausen comment on the heaviness in separating the datasets and, not certainly knowing if it was the correct way to do it, I mounted the three directories in the sole dataset:
Code:
iocage fstab mariadb --add /mnt/Bassin/innodb_data /var/db/mysql/innodb_data nullfs rw 0 0 iocage fstab mariadb --add /mnt/Bassin/innodb_data /var/db/mysql/innodb_log nullfs rw 0 0 iocage fstab mariadb --add /mnt/Bassin/innodb_data /var/db/mysql/datadir nullfs rw 0
Configure the service
Create the
/var/db/mysql/my.cnf
fileCode:
[mysqld] # Uncomment the following line to enable access from remote hosts. bind-address = 0.0.0.0 innodb_data_home_dir = /var/db/mysql/innodb_data innodb_log_group_home_dir = /var/db/mysql/innodb_log datadir = /var/db/mysql/datadir skip-innodb_doublewrite
Configure the service startup and start the service
Code:
sysrc mysql_enable=yes service mysql-server start
Run the script to improve the security of the installation
Code:
mysql_secure_installation
I left the root password empty
Testing the installation
Code:
mysql --user=root
It worked
Installing seafile
This is where I am at now and in need of help.
Installation of Seafile Server Community Edition with MySQL/MariaDB This is meant for a linux install and FreeBSD packages are different so I am not sure if I should follow that.
FreeBSD Install from @Hizar
My problem here is that since @Hizar installed Seafile and MariaDB in the same jail, I am not sure what goes where
Any help would be appreciated