Ubuntu18.04 +LMAP+NextCloud15

发布于 2019-03-31  487 次阅读


1.Ubuntu 安装

过程略

2.Ubuntu 安装 LMAP

安装可以参考以下链接:
Ubuntu18.04 配置php7.2+MySql5.7+Apache2.4+phpmyadmin

3.安装依赖

sudo apt -y install libapache2-mod-php7.2 php7.2-gd php7.2-json php7.2-mysql php7.2-curl php7.2-mbstring php7.2-intl php-imagick php7.2-xml php7.2-zip

4.配置数据库

sudo mysql_secure_installation
#1
VALIDATE PASSWORD PLUGIN can be used to test passwords...
Press y|Y for Yes, any other key for No: N (我的选项)

#2
Please set the password for root here...
New password: (输入密码)
Re-enter new password: (重复输入)

#3
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them...
Remove anonymous users? (Press y|Y for Yes, any other key for No) : N (我的选项)

#4
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network...
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y (我的选项)

#5
By default, MySQL comes with a database named 'test' that
anyone can access...
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : N (我的选项)

#6
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y (我的选项)

建立数据库
create database nextcloud character set utf8 collate utf8_bin;
建立用户
create user 'nextcloud'@'%' identified by 'King#Soft.$%9';
赋予权限
grant all privileges on nextcloud.* to 'nextcloud'@'localhost' IDENTIFIED BY 'King#Soft.$%9';
grant all privileges on nextcloud.* to 'nextcloud'@'%' IDENTIFIED BY 'King#Soft.$%9';

5.web设置

sudo chown -R www-data /var/www/html/nextcloud
sudo rm /etc/apache2/sites-enabled/000-default.conf
cd /etc/apache2/sites-available
sudo vi 001-nextcloud.conf
       
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/nextcloud
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
sudo ln -s 001-nextcloud.conf /etc/apache2/sites-enabled/
sudo systemctl restart apache2

6.nextcloud web 配置
浏览

http://172.18.119.22/index.php

填写信息后提交

7.错误信息排查
选择 :设置-概况


一沙一世界,一花一天堂。君掌盛无边,刹那成永恒。