UPDATED Aug 15 2018 - Script 100% auto install on Debian. Apache, MPM Event, php-fpm socket, Redis socket on both local and locking cache, LRU data eviction, LetsEncrypt SSL A+


#25

Thanks for the tip! Really wanted to avoid using backports. Changed the script and improved it a bunch. Should work now!


#26

Neat trick for mysql_secure_installation! However, on modern Debian/Ubuntu systems, the script is no-op. Read the script to see what it does – by default, there is no anonymous user, test database or remote root accounts. Try to run (as you described) “SELECT User, Host, password, plugin from mysql.user;” on a fresh MariaDB installation.


#29

I have not yet tried the script with Ubuntu or Debian Testing. Have they removed those questions in upstream versions of mysql_secure_installation ? Thanks for the heads up.


#30

I’m getting the error:
Failed authorization procedure. cloud.XXX.de (http-01): urn:acme:error: unknownHost :: The server could not resolve a domain name :: No valid IP address es found for cloud.XXX.de


#31

is it possible that you dont have an A record in the DNS of your domain pointing to your server?


#32

oh, you are right.
Had a a name for www.cloud. and not for cloud.

But now the problem is the following error message:

internal server error
The server could not complete the request.

If this happens again, please send the following technical details to your server administrator.

Further details can be found in the server log.


#33

Btw, log file in /var/log/nextcloud.log is empty (Permissions given)


#34

Reinstalled on a fresh debian, problem still there.


#35

Anyone a idea?


#36

maybe it has to do with folder permissions?


#37

which folder could that be?
the nextcloudfolder should have the permissions.


#38

/var/www/vhosts/nextcloud/config or better ${nc_home}/nextcloud/config
there is a chown -R www-data:www-data "$nc_home/nextcloud" so it should be correct.


#39

Thanks, but has not fixed it. Permissions are right.
Think i’m going to install nextcloud manually-


#40

@max18

git clone https://github.com/ReinerNippes/nextcloud nextcloud
cd nextcloud
vi inventory
sh ./prepare_system.sh
ansible-playbook nextcloud.yml

in the inventory you have to set the fqdn of the server and which office you want.
if you want to have nc13 you have to change next_archive = … as well. default is latest.
tested on digitalocean droplets and aws ec2s (ubuntu16/18,debian9,centos7)
if you are familiar with cloud-init look in the folder cloud-stuff. :wink:

onlyoffice and selfsigned certificates don’t work right now.
only run this on fresh installed maschines. i don’t want to be responsible for any damage to your existing machines.


#41

TASK [prep_ufw : Installing ufw package] ****************************************************************************************************************************************************************************************************
Thursday 27 September 2018 17:57:59 +0200 (0:00:00.118) 0:00:02.830 ****
fatal: [localhost]: FAILED! => {“changed”: false, “cmd”: “apt-get install --no-install-recommends python-apt -y -q”, “msg”: “E: Sub-process /usr/bin/dpkg returned an error code (1)”, “rc”: 100, “stderr”: “E: Sub-process /usr/bin/dpkg returned an error code (1)\n”, “stderr_lines”: [“E: Sub-process /usr/bin/dpkg returned an error code (1)”], “stdout”: “Reading package lists…\nBuilding dependency tree…\nReading state information…\nThe following packages were automatically installed and are no longer required:\n libtk8.6 libutempter0 tcl-expect tk8.6 xbitmaps xterm\nUse ‘apt autoremove’ to remove them.\nThe following additional packages will be installed:\n python-apt-common\nSuggested packages:\n python-apt-dbg python-apt-doc\nRecommended packages:\n lsb-release\nThe following NEW packages will be installed:\n python-apt python-apt-common\n0 upgraded, 2 newly installed, 0 to remove and 18 not upgraded.\n1 not fully installed or removed.\nNeed to get 265 kB of archives.\nAfter this operation, 1289 kB of additional disk space will be used.\nGet:1 http://mirror.1fire.de/debian stretch/main amd64 python-apt-common all 1.4.0~beta3 [93.0 kB]\nGet:2 http://mirror.1fire.de/debian stretch/main amd64 python-apt amd64 1.4.0~beta3 [172 kB]\nFetched 265 kB in 0s (9109 kB/s)\nSelecting previously unselected package python-apt-common.\r\n(Reading database … \r(Reading database … 5%\r(Reading database … 10%\r(Reading database … 15%\r(Reading database … 20%\r(Reading database … 25%\r(Reading database … 30%\r(Reading database … 35%\r(Reading database … 40%\r(Reading database … 45%\r(Reading database … 50%\r(Reading database … 55%\r(Reading database … 60%\r(Reading database … 65%\r(Reading database … 70%\r(Reading database … 75%\r(Reading database … 80%\r(Reading database … 85%\r(Reading database … 90%\r(Reading database … 95%\r(Reading database … 100%\r(Reading database … 55067 files and directories currently installed.)\r\nPreparing to unpack …/python-apt-common_1.4.0~beta3_all.deb …\r\nUnpacking python-apt-common (1.4.0~beta3) …\r\nSelecting previously unselected package python-apt.\r\nPreparing to unpack …/python-apt_1.4.0~beta3_amd64.deb …\r\nUnpacking python-apt (1.4.0~beta3) …\r\nSetting up python-apt-common (1.4.0~beta3) …\r\nSetting up python-apt (1.4.0~beta3) …\r\nSetting up redis-server (3:3.2.6-3+deb9u2) …\r\nJob for redis-server.service failed because the control process exited with error code.\r\nSee “systemctl status redis-server.service” and “journalctl -xe” for details.\r\ninvoke-rc.d: initscript redis-server, action “start” failed.\r\n* redis-server.service - Advanced key-value store\r\n Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)\r\n Active: activating (auto-restart) (Result: exit-code) since Thu 2018-09-27 17:58:04 CEST; 16ms ago\r\n Docs: http://redis.io/documentation,\r\n man:redis-server(1)\r\n Process: 9804 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf \u001b[0;1;31m(code=exited, status=226/NAMESPACE)\u001b[0m\r\n Process: 9801 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d \u001b[0;1;31m(code=exited, status=226/NAMESPACE)\u001b[0m\r\n\r\nSep 27 17:58:04 srv01 systemd[1]: \u001b[0;1;31mFailed to start Advanced key-value store.\u001b[0m\r\nSep 27 17:58:04 srv01 systemd[1]: \u001b[0;1;39mredis-server.service: Unit entered failed?ate.\u001b[0m\r\nSep 27 17:58:04 srv01 systemd[1]: \u001b[0;1;39mredis-server.service: Failed with result ?de’.\u001b[0m\r\nHint: Some lines were ellipsized, use -l to show in full.\r\ndpkg: error processing package redis-server (–configure):\r\n subprocess installed post-installation script returned error exit status 1\r\nErrors were encountered while processing:\r\n redis-server\r\n”, “stdout_lines”: [“Reading package lists…”, “Building dependency tree…”, “Reading state information…”, “The following packages were automatically installed and are no longer required:”, " libtk8.6 libutempter0 tcl-expect tk8.6 xbitmaps xterm", “Use ‘apt autoremove’ to remove them.”, “The following additional packages will be installed:”, " python-apt-common", “Suggested packages:”, " python-apt-dbg python-apt-doc", “Recommended packages:”, " lsb-release", “The following NEW packages will be installed:”, " python-apt python-apt-common", “0 upgraded, 2 newly installed, 0 to remove and 18 not upgraded.”, “1 not fully installed or removed.”, “Need to get 265 kB of archives.”, “After this operation, 1289 kB of additional disk space will be used.”, “Get:1 http://mirror.1fire.de/debian stretch/main amd64 python-apt-common all 1.4.0~beta3 [93.0 kB]”, “Get:2 http://mirror.1fire.de/debian stretch/main amd64 python-apt amd64 1.4.0~beta3 [172 kB]”, “Fetched 265 kB in 0s (9109 kB/s)”, “Selecting previously unselected package python-apt-common.”, “(Reading database … “, “(Reading database … 5%”, “(Reading database … 10%”, “(Reading database … 15%”, “(Reading database … 20%”, “(Reading database … 25%”, “(Reading database … 30%”, “(Reading database … 35%”, “(Reading database … 40%”, “(Reading database … 45%”, “(Reading database … 50%”, “(Reading database … 55%”, “(Reading database … 60%”, “(Reading database … 65%”, “(Reading database … 70%”, “(Reading database … 75%”, “(Reading database … 80%”, “(Reading database … 85%”, “(Reading database … 90%”, “(Reading database … 95%”, “(Reading database … 100%”, “(Reading database … 55067 files and directories currently installed.)”, “Preparing to unpack …/python-apt-common_1.4.0~beta3_all.deb …”, “Unpacking python-apt-common (1.4.0~beta3) …”, “Selecting previously unselected package python-apt.”, “Preparing to unpack …/python-apt_1.4.0~beta3_amd64.deb …”, “Unpacking python-apt (1.4.0~beta3) …”, “Setting up python-apt-common (1.4.0~beta3) …”, “Setting up python-apt (1.4.0~beta3) …”, “Setting up redis-server (3:3.2.6-3+deb9u2) …”, “Job for redis-server.service failed because the control process exited with error code.”, “See “systemctl status redis-server.service” and “journalctl -xe” for details.”, “invoke-rc.d: initscript redis-server, action “start” failed.”, “* redis-server.service - Advanced key-value store”, " Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)”, " Active: activating (auto-restart) (Result: exit-code) since Thu 2018-09-27 17:58:04 CEST; 16ms ago”, " Docs: http://redis.io/documentation,", " man:redis-server(1)", " Process: 9804 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf \u001b[0;1;31m(code=exited, status=226/NAMESPACE)\u001b[0m", " Process: 9801 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d \u001b[0;1;31m(code=exited, status=226/NAMESPACE)\u001b[0m", “”, “Sep 27 17:58:04 srv01 systemd[1]: \u001b[0;1;31mFailed to start Advanced key-value store.\u001b[0m”, “Sep 27 17:58:04 srv01 systemd[1]: \u001b[0;1;39mredis-server.service: Unit entered failed?ate.\u001b[0m”, “Sep 27 17:58:04 srv01 systemd[1]: \u001b[0;1;39mredis-server.service: Failed with result ?de’.\u001b[0m”, “Hint: Some lines were ellipsized, use -l to show in full.”, “dpkg: error processing package redis-server (–configure):”, " subprocess installed post-installation script returned error exit status 1", “Errors were encountered while processing:”, " redis-server"]}

PLAY RECAP **********************************************************************************************************************************************************************************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=1


#42

@max18

on your system redis doesn’t start.
that was also the mistake why onryo’s skript failed on your system and you got the internal server error.


#43

and what can i do?