irma

2025-12-07 0 142

irma

irma是一个有效的Web服务框架,源自业务项目,是由于诸如Enterprise要求采用.NET,SaaS&Cloud自动部署以及Linux运行环境等全面irma而创建的。它使用Mono在Linux上实现C#代码的解析和执行,并利用FastCGI和NGINX来处理HTTP交互。 irma有两个部分: irma call ,用C编写的多线程调度引擎,以及用C#编写的开发框架irma kitirma call负责启动和安排在irma kit框架上开发的各种Web应用程序。 irma的设计概念是:简单有效的调度,按需集成和扩展,这确实使irma看起来更像是工具包,而不是框架(实际上,它是工具包)。无论如何,我希望这对您有用:-)

建筑图

汇编和安装

首先对其进行配置:

$ make config

在这里,我假设您已经在$HOME/local/ (您可以根据实际情况输入正确的路径)安装了相关库,因此配置过程大致如下:

irma]
log file generated hourly support ? [n]

The irma is now hopefully configured for your setup.
Check the config.in & config.h files and do \’make\’ to build it.\”>

 # #######################################
# mono config:
# #######################################
mono installed location ? [/home/fenkey/local/mono]

# #######################################
# ssl config:
# #######################################
ssl installed location ? [/home/fenkey/local/openssl]

# #######################################
# fcgi config:
# #######################################
fcgi installed location ? [/home/fenkey/local/fcgi]

# #######################################
# curl config:
# #######################################
curl installed location ? [/home/fenkey/local/curl]
c_ares support ? [y]
c_ares installed location ? [/home/fenkey/local/c-ares]

# #######################################
# memcached config:
# #######################################
memcached support ? [y]
memcached installed location ? [/home/fenkey/local/libmemcached]

# #######################################
# redis config:
# #######################################
redis support ? [y]
hiredis installed location ? [/home/fenkey/local/hiredis]

# #######################################
# smtp config:
# #######################################
smtp support ? [y]

# #######################################
# log config:
# #######################################
log prefix (string with valid characters or numbers, of which the length is limited to 20): [ irma ]
log file generated hourly support ? [n]

The irma is now hopefully configured for your setup.
Check the config.in & config.h files and do \' make \' to build it.

上述依赖项的源链接可能会提及以下:

  • mono :https://github.com/mono/mono.git
  • openssl :https://github.com/openssl/openssl.git
  • fcgi :http://fastcgi.com/或https://gi*thub**.com/jorben/fcgi
  • c-ares :https://github.com/c-ares/c-ares
  • curl :https://github.com/curl/curl.git
  • memcached :https://libmemcached.org/
  • hiredis :https://github.com/redis/hiredis.git

汇编LibCurl时,请注意添加SSL支持( --with-ssl )。由于libcurl不支持DNS异步分辨率,因此您必须利用signal的方式,或者是第三方c-ares套餐,这是Libcurl的官方建议。我们遵循使用c-ares建议:

$ ./configure --prefix= $HOME /local/c-ares --enable-static
$ make
$ make install

编译并安装libcurl:

$ ./buildconf
$ export PKG_CONFIG_PATH= $HOME /local/openssl/lib/pkgconfig
$ ./configure --prefix= $HOME /local/curl --disable-ldap --disable-ldaps --with-ssl --enable-ares= $HOME /local/c-ares --enable-static
$ make
$ make install

完成有关irma的配置后,生成了两个文件: config.inconfig.h 。现在让我们继续

$ make
$ make install

默认情况下,我们在静态上编译irma ,这意味着您可以以最少的方式应用和运行它。您可以通过直接修改Makefile来更改它。我们假设安装路径为$HOME/local/ irma ,并修改文件irma /Makefile

PREFIX = $( HOME ) /local/ irma

设置环境路径并重新加载:

irma/bin:$PATH\” >> ~/.bash_profile
$ . ~/.bash_profile\”>

$ echo \" export PATH= $HOME /local/ irma /bin: $PATH \" >> ~ /.bash_profile
$ . ~ /.bash_profile

执行它:

irmacall
___ ____ __ __ _ ____ _ _
|_ _| _ \\| \\/ | / \\ / ___|__ _| | |
| || |_) | |\\/| | / _ \\| | / _` | | |
| || _ <| | | |/ ___ \\ |__| (_| | | |
|___|_| \\_\\_| |_/_/ \\_\\____\\__,_|_|_|
+——————————————————————————————————————+
| Usage: irma call [-t <log-type>] [-x <thread-count>] [-m <module-invoke>] [-c <config-of-module>] [-k] [-v] [-h] |
| Options: |
| -t: Log lever of \’debug\’, \’event\’, \’warn\’, \’error\’ or \’fatal\’ |
| -x: Threads count of every process |
| -m: Module invoking. Normally, it\’s a .Net DLL |
| -c: Configuration file of module |
| -k: Mock request support |
| -v: Version of irma call |
| -h: Help information |
+——————————————————————————————————————+

$ irma call -v
irma call 0.8
Features: fetcher fuse c_ares memcached redis smtp logprefx(\’ irma \’)\”>

$ irma call
 ___ ____  __  __    _    ____      _ _
| _ _ |  _ \\|  \\/  |  / \\  / ___ | __ _ | | |
 | || | _) | | \\/ | | / _ \\| |   / _ ` | | |
 | ||  _ < | |  | | / ___ \\ | __ | (_ | | | |
| ___ | _ | \\_\\_ |  | _/_/   \\_\\_ ___ \\_ _,_ | _ | _ |
+------------------------------------------------------------------------------------------------------------------+
| Usage: irma call [-t < log-type > ] [-x < thread-count > ] [-m < module-invoke > ] [-c < config-of-module > ] [-k] [-v] [-h]  |
| Options:                                                                                                         |
|    -t: Log lever of \' debug \' , \' event \' , \' warn \' , \' error \' or \' fatal \'                                                 |
|    -x: Threads count of every process                                                                            |
|    -m: Module invoking. Normally, it \' s a .Net DLL                                                                |
|    -c: Configuration file of module                                                                              |
|    -k: Mock request support                                                                                      |
|    -v: Version of irma call                                                                                       |
|    -h: Help information                                                                                          |
+------------------------------------------------------------------------------------------------------------------+

$ irma call -v
irma call 0.8
Features: fetcher fuse c_ares memcached redis smtp logprefx( \' irma \' ) 

快速开始

创建并启动第一个名为Foo的项目:

irma-genapp Foo
Generated project: \’Foo\’. Check pls !

$ cd Foo
$ make

$ ./start.sh
spawn-fcgi: child spawned successfully: PID: 17701\”>

$ cd ~ /tmp
$ irma -genapp Foo
Generated project: \' Foo \' . Check pls !

$ cd Foo
$ make
...
$ ./start.sh
spawn-fcgi: child spawned successfully: PID: 17701

请问我提醒您必须在启动Foo之前安装命令spawn-fcgi

$ git clone https://*git*hub*.com/lighttpd/spawn-fcgi
$ cd spawn-fcgi
$ ./autogen.sh
$ ./configure --prefix= $HOME /local/spawn-fcgi
$ make
$ make install
$ echo \" export PATH= $HOME /local/spawn-fcgi/bin: $PATH \" >> ~ /.bash_profile
$ . ~ /.bash_profile

Foo以多进程/多线程的方式运行,并在Bin/Debug/log目录中写入debug日志。您可以在start.sh文件中更新这些:

process_count=1
thread_count=4
log_type= \" debug \"
...

如果Foo无法启动,则应确认是否正在运行Memcached Server(请参阅file conf/Foo.conf中的system.session.server.serversuser.mc的配置)。

irma_20200903.log
[14:46:15,554039|032126|7f4d19fa7700] Kit – Service init failed: Memcached client instance is null: Availability testing is failed
[14:46:15,554132|032126|7f4d19fa7700] Core – Raise exception while invoking application ! Check it pls\”>

$ ./start.sh
!!!!!!!!!!!!!
!!! FATAL !!! - Fail to launch project \' Foo.dll \' ! check log files pls
!!!!!!!!!!!!!

$ cat Bin/Debug/log/fatal/ irma _20200903.log
[14:46:15,554039 | 032126 | 7f4d19fa7700] Kit - Service init failed: Memcached client instance is null: Availability testing is failed
[14:46:15,554132 | 032126 | 7f4d19fa7700] Core - Raise exception while invoking application ! Check it pls

如果还有其他原因,请参阅常见问题解答。如果成功,将生成log文件:

irma_20200903.log
[15:01:38,147495|032299|7f017783e780] Core – irma call version(0.8)
[15:01:38,601612|032299|7f0173da6700] Kit – Service start
[15:01:38,688583|032299|7f0171e83700] Kit – Service start
[15:01:38,787017|032299|7f01710ff700] Kit – Service start
[15:01:38,875054|032299|7f017783e780] Core – Total (4) workers have been booted up successfully
[15:01:38,875149|032299|7f0153fff700] Kit – Service start\”>

$ cat Bin/Debug/log/event/ irma _20200903.log
[15:01:38,147495 | 032299 | 7f017783e780] Core - irma call version(0.8)
[15:01:38,601612 | 032299 | 7f0173da6700] Kit - Service start
[15:01:38,688583 | 032299 | 7f0171e83700] Kit - Service start
[15:01:38,787017 | 032299 | 7f01710ff700] Kit - Service start
[15:01:38,875054 | 032299 | 7f017783e780] Core - Total (4) workers have been booted up successfully
[15:01:38,875149 | 032299 | 7f0153fff700] Kit - Service start

注意:如果选择支持make config中的loghourly ,则上面的日志文件名称为irma _2020090315.log 。支持loghourly将导致每小时生成日志文件。

配置NGINX(请记住重新加载或重新启动它):

irma.sock;
include nginx_fastcgi.conf;
}
}\”>

server {
	listen 8020 ;
	server_name localhost ;
	
	...
	
	location ~ ^/Foo(/ | $) {
		fastcgi_pass unix:/home/fenkey/tmp/Foo/Bin/Debug/ irma .sock ;
		include nginx_fastcgi.conf ;
    }
}

nginx_fastcgi.conf文件描述了nginx和fastcgi之间请求参数的映射关系。例如:

fastcgi_param  SERVER_NAME      $server_name ;
fastcgi_param  SERVER_ADDR      $server_addr ;
fastcgi_param  SERVER_PORT      $server_port ;
fastcgi_param  SERVER_PROTOCOL  $server_protocol ;
fastcgi_param  REMOTE_ADDR      $remote_addr ;
fastcgi_param  REMOTE_PORT      $remote_port ;
fastcgi_param  DOCUMENT_ROOT    $document_root ;
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name ;
fastcgi_param  REQUEST_URI      $request_uri ;
fastcgi_param  QUERY_STRING     $query_string ;
fastcgi_param  REQUEST_METHOD   $request_method ;
fastcgi_param  CONTENT_TYPE     $content_type ;
fastcgi_param  CONTENT_LENGTH   $content_length ;

在浏览器中输入地址访问:

常问问题

有关irma的更多详细信息,请参阅:常见问题解答

贡献

欢迎您以各种方式加入我们,例如提交您的公关,文件或问题。

下载源码

通过命令行克隆项目:

git clone https://github.com/Fenkey/irma.git

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

申明:本文由第三方发布,内容仅代表作者观点,与本网站无关。对本文以及其中全部或者部分内容的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。本网发布或转载文章出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,也不代表本网对其真实性负责。

左子网 开发教程 irma https://www.zuozi.net/31803.html

sesimos
上一篇: sesimos
king admin
下一篇: king admin
常见问题
  • 1、自动:拍下后,点击(下载)链接即可下载;2、手动:拍下后,联系卖家发放即可或者联系官方找开发者发货。
查看详情
  • 1、源码默认交易周期:手动发货商品为1-3天,并且用户付款金额将会进入平台担保直到交易完成或者3-7天即可发放,如遇纠纷无限期延长收款金额直至纠纷解决或者退款!;
查看详情
  • 1、描述:源码描述(含标题)与实际源码不一致的(例:货不对板); 2、演示:有演示站时,与实际源码小于95%一致的(但描述中有”不保证完全一样、有变化的可能性”类似显著声明的除外); 3、发货:不发货可无理由退款; 4、安装:免费提供安装服务的源码但卖家不履行的; 5、收费:价格虚标,额外收取其他费用的(但描述中有显著声明或双方交易前有商定的除外); 6、其他:如质量方面的硬性常规问题BUG等。 注:经核实符合上述任一,均支持退款,但卖家予以积极解决问题则除外。
查看详情
  • 1、左子会对双方交易的过程及交易商品的快照进行永久存档,以确保交易的真实、有效、安全! 2、左子无法对如“永久包更新”、“永久技术支持”等类似交易之后的商家承诺做担保,请买家自行鉴别; 3、在源码同时有网站演示与图片演示,且站演与图演不一致时,默认按图演作为纠纷评判依据(特别声明或有商定除外); 4、在没有”无任何正当退款依据”的前提下,商品写有”一旦售出,概不支持退款”等类似的声明,视为无效声明; 5、在未拍下前,双方在QQ上所商定的交易内容,亦可成为纠纷评判依据(商定与描述冲突时,商定为准); 6、因聊天记录可作为纠纷评判依据,故双方联系时,只与对方在左子上所留的QQ、手机号沟通,以防对方不承认自我承诺。 7、虽然交易产生纠纷的几率很小,但一定要保留如聊天记录、手机短信等这样的重要信息,以防产生纠纷时便于左子介入快速处理。
查看详情

相关文章

猜你喜欢
发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务