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
### CentOS 7.6 Server Configuration and Management #### Installing Software Packages on CentOS 7.6 For installing software packages like Docker, Redis, MySQL, Nacos, RabbitMQ, Nginx, and Jenkins within a CentOS 7.6 environment, specific steps must be followed to ensure proper installation without errors. To add the official Docker repository before proceeding with installations can involve using `yum-config-manager` as shown below: ```bash sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo ``` This command allows viewing all available versions of Docker from the repository and selecting a particular version for installation[^3]. #### Configuring DNS Settings Editing `/etc/resolv.conf` is essential when configuring DNS settings on CentOS 7.6. This involves specifying preferred name servers which help resolve domain names into IP addresses. An example entry would look like this: ```bash nameserver 114.114.114.114 ``` Such configurations are typically managed through NetworkManager but may also require manual editing depending upon network requirements[^2]. #### Troubleshooting Common Issues During Installation When encountering issues during service startup, such as missing dependencies causing failures (e.g., starting NGINX), it's important first to verify library presence or install necessary RPM files directly via commands similar to these: ```bash rpm -ivh pcre2-10.23-2.el7.x86_64.rpm yum install pcre2 ``` These actions address potential dependency problems that could prevent services from running correctly after setup attempts fail due to unresolved symbols or other runtime errors[^4]. #### Java Environment Setup Setting up a Java development kit (JDK) specifically version 1.8 requires adherence to detailed procedures ensuring compatibility across applications hosted under CentOS environments. Properly setting JAVA_HOME paths post-installation ensures smooth operation especially concerning application frameworks requiring explicit JVM specifications[^1].
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值