From 37aef461cfaf1a927b7f80869f68c9ec751f130a Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Sat, 1 Jul 2017 16:33:15 +0200 Subject: [PATCH] Modify owncloud role for debian stretch. --- roles/owncloud/files/www.conf | 4 ++-- roles/owncloud/handlers/main.yml | 4 ++-- roles/owncloud/tasks/main.yml | 30 +++++++++++++++++++----------- roles/owncloud/templates/vhost.j2 | 2 +- 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/roles/owncloud/files/www.conf b/roles/owncloud/files/www.conf index a24192b..2dfecab 100644 --- a/roles/owncloud/files/www.conf +++ b/roles/owncloud/files/www.conf @@ -35,7 +35,7 @@ group = www-data ; (IPv6 and IPv4-mapped) on a specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. -listen = /var/run/php5-fpm.sock +listen = /var/run/php-fpm.sock ; Set listen(2) backlog. ; Default Value: 65535 (-1 on FreeBSD and OpenBSD) @@ -225,7 +225,7 @@ pm.max_spare_servers = 3 ; last request memory: 0 ; ; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: /usr/share/php5/fpm/status.html +; It's available in: /usr/share/php/7.0/fpm/status.html ; ; Note: The value must start with a leading slash (/). The value can be ; anything, but it may not be a good idea to use the .php extension or it diff --git a/roles/owncloud/handlers/main.yml b/roles/owncloud/handlers/main.yml index b8367c9..877c9a0 100644 --- a/roles/owncloud/handlers/main.yml +++ b/roles/owncloud/handlers/main.yml @@ -3,5 +3,5 @@ - name: Restart nginx service: name=nginx state=restarted -- name: Restart php5-fpm - service: name=php5-fpm state=restarted +- name: Restart php7.0-fpm + service: name=php7.0-fpm state=restarted diff --git a/roles/owncloud/tasks/main.yml b/roles/owncloud/tasks/main.yml index 15b8bc4..0102a74 100644 --- a/roles/owncloud/tasks/main.yml +++ b/roles/owncloud/tasks/main.yml @@ -3,12 +3,16 @@ - name: Install packages apt: name={{ item }} state=present with_items: - - php5-apcu - - php5-curl - - php5-fpm - - php5-gd - - php5-ldap - - php5-pgsql + - php7.0-apcu + - php7.0-curl + - php7.0-fpm + - php7.0-gd + - php7.0-ldap + - php7.0-mbstring + - php7.0-pgsql + - php7.0-xml + - php7.0-zip + - php-redis - postgresql - python-psycopg2 @@ -36,16 +40,20 @@ template: src=vhost.j2 dest=/etc/nginx/sites-available/owncloud notify: Restart nginx -- name: Configure php5-fpm - copy: src=www.conf dest=/etc/php5/fpm/pool.d/www.conf - notify: Restart php5-fpm +- name: Configure php7.0-fpm + copy: src=www.conf dest=/etc/php/7.0/fpm/pool.d/www.conf + notify: Restart php7.0-fpm + +- name: Configure php7.0 opcache + copy: src=opcache.ini dest=/etc/php/7.0/mods-available/opcache.ini + notify: Restart php7.0-fpm - name: Enable vhost file: src=/etc/nginx/sites-available/owncloud dest=/etc/nginx/sites-enabled/owncloud state=link notify: Restart nginx -- name: Start php5-fpm - service: name=php5-fpm state=started enabled=yes +- name: Start php7.0-fpm + service: name=php7.0-fpm state=started enabled=yes - name: Start PostgreSQL service: name=postgresql state=started enabled=yes diff --git a/roles/owncloud/templates/vhost.j2 b/roles/owncloud/templates/vhost.j2 index 723d2a6..71dc104 100644 --- a/roles/owncloud/templates/vhost.j2 +++ b/roles/owncloud/templates/vhost.j2 @@ -75,7 +75,7 @@ server { fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param HTTPS on; fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice - fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_pass unix:/var/run/php-fpm.sock; fastcgi_intercept_errors on; }