系统相关
首页 > 系统相关> > centos7 安装exceptionless

centos7 安装exceptionless

作者:互联网

服务器安装.NET 5.0环境
Node.js 环境


#将项目Exceptionless.Web发布,并修改appsettings.Production.yml

##################################################
Elasticsearch: server=http://192.168.1.101:9200
Cache: provider=redis;server="192.168.1.100:6379,defaultDatabase=1,password=bA840fc02d524045429941"
Storage:  provider=folder;path=/data/exceptionless/storage
##################################################


#拷贝发布后的文件到服务器:/application/Exceptionless.Web
#提前启动redis和es

cd /application/Exceptionless.Web
dotnet Exceptionless.Web.dll --urls="http://*:5000"

#将项目Exceptionless.Job发布,并修改appsettings.Production.yml 和 appsettings.yml

#############appsettings.Production.yml############
Elasticsearch: server=http://192.168.1.101:9200
Cache: provider=redis;server="192.168.1.100:6379,defaultDatabase=1,password=bA840fc02d524045429941"
Storage:  provider=folder;path=/data/exceptionless/storage
##################################################
#############appsettings.yml############
DisableIndexConfiguration: true #不能开启哦,开始会导致日志挂掉
##################################################

然后手动创建索引:(否则会有一些字段标为text 类型且要做聚合就会报错)
##################################################
PUT /prod-events-2020.12.05
{
   "mappings": {
        "properties": {
            "stack_id": {
                "index": true,
                "type": "keyword"
            },
            "project_id": {
                "index": true,
                "type": "keyword"
            },
            "organization_id": {
                "index": true,
                "type": "keyword"
            }
          }    
        }
}

##################################################

#拷贝发布后的文件到服务器:/application/Exceptionless.Job

cd /application/Exceptionless.Job
dotnet Exceptionless.Job.dll #启动时不要传参,否则Job不会启动,所以我直接修改代码来修改启动端口
#######################Program.cs###########################
var builder = Host.CreateDefaultBuilder()
    .UseEnvironment(environment)
    .UseSerilog()
    .ConfigureWebHostDefaults(webBuilder => {
        webBuilder
            .UseUrls("http://*:5003") #这里哦
            .UseConfiguration(config)
#################################################
#允许防火墙端口
firewall-cmd --zone=public --add-port=5000/tcp --permanent
firewall-cmd --zone=public --add-port=5003/tcp --permanent
firewall-cmd --reload

firewall-cmd --zone=public --add-port=35729/tcp --permanent
firewall-cmd --reload

浏览器输入:
http://192.168.1.123:5000


#将项目:Exceptionless.UI-3.0.11 打包发布文件
#修改配置文件app.config.js

####################################
https://localhost:5001 改成:http://192.168.1.123:5000
####################################

#修改index.html

####################################
http://localhost:35729/livereload.js 改成:http://192.168.1.123:35729/livereload.js
####################################

#d:.....\Exceptionless.UI-3.0.11 压缩Exceptionless.UI-3.0.11.zip拷贝服务器目录下的文件到:/application

cd /application
yum install -y unzip zip
unzip Exceptionless.UI-3.0.11.zip

cnpm install -g grunt-cli
grunt -version

cd /application/Exceptionless.UI-3.0.11/src
cnpm install
npx bower install --allow-root
yum -y install git
npx bower install livereload-js --allow-root
sudo npx grunt serve #使用源码运行

grunt build #构建打包
cd /application/Exceptionless.UI-3.0.11/src/dist
npx grunt serve #使用发布后的文件运行
#允许防火墙端口
firewall-cmd --zone=public --add-port=5100/tcp --permanent
firewall-cmd --reload

浏览器输入: http://192.168.1.123:5100
注册用户:
名称:admin  
邮箱:admin@qq.com 
密码:admin123

运行效果:

标签:exceptionless,http,Exceptionless,--,192.168,centos7,application,安装,firewall
来源: https://blog.csdn.net/xiaoxionglove/article/details/110685276