Setting Up Your Development Environment: Linux
The following steps will walk you through the process of setting up your development environment for the Ubuntu 18.04 Linux distribution. Approximate setup time is 30-40 minutes.
For this process, we recommend The Software Development Kit Manager to manage JVM dependencies and the Node version manager for managing Node.
sudo apt-get install zip
curl -s "https://get.sdkman.io" | bash
If this is successfully installed you should see the following success message.
sdkto the path
To persist this, append it to the end of your
echo source "$HOME/.sdkman/bin/sdkman-init.sh" > ~/.bashrc
Node version manager
Node version manager or NVM for short is used, as the name suggests, to manage versions of node on your system.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
Restart your shell or refresh or environment by running
nvmwas successfully installed by running
nvm --version. You should see something like:
To install JDK 11 on Ubuntu 18.04, copy and paste the following into your terminal and press enter.
sdk install java 11.0.10.hs-adpt;
Depending on your Internet speed, this may take a while as packages are downloaded and installed. When the process is finished you should see something like this:
Please Note: this is the Adopt Open JDK Build.
For troubleshooting, see the Adopt OpenJDK installation instructions.
nvminstall version 12 of node.
nvm install 12
Set it as the default
nvm use 12
Test the version of node, run
node --version, this should return a version number, at time of writing this was
yarnas our package manager.
npm install --global yarn
(Optional) Install Angular CLI globally. This step is recommended for ease of use, but not strictly necessary. If you omit this step, all Angular CLI commands can be achieved by invoking the local version by prefixing all commands with
ng servewould become
npx ng serve. To install, copy and past the following into your terminal and press enter:
npm install -g @email@example.com
After this has finished, running
ng versionshould provide the following output:
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| / △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | | / ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | | /_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___| |___/ Angular CLI: 11.2.13 Node: 12.22.3 OS: linux x64 Angular: ... Ivy Workspace: Package Version ------------------------------------------------------ @angular-devkit/architect 0.1102.13 (cli-only) @angular-devkit/core 11.2.13 (cli-only) @angular-devkit/schematics 11.2.13 (cli-only) @schematics/angular 11.2.13 (cli-only) @schematics/update 0.1102.13 (cli-only)
SpringBot is primarily built around using the PostgreSQL database, although it can use others. In this guide, we will only walk through the setup of a PostgreSQL database.
To install, copy the following into your terminal and press enter:
yes | sudo apt-get install postgresql postgresql-client-common
To create a role, copy and paste the following into your terminal and press enter:
sudo su postgres -c "psql -c \"CREATE ROLE codebots SUPERUSER LOGIN PASSWORD 'bots' \"" ;
Create a database and assign our role to it. Copy and paste the following into your terminal and press enter:
sudo su postgres -c "psql -c \"CREATE DATABASE "codebots" WITH OWNER "codebots" ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8' TEMPLATE template0;\"";
Gradle 7.1 by copying and pasting the following command:
sdk install gradle 7.1
When this is complete you should see:
Done installing! Setting gradle 7.1 as default.
This completes the server setup required to run your SpringBot application! You can now SpringBot Development Environment: Source Code to start editing your SpringBot application, then Running SpringBot on your SpringBot server!
Complete the SpringBot Development Environment: Source Code lesson to setup your source code in your development environment.