How to install nextcloud on a turris omnia debian jessie container (using apache2)

Thanks for replying. It says

root@LXC_NAME:~# ping www.google.de
bash: ping: command not found

:smirk: Would have to install pingā€¦ without an internet connectionā€¦

You did previously install php and other packages correct? If so that means you did have a normal internet connection. Which means that you have made some configuration with the ethtool for example that disabled the internetconnection.

Try the following and post the output here.

ifconfig

1 Like

Here you go:

eth0      Link encap:Ethernet  HWaddr ca:03:4b:f4:04:eb
          inet6 addr: fe80::c803:4bff:fef4:4eb/64 Scope:Link
          inet6 addr: fdda:b184:b6ff:0:c803:4bff:fef4:4eb/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:566 errors:0 dropped:0 overruns:0 frame:0
          TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:41604 (40.6 KiB)  TX bytes:5120 (5.0 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

I have a regular connection to the internet. Yes.

You have no connection. Eth0 should have hd a ipaddress given to.

eth0      Link encap:Ethernet  HWaddr be:64:4a:c6:7b:62  
          inet addr:192.168.1.236  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::bc64:4aff:fec6:7b62/64 Scope:Link
          inet6 addr: fd3a:601c:29d7:0:bc64:4aff:fec6:7b62/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:51 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5095 (5.0 KB)  TX bytes:1288 (1.2 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

As you can see with mineā€¦(using Ubuntu instead of debian jessie)ā€¦i have the address 192.168.1.236

The good thing is eth0 is not disabled. Give me a second gonna take a look at some things.

EDIT: Post your ā€œconfigā€.

cat /srv/lxc/<LXC-NAME>/config

I had just created my Ubuntu LXC and this is how it should look like as the BASICS.

# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template: --server api.turris.cz/lxc --no-validate --dist Ubuntu --release Xenial --arch armv7l
# For additional config options, please look at lxc.container.conf(5)

# Distribution configuration
lxc.arch = armv7l

# Container specific configuration
lxc.tty = 4
lxc.pts = 1024
lxc.rootfs = /srv/lxc/K-Router-LXC/rootfs
lxc.utsname = K-Router-LXC

# Network configuration
lxc.network.type = veth
lxc.network.link = br-lan
lxc.network.flags = up
lxc.network.name = eth0

Try also by any chanceā€¦

ethtool -K br-lan tx on

@eugenio, has saidā€¦

Command for bug dhcliend debian (to be run on turris shell):

ethtool -K br-lan tx off

So that would probably means that dhclient is turned off or not working. To this solution if there indeed is a bug that is messing things upā€¦try a static ip-address instead of receiving one from the DHCP-Server.

root@turris:~# cat /srv/lxc/Debian_Jessie/config
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template: --server api.turris.cz/lxc --no-validate --dist Debian --release Jessie --arch armv7l
# For additional config options, please look at lxc.container.conf(5)

# Distribution configuration
lxc.arch = armv7l

# Container specific configuration
lxc.tty = 4
lxc.pts = 1024
lxc.rootfs = /srv/lxc/Debian_Jessie/rootfs
lxc.utsname = Debian_Jessie

# Network configuration
lxc.network.type = veth
lxc.network.link = br-lan
lxc.network.flags = up
lxc.network.name = eth0

The Debian lxc is not online, neither with tx on or off.

I have made a Debian_Jessie Containerā€¦i am laughing my ass offā€¦

no vi availableā€¦or vim or nano XDā€¦

I have managed to configure the ip-address in the /srv/lxc/Debian_Jessie/config on the Omnia it self

But i am struggling to change the dns XD because i have no editor to change things.

# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template: --server api.turris.cz/lxc --no-validate --dist Debian --release Jessie --arch armv7l
# For additional config options, please look at lxc.container.conf(5)

# Distribution configuration
lxc.arch = armv7l

# Container specific configuration
lxc.tty = 4
lxc.pts = 1024
lxc.rootfs = /srv/lxc/Debian_Jessie/rootfs
lxc.utsname = Debian_Jessie

# Network configuration
lxc.network.type = veth
lxc.network.link = br-lan
lxc.network.flags = up
lxc.network.name = eth0
lxc.network.ipv4 = 192.168.1.150/24
lxc.network.ipv4.gateway = 192.168.1.1

give me a sec.

Edit: I am not sure what is going on here, but Debian_Jessie is useless. It is like somebody telling you to configure his computerā€¦but you cannot use mouse OR keyboardā€¦=_=!. I have never experienced that even ā€œviā€-editor is not even available to change config files etc.

edit2: I am an idiot sometimes =_=!. ā€¦i forgot things that i did earlierā€¦

Okeā€¦everything is solved ā€¦for now :).

in your /srv/lxc/Debian_Jessie folder you have a ā€œrootfsā€ folder. There edit etc/resolv.conf

Change it to

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 8.8.4.4

Restart your Debian_Jessie container and the update should work now. Keep in mind that you also have to have the /srv/lxc/Debian_Jessie/conf configured with a static ip-address like i have shown above.

Install the following applications

apt update
apt install vim nano
1 Like

There seems to be local IPv6 connection (fdda:b184:b6ff:0:c803:4bff:fef4:4eb/64) so the container can talk to Omnia and other ā€œIPv6ā€ devices in local network unless firewall blocks it.

There are no IPv4 address or public IPv6 address so Internet connections wonā€™t work.

@j0n4s82 did you do

dhclient -4 -r eth0

in the container, after

ethtool -K br-lan tx on

on the turris shell?

I completely missed that one. Although i must admit that i havenā€™t played that much often with ipv6.

Is there a possibility to have IPv6 connection on the container and then connect it to the ipv4 gateway of the Omnia and thus have a internet connection? Or having the IPv6 connection enabled on the Omnia as well, then this will automatically configure and give a internet connection to it, although the WAN connection is a IPv4?

No. Thanks for pointing it out. Will try it asap.

EDIT: unknown package dhclient. @eugenio

Thank you @Big_boss!

This did the trick. Thank you. I am now able to run

apt-get update

and install further packages!! Thank you @Big_boss!!

root@LXC_NAME:~# apt-get remove isc-dhcp-client && apt-get install dhcpd5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'isc-dhcp-client' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dhcpd5

@eugenio This is what happens when I try to apply your suggestion. Please explain.

It could be that it meant to be the

dhcpcd

instead of the dhcpd5

Here some info about itā€¦

https://wiki.archlinux.org/index.php/dhcpcd

btw, you donā€™t have to type ā€œapt-getā€ every time. Just ā€œaptā€ does the job also.

1 Like

@Big_boss Thank you senpai :wink:

Ok. Thank you. It is still unclear to me what the permanent solution is for the Debian connection problem. Is your suggestion permanent? I am asking especially because it says in the rootfs file DO NOT EDIT - IT WILL BE OVERWRITTEN

EDIT This suggestion to install dhcpd5 worked for me now. I used the commands from within my Debian container and got this output:

root@LXC_NAME:~# dpkg -i dhcpcd5_6.0.5-2_armhf.deb
Selecting previously unselected package dhcpcd5.
(Reading database ... 15595 files and directories currently installed.)
Preparing to unpack dhcpcd5_6.0.5-2_armhf.deb ...
Unpacking dhcpcd5 (6.0.5-2) ...
Setting up dhcpcd5 (6.0.5-2) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for systemd (215-17+deb8u5) ...

Youā€™re welcome j0n4s82-kun

Well the ā€œtemporaryā€ solution was to just get things working for now.

You could now directly edit /etc/network/interfaces and configure a static ip-address to it.

so in /srv/lxc/Debian_Jessi/rootfs/etc/network/interfaces

Things for the eth0 should look like thisā€¦

iface eth0 inet static
        address 192.168.1.150
        netmask 255.255.255.0
        network 192.168.1.0
        gateway 192.168.1.1
        dns-nameservers 8.8.8.8 8.8.4.4

After configuring it do a

ifconfig eth0 down
ifconfig eth0 up

Also remove the previous settings you have configured. Although i am not sure if this solution would work, because when i tried then 2 weeks ago, it didnā€™t get the ip-address. You could try it though. You now know how to change things to make it work.

BTW, the ipaddress (192.168.1.150) doesnā€™t have to be thatā€¦you can choose another oneā€¦so (192.168.1.140 or 130 or 133 as long as it is not already been used by another host (laptop/phone/wifi-adapterā€¦etc)

EDIT 2: He forgot to put a ā€œcā€ between it. dpkg -i installs local packages like opkg install *.ipk in Omnia it self.

That should do the ā€œjobā€ i guess. You could try if things are working correctly, by removing all previous changes to give a static ipaddress and dns. You then should get a ip-address directly from the DHCP-server-software (dnsmasq running on Turris Omnia it self).

DO PLEASE LET ME KNOW IF IT WORKED!!

1 Like

So like this

dpkg -i -c dhcpcd5_6.0.5-2_armhf.deb

or the -c instead of the -i?

No, i meant the ā€œcā€ was missing in dhcpd5. @eugenio said

apt-get install dhcpd5
what it should be was

apt install dhcpcd5

he was missing the c between ā€œpā€ and ā€œdā€ before the ā€œ5ā€.

dpkg -i (package-name).deb is correct.

Edit: you downloaded this *.deb package? using Wget i guess. Why if i may ask?

@eugenio, when helping @j0n4s82 i stumbled upon thisā€¦

 # Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template: --server api.turris.cz/lxc --no-validate --dist Ubuntu --release Xenial --arch armv7l
# For additional config options, please look at lxc.container.conf(5)

# Distribution configuration
lxc.arch = armv7l

# Container specific configuration
lxc.tty = 4
lxc.pts = 1024
lxc.rootfs = /srv/lxc/K-Router-LXC/rootfs
lxc.utsname = K-Router-LXC

# Network configuration
lxc.network.type = veth
lxc.network.link = br-lan
lxc.network.flags = up
lxc.network.name = eth0

I have edited this file many times before, but i did not payed attention on certain parts of this script. Our ā€œproblemā€ has been solved about the architecture.

lxc.arch = armv7l

So as long as we have *.deb packages that are meant for ā€œarmv7lā€ then they should work i guess.

Because of this post. I didnā€™t think apt would work because the command with the typo didnā€™t install itā€¦ :smirk: It installed it all the same. EDIT And no, I used apt download. It doesnā€™t make any sense I believe!? But it did the job. The typo confused me.

Thank you for your input @Big_boss and

Yes. Later today. AFK for now. :relaxed: