How can I activate a service like apache-solr?

A service is activated by adding the corresponding line to the /etc/rc.conf file:

solr_enable=YES

This also guarantees that the service is started when the system is restarted.

The service can be started and stopped with the service command:

sudo service solr start
sudo service solr stop
sudo service solr restart

The available services can be selected with

service -l

spend.