Hi,
Im fairly new to Nas4Free and as far as i've used it im very satisfied.
The only thing im missing is a MySql server running on the server.
I dont want to install ownloud that has mysql inside it.)
I have a NAS4Free embedded installation and the webserver, php & phpMyAdmin running.
Then Ive insalled Mysql and it worked perfectly, until i reboot.
Than the whole MySql installation is gone.
Reading about it, i guess i have to use a "jail"
Installed the alcatraz version of The Brig, an all went well.
But from there i am dazzled.
And before I go and wreck my running system I wanted to post this.
Who can reach me a step by step explanation on how to create a jail for MySql and installing Mysql in it.
As said, i have TheBrig Alcatraz version.
Thanks in advance.
This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
How to get MySql in a jail
-
johanS
- NewUser

- Posts: 3
- Joined: 06 Jun 2016 12:16
- Status: Offline
How to get MySql in a jail
To get to the top, you have to go trough the valley first!
-
Kms
- NewUser

- Posts: 3
- Joined: 27 Jun 2016 20:58
- Status: Offline
Re: How to get MySql in a jail
Hi,
Im new to Nas4Free too, but
Several days ago i instaled Jail with Apache24+MySQL+php + Joomla CMS into my Nas4Free
For your question:
For my opinion its better to install web server, php & MyAdmin + MySql into 1 Jail.
To create Jail with the TheBrig i used this guide http://www.locslikes.com/creating-a-jail-using-thebrig/
After creating Jail, Start it, goto console
nas4free:~# jls
JID IP Address Hostname Path
nas4free:~# jexec 'JID' #tcsh -> you inside the Jail
And after you can install MySQL and another services
Im new to Nas4Free too, but
Several days ago i instaled Jail with Apache24+MySQL+php + Joomla CMS into my Nas4Free
For your question:
For my opinion its better to install web server, php & MyAdmin + MySql into 1 Jail.
To create Jail with the TheBrig i used this guide http://www.locslikes.com/creating-a-jail-using-thebrig/
After creating Jail, Start it, goto console
nas4free:~# jls
JID IP Address Hostname Path
nas4free:~# jexec 'JID' #tcsh -> you inside the Jail
And after you can install MySQL and another services
-
johanS
- NewUser

- Posts: 3
- Joined: 06 Jun 2016 12:16
- Status: Offline
Re: How to get MySql in a jail
hi, Kms,
Ive mannaged to install the jails and services like i wanted (Mysql, Apache & PHP)
All is well and is running perfectly.
But now I have another challenge.
In my main system i have a dataset named /mnt/Pool1/Websites
Ive also have a SMB share on this dataset and that all works fine.
But now I want to get to those files from within the jail where my Apache is installed (jail #2)
And that is not possible, as expected!
What I want is inside the the jail #2 a directory /websites/
But the real location would be /mnt/Pool1/websites/ on the main nas4free fs
Does anybody know how i can accomplish this?
Thanks!
Ive mannaged to install the jails and services like i wanted (Mysql, Apache & PHP)
All is well and is running perfectly.
But now I have another challenge.
In my main system i have a dataset named /mnt/Pool1/Websites
Ive also have a SMB share on this dataset and that all works fine.
But now I want to get to those files from within the jail where my Apache is installed (jail #2)
And that is not possible, as expected!
What I want is inside the the jail #2 a directory /websites/
But the real location would be /mnt/Pool1/websites/ on the main nas4free fs
Does anybody know how i can accomplish this?
Thanks!
To get to the top, you have to go trough the valley first!
-
Kms
- NewUser

- Posts: 3
- Joined: 27 Jun 2016 20:58
- Status: Offline
Re: How to get MySql in a jail
Hi
How i think, you can use 'Mounts' menu in TheBrig.
Edit jail with TheBrig, choose More button, you can see Mounts menu, where you can use 'Fstab for current jail'
For you
/mnt/Pool1/websites /mnt/Pool1/Ext/Jails/jail2/websites nullfs rw 0 0
Be sure that /mnt/Pool1/Ext/Jails/jail2/websites exist before
nullfs - mount method
rw - read write (ro - only read)
PS: I wrote this after reading posts of Guru Nas4Free @raulfg3 and @MikeMac
How i think, you can use 'Mounts' menu in TheBrig.
Edit jail with TheBrig, choose More button, you can see Mounts menu, where you can use 'Fstab for current jail'
For you
/mnt/Pool1/websites /mnt/Pool1/Ext/Jails/jail2/websites nullfs rw 0 0
Be sure that /mnt/Pool1/Ext/Jails/jail2/websites exist before
nullfs - mount method
rw - read write (ro - only read)
PS: I wrote this after reading posts of Guru Nas4Free @raulfg3 and @MikeMac
-
johanS
- NewUser

- Posts: 3
- Joined: 06 Jun 2016 12:16
- Status: Offline
Re: How to get MySql in a jail
[SOLVED]
Hi Kms,
Thanks for your pointers but nothing seemed to be working for me without problems.
But ive managed to come up wit an other solution.
1. Place a script outside the jail containing:
#!/bin/sh
mount_nullfs /mnt/Pool1/Websites/ /mnt/DATA/Jail/Apache/www (ofcourse edit the paths as needed)
2. Make the script executable
3. In the N4F gui go to System->Advanced->Command Scripts and call it from there in POST-INIT
4. Reboot
Now I have my /mnt/Pool1/Websites mounted on /mnt/DATA/Jail/Apache/www and all is reachable and editable in- and outside the jail.
It might be a dirty solution. but it does what I want!
Thanks for all your help and thinking with me!
Johan
Hi Kms,
Thanks for your pointers but nothing seemed to be working for me without problems.
But ive managed to come up wit an other solution.
1. Place a script outside the jail containing:
#!/bin/sh
mount_nullfs /mnt/Pool1/Websites/ /mnt/DATA/Jail/Apache/www (ofcourse edit the paths as needed)
2. Make the script executable
3. In the N4F gui go to System->Advanced->Command Scripts and call it from there in POST-INIT
4. Reboot
Now I have my /mnt/Pool1/Websites mounted on /mnt/DATA/Jail/Apache/www and all is reachable and editable in- and outside the jail.
It might be a dirty solution. but it does what I want!
Thanks for all your help and thinking with me!
Johan
To get to the top, you have to go trough the valley first!