(OK) 运行cBPM in Fedora23
来源:互联网 发布:pandora软件 编辑:程序博客网 时间:2024/04/30 23:40
###--- 第1步:在Fedora23上安装Codelocks 16.01的过程。
参考:http://blog.chinaunix.net/uid-14735472-id-5671522.html
###--- 第2步:install xerces-c
dnf install xerces*
cp /lib64/libxerces-c-3.1.so /opt/cBPM/criteria-lin/lib/libxerces-c-3.1.so
------------上面两条命令即可,下面是源代码安装,仅供参考:xerces-c-3.1.2.tar.gz
[root@localhost xerces-c-3.1.2]# pwd
/opt/cBPM/xerces-c-3.1.2
[root@localhost xerces-c-3.1.2]# ./configure --prefix=/opt/cBPM/xerces-c
[root@localhost xerces-c-3.1.2]# make -j
[root@localhost xerces-c-3.1.2]# ll src/.libs/libxerces-c-3.1.so
-rwxr-xr-x. 1 root root 25155928 9月 24 09:11 src/.libs/libxerces-c-3.1.so
[root@localhost xerces-c-3.1.2]# cp src/.libs/libxerces-c-3.1.so /opt/cBPM/criteria-lin/lib/
------------------------------------------------------------------------
###--- 第3步: 设置codeblocks 参数
参考:http://blog.chinaunix.net/uid-14735472-id-5204752.html
###--- 第4步:install fastcgi
wget http://www.fastcgi.com/dist/fcgi.tar.gz
tar -zxvf fcgi.tar.gz
cd fcgi-2.4.1-SNAP-0311112127
vi include/fcgio.h
在include/fcgio.h文件中加上 #include <cstdio>,然后再编译安装就通过了。
make -j5
make install
###--- 第5步:install mariadb
dnf install mysql mysql-devel
###--- 第6步:install nginx
dnf install nginx
root document dir: /usr/share/nginx/html
###--- 第7步:install spawn-fcgi
dnf install spawn-fcgi
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
运行cBPM in Fedora23 ————运行cBPM in CentOS7(http://blog.chinaunix.net/uid-14735472-id-5587052.html)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
###--- 第8步:编译cBPM
-----------------------------------
在codeblocks中编译cBPM成功后 (参考:http://blog.chinaunix.net/uid-14735472-id-5204752.html),
gedit /etc/ld.so.conf
最后一行添加:
/opt/cBPM/criteria-lin/lib
保存退出,然后运行 ldconfig 即可。
[root@localhost lib]# pwd
/opt/cBPM/criteria-lin/lib
[root@localhost lib]# ls
executer libLibraries.so libWorkflowEngineD.so libxerces-c-3.1.so
[root@localhost lib]# cp executer /usr/share/nginx/html
cp /opt/cBPM/criteria-lin/bin/Criteria/Debug/Tools.Executor/executer /usr/share/nginx/html
cp /opt/cBPM/criteria-lin/bin/Criteria/Debug/Tools.Executor/executer /opt/cBPM/criteria-lin/lib
-----------------------------------
###--- 第9步:启动nginx
setsebool -P mysql_connect_http 1
setsebool -P named_tcp_bind_http_port 1
setsebool -P httpd_can_network_connect 1
grep nginx /var/log/audit/audit.log | audit2allow -M mypol
semodule -i mypol.pp
systemctl start nginx.service
systemctl stop nginx.service
systemctl restart nginx.service
cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bac
gedit /etc/nginx/nginx.conf 内容如下:
点击(此处)折叠或打开
- #user nobody;
- worker_processes 1;
- #error_log logs/error.log;
- #error_log logs/error.log notice;
- #error_log logs/error.log info;
- #pid logs/nginx.pid;
- events {
- worker_connections 1024;
- }
- http {
- #fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300;
- include mime.types;
- default_type application/octet-stream;
- #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
- # '$status $body_bytes_sent "$http_referer" '
- # '"$http_user_agent" "$http_x_forwarded_for"';
- #access_log logs/access.log main;
- sendfile on;
- #tcp_nopush on;
- #keepalive_timeout 0;
- keepalive_timeout 65;
- #gzip on;
- server {
- listen 9090;
- server_name localhost;
- #charset koi8-r;
- #access_log logs/host.access.log main;
-
- location / {
- if ($request_method = 'OPTIONS') {
- add_header 'Access-Control-Allow-Origin' '*';
- #
- # Om nom nom cookies
- #
- #add_header 'Access-Control-Allow-Credentials' 'true';
- add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
- #
- # Custom headers and headers various browsers *should* be OK with but aren't
- #
- add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
- #
- # Tell client that this pre-flight info is valid for 20 days
- #
- add_header 'Access-Control-Max-Age' 1728000;
- add_header 'Content-Type' 'text/plain charset=UTF-8';
- add_header 'Content-Length' 0;
- return 204;
- }
- if ($request_method = 'POST') {
- add_header 'Access-Control-Allow-Origin' '*';
- #add_header 'Access-Control-Allow-Credentials' 'true';
- add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
- add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
- }
- if ($request_method = 'GET') {
- add_header 'Access-Control-Allow-Origin' '*';
- #add_header 'Access-Control-Allow-Credentials' 'true';
- add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
- add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
- }
- }
- location /criteria {
- fastcgi_pass 127.0.0.1:8000;
- root /usr/share/nginx/html;
- index index.html index.htm;
-
- fastcgi_param GATEWAY_INTERFACE CGI/1.1;
- fastcgi_param SERVER_SOFTWARE nginx;
- fastcgi_param QUERY_STRING $query_string;
- fastcgi_param REQUEST_METHOD $request_method;
- fastcgi_param CONTENT_TYPE $content_type;
- fastcgi_param CONTENT_LENGTH $content_length;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param SCRIPT_NAME $fastcgi_script_name;
- fastcgi_param REQUEST_URI $request_uri;
- fastcgi_param DOCUMENT_URI $document_uri;
- fastcgi_param DOCUMENT_ROOT $document_root;
- fastcgi_param SERVER_PROTOCOL $server_protocol;
- fastcgi_param REMOTE_ADDR $remote_addr;
- fastcgi_param REMOTE_PORT $remote_port;
- fastcgi_param SERVER_NAME $server_name;
- }
- #error_page 404 /404.html;
- # redirect server error pages to the static page /50x.html
- #
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
- # proxy the PHP scripts to Apache listening on 127.0.0.1:80
- #
- #location ~ \.php$ {
- # proxy_pass http://127.0.0.1;
- #}
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- #
- #location ~ \.php$ {
- # root html;
- # fastcgi_pass 127.0.0.1:9000;
- # fastcgi_index index.php;
- # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
- # include fastcgi_params;
- #}
- # deny access to .htaccess files, if Apache's document root
- # concurs with nginx's one
- #
- #location ~ /\.ht {
- # deny all;
- #}
- }
- # another virtual host using mix of IP-, name-, and port-based configuration
- #
- #server {
- # listen 8000;
- # listen somename:8080;
- # server_name somename alias another.alias;
- # location / {
- # root html;
- # index index.html index.htm;
- # }
- #}
- # HTTPS server
- #
- #server {
- # listen 443 ssl;
- # server_name localhost;
- # ssl_certificate cert.pem;
- # ssl_certificate_key cert.key;
- # ssl_session_cache shared:SSL:1m;
- # ssl_session_timeout 5m;
- # ssl_ciphers HIGH:!aNULL:!MD5;
- # ssl_prefer_server_ciphers on;
- # location / {
- # root html;
- # index index.html index.htm;
- # }
- #}
- }
systemctl start nginx.service
systemctl stop nginx.service
systemctl restart nginx.service
systemctl stop httpd.service
------------
systemctl start mariadb.service
# pwd
/opt/cBPM/criteria-lin/database/scripts/mysql
# mysql -uroot -p criteria < criteria_mysql.sql
mysqladmin -u root -p password '123456'
------------
[root@localhost recieve form Maurizio Farina]# pwd
/opt/cBPM/recieve form Maurizio Farina
[root@localhost recieve form Maurizio Farina]# cp -r html /usr/share/nginx/html
[root@localhost html]# chmod 755 -R /usr/share/nginx/html
------------
++++++++++++++++++++++++++++++++++++++++
问题:Criteria session Initialization [KO].Error[Unknow Error]. Exit.
解决:cp /opt/cBPM/criteria-lin/bin/Criteria/Debug/Tools.Executor/database/ /usr/share/nginx/html -r
问题:black bar in browser
解决:(注意 大小写)
cd /usr/share/nginx/html
mv Scripts/JavaScript/Vendor/AngularFormBuilder Scripts/JavaScript/Vendor/AngularFormbuilder
问题:the right area is blank in home
解决:
+++++++++++++++++++++++++++++++++++++
/opt/cBPM/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/FileSystemDataBase.cpp
CM_TRACE_CODEPATH("TemplatesFolder [" << fsConnection.getProcessTemplatesFolder().c_str() << "]") //ztg add
//bOS::IO::FileSystem::ls(fsConnection.getProcessTemplatesFolder().c_str(), files,".xml");
bOS::IO::FileSystem::ls("/usr/share/nginx/html/database/processTemplate/", files,".xml");
+++++++++++++++++++++++++++++++++++++
/opt/cBPM/criteria-lin/src/Criteria/Criteria.Libraries.bOS/IO/bOSFileSystem.cpp
void FileSystem::ls(const String& sDir, FilesList& files, const char* acExtension)
+++++++++++++++++++++++++++++++++++++
MariaDB [criteria]> delete from SF_WorkflowProcesses;
MariaDB [criteria]> delete from SF_Attributes;
MariaDB [criteria]> delete from SF_Activities;
MariaDB [criteria]> select * from SF_WorkflowProcesses;
+++++++++++++++++++++++++++++++++++++注意:先只放这两个xml文件
[root@localhost html]# ls database/processTemplate/
HeatingRepair.xml TestNotePad.xml
+++++++++++++++++++++++++++++++++++++
iptables -F
export WF_HOME=/usr/share/nginx/html; export CRITERIA_HOME=/usr/share/nginx/html
[root@localhost html]# pwd
/usr/share/nginx/html
systemctl start nginx.service
systemctl stop nginx.service
systemctl restart nginx.service
spawn-fcgi -p 8000 -n executer
# spawn-fcgi -a 127.0.0.1 -p 8000 -n /usr/share/nginx/html/executer
--------if wrong, use the following commands
tail -f /var/log/nginx/error.log
less /var/log/nginx/access.log
--------
less /var/log/nginx/error.log
错误如下(表面错误:the right area is blank in home):
*15 connect() to 127.0.0.1:8000 failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /criteria/processes/instances HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "localhost:9090", referrer: "http://localhost:9090/"
解决方法:
setsebool -P httpd_can_network_connect 1
--------
至此,OK
++++++++++++++++++++++++下面不用看
http://serverfault.com/questions/236795/restart-spawn-fcgi
how can i restart spawn-fcgi on nginx server?
Run it with option -P to store the PID in some temp file. For example:
/usr/local/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -P /var/run/fcgi.pid
Then you can kill it by this pid:
kill -9 `cat /var/run/fcgi.pid`
How was the process for spawn-fcgi started, was it by a command line (manually) or using a rc-script. In either case you can kill the process by first finding the PID
Use the command ps aux | grep spawn-fcgi to locate the process and the command kill -9 PID
I recommend slashdot's recommendation of using the rc-script to start and end your spawn-fcgi process.
Update: This answer randomly failed on me (I'm not sure why) but I'm leaving this here because it might help someone.
killall -9 -w php-cgi
The "-w" waits. Because if you try to (re)start spawn-fcgi too soon (without a delay) spawn-fcgi always gave me error, something like "...already in use." (I don't remember the exact error, sorry.) However, "-w" doesn't work 100% of the time if you plan to put this in cron. After months of random php failures I decided to switch to php-fpm, which has its own unique problems--proceed with caution.
++++++++++++++++++++++++
/opt/cBPM/criteria-lin/src/Criteria/Criteria.WorkflowEngine/DataBase/FileSystemDataBase.cpp
CM_TRACE_CODEPATH("TemplatesFolder [" << fsConnection.getProcessTemplatesFolder().c_str() << "]") //ztg add
//bOS::IO::FileSystem::ls(fsConnection.getProcessTemplatesFolder().c_str(), files,".xml");
bOS::IO::FileSystem::ls("/usr/share/nginx/html/database/processTemplate/", files,".xml");
++++++++++++++++++++++++
/opt/cBPM/criteria-lin/src/Criteria/Criteria.WorkflowEngine/WAPI/WAPI.cpp
String sDirectory = "/usr/share/nginx/html";
String sWfHome = "/usr/share/nginx/html";
0
上一篇:install skype in Fedora23
下一篇:陈老师新年寄语
相关热门文章
- test123
- 编写安全代码——小心有符号数...
- 使用openssl api进行加密解密...
- 一段自己打印自己的c程序...
- sql relay的c++接口
- linux dhcp peizhi roc
- 关于Unix文件的软链接
- 求教这个命令什么意思,我是新...
- sed -e "/grep/d" 是什么意思...
- 谁能够帮我解决LINUX 2.6 10...
给主人留下些什么吧!~~
评论热议
0 0
- (OK) 运行cBPM in Fedora23
- (OK) 运行cBPM in Fedora23
- (OK) 运行cBPM in Fedora23
- (OK) 运行cBPM—Fedora23
- (OK) 运行cBPM—Fedora23
- (OK) 运行cBPM—Fedora23—ALL
- (OK) 运行cBPM—Fedora23—SIMPLE
- (OK) 运行cBPM—CentOS7
- (OK) 运行cBPM—CentOS7
- (OK) install vmware12 in fedora23
- (OK) cBPM in Docker ( Fedora 26)
- (OK) codeblocks-16.01 in docker container [ztg/cbpm]
- (OK)(OK)(All in CLI) Fedora23 + Docker(busybox) + NS3 + MANETs - testing
- (OK)(OK) cross compile quagga-0.99.21mr2.2 for android-x86 in Fedora23
- (OK) 编译cBPM-CentOS7-codeblocks
- (OK) 编译cBPM-CentOS7-codeblocks
- (OK) fedora23——add “opening terminal” in the menu of right click
- install skype in Fedora23
- POJ 3254 状态压缩DP
- iOS去除数组重复元素
- Linux知识学习
- install skype in Fedora23
- hbase-default.xml file seems to be for an older version of HBase ,this version is 1.2.0
- (OK) 运行cBPM in Fedora23
- Android Use System Mail App to Send Mail
- 用动态规划解决TSP问题
- Docker命令参考
- PySpider HTTP 599: SSL certificate problem错误的解决方法
- 双肾坏死“跪守”课堂教师:真要倒也一定倒在讲台上
- 政协委员:最大愿望是让小学生步行上学
- 《数据结构》 栈代码操作集合
- AI - GNU项目发布Gneural Network神经网络软件包
原创粉丝点击
热门IT博客
热门问题
老师的惩罚
人脸识别
我在镇武司摸鱼那些年
重生之率土为王
我在大康的咸鱼生活
盘龙之生命进化
天生仙种
凡人之先天五行
春回大明朝
姑娘不必设防,我是瞎子
纤夫
纤夫读音
纤夫的读音
纤夫拼音
纤夫烤鱼
纤夫的爱歌词
伏尔加河纤夫
纤夫的爱原唱
纤夫的爱简谱
纤夫的爱歌曲
纤夫的爱尹相杰于文华
纤夫的爱原唱原版
歌曲纤夫的爱原唱
伏尔加河纤夫曲
伏尔加河上的纤夫
伏尔加河上的纤夫赏析
伏尔加河上的纤夫歌曲
伏尔加河上的纤夫课文
诺纤妍秀
纤妍文胸
娇韵诗纤妍紧致慕斯面膜
纤妍内衣旗舰店
纤妍塑身衣
兰蔻紧致纤妍眼霜
诺纤妍秀减肥有效果吗
伊兰纤姿
纤瑾姿减肥怎么样
纤姿秀
纤姿婷
纤姿蒂价格
纤姿服装
纤姿美甲
纤姿睡睡瘦有用吗
纤姿蒂丰胸
纤姿娇减肥效果咋样
纤姿牌纤体梅
纤姿秀美体霜
纤姿物语左旋肉碱
素妍纤姿
纤婷纯中药减肥酵素
纤秀婷减肥有效吗