标签:www php7.4 apt apache2 install Ubuntu nextcloud 搭建
在Ubuntu下搭建nextcloud
一、准备环境说明
1,操作系统 Ubuntu server 20.04
2,nextcloud 选择官方最新版本nextcloud-21.0.0
二、开始安装
1,安装操作系统,主要是分区模式LVM 方式,方便以后扩容,系统安装时候注意该原地址为上海交通大学的源地址:https://mirrors.sjtug.sjtu.edu.cn/ubuntu
注意安装的时候需要安装openssh这个软件,不然就不能远程连接了。
2,Ubuntu默认防火墙是关闭的,selinux也不要管的。
3,安装一下压缩软件和net-tools软件。
apt install unzip apt install net-tools
4,接下来安装MySQL、apache2和php软件。
apt update apt install apache2 mariadb-server libapache2-mod-php7.4 -y apt install php7.4-gd php7.4-mysql php7.4-curl php7.4-mbstring php7.4-intl -y apt install php7.4-gmp php7.4-bcmath php-imagick php7.4-xml php7.4-zip php7.4-ldap -y
5,启动MySQL和apache2 服务。
/etc/init.d/mysql start service apache2 start
6,查看服务端口是否工作正常。
netstat -lntup |grep 80 netstat -lntup |grep 3306
7,创建文件夹,上传nextcloud 文件,解压文件,最后给解压的文件授权。
mkdir -p /tools 通过工具上传软件 unzip nextcloud-21.0.0.zip cp -r nextcloud /var/www chown -R www-data.www-data /var/www/nextcloud
8,进入数据库,创建next cloud数据库,并授权。
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'Android'; CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; GRANT ALL PRIVILEGES ON nextcloud.* TO 'admin'@'localhost'; FLUSH PRIVILEGES;
9,配置apache2服务目录文件位置。
vim /etc/apache2/sites-available/000-default.conf <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerAdmin webmaster@localhost DocumentRoot /var/www/nextcloud # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to
10,重启apache2服务。
service apache2 restart
三、在浏览器配置
1,打开浏览器输入http://10.93.59.10,根据你在MySQL里授权的用户来填写这些资料,如下图(根据你自己实际情况)
2,完成后的初始化得到的页面如下:
3,添加一些应用,这里我们需要的LDAP跟DC结合来用。
4,添加LDAP功能,并启用。
5,回到主页面设定中
6,然后根据你的AD来设置这些参数来整合,第一步设置AD服务器的IP地址和验证的用户名及密码,如设置正确,点击测试会有返回值。
7,设置使用者,我这选择的Domain User 用户,当然也可以指定特定的组。
8,登陆的设置,这里选择默认就好。
9,设置群组,这里依然是使用了domain user这个群组。
10,最后找一个客户端试试,如果能使用AD账号登陆就证明设置没有问题。
标签:www,php7.4,apt,apache2,install,Ubuntu,nextcloud,搭建 来源: https://blog.51cto.com/hwg1227/2656998
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。