Universeorange.com/Docs/

R3m/framework Installation

Installing r3m/framework is quite easy using composer or download.
The easiest way is composer.

Getting composer:

Composer download website

this will give you a composer.phar file (a packed php file).
Now to install the r3m/framework all you have to do is:

./composer.phar require r3m/framework

this has to be done in the same directory the composer.phar is in.
you might run in a zip error, this is easily fixed by installing php-zip.
On Debian based systems like Ubuntu you can do:

apt install php-zip

r3m/framework

r3m/framework uses the following php extensions:

apt install php-mbstring

After installing r3m/framework, you will have to make a copy of the r3m binary in the root of your project.

cp vendor/r3m/framework/Bin Bin/ -R

Now run: php Bin/r3m.php
A welcome notice should be shown:

Welcome to R3m.io

Let r3m/framework create a binary, so you can easily access it.

Now run: php Bin/r3m.php bin <name> where name should not be an existing program.

Binary created...

Try running <name> and you should see:

Welcome to R3m.io

To create a webpage:

<name> configure host create <domain> <public_html> <ip> <e-mail>
this script does handle the performing tasks for you. where:
<domain> The domain name, this can include a subdomain for example: test.example.com
<public_html> The public directory for example htdocs
<ip> The ip address for example 0.0.0.0
<e-mail> the server admins e-mail address.

  1. The apache site file is created.
  2. The host is added to /etc/hosts.
  3. The public directory is created including a .htaccess and an index.php.
  4. The domain is added to the Host, a controller, routing and a view is created.
  5. The apache site is enabled.
  6. The apache module rewrite is enabled.
  7. Apache is restarted using service.

WSL (Windows Subsystem Linux)

When working on windows with wsl (Windows Subsystem Linux) you need to adjust the windows host file located at C:\Windows\System32\drivers\etc\hosts .
If you use wsl version 1 you need to add: 127.0.0.1 <domain>.
If you use wsl version 2, first check your ip address in the Debian or Ubuntu shell with ip address and add that one to the Windows host file.
For example:

user@PC:~$ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 6a:c3:20:09:8a:07 brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 72:ac:a8:7a:da:40 brd ff:ff:ff:ff:ff:ff
4: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
5: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:f2:e5:58 brd ff:ff:ff:ff:ff:ff
inet 172.29.37.168/20 brd 172.29.47.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::215:5dff:fef2:e558/64 scope link
valid_lft forever preferred_lft forever

You need to copy the inet address of eth0, in this example: 172.29.37.168 and add it to the windows host file located at: C:\Windows\System32\drivers\etc\hosts .
You need to add 172.29.37.168 <domain> to the host file.

Last modified: 2021-06-07

© 2021 universeorange.com