Getting Started - rwth-acis/Anatomy2.0 GitHub Wiki

[TOC]

Setup Anatomy2.0

General Setup

  • Cloning git repository https://github.com/rwth-acis/Anatomy2.0
  • Setup of php-http server (e.g. Apache Server)
  • Setup of MySQL server
  • Setup of MySQL database with this SQL-script
  • Registration of a new Learning Layers user-account
  • Registration of a the localhost-webpage in Learning Layers as described here
  • Create /src/config/config.php↑
  • Create /src/widgets/gallery.xml↑ and /src/widgets/showcase.xml↑

Local Windows Example

  • Installation of GitHub Desktop™
  • Cloning https://github.com/rwth-acis/Anatomy2.0 with git
  • Installation of XAMPP™
  • Running XAMPP™ Control Panel
  • Starting Apache and MySQL
  • Configuring phpMyAdmin (included in XAMPP™), see here
  • Creating a MySQL-database, the name is not important
  • Creating the needed tables in the database by executing this SQL-script
  • Registration of a new Learning Layers user-account
  • Registration of a the localhost-webpage in Learning Layers as described here
  • Configuring a virtual host as described here
  • Copying /src/config/config_placeholder.php↑ to /src/config/config.php↑
  • Editing /src/config/config.php↑, see the link for more detail
  • Hosting ROLE-widgets from localhost on http://role-sandbox.eu/ is not trivial and thus not used

Local Ubuntu Example

  • sudo apt-get install git (22MB)

  • git clone https://github.com/rwth-acis/Anatomy2.0 (< 50MB)

  • sudo apt-get install php5 php5-mysql (30MB)

  • sudo apt-get install mysql-server (95MB), setting the root-password during installation ℹ To avoid launching the MySQL-server on system startup, comment out "start on…" in /etc/init/mysql.conf↑

  • the database should have started automatically. If not: sudo service mysql start

ℹ Personally I prefer

  • sudo apt-get install nautilus-open-terminal (<1MB)
  • nautilus -q && nautilus & (restart nautilus)
  • rightclick in folder → ⌨e (Open in Terminal)

  • sudo apt-get install emma (1MB), a graphical MySQL-client
  • Connecting to local database with emma™ by modifying localhost connection and setting the previously chosen database-password
  • Creating new database, name is not important
  • Creating the needed tables in the database by executing this SQL-script in the query-tab
  • Registration of a new Learning Layers user-account
  • Registration of a the localhost-webpage in Learning Layers as described here, using http://localhost:105/src/views/login_callback.php as redirect url. The port (e.g. 105) can be freely chosen, only adapting /start_anatomy2.0.sh↑ and /src/config/config.php↑ is necessary
  • Copying /src/config/config_placeholder.php↑ to /src/config/config.php↑
  • Editing /src/config/config.php↑, choosing following values:
    • baseUrl: http://localhost:105
    • admins: adding a usable email-address as given in the example
    • oidcClientId: the client id returned from the Learning Layers self registration service
    • host: localhost
    • database: the chosen databse name
    • user: probably root
    • password: the chosen password
  • Opening terminal in cloned folder → executing script ./start_anatomy2.0.sh↑, will start local php-server and mysql-server (if not already started)
  • Visiting localhost:105 in browser, that's it!
  • Hosting ROLE-widgets from localhost on http://role-sandbox.eu/ is not trivial and thus not used

Windows Virtualhosts

See also http://www.php.de/tutorials/42725-virtual-hosts-vhosts-einrichten-unter-windows.html

Note: $XAMPP_ROOT is the directory you installed XAMPP into. You have to replace $XAMPP_ROOT by the actual directory name.

  1. Open $XAMPP_ROOT/apache/conf/httpd.conf↑
  2. Make sure Include conf/extra/httpd-vhosts.conf is not commented out
  3. Open $XAMPP_ROOT/apache/conf/extra/httpd-vhosts.conf↑
  4. Insert the following code (Note, that you can replace ServerName anatomy by another name). Instead of C:/Homepage put the absolute path to your local Anatomy2.0 git repository.
<Directory C:/Homepage>
 Require all granted
</Directory>

<VirtualHost *:80>
 DocumentRoot $XAMPP_ROOT/htdocs
 ServerName localhost
</VirtualHost>

<VirtualHost *:80>
 DocumentRoot c:/Homepage
 ServerName anatomy
</VirtualHost>
  1. Uncomment NameVirtualHost *:80
  2. Open C:\WINDOWS\system32\drivers\etc\hosts↑ in a text editor
  3. Add 127.0.0.1 3dmodels.local after 127.0.0.1 localhost (make sure lines are not commented out) (You may not be allowed to save the file to this directory. You may then just save anywhere else and copy the file back with administrator rights) (You have to restart Apache for changes in config files to take effect)
⚠️ **GitHub.com Fallback** ⚠️