nextcloud16 centos7.6 manual install 手动安装

基本

yum install -y epel-release yum-utils unzip curl wget \
bash-completion policycoreutils-python mlocate bzip2

nginx

yum install -y nginx

systemctl enable nginx
systemctl restart nginx

nginx 配置参见 https://docs.nextcloud.com/server/16/admin_manual/installation/nginx.html

证书部分略,可直接http

redis

yum install -y redis
systemctl enable redis.service
systemctl start redis.service

mariadb

yum install -y mariadb mariadb-server
systemctl enable mariadb.service
systemctl start mariadb.service

vi /etc/my.cnf.d/server.cnf 

[mysqld]
lower_case_table_names=1
collation-server = utf8mb4_unicode_ci
character-set-server = utf8mb4
innodb_file_per_table = 1

/usr/bin/mysql_secure_installation

CREATE DATABASE `nextcloud`;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'%' IDENTIFIED BY 'nextcloud' WITH GRANT OPTION;
flush privileges;

php 7.2 php-fpm

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum-config-manager --enable remi-php72


yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysql \
php-mbstring php-intl php-pecl-apcu php-mysqlnd php-pecl-redis \
php-opcache php-imagick  php-fpm php-zip php-xml php php-process

/etc/php-fpm.d/www.conf
user nginx
group nginx


systemctl enable php-fpm
systemctl restart php-fpm

nextcloud 应用

准备

下载
上传
解压

cp -R nextcloud/ /var/www/

mkdir /var/www/data

chown -R apache:apache /var/www/html/nextcloud

chown -R nginx:nginx /var/www

初始化应用

IP/nextcloud 选择mariadb 初始化

启用redis

加入
vi /var/www/config/config.php

  'memcache.distributed' => '\OC\Memcache\Redis',
  'memcache.locking' => '\OC\Memcache\Redis',
  'memcache.local' => '\OC\Memcache\APCu',
  'redis' => array(
    'host' => 'localhost',
    'port' => 6379,
  ),

登录循环查看日志

Login loop without any clue in access.log, error.log, nor nextcloud.log
tail /var/www/nextcloud/data/nextcloud.log
tail /var/log/nginx/access.log
tail /var/log/nginx/error.log

权限问题

chown nginx:nginx /var/lib/php/session/
chown root:nginx /var/lib/php/wsdlcache/
chown root:nginx /var/lib/php/opcache/

onlyoffice document server

docker

yum -y install docker
systemctl enable docker
systemctl start docker

应用

mkdir -p /var/log/onlyoffice
mkdir -p /var/www/onlyoffice/Data
mkdir -p /var/lib/onlyoffice
mkdir -p /var/lib/postgresql

sudo docker run -i -t -d -p 9300:80 --restart=always \
    -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice  \
    -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  \
    -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
    -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql  onlyoffice/documentserver

关联

  • nextcloud 访问+应用,搜索onlyoffice
  • 设置ip:9300

你可能感兴趣的:(运维)