You are on page 1of 3

Instance AWS Installation

Lets install NextCloud in an AWS instance step-by-step.

1. Choose an Amazon Machine Image (AMI)

Choose Ubuntu Server 20.04 LTS AMI.

2. Configure Security Group

3.

Copy and paste in the comand line


“chmod 400 exemple.pem”​ and then
“ssh -i “exemple.pem”​ubuntu@ec2-x-xx-xxx-xxx-xxx.compute-1.amazonaws.com​” ​to connect
by SSH.

Oriana Rojas SMX2 BB


Configuration and installation Nextcloud.
1. Copy and paste the following commands in the terminal.
sudo apt update
sudo apt install apache2 mariadb-server libapache2-mod-php7.4
sudo apt install php7.4-gd php7.4-mysql php7.4-curl php7.4-mbstring php7.4-intl
sudo apt install php7.4-gmp php7.4-bcmath php-imagick php7.4-xml php7.4-zip

2. Create a BBDD using MySQL Interface with the folliwing commands in the terminal.
sudo /etc/init.d/mysql start
sudo mysql -uroot -p

Copy and paste this in the MariaDB root:


CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4
COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'username'@'localhost';
FLUSH PRIVILEGES;
quit;

3. Go to the​ ​Nextcloud Download Page​ and download ​Download > Archive file for
server owners​ and download either the tar.bz2 or .zip archive.
extract the archive contents with unzip or tar:

tar -xjfv nextcloud-x.y.z.tar.bz2


unzip nextcloud-x.y.z.zip

4. Copy the Nextcloud directory destination.


cp -r nextcloud /var/www

5. Apache Web Server configuration. Create a file


/etc/apache2/sites-available/nextcloud.conf​ replace the Directory root for yours AWS.
Alias /nextcloud "/var/www/nextcloud/​ec2-x-xx-xxx-xxx-xxx.compute-1.amazonaws.com​"

<Directory /var/www/nextcloud/​ec2-x-xx-xxx-xxx-xxx.compute-1.amazonaws.com​>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews

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

</Directory>

Oriana Rojas SMX2 BB


6. Install Nextcloud.

wget https://download.nextcloud.com/server/releases/nextcloud-20.0.1.zip

My NextCloud DNS:

ec2-34-235-162-224.compute-1.amazonaws.com

Admin user:

orianarojas

Admin password

password

.pem
https://drive.google.com/file/d/1MjqdY3mofKGd-RVBdNnbjH6rCOMRNZgO/view?usp=sharin
g

Oriana Rojas SMX2 BB

You might also like