Use MySQL 16.04 + PHP 7 + Apache in Ubuntu 5.7 to deploy Nextcloud
Deploy Nextcloud using MySQL 16.04 + PHP 7 + Apache in Ubuntu 5.7.
Preparation
If you want to use VPS or cloud host as the Nextcloud server, you can install an Xshell first.
Note: In the following code block, # represents the annotation, and $ represents the Linux Command.
Related: use MySQL 5.7 + PHP 7 + Apache in CentOS 7 to deploy Nextcloud. See
1. Install MySQL and create the Nextcloud Database
# Install MySQL Server (y: Select y automatically ), during installation, you will be prompted to enter the password $ apt-get-y install mysql-server # install vim $ apt-get-y install vim # modify the MySQL configuration file $ vim/etc/mysql/my. cnf # modify the default encoding to the UTF-8, add the following content [mysqld] character-set-server = utf8 # start MySQL service $ systemctl start mysql. service # Start MySQL service $ systemctl enable mysql # reload service $ systemctl daemon-reload # log on to MySQL $ mysql-uroot-p # create nextcloud database mysql> create database nextcloud; # create a nextcloud user mysql> create user 'nextcloud' @ 'localhost' identified by 'Password'; # authorize nextcloud users with all permissions for the nextcloud database mysql> grant all on nextcloud. * to 'nextcloud' @ 'localhost'; # refresh permissions (extract user information/permission settings in the current user and privilige table from mysql database to memory) mysql> flush privileges; # exit MySQLmysql> quit;
2. install PHP
# Install PHP 7.0 (the first three must be installed, followed by a prompt for installation after enabling Nextcloud) $ apt-get-y install php-dev php-mysql php-xml php-mbstring php-gd php-zip php-curl
3. install Apache
# Install apache2 $ apt-get-y install apache2
4. Deploying Nextcloud
# Install wget $ apt-get-y install wget # Move to the Apache deployment directory $ cd/var/www/html # download Nextcloud server $ wget https://download.nextcloud.com/server/releases/nextcloud-12.0.0.zip# install unzip program $ apt-get- y install unzip # unzip the server package $ unzip nextcloud-12.0.0.zip # grant directory permissions (R: recursion) $ chmod-R 777 nextcloud # start apache2 $ systemctl start apache2.service
Open IP/nextcloud in the browser and enter the Configuration:
After the installation is complete, wait for one or two minutes to go to the file list:
Then download the client and follow the prompts.