{"id":437,"date":"2021-05-24T13:54:00","date_gmt":"2021-05-24T09:24:00","guid":{"rendered":"https:\/\/fakhry.ir\/?p=437"},"modified":"2021-05-24T14:04:17","modified_gmt":"2021-05-24T09:34:17","slug":"%d8%a2%d9%85%d9%88%d8%b2%d8%b4-%d9%86%d8%b5%d8%a8-ibsng-%d8%af%d8%b1-centos-6-7","status":"publish","type":"post","link":"https:\/\/fakhry.ir\/?p=437","title":{"rendered":"\u0622\u0645\u0648\u0632\u0634 \u0646\u0635\u0628 IBSng \u062f\u0631 centOS 6\/7"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"437\" class=\"elementor elementor-437\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-49100abd elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"49100abd\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-53e27cf4\" data-id=\"53e27cf4\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6981ebc9 elementor-widget elementor-widget-text-editor\" data-id=\"6981ebc9\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<p style=\"text-align: right;\">\u062f\u0631\u0648\u062f<br \/>\u0647\u0645\u0648\u0646 \u0637\u0648\u0631 \u06a9\u0647 \u0645\u06cc\u062f\u0648\u0646\u06cc\u062f Centos6 \u062f\u0631 \u062d\u0627\u0644 \u0628\u0627\u0632\u0646\u0634\u0633\u062a\u06af\u06cc \u0647\u0633\u062a\u0634 \u0648 \u0627\u0632 \u0637\u0631\u0641 \u062f\u06cc\u06af\u0647 \u0633\u0631\u0648\u06cc\u0633 \u0647\u0627\u06cc \u062c\u062f\u06cc\u062f \u0641\u0642\u0637 \u0631\u0648\u06cc \u0648\u0631\u0698\u0646 7 \u0627\u06cc\u0646 \u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644 \u0646\u0635\u0628 \u0645\u06cc\u0634\u0646<br \/>\u0627\u0632 \u0637\u0631\u0641 \u062f\u06cc\u06af\u0647 \u062e\u06cc\u0644\u06cc \u0647\u0627 \u0628\u0631\u0627\u06cc \u0646\u0635\u0628 IBSng \u062f\u0631 Centos7 \u0645\u0634\u06a9\u0644 \u062f\u0627\u0631\u0646 \u0686\u0648\u0646 \u0622\u0645\u0648\u0632\u0634 \u062f\u0631\u0633\u062a\u06cc \u0627\u0632\u0634 \u0646\u06cc\u0633\u062a<\/p>\n<p>\u062e\u0628 \u0628\u0631\u06cc\u0645 \u0633\u0631 \u0622\u0645\u0648\u0632\u0634<br \/>\u062f\u0631 \u0627\u0628\u062a\u062f\u0627 \u0628\u0627\u06cc\u062f \u06cc\u0647 \u0633\u0631\u06cc \u067e\u06a9\u06cc\u062c \u0647\u0627\u06cc \u0636\u0631\u0648\u0631\u06cc \u067e\u06cc\u0634 \u0646\u06cc\u0627\u0632 IBSng \u0631\u0627 \u0646\u0635\u0628 \u0646\u0645\u0627\u06cc\u06cc\u062f.<br \/>\u06a9\u062f:<br \/>yum install httpd php postgresql postgresql-server postgresql-python perl unzip wget nano -y<br \/>\u062d\u0627\u0644\u0627 \u0628\u0627\u06cc\u062f IBSng \u0631\u0627 \u062f\u0627\u0646\u0644\u0648\u062f \u0648 \u0627\u0632 \u062d\u0627\u0644\u062a \u0641\u0634\u0631\u062f\u0647 \u062e\u0627\u0631\u062c \u06a9\u0646\u06cc\u0645.<\/p>\n<div>\n<p>\u0628\u0631\u0627\u06cc \u062f\u0627\u0646\u0644\u0648\u062f IBSng \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u06a9\u0646\u06cc\u0645.<br \/>\u06a9\u062f:<br \/>wget\u00a0<a href=\"https:\/\/excellmedia.dl.sourceforge.net\/project\/ibsng\/IBSng-A1.24.tar.bz2\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/excellmedia.dl.sourceforge.n&#8230;-A1.24.tar.bz2<\/a><br \/>tar -xvjf IBSng-A1.24.tar.bz2 -C \/usr\/local<br \/>\u062f\u06cc\u062a\u0627\u0628\u06cc\u0633 \u0628\u0627\u06cc\u062f \u0641\u0639\u0627\u0644 \u06a9\u0646\u06cc\u0645<br \/>\u06a9\u062f:<br \/>service postgresql initdb<br \/>service postgresql start<br \/>\u0627\u06a9\u0646\u0648\u0646 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f.<br \/>\u06a9\u062f:<br \/>nano \/var\/lib\/pgsql\/data\/pg_hba.conf<br \/>\u0633\u067e\u0633 \u0639\u0628\u0627\u0631\u062a \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0631 \u0627\u0628\u062a\u062f\u0627 \u0641\u0627\u06cc\u0644 \u06a9\u067e\u06cc \u06a9\u0631\u062f\u0647 \u0648 \u0641\u0627\u06cc\u0644 \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u062f.<br \/>\u06a9\u062f:<br \/>local IBSng ibs trust<br \/>\u062d\u0627\u0644\u0627 \u0628\u0627\u06cc\u062f \u06cc\u0648\u0632\u0631 IBSng \u062f\u0631 \u062f\u06cc\u062a\u0627\u0628\u06cc\u0633 \u0633\u0627\u062e\u062a \u0633\u0647 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0628\u0647 \u062a\u0631\u062a\u06cc\u0628 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f:<br \/>\u06a9\u062f:<br \/>su &#8211; postgres<br \/>createdb IBSng<br \/>createuser ibs<br \/>\u0627\u06af\u0631 \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0631\u062d\u0644\u0647 \u0633\u0648\u0627\u0644\u06cc \u067e\u0631\u0633\u06cc\u062f\u0647 \u0634\u062f \u0628\u0627 y \u062a\u0627\u06cc\u06cc\u062f \u06a9\u0646\u06cc\u062f. \u0648 \u062f\u0631 \u0645\u0631\u062d\u0644\u0647 \u0628\u0639\u062f\u06cc 4 \u062f\u0633\u062a\u0648\u0632 \u0632\u06cc\u0631 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f \u062a\u0627 \u0646\u0635\u0628 IBSng \u0634\u0631\u0648\u0639 \u0628\u0634\u0647:<br \/>\u06a9\u062f:<br \/>createlang plpgsql IBSng<br \/>exit<br \/>service postgresql restart<br \/>\/.\/usr\/local\/IBSng\/scripts\/setup.py<br \/>\u0627\u06a9\u0646\u0648\u0646 \u0641\u0642\u0637 \u0627\u0639\u062f\u0627\u062f (\u0628\u062c\u0632 \u062f\u0648 \u0645\u0648\u0631\u062f \u0622\u062e\u0631) \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0647 \u062a\u0631\u062a\u06cc\u0628 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f:<br \/>\u062a\u0648\u062c\u0647: \u0628\u062c\u0627\u06cc \u0639\u0628\u0627\u0631\u062a Enter System password \u067e\u0633\u0648\u0631\u062f \u0627\u062f\u0645\u06cc\u0646 \u0633\u06cc\u0633\u062a\u0645 IBSNG \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f:<br \/>\u06a9\u062f:<br \/>1 Install<br \/>2 Test DB Connection and Continue<br \/>2 Compile Configuration and Continue<br \/>1 Import Tables and Continue<br \/>Enter System password<br \/>1 Copy ibs.conf to &#8216;\/etc\/httpd\/conf.d&#8217;<br \/>2 Chown apache directories to &#8216;apache&#8217;<br \/>5 Continue<br \/>1 Copy logrotate Conf to \/etc\/logrotate.d<br \/>3 Continue<br \/>1 Copy Redhat init file to \/etc\/init.d<br \/>2 Set IBSng to start on reboot<br \/>b Back to main menu<br \/>x Exit<\/p>\n<div>\u062d\u0627\u0644 \u0628\u0627 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0641\u0627\u06cc\u0644 \u06a9\u0627\u0646\u0641\u06cc\u06af httpd \u0631\u0627 \u0627\u062f\u06cc\u062a \u0645\u06cc\u06a9\u0646\u06cc\u0645:<\/div>\n<div>\n<p>\u06a9\u062f:<\/p>\n<div>nano \/etc\/httpd\/conf\/httpd.conf<\/div>\n<p>\u0633\u067e\u0633 \u0639\u0628\u0627\u0631\u062a \u0632\u06cc\u0631 \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u0648 \u0641\u0627\u06cc\u0644 \u0631\u0627 \u0633\u06cc\u0648 \u0645\u06cc\u06a9\u0646\u06cc\u0645:<\/p>\n<\/div>\n<p>\u06a9\u062f:<\/p>\n<div>ServerName 127.0.0.1<br \/>&lt;Directory &#8220;\/usr\/local\/IBSng\/interface\/IBSng&#8221;&gt;<br \/>AllowOverride None<br \/>Options None<br \/>Require all granted<br \/>&lt;\/Directory&gt;<\/div>\n<p>\u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f:<br \/>\u06a9\u062f:<\/p>\n<div>nano \/usr\/local\/IBSng\/core\/lib\/IPy.py<\/div>\n<p>\u0633\u067e\u0633 \u0639\u0628\u0627\u0631\u062a \u0632\u06cc\u0631 \u0631\u0627 \u0627\u0648\u0644 \u0641\u0627\u06cc\u0644 \u06a9\u067e\u06cc \u0648 \u0633\u06cc\u0648 \u0645\u06cc\u06a9\u0646\u06cc\u0645:<br \/>\u06a9\u062f:<\/p>\n<div>#coding:utf-8<\/div>\n<p>\u0648 \u0647\u0645\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0641\u0627\u06cc\u0644 des_c.py \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc\u062f\u0647\u06cc\u0645:<\/p>\n<p>\u06a9\u062f:<\/p>\n<div>nano \/usr\/local\/IBSng\/core\/lib\/mschap\/des_c.py<\/div>\n<p>\u0648 \u0639\u0628\u0627\u0631\u062a \u0632\u06cc\u0631 \u0631\u0627 \u0627\u0648\u0644 \u0641\u0627\u06cc\u0644 \u06a9\u067e\u06cc \u0648 \u0630\u062e\u06cc\u0631\u0647 \u0645\u06cc\u06a9\u0646\u06cc\u0645:<\/p>\n<p>\u06a9\u062f:<\/p>\n<div>#coding:utf-8<\/div>\n<p>\u062d\u0627\u0644 \u0628\u0627 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0641\u0627\u06cc\u0644 error.php \u0631\u0627 \u0648\u06cc\u0631\u0627\u06cc\u0634 \u0645\u06cc\u06a9\u0646\u06cc\u0645:<br \/>\u06a9\u062f:<\/p>\n<div>nano \/usr\/local\/IBSng\/interface\/IBSng\/inc\/error.php<\/div>\n<\/div>\n<p>\u06a9\u062f:<\/p>\n<p>\u0646\u0647 \u062e\u0637 \u0622\u062e\u0631 \u067e\u0627\u06a9 \u0645\u06cc\u06a9\u0646\u06cc\u0645 \u0648 \u0628\u062c\u0627\u0634 \u0627\u06cc\u0646 \u0647\u0627 \u0642\u0631\u0627\u0631 \u0628\u062f\u06cc\u062f:<br \/>\u06a9\u062f:<br \/>$timeArr=&#8221;IRDT\/4.0\/DST&#8221;;<br \/># $timeStr=&#8221;{$timeArr[&#8220;tm_year&#8221;]}\/{$timeArr[&#8220;tm_mon&#8221;]}\/{$timeArr[&#8220;tm_mday&#8221;]} {$timeArr[&#8220;tm_hour&#8221;]}:{$timeArr[&#8220;tm_min&#8221;]}&#8221;;<br \/>$phperr=isset($php_errormsg)?$php_errormsg:&#8221;&#8221;;<br \/># fwrite($fh,&#8221;{$timeStr} {$msg} {$phperr}\\n&#8221;);<br \/>return;<\/p>\n<p>}<\/p>\n<p>?&gt;<\/p>\n<p>\u062d\u0627\u0644 \u0628\u0627\u06cc\u062f \u0641\u0627\u06cc\u0644 \u0632\u06cc\u0631 \u0631\u0627 \u0648\u06cc\u0631\u0627\u06cc\u0634 \u06a9\u0631\u062f:<br \/>\u06a9\u062f:<br \/>nano \/usr\/local\/IBSng\/core\/server\/xmlrpcserver.py<br \/>\u0639\u0628\u0627\u0631\u062a \u0632\u06cc\u0631 \u0631\u0627 \u0627\u0648\u0644 \u0641\u0627\u06cc\u0644 \u06a9\u067e\u06cc \u0648 \u0630\u062e\u06cc\u0631\u0647 \u0645\u06cc\u06a9\u0646\u06cc\u0645:<br \/>\u06a9\u062f:<br \/>from xmlrpclib import Marshaller<br \/>from decimal import Decimal<\/p>\n<p>def dump_decimal(self,value, write):<br \/>write(&#8220;&lt;value&gt;&lt;double&gt;&#8221;)<br \/>write(str(value))<br \/>write(&#8220;&lt;\/double&gt;&lt;\/value&gt;\\n&#8221;)<\/p>\n<p>Marshaller.dispatch[Decimal] = dump_decimal<br \/>\u0648 \u062f\u0631 \u0641\u0627\u06cc\u0644 \u0632\u06cc\u0631 \u0631\u0641\u062a\u0647:<br \/>\u06a9\u062f:<br \/>nano \/usr\/local\/IBSng\/core\/admin\/admin.py<br \/>\u0628\u0627 \u0632\u062f\u0646 \u06a9\u0644\u06cc\u062f \u062a\u0631\u06a9\u06cc\u0628\u06cc w+Ctrl \u0639\u0628\u0627\u0631\u062a:<br \/>\u06a9\u062f:<br \/>self.deposit+=deposit_change<br \/>\u062c\u0633\u062a\u062c\u0648 \u06a9\u0631\u062f\u0647 \u0648 \u0628\u062c\u0627\u06cc \u0639\u0628\u0627\u0631\u062a \u0628\u0627\u0644\u0627 \u0639\u0628\u0627\u0631\u062a \u0632\u06cc\u0631 \u0631\u0627 \u0642\u0631\u0627\u0631 \u0628\u062f\u06cc\u062f:<br \/>\u06a9\u062f:<br \/>self.deposit+=float(deposit_change)<br \/>\u0633\u067e\u0633 \u0628\u0631\u0627\u06cc \u0628\u0627\u0632 \u06a9\u0631\u062f\u0646 \u067e\u0648\u0631\u062a \u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u062f\u0631 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u06f3 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f:<\/p>\n<p>\u06a9\u062f:<\/p>\n<div>iptables -A INPUT -p tcp -m state \u2013state NEW -m tcp \u2013dport 80 -j ACCEPT<br \/>iptables -A INPUT -p tcp -m state \u2013state NEW -m tcp \u2013dport 1812 -j ACCEPT<br \/>iptables -A INPUT -p tcp -m state \u2013state NEW -m tcp \u2013dport 1813 -j ACCEPT<\/div>\n<p>\u062f\u0631 \u0627\u062e\u0631 \u0628\u0627\u06cc\u062f SELinux \u0631\u0627 \u063a\u06cc\u0631 \u0641\u0639\u0627\u0644 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646\u06a9\u0627\u0631 \u0628\u0647 \u0637\u0631\u06cc\u0642 \u0632\u06cc\u0631 \u0639\u0645\u0644 \u06a9\u0646\u06cc\u062f.<\/p>\n<div>\u0627\u0628\u062a\u062f\u0627 \u0641\u0627\u06cc\u0644 \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0627 \u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631\u06cc \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f.<\/div>\n<p>\u06a9\u062f:<\/p>\n<div>nano \/etc\/selinux\/config<\/div>\n<p>\u00a0<\/p>\n<div>\u0633\u067e\u0633 \u0639\u0628\u0627\u0631\u062a SELINUX=enforcing \u0631\u0627 \u0628\u0647 \u0639\u0628\u0627\u0631\u062a \u0632\u06cc\u0631 \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u062f.<\/div>\n<p>\u06a9\u062f:<\/p>\n<div>SELINUX=disabled<\/div>\n<p>\u0633\u067e\u0633 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0647 \u062a\u0631\u06cc\u062a\u0628 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f:<br \/>\u06a9\u062f:<br \/>chkconfig httpd on<br \/>chkconfig postgresql on<br \/>chkconfig IBSng on<br \/>service httpd restart<br \/>service postgresql restart<br \/>setenforce 0<br \/>service IBSng start<br \/>\u0627\u06a9\u0646\u0648\u0646 \u0628\u0627\u06cc\u062f \u062a\u0645\u0627\u0645\u06cc \u0633\u0631\u0648\u06cc\u0633 \u0647\u0627\u06cc \u0628\u0627\u0644\u0627 \u0628\u062f\u0648\u0646 \u0645\u0634\u06a9\u0644 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u0634\u0648\u0646\u062f..<\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u0646\u0635\u0628 IBSng<\/p>\n","protected":false},"author":1,"featured_media":438,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18,8,7],"tags":[],"_links":{"self":[{"href":"https:\/\/fakhry.ir\/index.php?rest_route=\/wp\/v2\/posts\/437"}],"collection":[{"href":"https:\/\/fakhry.ir\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fakhry.ir\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fakhry.ir\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fakhry.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=437"}],"version-history":[{"count":6,"href":"https:\/\/fakhry.ir\/index.php?rest_route=\/wp\/v2\/posts\/437\/revisions"}],"predecessor-version":[{"id":445,"href":"https:\/\/fakhry.ir\/index.php?rest_route=\/wp\/v2\/posts\/437\/revisions\/445"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fakhry.ir\/index.php?rest_route=\/wp\/v2\/media\/438"}],"wp:attachment":[{"href":"https:\/\/fakhry.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fakhry.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fakhry.ir\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}