Changes

Jump to: navigation, search

OPS345 Lab 4

1,909 bytes added, 05:24, 30 September 2021
no edit summary
* Go back and try again to create the database.
* Assign temporary elastic IP to yum install mariadb, no need for server.
** Disassociate Will disassociate and release the elastic ipat the end of the lab.
* Do the rest of the lab as the regular user, don't use root.
* In the AWS Console go to RDS, and find the FQDN ("Endpoint") for the database. Such as ops345db.cobdogt5aykb.us-east-1.rds.amazonaws.com - record that.
* use firstdb;
* show tables;
* Create tables, insert data, select: https://www.guru99.com/mariadb-tutorial-install.html#6
* A realistic use case for your career: download and instal nextcloud.
* wget the .tar.bz2 (not zip)
* Extract it into /var/www/html so you have a /var/www/html/nextcloud/index.html
* https://docs.nextcloud.com/server/latest/admin_manual/installation/source_installation.html
** As root, vi /etc/httpd/conf.d/nextcloud.conf <source>Alias /nextcloud "/var/www/html/nextcloud/"
 
<Directory /var/www/html/nextcloud/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
 
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory></source>
** chown -R apache.apache nextcloud/
** Get an error: <source>This version of Nextcloud requires at least PHP 7.3
You are currently running 5.4.16. Please update your PHP version.</source>
** amazon-linux-extras | grep php
** amazon-linux-extras enable php7.4
** yum clean metadata
** yum install php-cli php-pdo php-fpm php-json php-mysqlnd
** restart apache
** Get module errors from website, install them:
*** amazon-linux-extras enable httpd_modules
*** yum install php-dom php-gd php-mbstring
** Should now let you continue the setup.
** Create an admin account. Use ops345admin/nextcloudadminpass
** Create a new database and user and password nextclouddb/nextclouduser/nextclouddbpassword
*** CREATE DATABASE nextclouddb;
*** CREATE USER 'nextclouduser'@'%' IDENTIFIED BY 'nextclouddbpassword';
*** GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE ON nextclouddb.* TO 'nextclouduser'@'%';
** Fill in the database details in the nextcloud web setup screen.
** Look around inside the nextcloud, create user yoursenecaid, unlimited quota
** Log in as yoursenecaid, upload a picture, share a link to it.
* When done with everything, release the elastic ip.

Navigation menu