{"id":791,"date":"2016-07-28T15:21:26","date_gmt":"2016-07-28T07:21:26","guid":{"rendered":"http:\/\/www.luwl.net\/?p=791"},"modified":"2016-07-29T18:56:58","modified_gmt":"2016-07-29T10:56:58","slug":"ones-erp-%e5%ae%89%e8%a3%85%e7%ac%94%e8%ae%b0","status":"publish","type":"post","link":"http:\/\/www.luwl.net\/?p=791","title":{"rendered":"ONES erp \u5b89\u88c5\u7b14\u8bb0"},"content":{"rendered":"<p>CentOS\u5b89\u88c5ONES\u8fc7\u7a0b<\/p>\n<p>\u5b98\u65b9\u6587\u6863\u4ecb\u7ecd\uff1a<\/p>\n<h2>\u73af\u5883\u4f9d\u8d56<\/h2>\n<ul>\n<li>bower<\/li>\n<li>composer<\/li>\n<li>php 5.5.9+<\/li>\n<li>mysql 5.6.5+<\/li>\n<\/ul>\n<p><strong>PHP\u548cMySQL\u7248\u672c\u5747\u4e3a\u6700\u4f4e\u8981\u6c42\u7248\u672c\uff0c\u5b89\u88c5\u524d\u8bf7\u5148\u786e\u8ba4\u3002<\/strong><\/p>\n<h2>\u901a\u8fc7CLI\u5b89\u88c5<\/h2>\n<pre><code>$ git clone http:\/\/git.oschina.net\/xiaolan\/ones ones # \u53d6\u5f97\u6700\u65b0\u4ee3\u7801\r\n$ cd ones\r\n\r\n$ npm install # \u5b89\u88c5\u4f9d\u8d56 \u975e\u5fc5\u987b\r\n$ bower install # \u5b89\u88c5\u4f9d\u8d56\r\n\r\n$ cd server\r\n$ composer install # \u5b89\u88c5\u540e\u7aef\u7b2c\u4e09\u65b9\u4f9d\u8d56\r\n\r\n$ php install\/install.php # \u7b80\u6613\u5b89\u88c5\u5411\u5bfc\uff0c\u6839\u636e\u63d0\u793a\u6b65\u9aa4\u6765\r\n\r\n$ cd ..\r\n$ grunt build # \u6253\u5305\u524d\u7aef\u6587\u4ef6 \u975e\u5fc5\u987b\uff0c\u90e8\u7f72\u73af\u5883\u4e0b\u4f7f\u7528<\/code><\/pre>\n<h2>\u5e38\u89c1\u95ee\u9898\u53ca\u6ce8\u610f\u4e8b\u9879<\/h2>\n<ul>\n<li>npm\u548ccomposer\u901f\u5ea6\u6162\u7684\u65f6\u5019\uff0c\u4f7f\u7528\u56fd\u5185\u955c\u50cf <a href=\"http:\/\/npm.taobao.org\/\">http:\/\/npm.taobao.org\/<\/a> \u548c <a href=\"http:\/\/packagist.cn\/\">http:\/\/packagist.cn\/<\/a><\/li>\n<\/ul>\n<h2>dist<\/h2>\n<p>ONES\u6e90\u7801\u5e93\u4e2d\u5e76\u4e0d\u5305\u542bdist\u76ee\u5f55\uff0cdist\u76ee\u5f55\u662fONES\u524d\u7aef\u6253\u5305\u7684\u76ee\u5f55\uff1b\u5f00\u53d1\u73af\u5883\u4e2d\u5efa\u8bae\u8bbf\u95ee\/ones\u76ee\u5f55\uff1b\u90e8\u7f72\u73af\u5883\u4e2d\u4f7f\u7528 <code>grunt build<\/code>\u6765\u521b\u5efadist\u76ee\u5f55\uff08\u6ce8\u610f\u4fee\u6539\u524d\u7aefDEBUG\u6a21\u5f0f\u4e3afalse\uff0c\u540e\u7aef\u4e0d\u8981\u4fee\u6539\uff09\u3002<\/p>\n<h2>\u4fee\u6539\u914d\u7f6e<\/h2>\n<ul>\n<li>\u6570\u636e\u5e93\u8fde\u63a5\u914d\u7f6e\uff1a <code>\/server\/phinx.yml<\/code><\/li>\n<li>\u540e\u7aef\u914d\u7f6e\uff1a <code>\/server\/Application\/Common\/Conf\/config.php<\/code><\/li>\n<li>\u524d\u7aef\u914d\u7f6e\uff1a <code>\/ones\/common\/config.js<\/code> \u4ee5\u4e0a\u914d\u7f6e\u901a\u5e38\u901a\u8fc7\u5b89\u88c5\u5411\u5bfc\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f1a\u81ea\u52a8\u8bbe\u7f6e\uff0c\u65e0\u7279\u6b8a\u60c5\u51b5\u901a\u5e38\u4e0d\u9700\u8981\u518d\u624b\u52a8\u4fee\u6539\u3002<\/li>\n<\/ul>\n<h2>\u5b89\u5168\u6307\u5f15<\/h2>\n<p>\u56e0\u4e3aONES 1.x\u4e4b\u540e\u7684\u7248\u672c\u4e2d\u5927\u90e8\u5206\u4f7f\u7528yaml\u683c\u5f0f\u4e3a\u914d\u7f6e\u6587\u4ef6\uff0c\u4f46yaml\u683c\u5f0f\u5728webserver\u4e2d\u5e76\u6ca1\u6709\u88ab\u7981\u6b62\u8bbf\u95ee\u7684\u65f6\u5019\uff0c\u53ef\u80fd\u4f1a\u66b4\u9732\u654f\u611f\u4fe1\u606f\uff1b\u6240\u4ee5\u5728webserver\u7684\u914d\u7f6e\u4e2d\uff0c\u9700\u8981\u5c06 *.yml \u6587\u4ef6\u8bbe\u4e3a\u7981\u6b62\u8bbf\u95ee\uff0c\u8fd9\u5e76\u4e0d\u5f71\u54cdONES\u4f7f\u7528\u3002<\/p>\n<h2>\u5347\u7ea7<\/h2>\n<p>\u9996\u5148\u9700\u8981\u901a\u8fc7git\u83b7\u5f97\u6700\u65b0\u6e90\u7801\uff0c\u7136\u540e\u91cd\u65b0\u6267\u884c\u4e00\u904d<code>npm install<\/code>, <code>bower install<\/code>\u3002\u6700\u540e\u540c\u6b65\u6570\u636e\u5e93\u7ed3\u6784\uff1a<\/p>\n<p>php vendor\/robmorgan\/phinx\/bin\/phinx migrate<\/p>\n<p>\u7b2c\u4e00\u6b65\u5728cenos\u4e0a\u9ed8\u8ba4git\u4e0d\u80fd\u4f7f\u7528\uff0c\u9700\u8981\u652f\u6301git<br \/>\nyum install -y git<br \/>\n\u7b2c\u4e8c\u90e8\uff0cnmp\u547d\u4ee4\uff0c\u9700\u8981\u5b89\u88c5nodejs<br \/>\nyum install gcc-c++ openssl-devel \u4f9d\u8d56\u5305<br \/>\n\u5b8c\u6bd5\u4e4b\u540e\uff0c\u6211\u4eec\u8f93\u5165gcc -v\u68c0\u67e5\u662f\u5426\u6709\u51fa\u73b0\u7248\u672c\u53f7\uff0c\u5982\u679c\u6709\u8bf4\u660e\u6ca1\u6709\u95ee\u9898\u3002<br \/>\npython &#8211;version\u6267\u884c\u4e4b\u540e\u770b\u770b\u7248\u672c\uff0cNode.js\u73af\u5883\u9700\u8981Python2.6\u4ee5\u4e0a\uff0c\u6211\u4eec\u9700\u8981\u68c0\u67e5\uff0c\u5982\u679c\u4e0d\u662f\u5219\u9700\u8981\u5b89\u88c5\u548c\u5347\u7ea7Python\u3002<br \/>\ncd \/usr\/local\/src<br \/>\nwget http:\/\/nodejs.org\/dist\/node-latest.tar.gz<br \/>\nwget http:\/\/nodejs.org\/dist\/v0.10.26\/node-v0.10.26.tar.gz<br \/>\ntar -zxvf node-latest.tar.gz<br \/>\ncd node-v***<br \/>\n.\/configure<br \/>\nmake &amp;&amp; make install<br \/>\n\u6267\u884c\u5b8c\u6bd5\u4e4b\u540e\uff0c\u6211\u4eec\u8f93\u5165node -v\u770b\u770b\u662f\u5426\u770b\u5230\u7248\u672c\u3002<\/p>\n<p>\u5b89\u88c5NPM<\/p>\n<p>curl https:\/\/npmjs.org\/install.sh | sh<\/p>\n<p>\u5b89\u88c5express<\/p>\n<p>npm install express -g<\/p>\n<p>\u5b89\u88c5\u597dnode\u548cnpm\u540e\uff0c\u4f7f\u7528nmp\u5b89\u88c5bower\u5de5\u5177\uff1a<\/p>\n<p>npm install -g bower<\/p>\n<p>\u8fd9\u4e2a\u8fc7\u7a0b\u5f88\u6162\u53ef\u4ee5\u4f7f\u7528taobao\u7684npm\u6e90<\/p>\n<p>npm config set registry https:\/\/registry.npm.taobao.org<\/p>\n<p>Composer\u7684\u5b89\u88c5\u548c\u4f7f\u7528<br \/>\ncurl?-sS?https:\/\/getcomposer.org\/installer?|?php<\/p>\n<p>mv?composer.phar?\/usr\/local\/bin\/composer<\/p>\n<p>composer?-V<\/p>\n<p>\u5b89\u88c5grunt<\/p>\n<p>npm install -g grunt-cli<\/p>\n<p>\u66f4\u65b0<\/p>\n<p>npm install -g minimatch<br \/>\nnpm install -g lodash<br \/>\nnpm install -g graceful-fs<\/p>\n<p>npm i npm -g<\/p>\n<p>\u65b0\u5efa\u7528\u6237<\/p>\n<p>adduser ***<br \/>\npasswd ***<\/p>\n<p>bower\u8981\u4f7f\u7528\u975esudo\u6743\u9650\u7684\u7528\u6237\u3002<br \/>\n\u4fee\u6539<code class=\"language-bash hljs\">composer\u66f4\u65b0\u6e90<\/code><\/p>\n<pre><code class=\"language-bash hljs\">composer config -g repo.packagist composer https:\/\/packagist.phpcomposer.com<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>CentOS\u5b89\u88c5ONES\u8fc7\u7a0b \u5b98\u65b9\u6587\u6863\u4ecb\u7ecd\uff1a \u73af\u5883\u4f9d\u8d56 bower compos &hellip; <a href=\"http:\/\/www.luwl.net\/?p=791\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-791","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.luwl.net\/index.php?rest_route=\/wp\/v2\/posts\/791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.luwl.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.luwl.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.luwl.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.luwl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=791"}],"version-history":[{"count":4,"href":"http:\/\/www.luwl.net\/index.php?rest_route=\/wp\/v2\/posts\/791\/revisions"}],"predecessor-version":[{"id":796,"href":"http:\/\/www.luwl.net\/index.php?rest_route=\/wp\/v2\/posts\/791\/revisions\/796"}],"wp:attachment":[{"href":"http:\/\/www.luwl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.luwl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=791"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.luwl.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}