LAMP环境部署NextCloud(YUM方式安装)

1.1 安装MySQL和Apache

[root@nextcloud ~]# yum install -y mariadb-server httpd

1.2 安装PHP

[root@nextcloud ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
[root@nextcloud ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
[root@nextcloud ~]# yum install -y zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel openssl openssl-devel mcrypt
[root@nextcloud ~]# yum install -y php72w php72-devel php72w-mysqlnd php72w-gd php72w-json php72w-mysql php72w-curl php72w-mbstring php72w-intl php72w-pecl-imagick php72w-xml php72w-zip

1.3 部署NextCloud

[root@nextcloud ~]# cd /server/tools/
[root@nextcloud tools]# wget https://download.nextcloud.com/server/releases/nextcloud-13.0.0.zip
[root@nextcloud tools]# unzip nextcloud-13.0.0.zip
[root@nextcloud tools]# cp -a nextcloud /var/www/html/

1.4 配置Apache

[root@nextcloud ~]# cat /etc/httpd/conf.d/nextcloud.conf
Alias /nextcloud "/var/www/html/nextcloud/"

<Directory /var/www/html/nextcloud/>
  Options +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off
 </IfModule>

 SetEnv HOME /var/www/html/nextcloud
 SetEnv HTTP_HOME /var/www/html/nextcloud

</Directory>

1.5 设置站点目录权限

[root@nextcloud ~]# chmod -R 777 /var/www/html/nextcloud/

1.6 创建数据库并启动LAMP

[root@nextcloud ~]# systemctl start mariadb
[root@nextcloud ~]# mysql
MariaDB [(none)]> create database nextcloud;
MariaDB [(none)]> grant all on nextcloud.* to 'nextcloud'@'localhost' identified by '123456';
[root@nextcloud ~]# systemctl start httpd
温馨提示:本文最后更新于2022-12-20 20:57:46,已超过483天没有更新。某些文章具有时效性,若文章内容或图片资源有错误或已失效,请联系站长。谢谢!
转载请注明本文链接:https://blog.leonshadow.cn/763482/1225.html
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享