1.下载并安装dotnet-sdk-2.1
官网:https://dotnet.microsoft.com/download/dotnet-core
安装依赖包(看不到验证码)
yum -y inistall icu libunwind libgdiplus-devel libgdiplus
yum -y install gcc gcc-c++ bison pkgconfig glib2-devel gettext make libpng-devel libjpeg-devel libtiff-devel libexif-devel giflib-devel libX11-devel freetype-devel fontconfig-devel cairo-devel
操作:
1.下载软件包(跳过)
2.安装环境
yum -y install icu
3.解压软件包并做软连接
tar -xf /root/dotnet-sdk-2.1.101-linux-x64.tar.gz -C /usr/share/dotnet/
ln -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet
4.查看是否安装成功
dotnet --info
报错:
Failed to load hi=, error: libunwind.so.8: cannot open shared object file: No such file or directory
Failed to bind to CoreCLR at ‘/usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.6/libcoreclr.so’
解决:
yum -y install libunwind
重新再试 dotnet --info
.NET Command Line Tools (2.1.101)
Product Information:
Version: 2.1.101
Commit SHA-1 hash: 6c22303bf0
Runtime Environment:
OS Name: centos
OS Version: 7
OS Platform: Linux
RID: centos.7-x64
Base Path: /usr/share/dotnet/sdk/2.1.101/
Microsoft .NET Core Shared Framework Host
Version : 2.0.6
Build : 74b1c703813c8910df5b96f304b0f2b78cdf194d
5.确认.Net Core安装成功后,将SSO文件上传计划部署目录
mkdir /usr/local/SSO
SSO目录中,有appsettings.json及hosting.json两需要配置的文件。
appsettings.json中,主要配置如下内容:
数据库地址:
“UserSystemEntities”: “server=192.168.1.3;uid=sa;pwd=SccinData;database=DY_UserSystem_in;”,
“UserSystemEntities_out”: “server=192.168.1.3;uid=sa;pwd=SccinData;database=DY_UserSystem;”
默认地址:
“UserSystemID”: “ff621975-cbba-4f54-83c0-5dd4bf225c63”,
“UserRegisterURL”: “http://192.168.0.218:8088/UserLogin/UserRegister/Index”,
“DefaultReturnURL”: “http://192.168.0.218:8088/SSOBase/Index”,
“UserSystemReturnURL”: “http://192.168.0.218:8088/SSOBase/Index”//用户体系回调地址hosting.json文件中,主要配置如下内容:
SSO服务地址:
“server.urls”: http://192.168.0.43:6000
6.启动SSO
一般启动命令:
dotnet Sccin.Auth.dll
这时,表示该服务启动成功了,但是这样有一个弊端,就是发布之后不能关闭Xshell,如果关闭则默认程序会推出,所以,我们可以使用下面的命令直接将其设置为在后台运行
命令如下:nohup dotnet Sccin.Auth.dll &