{"id":645,"date":"2017-11-25T15:09:47","date_gmt":"2017-11-25T07:09:47","guid":{"rendered":"http:\/\/blog.defjia.top\/?p=645"},"modified":"2017-11-25T15:09:47","modified_gmt":"2017-11-25T07:09:47","slug":"25th-nov-%e6%90%ad%e5%bb%basso-casphp_server%e7%9a%84%e5%ae%9e%e8%b7%b5","status":"publish","type":"post","link":"https:\/\/blog.defjia.top\/?p=645","title":{"rendered":"25th Nov \u642d\u5efaSSO-CAS(php_server)\u7684\u5b9e\u8df5"},"content":{"rendered":"<p>\u6700\u8fd1\u4e24\u5468\u65f6\u95f4\uff0c\u505a\u4e86\u5f88\u591a\u642d\u5efaCAS\u7684\u5b9e\u8df5\uff0c\u4e5f\u5b66\u4e60\u4e86\u5f88\u591a\u5173\u4e8eDocker\u5e94\u7528\u7684\u77e5\u8bc6\uff1b\u6df1\u6df1\u4f53\u4f1a\u5230\u4e86\u4f7f\u7528Docker\u90e8\u7f72\u73af\u5883\u7684\u65b9\u4fbf\u4e0e\u5feb\u6377\uff0c\u4ee5\u53ca\u5173\u4e8enode.js\u548cLaravel\u7684\u4e00\u4e9b\u4e86\u89e3\uff1b\u4f46\u662f\u5bf9CAS\u672c\u8eab\u8fd8\u662f\u4e0d\u591f\u4e86\u89e3\uff0c\u4e0b\u5468\u8981\u90e8\u7f72\u5355\u70b9\u767b\u5f55\u7684\u5e94\u7528\uff0c\u518d\u5f80\u540e\u6253\u7b97\u90e8\u7f72\u4e00\u4e0b\u539f\u751f\u7684CAS\u3002<\/p>\n<h3>\u6d41\u7a0b<\/h3>\n<ul>\n<li>\u51c6\u5907<br \/>\nDocker\u73af\u5883\uff0c\u7a33\u5b9a(\u79d1\u5b66)\u7684\u7f51\u7edc\u8fde\u63a5<\/li>\n<li>\u73af\u5883\u90e8\u7f72<\/li>\n<\/ul>\n<ol>\n<li>\u4e0b\u8f7d\u955c\u50cf(\u6839\u636e\u4e1a\u52a1\u5185\u5bb9\u7cbe(sui)\u5fc3(yi)\u6311\u9009\u7684\u955c\u50cf)\uff0c\u521b\u5efa\u5bb9\u5668\u5e76\u8fdb\u5165\u5bb9\u5668shell\u3002<br \/>\n<a title=\"\u955c\u50cf\u5730\u5740\" href=\"https:\/\/hub.docker.com\/r\/oblank\/docker-centos-nginx-php-mongo-redis-memcached\/~\/dockerfile\/\" target=\"_blank\"  rel=\"nofollow\" >\u955c\u50cf\u5730\u5740<\/a><\/p>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-shell\">docker pull oblank\/Docker-Centos-Nginx-PHP-Mongo-Redis-Memcached<\/code><\/pre>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-shell\">docker run -it -P -d --name cas oblank\/Docker-Centos-Nginx-PHP-Mongo-Redis-Memcached<\/code><\/pre>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-shell\">docker exec -it cas \/bin\/bash\n<\/code><\/pre>\n<p>2. \u66f4\u65b0\u6e90\u3001\u8f6f\u4ef6\u5305\uff08\u53ef\u9009\uff09\uff0c\u4ee5\u53ca\u5b89\u88c5\u7f3a\u5c11\u7684git\u3002<\/p>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-shell\">yum update<\/code><\/pre>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-shell\">yum upgrade<\/code><\/pre>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-shell\">yum install git\n<\/code><\/pre>\n<ol>\n<li>\u5f00\u59cb\u90e8\u7f72<br \/>\n<a title=\"\u9879\u76ee\u6587\u6863\u5730\u5740\" href=\"https:\/\/github.com\/leo108\/php_cas_server\/blob\/master\/readme_zh.md\" target=\"_blank\"  rel=\"nofollow\" >\u9879\u76ee\u6587\u6863\u5730\u5740<\/a><\/li>\n<\/ol>\n<p>&#8211; Composer\u62c9\u53d6\u9879\u76ee<br \/>\n\u5982\u679c\u6ca1\u6709composer\uff0c<a title=\"\u5b89\u88c5\u65b9\u6cd5\" href=\"https:\/\/pkg.phpcomposer.com\/#how-to-install-composer\" target=\"_blank\"  rel=\"nofollow\" >\u5b89\u88c5\u65b9\u6cd5<\/a><\/p>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-shell\">composer create-project leo108\/php_cas_server php_cas_server dev-master\n<\/code><\/pre>\n<ul>\n<li>npm\u5b89\u88c5<\/li>\n<\/ul>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-shell\">cd php_cas_server\nnpm install\n<\/code><\/pre>\n<p>\u7531\u4e8e\u4f17\u6240\u5468\u77e5\u7684\u7f51\u7edc\u539f\u56e0\uff0c\u5b89\u88c5\u53ef\u80fd\u4f1a\u5931\u8d25\uff0c\u901a\u5e38\u7684\u64cd\u4f5c\u662f\u4f7f\u7528\u6dd8\u5b9d\u56e2\u961f\u63d0\u4f9b\u7684<a title=\"cnpm\" href=\"https:\/\/npm.taobao.org\/\" target=\"_blank\"  rel=\"nofollow\" >cnpm<\/a>\u3002<\/p>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-shell\">npm install -g cnpm --registry=https:\/\/registry.npm.taobao.org\n<\/code><\/pre>\n<p>\u7528\u6cd5\u540cnpm\u3002<br \/>\n\u82e5node-sass\u4e0b\u8f7d\u9047\u5230Timeout\u5bfc\u81f4\u540e\u7eed\u62a5\u9519\uff0c\u53ef\u4f7f\u7528cnpm\u4ee3\u66ffnpm\uff1b\u82e5\u518d\u6b21\u5931\u8d25\uff0c\u5219\u5c1d\u8bd5\u5148\u62a5node-sass\u6587\u4ef6\u4e0b\u8f7d\u5230\u672c\u5730\u2014\u2014<a title=\"\u4e0b\u8f7d\u5730\u5740\uff08\u5bfb\u627e\u5408\u9002\u7248\u672c\uff09\" href=\"https:\/\/npm.taobao.org\/mirrors\/node-sass\/\" target=\"_blank\"  rel=\"nofollow\" >\u4e0b\u8f7d\u5730\u5740\uff08\u5bfb\u627e\u5408\u9002\u7248\u672c\uff09<\/a><\/p>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-shell\">npm i node-sass --sass_binary_path=\/home\/php_cas_server\/darwin-x64-48_binding.node\n<\/code><\/pre>\n<p>\u82e5\u5b89\u88c5\u5931\u8d25\u9700\u518d\u6b21\u5b89\u88c5\uff0c\u9700\u5148\u5378\u8f7d\u3002<\/p>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-shell\">npm uninstall node-sass\n<\/code><\/pre>\n<p><a title=\"\u53c2\u8003\u94fe\u63a5\" href=\"http:\/\/lzw.me\/a\/node-sass-install-helper.html\" target=\"_blank\"  rel=\"nofollow\" >\u53c2\u8003\u94fe\u63a5<\/a><br \/>\n&#8211; gulp\u90e8\u7f72<\/p>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-shell\">cnpm install gulp -g<\/code><\/pre>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-shell\">gulp -v\n<\/code><\/pre>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-shell\">gulp\n<\/code><\/pre>\n<p><a title=\"\u53c2\u8003\u94fe\u63a5\" href=\"http:\/\/www.ydcss.com\/archives\/18#lesson5\" target=\"_blank\"  rel=\"nofollow\" >\u53c2\u8003\u94fe\u63a5<\/a><br \/>\n4. \u6309\u7167\u9879\u76ee\u6587\u6863\u4e2d\u7684\u6307\u793a\u5b8c\u6210\u521d\u59cb\u5316\u3002<br \/>\n&#8211; <a title=\"MySQL\u91cd\u7f6e\u5bc6\u7801\" href=\"https:\/\/www.cnblogs.com\/BenWong\/p\/4322085.html\" target=\"_blank\"  rel=\"nofollow\" >MySQL\u91cd\u7f6e\u5bc6\u7801<\/a><br \/>\n5. \u9879\u76ee\u6d4b\u8bd5<br \/>\nLaravel\u4e3a\u9879\u76ee\u63d0\u4f9b\u4e86\u6d4b\u8bd5\u65b9\u6cd5\uff08\u4ec5\u9650\u672c\u673a\u8bbf\u95ee\uff1f\uff09<\/p>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-shell\">php artisan serve --port=80\n<\/code><\/pre>\n<p>\uff08\u5728\u9879\u76ee\u6839\u76ee\u5f55\u6267\u884c\uff09\u8fd9\u6837\u901a\u8fc7curl lcoalhost\u5c31\u53ef\u4ee5\u8bbf\u95ee\u4e86\u3002<br \/>\n6. \u90e8\u7f72\u4e0a\u7ebf<br \/>\n\u5728\u6b64\u955c\u50cf\u4e2d\u53ef\u76f4\u63a5\u4fee\u6539Nginx\u5728\/etc\/nginx\/conf.d\/default.conf\u7684\u914d\u7f6e\u6587\u4ef6\u7684\u6839\u76ee\u5f55\u5230&#8230;\/php_cas_server\/public\uff0c\u82e5\u51fa\u73b0500\uff0c\u53ef\u80fd\u662f\u6743\u9650\u95ee\u9898\u3002<\/p>\n<h5>Java\u7248\u53c2\u8003\u8d44\u6599<\/h5>\n<ul>\n<li><a title=\"\u9879\u76ee\u90e8\u7f72\u6587\u6863\" href=\"https:\/\/apereo.github.io\/cas\/5.0.x\/installation\/Configuration-Management.html\" target=\"_blank\"  rel=\"nofollow\" >\u9879\u76ee\u90e8\u7f72\u6587\u6863<\/a><\/li>\n<li><a title=\"SSO-CAS\u90e8\u7f72\u6307\u5357\" href=\"http:\/\/www.imooc.com\/article\/3576\" target=\"_blank\"  rel=\"nofollow\" >SSO-CAS\u90e8\u7f72\u6307\u5357<\/a><\/li>\n<li><a title=\"CAS\u4e4bDocker\uff08\u597d\u50cf\u4e0d\u600e\u4e48\u7ba1\u7528\uff09\" href=\"http:\/\/blog.csdn.net\/xichenguan\/article\/details\/73287228\" target=\"_blank\"  rel=\"nofollow\" >CAS\u4e4bDocker\uff08\u597d\u50cf\u4e0d\u600e\u4e48\u7ba1\u7528\uff09<\/a><\/li>\n<li><a title=\"CAS\u90e8\u7f72\u53ca\u7b80\u4ecb\" href=\"http:\/\/blog.csdn.net\/xiaoxing598\/article\/details\/55518241\" target=\"_blank\"  rel=\"nofollow\" >CAS\u90e8\u7f72\u53ca\u7b80\u4ecb<\/a><\/li>\n<li><a title=\"Github-cas_webapp_docker\" href=\"https:\/\/github.com\/apereo\/cas-webapp-docker\" target=\"_blank\"  rel=\"nofollow\" >Github-cas_webapp_docker<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u4e24\u5468\u65f6\u95f4\uff0c\u505a\u4e86\u5f88\u591a\u642d\u5efaCAS\u7684\u5b9e\u8df5\uff0c\u4e5f\u5b66\u4e60\u4e86\u5f88\u591a\u5173\u4e8eDocker\u5e94\u7528\u7684\u77e5\u8bc6\uff1b\u6df1\u6df1\u4f53\u4f1a\u5230\u4e86\u4f7f\u7528Docker\u90e8\u7f72\u73af\u5883\u7684\u65b9\u4fbf\u4e0e\u5feb\u6377\uff0c\u4ee5\u53ca\u5173\u4e8enode.js\u548cLaravel\u7684\u4e00\u4e9b\u4e86\u89e3\uff1b\u4f46\u662f\u5bf9CAS\u672c\u8eab\u8fd8\u662f\u4e0d\u591f\u4e86\u89e3\uff0c\u4e0b\u5468\u8981\u90e8\u7f72\u5355\u70b9\u767b\u5f55\u7684\u5e94\u7528\uff0c\u518d\u5f80\u540e\u6253\u7b97\u90e8\u7f72\u4e00\u4e0b\u539f\u751f\u7684CAS\u3002 \u6d41\u7a0b \u51c6\u5907 Docker\u73af\u5883\uff0c\u7a33\u5b9a(\u79d1\u5b66)\u7684\u7f51\u7edc\u8fde\u63a5 \u73af\u5883\u90e8\u7f72 \u4e0b\u8f7d\u955c\u2026\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-645","post","type-post","status-publish","format-standard","hentry","category-3"],"_links":{"self":[{"href":"https:\/\/blog.defjia.top\/index.php?rest_route=\/wp\/v2\/posts\/645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.defjia.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.defjia.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.defjia.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.defjia.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=645"}],"version-history":[{"count":0,"href":"https:\/\/blog.defjia.top\/index.php?rest_route=\/wp\/v2\/posts\/645\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.defjia.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.defjia.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.defjia.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}