Installing entirely from CLI?

Hello, I am pretty unfamiliar with linux, but I have been having a fun time with it.
I believe I have everything set up, but I am now stuck on the fnal step of configuring the applicatrion with my web browser.
I am using ubuntu server 18.04, but I did not install the GUI desktop.

Does anyone know if this is possible to do from the CLI or do I need to install desktop?
Can I set the app to be finished from another computer on my network.

I apologize if this question is beyond the scope of this forum.
Thanks!

1 Like

Hi @scissors - I might need to understand the issue a bit better. Are you installing Apache/MySQL yourself and running farmOS in /var/www/html directly on your server? Or are you running Docker containers, perhaps?

It is possible to run farmOS on a server without any desktop (all command line). Once it is up and running farmOS is accessed entirely through a browser. After you have the code in place, the first time you load the farmOS page in your browser you should see a page that asks for database credentials, and then it walks you through the other steps in the database setup and site installation process.

farmOS is Drupal, so you can Google search for tutorials/guides/troubleshooting for Drupal hosting more generally as well. Drupal can be run in a lot of different environments/setups, so likewise farmOS can as well.

Hope that helps!

1 Like

After you have the code in place, the first time you load the farmOS page in your browser you should see a page that asks for database credentials, and then it walks you through the other steps in the database setup and site installation process.

Oh… are you asking if it’s possible to do this via CLI?

Yes. Using Drush. drush site install for drush 8.x

1 Like

Yes, I am attempting to run Apache and MySQL, I think I am at the final step but I will need to wait until after work to try it out. I will look into Drush

Thanks for the help!

1 Like

Okay I got it all installed!
Then I went about trying to fix all of the updates and managed to crash something in the openlayers thingy.

I see that @mstenta you have worked on this but I do not understand how you are fixing this in the comments here:

I think there is a problem if you use the internal update features of drupal. As far as I know drupal updates that are shown in the admin area “inside” farmOS have to be applied as a complete update of either drupal or farmOS.

1 Like

I had tried to upgrade openlayers by replacing the files in the modules folder manually, but I guess there was dependencies outside of that folder being referenced. I just reverted the files in the openlayers module folder with the ones from my back up and it works. The updates report still recommends me to update it but I will ignore it until I can figure out what went wrong. I was able to get the drupal core updated to 7.69 though!

Why does “myFarmName/farm/areas” give me a 404 but “myFarmName/?=farm/areas” work?

There are a lot of dependencies. I had a similar problem in the past and ended up with a complete reinstall to fix everything.

1 Like

I think I have the most recent version of farmOS and the most recent drupal core.
Replacing the files in the open layers folder or doing the built in update script both result in errors of

Unresolved dependency elements (Missing)
Farm Area requires this module.

Then I went about trying to fix all of the updates and managed to crash something in the openlayers thingy.

@scissors Take a look at the “Updating farmOS” user guide: Updating farmOS | farmOS

Specifically the big warning on top: :slight_smile:

Do not use Drupal’s automatic update feature
This process may break your farmOS system.

That’s exactly what happened in your case. Read through that page to understand why, and to understand the recommended process for upgrading.

farmOS 7.x-1.2 is a little behind in terms of updates, but the 7.x-1.x development branch has all of the latest, if you’d like to just use that: https://www.drupal.org/project/farm/releases/7.x-1.x-dev

I generally recommend people use the tagged releases for stability, but the dev branch is usually stable too. For what it’s worth, the security warnings you see in 7.x-1.2 are not critical issues - they should not put your farmOS at risk, but they are annoying. I’ve been trying to wrap up some development before tagging 7.x-1.3 but keep getting sidetracked. Hopefully very soon!

Why does “myFarmName/farm/areas” give me a 404 but “myFarmName/?=farm/areas” work?

This is because “Clean URLs” are not enabled on your site. I’m not sure if this is because your installation is broken, or if you will need to set this up manually regardless. I would probably suggest that you reinstall and see if it’s still an issue. And if it is, see this for more information: https://www.drupal.org/docs/7/configuring-clean-urls/enable-clean-urls

1 Like

Take a look at the “Updating farmOS” user guide

Thanks, did this, and it all seems to be working now.

This is because “Clean URLs” are not enabled on your site.

The “Areas” section at the top was working but the Metrics link to the areas was broken.
I had to enable the apache2 rewrite_module to get this working, but so far so good.

1 Like

Thanks, did this, and it all seems to be working now.

Great!!

The “Areas” section at the top was working but the Metrics link to the areas was broken.

Ah ok! That would be a small bug with the Metrics link then: those should work without clean URLs too. I will fix that right now…

1 Like

I am happy to say that my farm conspirators have successfully created accounts and are also finding the software useful. They are sort of internet nerdy people, but they had a pretty easy time figuring out how things work.

We have two questions though:

We would like some kind of local chat or forum we can use to commen outside of the logs. I played with the built in drupal forum for an hour or so but so far I am unimpressed. Is there any other slim messaging system that will play well with the farmOS install that you would recommend, or should I keep playing with the drupal forum?

Second, is there any recommended route for embedding images in our logs?

Thanks again!

1 Like

We would like some kind of local chat or forum we can use to commen outside of the logs.

In farmOS 2.0 we may be enabling comments on area, asset, and log records - which I think would do exactly what you describe. Nothing planned for farmOS 1.0 though, and I don’t have any good recommendations for that, unfortunately. Would a chat room help? We’ve been using Riot.im/Matrix.org for the farmOS chat and it works well for us.

Second, is there any recommended route for embedding images in our logs?

You can attach images to logs, and they will be displayed automatically. But you can’t currently “embed” them directly into the “Notes” field, if that’s what you mean?

1 Like

In case it is helpful to have a farmOS-specific example, these are the commands I use when creating test installations of farmOS;

alias drush="docker-compose exec www drush"
drush site-install farm --locale=us --db-url=mysql://farm:farm@db/farm --site-name=Test0 --account-name=root --account-pass=test install_configure_form.update_status_module='array(FALSE,FALSE)'
2 Likes

Thanks @Symbioquine - I use a similar bash alias in my ~/.bash_aliases config file to make it easier to use drush within the Docker container. I like that you use docker-compose exec because then it isn’t tied to a specific Docker container (I run multiple farmOS containers on my laptop for testing etc).

We’ve been using Riot.im/Matrix.org for the farmOS chat and it works well for us.

This seems like awesome software, but slightly overkill. We wanted something simple and local that would potentially fit into farmOs in some way. I think I am going to see how friendly it works with phpBB.

1 Like