How to install Composer and PyroCMS on your DirectAdmin VPS at KnownHost

Motoenth

New Member
Hi All -

I wanted to share the steps to install Composer and PyroCMS on your DirectAdmin VPS here at KnownHost.

Full disclosure: I consider myself a 'webhack'. I search for answers, try stuff and check to see if they work. If they don't, I start over. The steps here are a blend of the instructions I found on the links found at the bottom of this post.

You'll need SSH root and account-level access to complete these steps.

And finally - the fine folks at KnownHost may very well complete the installation for you. It's just that I have a curious mind and enjoy the feeling of accomplishment I get from doing stuff myself.

Here we go:

1. Login to your VPS via SSH as root
Code:
ssh root@my_server
2. Install Composer - (the following method will allow Composer to be accessible from all accounts/users). Move composer.phar file to bin

Code:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
3. Delete default files created by DirectAdmin:
Code:
rm -rf /home/<<USERNAME>>/domains/<<DOMAIN_NAME>>/public_html/*
4. Logout of SSH as root. Log back in as User - (in order to assign ownership correctly. Or 'chown', if you wanna...)
- cd to public_html directory (which should be empty)

5. Run PyroCMS install via Composer:
Code:
composer create-project pyrocms/pyrocms
6. Modify the httpd.conf
- Login to your DirectAdmin control panel as Admin
- under "Server Manager", choose "Custom HTTPD Configuration"
- the domain list loads. Choose httpd.conf on the appropriate row
- Domain configuration page loads. Click "Customize"
- in the httpd.conf customization textarea:
Code:
|?DOCROOT=/home/<<USERNAME>>/domains/<<DOMAIN_NAME/public_html/pyrocms/public|
-Save

7. At this point, you should be able to visit your site in a browser and be redirected to PyroCMS's install wizard.

8. After running PyroCMS's install wizard, FTP into account and edit composer.json file:
- remove "anomaly/installer-module" line
- save

9. Run:
Code:
composer update
after removing line in step 8.

Annnnnd...... that should be it! Hope this helps!

How to install Laravel and Composer on a DirectAdmin VPS: https://www.rosehosting.com/blog/how-to-install-laravel-on-a-directadmin-server/
How to install PyroCMS: https://pyrocms.com/documentation/pyrocms/3.7/getting-started/installation
Adding custom httpd.conf: https://help.directadmin.com/item.php?id=3
 
Top