Is it possible to install and run Prestashop in FreeNas?

Status
Not open for further replies.

Marcelo Ruiz

Dabbler
Joined
Oct 8, 2015
Messages
20
Hi Comunity!
I am new to FreeNas (in fact, I am considering buying a FreeNas Mini for my very small company).
I would like to use FreeNas (among other things) to host a Prestashop website while we update it.
I was read FreeNas uses Jails and some people installed applications that run in FreeBSD (a Preatashop package exists for FreeBSD). One person installed mirrors of Ubuntu repositories making different Jails to comunicate to each other.
Prestashop uses PHP 5.2 or later, MySQL 5.0 or later, Apache web server 1.3 or later or nginx.
Can anyone tell me if this is possible and if so, how complicated would this be?
Thanks!
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Apache/nginx, MySQL, and PHP have all been successfully installed in jails. Moreover, there's a FreeBSD package available for prestashop. If you're comfortable with the command line, it shouldn't be too hard, but I haven't seen any discussion here of this particular package. There's a pretty fair writeup on installing the basic dependencies here: https://www.digitalocean.com/commun...ginx-mysql-and-php-femp-stack-on-freebsd-10-1

It's for FreeBSD 10.1 rather than 9.3, but the requirements should be very similar. Once that's up and running, "pkg install prestashop" should take care of installing the prestashop software.

Note that if this is going to be publicly accessible, you'll want to do a pretty good job of locking down the jail against attacks.
 

Marcelo Ruiz

Dabbler
Joined
Oct 8, 2015
Messages
20
Thanks for your answer danb35!
Is there a way you would recommend doing this? I mean, do I need different Jails (one for Apache, one for MySQL and one for PHP)? What would you think will be the best future-proof solution?
 
Joined
Apr 9, 2015
Messages
1,258
Pretty much everything that Prestashop needs will be installed in one jail. If you want to attach storage to transfer images or other files that can be done to a directory of your choosing.

Otherwise you will have a much more complex setup to make things work if you install everything into separate jails.
 

Marcelo Ruiz

Dabbler
Joined
Oct 8, 2015
Messages
20
Pretty much everything that Prestashop needs will be installed in one jail. If you want to attach storage to transfer images or other files that can be done to a directory of your choosing.

Otherwise you will have a much more complex setup to make things work if you install everything into separate jails.

Thanks, I will give it a try and see how it goes
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Thanks for writing this up. For reference, the steps of changing the root password, enabling ssh in the jail, and creating a non-root user in the jail are all unnecessary. If ssh is enabled on your FreeNAS server, you can just ssh to it as root (either by logging in as root, or by logging in as another user and using su to get root privileges), running jls, noting the JID number of your prestashop jail, and then running 'jexec <JID> tcsh'. That will put you inside the jail running the tcsh shell--you can substitute any shell you prefer.

Of course, if you want to give remote access to the prestashop jail without giving that individual access to the FreeNAS server, you'd need to take the steps you describe. But if it's just you, or trusted admins, this just saves a few steps.
 

Marcelo Ruiz

Dabbler
Joined
Oct 8, 2015
Messages
20
Thanks for writing this up. For reference, the steps of changing the root password, enabling ssh in the jail, and creating a non-root user in the jail are all unnecessary. If ssh is enabled on your FreeNAS server, you can just ssh to it as root (either by logging in as root, or by logging in as another user and using su to get root privileges), running jls, noting the JID number of your prestashop jail, and then running 'jexec <JID> tcsh'. That will put you inside the jail running the tcsh shell--you can substitute any shell you prefer.

Of course, if you want to give remote access to the prestashop jail without giving that individual access to the FreeNAS server, you'd need to take the steps you describe. But if it's just you, or trusted admins, this just saves a few steps.

Thanks for pointing that out... I configured the Jail in that way because of the many tutorials I read (actually this is my first attempt working with FreeNas). I was also wondering how difficult it would be to configure (meaning securing) the prestashop install to actually have FreeNas acting as my web server (at least temporarily, when friends and family will be "invited" to try the new website).
 
Status
Not open for further replies.
Top