Difference between revisions of "AWS Quick Startup"

From TheInterWiki
(Created page with "*1-click launch *SSH into command line. *Create MySQL user and database for MediaWiki. Grant all privileges to user for database. (I'd recommend walking the buyer through the...")
 
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
*1-click launch
+
==Installation==
*SSH into command line.
 
  
*Create MySQL user and database for MediaWiki. Grant all privileges to user for database.
+
This page is written for someone that is familiar with unix and setting up an AWS instance from a AMI image.
(I'd recommend walking the buyer through the steps of creating a user/db for MediaWiki.)
 
  
- Go to web server: yourdomain.com/wiki . Follow instructions to install MediaWiki.
+
For detailed instructions and tutorials to start your server, see the [[Startup Instructions|startup instructions]] at theinterwiki.com
(Depending on how the subscriber launches this product, they may not have a domain for the launched instance. It may be better to recommend that the subscriber navigates to https://<EC2_Instance_Public_DNS>/wiki. They can readily pull the Public DNS from the EC2 console and navigate to the front facing MediaWiki page to continue steps.)
 
  
 +
*Find the Inter Wiki AMI on the AWS Marketplace. Search the term "Cath Lab"
 +
*Select one-click launch to start the AMI
 +
*Once it is running, connect with your SSH program using the server IPv4 DNS name from the instance page, the username ubuntu, port 22, and your SSH key. If these sound unfamiliar, go to theinterwiki.com and use the detailed instructions.
  
  -Under extras, check only Visual Editor. The rest will be installed from the back end.
+
===Create MySQL user and database===
- Download LocalSettings.php
 
- SSH to command line. sudo nano /var/www/html/wiki/LocalSettings.php
 
- Paste in full text from downloaded file and add text from /var/www/html/wiki/SettingsExtras.php. Save file.
 
- Open MySQL and import theinterwikidata.sql, this will overwrite all but the admin user with all the template data. Exit MySQL.
 
- Run php /var/www/html/wiki/maintenance/update.php twice.
 
- Run php /var/www/html/wiki/extensions/SemanticMediaWiki/maintenance/rebuildData.php
 
- Go back to the web interface and confirm all is working.
 
- Proceed to fill in physicians and Procedure data.
 
  
Though this is not necessary, Markdown notation is accepted within the Usage Instructions field. This means that we can create a more visually organized means of providing this information/instructions. I'll leave an example of what you could provide for your Usage Instructions:
+
*From the command line launch MySQL with super user privileges.
 +
Sudo MySQL
 +
*Create the database. Pick a database name for your installation.
 +
  CREATE DATABASE wikidb;
 +
*Create a user for mediawiki to access the database. Pick a name and good password for this command.
 +
CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'strongpassword';
 +
*Give the user rights to the database.
 +
GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost' WITH GRANT OPTION;
 +
*Reset the privileges table
 +
Flush privileges;
 +
*Exit MySQL
 +
Exit;
  
### SSH into EC2 Instance ###
+
===Install MediaWiki===
- SSH over port 22 to your Linux instance
 
- Login with username: ubuntu
 
  
### MYSQL User/DB creation on Instance ###
+
Now you will access the web site directly. In the AWS Instances dashboard, click on your running instance, and look in the bottom part of the page. Here you will find all of the information about your server. One of these items is the AWS supplied domain name for the instance. Click the Open address link under the Public IPv4 heading. This will open your website in a new window. Please note that you may get a warning that the site is not secure, proceed anyway and open the site. We will set up a self-signed https certificate at a later point.
- Steps to create user/db
 
- Steps to create user/db
 
  
### Accessing the WebUI ###
+
*Follow the instructions on the installer page to install MediaWiki.
- Through a web browsers navigate to the public DNS of your instance: https://<EC2_Instance_Public_DNS>/wiki
+
**'''Under extras, check only Visual Editor. The rest will be installed from the back end.'''
- Next Steps to complete the installation
+
*When the installer is finished, download the LocalSettings.php file to your local computer.
 +
*Return to the command line and create the LocalSettings.php file using the nano text editor:
 +
sudo nano /var/www/html/wiki/LocalSettings.php
 +
*Open the LocalSettings.php file you downloaded on your computer in the editor of your choice. Copy all the text.
 +
*Switch back to the SSH program and paste this text into the nano editor.
 +
*Make sure you are at the end of the file in nano.
 +
*Use Ctrl-R to read in a file. It will ask for the location of the file. Paste in the following:
 +
/var/www/html/wiki/SettingsExtras.php.
 +
*Use Ctrl-x to Save the file and exit nano.
  
### Location of saved Data on instance ###
+
===Add custom templates to MySQL===
- Location of MYSQL DB
 
- Any other location
 
- AMI and container product usage instructions
 
  
### Additional Dependencies ###
+
*Open MySQL and import theinterwikidata.sql.
- Stable Internet connection required
+
sudo MySQL;
- AMI-based product requirements
+
use mywikidb; (Your database name)
 +
source /var/www/html/wiki/theinterwikidata.sql;
 +
exit;
 +
 +
This will overwrite everything with all the template data.
  
 +
Admmin credentials Username: Admin, Password: Admin12345
  
This sample formatting is an example that you can leverage, but is not required. The usage instructions will require clarified steps on how the user can create a user/db. Any other actions that are required from the subscriber to create resources, will need to be detailed.
+
===Update the data===
  
Please let me know if you have any further questions regarding the provided feedback.
+
*Update the database and Semantic Mediawiki with the data you just imported.
 +
php /var/www/html/wiki/maintenance/update.php  (run this twice)
 +
php /var/www/html/wiki/extensions/SemanticMediaWiki/maintenance/rebuildData.php
 +
 
 +
Go back to the web interface and reload the page to confirm all is working.
 +
Proceed to fill in physicians and procedure data.
 +
 
 +
For assistance in setting up a domain name, and securing your site for https, please visit the [[Startup Instructions|full user manual]] at the Interventional Services Wiki Project webpage. theinterwiki.com

Latest revision as of 12:35, 15 July 2023

Installation

This page is written for someone that is familiar with unix and setting up an AWS instance from a AMI image.

For detailed instructions and tutorials to start your server, see the startup instructions at theinterwiki.com

  • Find the Inter Wiki AMI on the AWS Marketplace. Search the term "Cath Lab"
  • Select one-click launch to start the AMI
  • Once it is running, connect with your SSH program using the server IPv4 DNS name from the instance page, the username ubuntu, port 22, and your SSH key. If these sound unfamiliar, go to theinterwiki.com and use the detailed instructions.

Create MySQL user and database

  • From the command line launch MySQL with super user privileges.
Sudo MySQL
  • Create the database. Pick a database name for your installation.
CREATE DATABASE wikidb;
  • Create a user for mediawiki to access the database. Pick a name and good password for this command.
CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'strongpassword';
  • Give the user rights to the database.
GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost' WITH GRANT OPTION;
  • Reset the privileges table
Flush privileges;
  • Exit MySQL
Exit;

Install MediaWiki

Now you will access the web site directly. In the AWS Instances dashboard, click on your running instance, and look in the bottom part of the page. Here you will find all of the information about your server. One of these items is the AWS supplied domain name for the instance. Click the Open address link under the Public IPv4 heading. This will open your website in a new window. Please note that you may get a warning that the site is not secure, proceed anyway and open the site. We will set up a self-signed https certificate at a later point.

  • Follow the instructions on the installer page to install MediaWiki.
    • Under extras, check only Visual Editor. The rest will be installed from the back end.
  • When the installer is finished, download the LocalSettings.php file to your local computer.
  • Return to the command line and create the LocalSettings.php file using the nano text editor:
sudo nano /var/www/html/wiki/LocalSettings.php
  • Open the LocalSettings.php file you downloaded on your computer in the editor of your choice. Copy all the text.
  • Switch back to the SSH program and paste this text into the nano editor.
  • Make sure you are at the end of the file in nano.
  • Use Ctrl-R to read in a file. It will ask for the location of the file. Paste in the following:
/var/www/html/wiki/SettingsExtras.php. 
  • Use Ctrl-x to Save the file and exit nano.

Add custom templates to MySQL

  • Open MySQL and import theinterwikidata.sql.
sudo MySQL;
use mywikidb; (Your database name)
source /var/www/html/wiki/theinterwikidata.sql;
exit;

This will overwrite everything with all the template data.

Admmin credentials Username: Admin, Password: Admin12345

Update the data

  • Update the database and Semantic Mediawiki with the data you just imported.
php /var/www/html/wiki/maintenance/update.php  (run this twice)
php /var/www/html/wiki/extensions/SemanticMediaWiki/maintenance/rebuildData.php

Go back to the web interface and reload the page to confirm all is working. Proceed to fill in physicians and procedure data.

For assistance in setting up a domain name, and securing your site for https, please visit the full user manual at the Interventional Services Wiki Project webpage. theinterwiki.com