Please help me install nextcloud 12 in jail

Status
Not open for further replies.

dureal99d

Contributor
Joined
Aug 3, 2017
Messages
156
I am new to FreeNAS and willing to learn.

I have followed every tutorial I can find today and none have worked for me. please help me.

and yes I'm begging.
 
Last edited by a moderator:

dureal99d

Contributor
Joined
Aug 3, 2017
Messages
156
There's a tutorial for that. It's for owncloud but just substitute nextcloud for every instance of owncloud and it will work.

https://forums.freenas.org/index.php?threads/how-to-owncloud-using-nginx-php-fpm-and-mysql.17786/
I spent like 3 hours following this tutorial step by step and it did not work for me. perhaps i am missing something? I admit that some of the things mentioned were a bit above my current skill set with FreeBSD. I use Linux often and yet FreeBSD seems to boggle me at certain points
 
Last edited by a moderator:

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
I can guarantee that thread works, having setup ownCloud a number of times and Nextcloud a couple of times too. Take it step by step with a few snapshots along the way, so you can always roll back if something breaks, but its a very good guide and you should be able to get it working from that.

I don't think there is an easier way, other than perhaps the plugin, but I'd strongly recommend the manual jail route over that.
 

dureal99d

Contributor
Joined
Aug 3, 2017
Messages
156
this part confuses me "Replace the relevant lines in /usr/local/etc/php-fpm.d/www.conf"

listen = /var/run/php-fpm.sock
listen.owner = www
listen.group = www
env[PATH] = /usr/local/bin:/usr/bin:/bin

i changed "listen = (ip address) to /var/run/php-fpm.sock "

i have no idea what to do with
listen.owner = www
listen.group = www
env[PATH] = /usr/local/bin:/usr/bin:/bin
 

onryo

Cadet
Joined
May 7, 2015
Messages
8
NextCloud 12.02 is in FreeNAS 11 and it pulls all the php stuff needed. Not sure why people are still using that old article.
 

dureal99d

Contributor
Joined
Aug 3, 2017
Messages
156
NextCloud 12.02 is in FreeNAS 11 and it pulls all the php stuff needed. Not sure why people are still using that old article.
care to explain how i install it? ive tried the whole pkg install nextcloud command and it pulls all the stuff. but im unable to logon or anything else
 

dureal99d

Contributor
Joined
Aug 3, 2017
Messages
156
Ok im stuck at this whole cron thing. i have no idea how this editor works or what commands to use.

can anyone help me understand how to save this command in cron
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
this part confuses me "Replace the relevant lines in /usr/local/etc/php-fpm.d/www.conf"

listen = /var/run/php-fpm.sock
listen.owner = www
listen.group = www
env[PATH] = /usr/local/bin:/usr/bin:/bin

i changed "listen = (ip address) to /var/run/php-fpm.sock "

i have no idea what to do with
listen.owner = www
listen.group = www
env[PATH] = /usr/local/bin:/usr/bin:/bin

From memory, but pretty sure you just uncomment (remove the ; ) those 2/3 lines in the file.

And don't worry too much about the cron thing - that can be configured later. vi editor is a bit weird if you're not used to using it!

Here's my notes I made in another file:


Hit the 'i' button to set vi into 'insert mode'. Copy & paste into the editor:

*/15 * * * * /usr/local/bin/php -f /usr/local/www/owncloud/cron.php

After it is posted, hit the "Escape" button then ":" then "w" then "q" then "enter"
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
NextCloud 12.02 is in FreeNAS 11 and it pulls all the php stuff needed. Not sure why people are still using that old article.
Because the dependencies for the Nextcloud package are php56 and the linked tutorial shows how to install with php7. There's a performance improvement by going with php7.
 

onryo

Cadet
Joined
May 7, 2015
Messages
8
Because the dependencies for the Nextcloud package are php56 and the linked tutorial shows how to install with php7. There's a performance improvement by going with php7.

Yup you are right. Just installed it from the repo.

pkg install apache24
pkg install php56 php56-mbstring php56-zlib php56-curl php56-gd php56-json mod_php56 php56-mcrypt *fix php.conf*
pkg install mysql56-client mysql56-server php56-mysqli *set up db stuff*
pkg install nextcloud *some fcukery*

Weird as hell that I had to use mysql56 and php56 stuff. Think that is from 2013? I mean who does that? Package something new like NextCloud with really old deps.
 

dureal99d

Contributor
Joined
Aug 3, 2017
Messages
156
Yup you are right. Just installed it from the repo.

pkg install apache24
pkg install php56 php56-mbstring php56-zlib php56-curl php56-gd php56-json mod_php56 php56-mcrypt *fix php.conf*
pkg install mysql56-client mysql56-server php56-mysqli *set up db stuff*
pkg install nextcloud *some fcukery*

Weird as hell that I had to use mysql56 and php56 stuff. Think that is from 2013? I mean who does that? Package something new like NextCloud with really old deps.
i see, well ill give what you posted a try
 

onryo

Cadet
Joined
May 7, 2015
Messages
8
http://xxx.xxx.x.x/nextcloud =
404 Not Found
nginx/1.12.1

The "right way" to do this is more or less the way shown in that tutorial. I just got it up running using just binaries from the repos doing this.

pkg install apache24
sysrc apache24_enable="yes"
service apache24 start

pkg install php56 php56-mbstring php56-zlib php56-curl php56-gd php56-json mod_php56 php56-mcrypt

nano /usr/local/etc/apache24/Includes/php.conf
add this

<IfModule dir_module>
DirectoryIndex index.php index.html
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
</IfModule>

cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini-production.bakup
ln -s /usr/local/etc/php.ini-production /usr/local/etc/php.ini

service apache24 restart

pkg install mysql56-client mysql56-server php56-mysqli
sysrc mysql_enable="yes"
service mysql-server start
mysql_secure_installation
Do Y to all and set a root pw

mysql -u root -p
CREATE DATABASE nextclouddb;
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON nextclouddb.* TO 'nextcloud'@'localhost';
FLUSH PRIVILEGES;
\q

pkg install nextcloud

read the install notes. Perms where correct already. I added to httpd.conf

Alias /nextcloud /usr/local/www/nextcloud
AcceptPathInfo On
<Directory /usr/local/www/nextcloud>
AllowOverride All
Require all granted
</Directory>

And restart Apache

http://your-ip/nextcloud


I might repackage NextCloud for FreeBSD 11 using php7+ and mariadb 10+
 
Last edited:

dureal99d

Contributor
Joined
Aug 3, 2017
Messages
156
The "right way" to do this is more or less the way shown in that tutorial. I just got it up running using just binaries from the repos doing this.

pkg install apache24
sysrc apache24_enable="yes"
service apache24 start

pkg install php56 php56-mbstring php56-zlib php56-curl php56-gd php56-json mod_php56 php56-mcrypt

nano /usr/local/etc/apache24/Includes/php.conf

<IfModule dir_module>
DirectoryIndex index.php index.html
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
</IfModule>

cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini-production.bakup
ln -s /usr/local/etc/php.ini-production /usr/local/etc/php.ini

service apache24 restart

pkg install mysql56-client mysql56-server php56-mysqli
sysrc mysql_enable="yes"
service mysql-server start
mysql_secure_installation
Do Y to all and set a root pw

mysql -u root -p
CREATE DATABASE nextclouddb;
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON nextclouddb.* TO 'nextcloud'@'localhost';
FLUSH PRIVILEGES;
\q

pkg install nextcloud

read the install notes.

http://your-ip/nextcloud


I might repackaged NextCloud for FreeBSD 11 using newer stuff.
Im going to try this and let you know how this goes & i think that would be nice to update the current version of nextcloud
 
Last edited:

dureal99d

Contributor
Joined
Aug 3, 2017
Messages
156
The "right way" to do this is more or less the way shown in that tutorial. I just got it up running using just binaries from the repos doing this.

pkg install apache24
sysrc apache24_enable="yes"
service apache24 start

pkg install php56 php56-mbstring php56-zlib php56-curl php56-gd php56-json mod_php56 php56-mcrypt

nano /usr/local/etc/apache24/Includes/php.conf
add this

<IfModule dir_module>
DirectoryIndex index.php index.html
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
</IfModule>

cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini-production.bakup
ln -s /usr/local/etc/php.ini-production /usr/local/etc/php.ini

service apache24 restart

pkg install mysql56-client mysql56-server php56-mysqli
sysrc mysql_enable="yes"
service mysql-server start
mysql_secure_installation
Do Y to all and set a root pw

mysql -u root -p
CREATE DATABASE nextclouddb;
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON nextclouddb.* TO 'nextcloud'@'localhost';
FLUSH PRIVILEGES;
\q

pkg install nextcloud

read the install notes. Perms where correct already. I added to httpd.conf

Alias /nextcloud /usr/local/www/nextcloud
AcceptPathInfo On
<Directory /usr/local/www/nextcloud>
AllowOverride All
Require all granted
</Directory>

And restart Apache

http://your-ip/nextcloud


I might repackage NextCloud for FreeBSD 11 using php7+ and mariadb 10+

read the install notes. Perms where correct already. I added to httpd.conf ?????
 

onryo

Cadet
Joined
May 7, 2015
Messages
8
read the install notes. Perms where correct already. I added to httpd.conf ?????

nano /usr/local/etc/apache24/httpd.conf
add this

Alias /nextcloud /usr/local/www/nextcloud
AcceptPathInfo On
<Directory /usr/local/www/nextcloud>
AllowOverride All
Require all granted
</Directory>

When you enter http://yourIP/nextcloud you should get a nice web interface. Enter this for the database info. You can change it later.
user: nextcloud
pw: password
db: nextclouddb
localhost
 

dureal99d

Contributor
Joined
Aug 3, 2017
Messages
156
nano /usr/local/etc/apache24/httpd.conf
add this

Alias /nextcloud /usr/local/www/nextcloud
AcceptPathInfo On
<Directory /usr/local/www/nextcloud>
AllowOverride All
Require all granted
</Directory>

When you enter http://yourIP/nextcloud you should get a nice web interface. Enter this for the database info. You can change it later.
user: nextcloud
pw: password
db: nextclouddb
localhost
ok!!!!!
 

dureal99d

Contributor
Joined
Aug 3, 2017
Messages
156
nano /usr/local/etc/apache24/httpd.conf
add this

Alias /nextcloud /usr/local/www/nextcloud
AcceptPathInfo On
<Directory /usr/local/www/nextcloud>
AllowOverride All
Require all granted
</Directory>

When you enter http://yourIP/nextcloud you should get a nice web interface. Enter this for the database info. You can change it later.
user: nextcloud
pw: password
db: nextclouddb
localhost
Performing sanity check on apache24 configuration:
AH00558: httpd: Could not reliably determine the server's fully qualified domain
name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this
message
Syntax OK
apache24 not running? (check /var/run/httpd.pid).
Performing sanity check on apache24 configuration:
AH00558: httpd: Could not reliably determine the server's fully qualified domain
name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this
message
Syntax OK
Starting apache24.
AH00558: httpd: Could not reliably determine the server's fully qualified domain
name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this
message
(48)Address already in use: AH00072: make_sock: could not bind to address [::]:8
0
(48)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.
0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
/usr/local/etc/rc.d/apache24: WARNING: failed to start apache24
 
Status
Not open for further replies.
Top