Your location:Tech News>News>Script>ZKEACMS detailed process running on CentOS

Latest News

ZKEACMS detailed process running on CentOS

Author:fsadmin

Views:

  ZKEACMS Core is based on .net core development, cross-platform runs on windows, linux, mac, then we look at how to run on CentOS ZKEACMS.

  installation .Net Core runtime

  Run the following command to install .Net Core Runtime

  sudo yum install libunwind libicu

  curl -sSL -o dotnet.tar.gz https: // go.microsoft.com / fwlink /?linkid = 843420

  sudo mkdir -p / opt / dotnet && sudo tar zxf dotnet.tar.gz -C / opt / dotnet

  sudo ln -s / opt / dotnet / dotnet / usr / local / bin

  Install Nginx

  sudo yum install epel-release

  sudo yum install nginx

  sudo systemctl enable nginx

  Nginx configuration modification

  Modify Nginx configuration and let it reverse proxy to localhost: 5000, modify the global configuration file / etc / nginx / nginx.conf, modify location below the junction of

  location / {

  proxy_pass http: // localhost: 5000;

  proxy_http_version 1.1;

  proxy_set_header Upgrade $ http_upgrade;

  proxy_set_header Connection keep-alive;

  proxy_set_header Host $ host;

  proxy_cache_bypass $ http_upgrade;

  }

  Start Nginx

  sudo systemctl start nginx

  Here, our environment will mix well, then, we publish ZKEACMS

  Published ZKEACMS.Core

  Published ZKEACMS.Core is relatively simple, double-click Publish.cmd can

  

  SQLite database

  For simplicity''s sake since, as used herein SQLite database, generates a data named SQLite Database.sqlite.In publishing a good program folder, create the App_Data folder and Database.sqlite placed under App_Data directory.On how to generate SQLite data into the group may ask, or on their own Baidu / Google.

  Modify the connection string

  Open appsettings.JSON, added SQLite database connection string, the following results

  {

  "ConnectionStrings": {

  "DefaultConnection": "",

  "Sqlite": "Data Source = App_Data / Database.sqlite ",

  "MySql": ""

  },

  "ApplicationInsights": {

  "InstrumentationKey": ""

  },

  "Logging": {

  "IncludeScopes": false,

  "LogLevel": {

  "Default": "Debug",

  "System": "Information",

  "Microsoft": "Information"

  }

  },

  "Culture": "zh-CN"

  }

  Package upload server

  We will post good packaged as cms.zip and upload it to the / root directory.And extract to / root / cms directory, use the following command to extract

  unzip cms.zip -d cms

  

  run

  Navigate to the directory, then run the command using dotnet

  cd / root / cms

  dotnet ZKEACMS.WebHost.dll

  After the successful operation, you can use IP or domain name server visited :)

  After exiting the SSH remote connection client, I found not visit because dotnet dropped out.

  Run as a service

  Create a service running in the background so that dotnet.Installation nano editor

  yum install nano

  Create a service

  sudo nano / etc / systemd / system / zkeacms.service

  Enter the following save

  [Unit]

  Description = ZKEACMS

  [Service]

  WorkingDirectory = / root / cms

  ExecStart = / usr / local / bin / dotnet / root / cms / ZKEACMS.WebHost.dll

  Restart = always

  RestartSec = 10

  SyslogIdentifier = zkeacms

  User = root

  Environment = ASPNETCORE_ENVIRONMENT = Production

  [Install]

  WantedBy = multi-user.target

  Start Service

  systemctl start zkeacms.service

  This can be reassuring to exit the SSH remote connections.

  That''s all for this article, I want to be helpful to learn, I hope you will support script Home.

  You may also be interested in the article: ZKEACMS for .Net Core depth analysis asp.The net cms asp core code articles.The principle cms asp net articles.net of papers bound data cms asp.Confucius data net small modifications cms was added

Recommend article

Relate article