Installing YetaWF for ASP.NET Core on Linux
.NET Core SDK
YetaWF uses ASP.NET Core 3.1.
The .NET Core SDK is required to build YetaWF.
It can be downloaded and installed from https://dotnet.microsoft.com/download/linux-package-manager/ubuntu18-04/sdk-current.
Visual Studio Code
To make changes to YetaWF, a code editor like Visual Studio Code is required. It can be downloaded and installed from https://code.visualstudio.com/download.
In order to clone the Git repository you'll need the Git tools. If these are not present on your development system you can install them from https://git-scm.com/book/en/v2/Getting-Started-Installing-Git.
Nodejs, which includes npm, can be downloaded and installed from https://nodejs.org/en/download/package-manager/.
YetaWF was tested with nodejs 12.14.1, gulp >4.
Gulp can be installed from the command line:
sudo npm install -g gulp
It also requires the latest version of gulp-cli.
sudo npm install -g gulp-cli
Bower is used for the Kendo UI Core package. Bower can be installed from the command line:
npm install -g bower
Clone The YetaWF Depot
Open a Windows Command Prompt and create an appropriate folder on your development system. Then make the new folder the current directory:
Clone the YetaWF Solution2 repository (make sure to include the trailing period in the clone statement to indicate the current folder) and retrieve all the required submodules:
git clone --recursive https://github.com/YetaWF/YetaWF-Solution2 .
Once completed, run the following command which activates the correct project files for use with ASP.NET Core.
This step is required because all the module and skin packages share the same source code between ASP.NET Core and ASP.NET 4 but the project files (*.csproj) are not compatible.
The above executes the following statements so you don't have to enter them manually. Depending on your Linux flavor, you may need to change this a bit.
# Change ownership of all files/folder
sudo chown $USER -R .
# get libgdiplus for webp image support
sudo apt-get update
sudo apt-get install -y libgdiplus libc6-dev
# Build and run ProjectSettings tool to set MVC6 project files and all symlinks
cp PublicTools/ProjectSettings/ProjectSettings.csproj_MVC6 PublicTools/ProjectSettings/ProjectSettings.csproj
dotnet build PublicTools/ProjectSettings
dotnet run -p PublicTools/ProjectSettings SetMVC6
dotnet run -p PublicTools/ProjectSettings SymLinks
# Build the website
npm rebuild cwebp-bin
sudo bower install --allow-root
Do not run the web project until after deciding whether to use files or a SQL DB below.
Files Or SQL DB
The default installation can run as-is and will create data files. This is intended for use with small sites (few pages or users) and for initial testing.
If you want to use files for data storage, you're ready to run the Website project. This will start your new website. Otherwise, for large scale use, it is recommended to use a SQL database to store all site data.
In order to use a SQL database, the connection string has to be specified in the AppSettings.json file.
The SQL DB is defined in AppSettings.json (located in folder ./Website/Data).
First, in the "Default" section, change the IOMode setting to "SQL".
Then add the connection string, by removing "notused_" (part of the SQLDbo and SQLConnect keys) and provide the connection string ("Data Source= ....").
. . .
"notused_SQLConnect": "Data Source=....;Initial Catalog=....;User ID=username;Password=password",
. . .
AppSettings.json shown with connection string ("Data Source=") which you would provide.
. . .
"IOMode": "SQL", <<<<<< CHANGED
"SQLDbo": "dbo", <<<<<< CHANGED
"SQLConnect": "Data Source=yoursource;Initial Catalog=yourcatalog;User ID=yourusername;Password=yourpassword", <<<<<< CHANGED
. . .
The DB itself has to be created in SQL (usually with SQL Server Management Studio). Once the DB has been created, the site can be rebuilt and started.
All tables will be created automatically during site startup.
Running The Web Project
For first time startup of the site, make sure to build a Debug build (but don't run the debugger when starting the site).
Once all of the above steps have been completed, the Website project can be started.
Once started, you can view the site in your browser:
As the site starts up, it will guide you through the initial installation.
Once the site has been created, shut down the website (Cltr-C to to shut it down), and restart it:
Your site is now up and running and you can view it again in your browser:
YetaWF can also be containerized as shown in YetaWF On Docker.