Ubuntu Configuration Nextcloud
Install common software:
1:ssh sudo apt-get install Openssh-server
SSH Enable root login: Vi/etc/ssh/sshd_config comment off #permitrootlogin prohibit-password add Permitrootlogin Yes below
2: Default boot interface change: sudo systemctl set-difault multi-user.target/graphical.target
3: Enable root user sudo passwd-u root
4:vim sudo apt-get instal vim
Installing Apache
sudo apt-get install apache2
Install MySQL
sudo apt-get install mysql-server mysql-client
Test: Mysql-uroot-p View status: Service MySQL status
Creating the Nextcloud Database: Create databases Nextcloud set UTF8;
Installing the PHP module
sudo apt-get install libapache2-mod-php
sudo apt-get install Php-mysql
sudo apt install-y php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring php7.0-intl php7.0-mcrypt Php-imagick p Hp7.0-xml Php7.0-zip
Restart Services: Service apache2 restart service MySQL restart
Test if Apache can parse PHP:
vim/var/www/html/phpinfo.php
Written in file: <?php echo phpinfo ();? >
Browser access:http://ubuntu address/phpinfo.php, PHP appears
Modify Permissions sudo chmod 777/var/www
Install phpmyadmin sudo apt-get install phpMyAdmin
Create phpMyAdmin shortcut: Ln-s/usr/share/phpmyadmin/var/www/html
Enable Apache Mo_rewrite module: A2enmod rewrite
Restart Services: Service php7.0-fpm Restart service apache2 restart
Test, browser access: http://ip/phpmyadmin
Installing Nextcloud
Cd/var/www/html
wget Https://download.nextcloud.com/server/releases/nextcloud-13.0.3.zip
Unzip Nextcloud-13.0.3.zip
Set directory permissions for Nextcloud: sudo chown-r www-data:www-data/var/www/html/nextcloud/
The next cloud configuration interface will appear after you enter http://server Ip/nextcloud on your browser.
Nextcloud OCC command-line tool
Shijiaofa-test:/var/www/html/nextcloud #sudo-u www-data php occ-v
In the event of a permissions issue, set the directory permissions for Nextcloud: sudo chown-r www-data:www-data/var/www/html/nextcloud/
Ubuntu Configuration Nextcloud