Centos7 手动源代码安装NextCloud 15.05私有云(参考官网,略有修改)

Centos7 官方安装方法(参考官网,略有修改)

  1. 关闭firewalld防火墙和SElinux
  2. 安装一些工具
  3. 更新系统
  4. 安装apache
  5. 建立一个虚拟主机
  6. 启动并永久启动apache
  7. 安装php模块
  8. 建立一些链接
  9. 数据库设置
    1. 默认密码为空
    2. 创建数据库
    3. 创建用户
    4. 授于权限
    5. 刷新权限
    6. 用新用户和密码登录
    7. 测试用新用户能否访问数据库
    8. 退出,重启数据库
  10. 安装NextCloud
  11. 命令
systemctl stop firewalld;systemctl disable firewalld;setenforce 0;sed -i '/^SELINUX=/cSELINUX=disabled' /etc/selinux/config
yum install -y epel-release yum-utils unzip curl wget bash-completion policycoreutils-python mlocate bzip2
yum update -y
yum install -y httpd
vi /etc/httpd/conf.d/nextcloud.conf
#添加以下内容

  DocumentRoot /var/www/html/
  ServerName  your.server.com


  Require all granted
  AllowOverride All
  Options FollowSymLinks MultiViews


#添加以上内容
systemctl enable httpd.service
systemctl start httpd.service
yum install -y centos-release-scl
yum install -y rh-php72 rh-php72-php rh-php72-php-gd rh-php72-php-mbstring rh-php72-php-intl rh-php72-php-pecl-apcu rh-php72-php-mysqlnd rh-php72-php-pecl-redis rh-php72-php-opcache rh-php72-php-imagick
ln -s /opt/rh/httpd24/root/etc/httpd/conf.d/rh-php72-php.conf /etc/httpd/conf.d/
ln -s /opt/rh/httpd24/root/etc/httpd/conf.modules.d/15-rh-php72-php.conf /etc/httpd/conf.modules.d/
ln -s /opt/rh/httpd24/root/etc/httpd/modules/librh-php72-php7.so /etc/httpd/modules/
ln -s /opt/rh/rh-php72/root/bin/php /usr/bin/php
##安装并设置数据库
yum install -y mariadb mariadb-server
systemctl enable mariadb.service
systemctl start mariadb.service
#配置数据库
sudo mysql -u root -p
CREATE DATABASE nextcloud;
create user nextcloud@localhost identified by '此处改成自己的密码';
grant all on *.* to 'nextcloud'@'localhost' identified by '上面设置的密码' with grant option;
FLUSH PRIVILEGES;
EXIT
mysql -u nextcloud -p
\u nextcloud
exit
systemctl restart mariadb.service
##安装nextcloud
#下载源码安装包并用unzip解压到/var/www/html/
#如果官网下载特别慢可以在下面地址下载
#https://download.csdn.net/download/liujinbao8000/10989179
mkdir /var/www/html/nextcloud/data
chown -R apache:apache /var/www/html/nextcloud
systemctl restart httpd.service
#进入web页面安装
http://IP/nextcloud

你可能感兴趣的:(Linux博文)