Native Install#
If you choose to do so, you can install SolarThing to a different location than /opt
. If you do, just realize that this documentation
will refer to /opt/solarthing/
instead of whatever custom location you use.
Warning
A native install is no longer the recommended way to run SolarThing. Please consider the Docker install before continuing: Docker Install.
Installing#
Run these commands to install SolarThing. The script will install to /opt/solarthing
and will create a new solarthing
user.
The script will also modify the root user’s .gitconfig
.
curl https://raw.githubusercontent.com/wildmountainfarms/solarthing/master/other/linux/clone_install.sh | sudo bash
sudo usermod -a -G solarthing,dialout,tty,video $USER
git config --global --add safe.directory /opt/solarthing
Note
If you do not have curl
installed, you can instead use wget -O - https://raw.githubusercontent.com/wildmountainfarms/solarthing/master/other/linux/clone_install.sh | sudo bash
.
Make sure to also run the other commands shown above.
Note
You must have git
installed on your system before running the install.
After installing and running the usermode
command, you should log out and back in, for your user to have full access to the /opt/solarthing
directory.
Checking if java is installed#
Now SolarThing has been installed. That does not mean that java
has been installed. Let’s check to see if java
is installed now.
java -version
If you got an unknown command, you need to go to Install Java.
The solarthing command#
Throughout the documentation, you may see the use of the solarthing
command. Even though we ran the above installation command,
it did not add the solarthing
command to your PATH
. Adding the solarthing
command to your PATH
is optional, but recommended.
If you decide not to add the solarthing
command to your path, just know that these are equivalent:
solarthing version
# These are equivalent
/opt/solarthing/program/.bin/solarthing version
Adding solarthing command to your PATH#
To add solarthing
to your path temporarily, run
source /opt/solarthing/other/linux/path_update.sh
To add solarthing
to your PATH for your user only, edit ~/.bash_profile
like so:
nano ~/.bash_profile
# or if you do not have a .bash_profile
nano ~/.bashrc
Now go to the bottom of the file and add the above command to the end of the file. Save the file.
Testing the solarthing command#
Now that you have the solarthing
command in your PATH
. Run
solarthing version
You should get output such as
pi@raspberrypi:/opt/solarthing$ solarthing version
SolarThing made by Lavender Shannon
Jar: solarthing-SNAPSHOT.jar
Jar last modified: 2021-12-20T08:28:27.040Z
Java version: 11.0.11
If you got similar output, continue on! The installation was successful!