How to install composer . Flarum software

I having issue installing flarum software .

composer create-project flarum/flarum . --stability=beta

What i have tried :

Running command as root , failed .

Creating a use to run the command , failed

access permission issue .

I will love some help …

the output you get (when running as root)?

I would recommend you to

cd /home/domain.com
rm -rf public_html
composer create-project flarum/flarum public_html --stability=beta

Then fix permissions from the file manager, and you should be good to go.

[root@vm374142 forum.example.com]# composer create-project flarum/flarum public_html --stability=beta
Do not run Composer as root/super user! See How do I install untrusted packages safely? Is it safe to run Composer as superuser or root? - Composer for details
Installing flarum/flarum (v0.1.0-beta.7)

  • Installing flarum/flarum (v0.1.0-beta.7): Loading from cache
    Created project in public_html
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Killed

using another sudo user , still having permission problem

[ErrorException]
mkdir(): Permission denied

Update : this is what i have been able to do .

Recreate public_html

setfacl -m user: username :rwx public_html

Now allow me to run above flarum command , but another error .

[username@vm374142 public_html]$ composer create-project flarum/flarum . --stability=beta
Installing flarum/flarum (v0.1.0-beta.7)

  • Installing flarum/flarum (v0.1.0-beta.7): Loading from cache
    Created project in .
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Package operations: 82 installs, 0 updates, 0 removals
  • Installing symfony/process (v3.4.15): Loading from cache
    proc_open(): fork failed - Cannot allocate memory
    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class
    The following exception is caused by a lack of memory or swap, or not having swap configured
    Check Troubleshooting - Composer for details

[ErrorException]
proc_open(): fork failed - Cannot allocate memory

Finally am able to solve it . and everything is working fine .

Using this

Make sure to use File-manager to fix permission back .

Thank you for the help .

I would recommend you to
cd /home/domain.com
rm -rf public_html
composer create-project flarum/flarum public_html --stability=beta

Then fix permissions from the file manager, and you should be good to go.

Hi I followed the instructions above including fixing the permission using the File Manager and manage to install it properly. But when I go to the site I get a 404 error. Am I missing something else?

Type your comment> @Stoic100 said:

(Quote)

Hi I followed the instructions above including fixing the permission using the File Manager and manage to install it properly. But when I go to the site I get a 404 error. Am I missing something else?

Hi, you should go to domain.com/public to install flarum

Hello, I wonder if I can get any to install Composer (https://getcomposer.org) on Cyberpanel.
Can someone please guide me from the basics?
I have Cyberpanel completely working.
Thanks!

(I have also tried to install Drupal 10 and it worked too).