{"id":105,"date":"2011-04-13T23:43:34","date_gmt":"2011-04-13T15:43:34","guid":{"rendered":"http:\/\/guoh.ai\/lifelog\/?p=105"},"modified":"2011-04-13T23:43:34","modified_gmt":"2011-04-13T15:43:34","slug":"some-tips-on-trac-installation","status":"publish","type":"post","link":"https:\/\/guoh.ai\/lifelog\/2011\/04\/some-tips-on-trac-installation\/","title":{"rendered":"Nginx+FastCGI+MySQL+Linux\u642d\u5efaTrac 0.12.2\u73af\u5883"},"content":{"rendered":"<p>\u5b8c\u6574\u8be6\u7ec6\u7684\u5b89\u88c5\u65b9\u6cd5\u8bf7\u53c2\u8003\u5b98\u7f51http:\/\/trac.edgewall.org\/wiki\/TracInstall\u6216\u8005INSTALL<br \/>\n\u672c\u6587\u4e3b\u8981\u8bb0\u5f55\u6211\u5728\u5b89\u88c5\u7684\u65f6\u5019\u9047\u5230\u7684\u4e00\u4e9b\u95ee\u9898\u548c\u89e3\u51b3\u529e\u6cd5\uff0c\u6709\u8bef\u5bfc\u7684\u5730\u65b9\u6b22\u8fce\u6307\u6b63<\/p>\n<p>\u4e00\u822c\u90fd\u662f\u88c5\u6570\u636e\u5e93\uff0c\u88c5\u670d\u52a1\u5668\uff0c\u88c5Trac\u7a0b\u5e8f<\/p>\n<p>0\u3001\u5b89\u88c5Python\u73af\u5883\uff0c\u9ed8\u8ba4\u90fd\u6709\uff0c\u53ea\u9700\u8981\u68c0\u67e5\u7248\u672c\u662f\u5426\u7b26\u5408\uff0c\u5b89\u88c5\u9700\u8981\u7684Python\u63d2\u4ef6<\/p>\n<p>1\u3001\u5b89\u88c5\u6570\u636e\u5e93\uff0c\u6211\u8fd9\u91cc\u7528\u7684\u662fMySQLhttp:\/\/lucane.iteye.com\/blog\/866355<br \/>\nTrac\u662fPython\u5199\u7684\uff0c\u8bbf\u95eeMySQL\u7528\u7684\u662fMySQL-python<br \/>\n\u9700\u8981\u914d\u7f6e\u7684\u5c31\u662f$MYSQL_PYTHON_HOME\/site.cfg\/site.cfg<br \/>\n\u4e0b\u7684mysql_config = $MYSQL_HOME\/bin\/mysql_config<br \/>\n\u76ee\u524d\u6211\u7684\u8fd9\u4e9b\u4e1c\u897f\u90fd\u5728\u4e00\u53f0\u673a\u5668\u4e0a\uff0c\u5982\u679c\u5206\u5e03\u5728\u591a\u53f0\u673a\u5668\u4e0a\u8fd8\u771f\u4e0d\u77e5\u9053\u600e\u4e48\u88c5<\/p>\n<p>2\u3001\u5b89\u88c5Nginx\uff0c\u6211\u8fd9\u91cc\u662f\u7f16\u8bd1\u5b89\u88c5<br \/>\n .\/configure &#8211;prefix=$PATH_TO_INSTALL\/nginx<br \/>\n make<br \/>\n make install<br \/>\n\u53ef\u80fd\u542f\u52a8\u7684\u65f6\u5019\u62a5\u9519\uff0c\u7c7b\u4f3c\u4e8e\u4e0b\u9762\u8fd9\u6837<br \/>\n[emerg]: bind() to 0.0.0.0:80 failed (13: Permission denied)<br \/>\n\u8fd9\u662f\u56e0\u4e3a\u7aef\u53e3\u53f7\u7684\u95ee\u9898\uff0c\u5728Linux\u4e2d1024\u4e0b\u7684\u7aef\u53e3\u53f7\u90fd\u9700\u8981root\u7528\u6237\u624d\u80fd\u4f7f\u7528<br \/>\n\u6240\u4ee5\u666e\u901a\u7528\u6237\u542f\u52a8\u7a0b\u5e8f\u7ed1\u5b9a\u4f1a\u62a5\u51fa\u6743\u9650\u95ee\u9898\uff0c\u6211\u8fd9\u91cc\u662f\u628aNginx\u7ed1\u5b9a\u7684\u7aef\u53e3\u53f7\u6539\u4e3a8888<\/p>\n<p>Nginx\u6bd4\u8f83\u7b80\u964b\uff0c\u542f\u52a8\u4e4b\u540e\u5173\u95ed\u4e00\u822c\u8981\u901a\u8fc7kill\u547d\u4ee4\u6740\u8fdb\u7a0b\uff0c\u5177\u4f53\u7684\u53c2\u8003Nginx\u76f8\u5173\u624b\u518c<br \/>\n\u8fd9\u91cc\u5217\u51fa\u51e0\u4e2a\u7b80\u5355\u7684<\/p>\n<p>\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u540e\u68c0\u67e5\u914d\u7f6e\u6587\u4ef6\u8bed\u6cd5\u662f\u5426\u6b63\u786e<br \/>\nnginx -t -c $NGINX_HOME\/conf\/nginx.conf<br \/>\nt\u56e0\u8be5\u662f\u8868\u793a\u6d4b\u8bd5\u7684\u610f\u601d\uff0cc\u5c31\u662f\u6307\u5b9a\u6240\u7528\u914d\u7f6e\u6587\u4ef6\u7684\u5730\u65b9\uff0c\u8fd9\u91cc\u53ef\u4ee5\u81ea\u7531\u53d1\u6325<\/p>\n<p>\u505c\u6b62Nginx<br \/>\nkill -quit PID_OF_NGINX<\/p>\n<p>\u5e73\u6ed1\u91cd\u542fNginx<br \/>\nkill -hup PID_OF_NGINX<\/p>\n<p>\u542f\u52a8Nginx\u5c31\u4e0d\u8bf4\u4e86<\/p>\n<p>\u5173\u952e\u662f\u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\uff0c\u8fd9\u91cc\u6bd4\u8f83\u590d\u6742\uff0c\u81f3\u5c11\u5bf9\u4e8e\u65b0\u624b\u6765\u8bf4\u662f\u8fd9\u6837\u7684<br \/>\n\u6211\u4e5f\u662f\u53c2\u8003\u4e86<strong><em>http:\/\/marshalys.blogspot.com\/2009\/02\/freebsdtrac.html<\/em><\/strong>\u624d\u5f04\u51fa\u6765\u7684<\/p>\n<p>\u6211\u5148\u628a\u6211\u7684\u914d\u7f6e\u6587\u4ef6\u8d34\u51fa\u6765\uff0c\u53ef\u80fd\u6709\u4e9b\u65e0\u7528\uff0c\u4f46\u662f\u6682\u65f6\u5c31\u8fd9\u6837\u4e86<br \/>\nnginx.conf<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">    server {\r\n        listen       8888;\r\n        server_name  localhost;\r\n\r\n        #charset koi8-r;\r\n\r\n        #access_log  logs\/host.access.log  main;\r\n\r\n        location \/ {\r\n            fastcgi_pass 0.0.0.0:8080;\r\n\r\n            auth_basic &quot;Trac Realm&quot;; \r\n            auth_basic_user_file $KEY_PATH\/trac.htpasswd;\r\n\r\n            fastcgi_param PATH_INFO $fastcgi_script_name;\r\n            fastcgi_param REQUEST_METHOD $request_method;\r\n            fastcgi_param QUERY_STRING $query_string;\r\n            fastcgi_param CONTENT_TYPE $content_type;\r\n            fastcgi_param CONTENT_LENGTH $content_length;\r\n            fastcgi_pass_header Authorization;\r\n            fastcgi_param REMOTE_ADDR           $remote_addr;\r\n            fastcgi_param SERVER_PROTOCOL       $server_protocol;\r\n            fastcgi_param SERVER_PORT           $server_port;\r\n            fastcgi_param SERVER_NAME           $server_name;\r\n            fastcgi_intercept_errors off;\r\n\r\n            # for authentication to work\r\n            fastcgi_param AUTH_USER $remote_user;\r\n            fastcgi_param REMOTE_USER $remote_user;\r\n        }\r\n<\/pre>\n<p>\u5176\u4e2d<br \/>\n            auth_basic &#8220;Trac Realm&#8221;;<br \/>\n            auth_basic_user_file $KEY_PATH\/trac.htpasswd;<br \/>\n\u548c<br \/>\n            # for authentication to work<br \/>\n            fastcgi_param AUTH_USER $remote_user;<br \/>\n            fastcgi_param REMOTE_USER $remote_user;<br \/>\n\u662fTrac\u6388\u6743\u7528\u7684\uff0c\u53ef\u4ee5\u5148\u4e0d\u7528\u7ba1<\/p>\n<p>\u5f53\u7136\u5f04\u597d\u4e4b\u540e\u5148\u8981\u6d4b\u8bd5Nginx\u80fd\u5426\u5c06Python\u8f6c\u53d1\u7ed9FastCGI\u5904\u7406\uff0c\u5199\u4e2a\u7b80\u5355\u7684\u6d4b\u8bd5fcgi.py\u653e\u5230$NGINX_HOME\/html\/\u4e0b<br \/>\n\u5176\u4e2dfcgi.py\u7684\u5185\u5bb9\u5982\u4e0b<br \/>\n<script src=\"https:\/\/gist.github.com\/917756.js?file=fcgi.py\"><\/script><br \/>\n\u6267\u884cpython fcgi.py &#038;<br \/>\n\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u952e\u5165http:\/\/localhost:8888\/\u5982\u679c\u80fd\u770b\u5230Hello World\u5b57\u6837\u5c31\u8bf4\u660eOK<br \/>\n\u5f53\u7136\u8fd9\u4e9b\u7aef\u53e3\u53f7\u795e\u9a6c\u7684\u90fd\u662f\u6839\u636e\u81ea\u5df1\u7684\u5b9e\u9645\u60c5\u51b5<\/p>\n<p>3\u3001\u5b89\u88c5Trac<br \/>\n\u4f60\u53ef\u4ee5\u628a\u5b83\u8ba4\u4e3a\u662fPython\u7684\u6a21\u5757\u63d2\u4ef6<br \/>\n\u6240\u4ee5\u5b89\u88c5\u65b9\u5f0f\u548c\u5b89\u666e\u901a\u6a21\u5757\u662f\u4e00\u6837\u7684<br \/>\n\u6211\u8fd9\u91cc\u7f16\u8bd1\u5b89\u88c5<br \/>\npython setup.py build<br \/>\nsudo python setup.py install<\/p>\n<p>\u63a5\u4e0b\u6765\u5c31\u662f\u521b\u5efa\u5b9e\u4f8b\u4e86\uff0c\u53c2\u8003INSTALL<br \/>\ntrac-admin \/path\/to\/projectenv initenv<\/p>\n<p>\u9700\u8981\u586b\u4e9b\u6570\u636e\u5e93\u8fde\u63a5\uff0c\u5b9e\u4f8b\u540d\u5b57\u4e4b\u7c7b\u7684\uff0c\u6211\u8fd9\u91cc\u6570\u636e\u5e93\u8fde\u63a5\u5982\u4e0b<br \/>\nmysql:\/\/trac:trac@127.0.0.1:3306\/trac<br \/>\n\u662f\u8fd9\u79cd\u683c\u5f0f<br \/>\nDATABASE_TYPE:\/\/USERNAME:PASSWD@HOST:PORT\/DATABASE_INSTANCE<br \/>\n\u5728HOST\u90a3\u91cc\u4f60\u5982\u679c\u586b\u7684\u662flocalhost\u5c31\u53ef\u80fd\u4f1a\u51fa\u4e0b\u9762\u8fd9\u4e2a\u9519\u8bef<br \/>\nOperationalError: (2002, &#8220;Can&#8217;t connect to local MySQL server through socket &#8216;\/var\/run\/mysqld\/mysqld.sock&#8217; (2)&#8221;)<br \/>\n\u5c06localhost\u6362\u6210127.0.0.1\u5c31\u4e0d\u4f1a\u62a5\u9519\u4e86\uff0c\u539f\u56e0\u662f\u5b83\u6307\u5b9a\u7684sock\u548c\u4f60\u673a\u5668\u4e0a\u5b9e\u9645\u7684sock\u8def\u5f84\u4e0d\u4e00\u81f4\uff0c\u586bIP\u5c31\u5f3a\u5236\u8981\u6c42\u901a\u8fc7TCP\/IP\u4e4b\u7c7b\u7684\u53bb\u8fde\uff0c\u4e0d\u7528socket<\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\u53ef\u4ee5\u7528\u5b83\u81ea\u5e26\u7684\u670d\u52a1\u5668\u6d4b\u8bd5\u4e0b<br \/>\n\u6267\u884ctracd &#8211;port 8000 \/path\/to\/projectenv<br \/>\n\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u952e\u5165http:\/\/localhost:8000\/\u5982\u679c\u80fd\u770b\u5230Trac\u7684\u4e1c\u897f\u5c31\u8bf4\u660eOK<\/p>\n<p>4\u3001\u6574\u5408\uff0c\u628a\u6211\u4eec\u7684Trac\u90e8\u7f72\u5230Nginx\u4e0a\u53bb<br \/>\n\u5f88\u7b80\u5355\uff0c\u5199\u4e2atrac-standalone-fcgi.py\u653e\u5230$TRAC_HOME\/cgi-bin\u5f53\u4e2d\uff0c\u8fd9\u91cc\u7684$TRAC_HOME\u662fTrac\u672c\u8eab\u5b89\u88c5\u7684\u4f4d\u7f6e\uff0c\u4e0d\u662ftrac-admin\u521b\u5efa\u51fa\u6765\u7684\u5b9e\u4f8b(\u6216\u5de5\u7a0b\uff0c\u9879\u76ee)\u7684\u4f4d\u7f6e<br \/>\n\u7b80\u5355\u7684\u8bf4\u5982\u679c\u4f60\u628aTrac\u8ba4\u4e3a\u662fPython\u7684\u4e00\u4e2a\u63d2\u4ef6\uff0c\u90a3\u4e48\u8fd9\u4e2a$TRAC_HOME\u5c31\u662f\u8fd9\u4e2a\u63d2\u4ef6\u7684\u4f4d\u7f6e<br \/>\ntrac-standalone-fcgi.py\u7684\u5185\u5bb9\u5982\u4e0b<br \/>\n<script src=\"https:\/\/gist.github.com\/917756.js?file=trac-standalone-fcgi.py\"><\/script><br \/>\n\u6267\u884cpython trac-standalone-fcgi.py &#038;<br \/>\n\u5f53\u7136\u4f60\u9700\u8981\u628a\u4e4b\u524d\u6253\u5f00\u7684\u4e00\u4e9b\u4e1c\u897f\u90fd\u505c\u6b62\uff0c\u6bd4\u5982fcgi.py\u6216tracd\u7b49<br \/>\n\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u952e\u5165http:\/\/localhost:8888\/\u5982\u679c\u80fd\u770b\u5230Trac\u7684\u4e1c\u897f\u5c31\u8bf4\u660eOK<br \/>\n\u6ce8\u610f\u8fd9\u4e9b\u7aef\u53e3\u53f7\u548c\u5730\u5740\uff0c\u8981\u7406\u89e3\u6e05\u695a\uff0c\u5f04\u6e05\u695a<\/p>\n<p>5\u3001\u6743\u9650\u914d\u7f6e<br \/>\n\u5982\u679c\u7b2c\u56db\u6b65\u6210\u529f\u641e\u5b9a\u7684\u8bdd\uff0c\u4f60\u5c31\u53ef\u4ee5\u6d4f\u89c8\u4e9b\u5185\u5bb9\u4e86\uff0c\u4f46\u4e0d\u4f1a\u53d1\u73b0\u4f60\u65e0\u6cd5\u6dfb\u52a0\u5185\u5bb9\u7b49\u7b49<br \/>\n\u8fd9\u91cc\u6743\u9650\u7528\u6237\u7ba1\u7406\u6709\u597d\u591a\u79cd\u65b9\u6cd5\uff0c\u5177\u4f53\u53c2\u8003\u5b98\u7f51\u8bf4\u660e\uff0c\u6211\u8fd9\u91cc\u662f\u628a\u7528\u6237\u4fe1\u606f\u653e\u5728key\u6587\u4ef6\u4e2d\u7684\uff0c\u91c7\u7528basic\u8ba4\u8bc1\u7684\u65b9\u5f0f<br \/>\n\u5c31\u662f\u90a3\u79cduser:passwd\u952e\u503c\u5bf9\u5f62\u5f0f\u5b58\u653e\u7684<br \/>\n\u8fd9\u6837\u505a\u7684\u8bdd\uff0c\u5148\u8981\u751f\u6210\u8fd9\u6837\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u53ef\u4ee5\u7528Apache\u7684htpasswd\u5de5\u5177\u6765\u751f\u6210<br \/>\n\u6211\u8fd9\u91cc\u4f7f\u7528\u7684$TRAC_HOME\/contrib\/htpasswd.py\u6765\u751f\u6210\u7684<br \/>\n.\/htpasswd.py -c -b $KEY_PATH\/trac.htpasswd admin admin<br \/>\n.\/htpasswd.py -b $KEY_PATH\/trac.htpasswd use1 use2<br \/>\n\u6ce8\u610f\u7b2c\u4e8c\u4e2a\u5c31\u4e0d\u7528-c\u53c2\u6570\u4e86\uff0c\u4f30\u8ba1\u8fd9\u91cc\u662f\u7b2c\u4e00\u4e2a\u5df2\u7ecf\u521b\u5efa\u6587\u4ef6\u4e86\uff0c\u540e\u9762\u7684\u5c31\u662f\u5f80\u91cc\u9762\u6dfb\u52a0\u5185\u5bb9\uff0c\u6240\u4ee5\u4e0d\u9700\u8981-c\u53c2\u6570<br \/>\n\u6709\u4e86\u8fd9\u4e2a\u7528\u6237\u5bc6\u7801\u6587\u4ef6\uff0c\u8fd8\u8981\u628a\u5b83\u548c\u6211\u4eec\u7684Nginx\u5173\u8054\u8d77\u6765\uff0c\u5728$NGINX_HOME\/conf\/nginx.conf\u4e2d\u52a0\u8fd9\u4e24\u884c<br \/>\n    auth_basic &#8220;Trac Realm&#8221;;<br \/>\n    auth_basic_user_file $KEY_PATH\/trac.htpasswd;<br \/>\n\u8fd8\u9700\u8981\u548c\u6211\u4eec\u7684\u5b9e\u4f8b(\u6216\u5de5\u7a0b\uff0c\u9879\u76ee)\u5173\u8054\u8d77\u6765\uff0c\u4e00\u822c\u8fd9\u91cc\u53ea\u9700\u8981\u589e\u52a0\u4e2a\u7ba1\u7406\u5458\u5c31\u884c\u4e86(\u65b9\u4fbf\u5728Web\u754c\u9762\u4e2d\u64cd\u4f5c)\uff0c\u547d\u4ee4\u5982\u4e0b<br \/>\ntrac-admin \/path\/to\/projectenv permission add admin TRAC_ADMIN<br \/>\n\u4f60\u4e5f\u53ef\u4ee5help\u770b\u4e0b\u8be5\u547d\u4ee4\u66f4\u591a\u7684\u7528\u6cd5\uff0c\u6bd4\u5982<br \/>\ntrac-admin \/path\/to\/projectenv permission list<\/p>\n<p>\u8fd9\u6837\u4f60\u518d\u91cd\u542fNginx\u548ctrac-standalone-fcgi.py\u5c31\u53ef\u4ee5\u770b\u89c1\u9700\u8981\u4f60\u8f93\u5165\u7528\u6237\u540d\u5bc6\u7801\u7684\u63d0\u793a\u4e86\uff0c\u8fd9\u662f\u91c7\u7528HTTP\u7684\u8ba4\u8bc1\u65b9\u5f0f\uff0c\u6240\u4ee5\u4f1a\u54d0\u54d0\u7684\u63d0\u793a\u4f60\u8f93\u5165\u7528\u6237\u540d\u5bc6\u7801<br \/>\n\u4f60\u53ef\u4ee5\u5b89\u88c5\u4e9b\u63d2\u4ef6\u6765\u5b8c\u6210\u666e\u901a\u7684\u57fa\u4e8e\u8868\u5355\u7684\u9a8c\u8bc1\u65b9\u5f0f<\/p>\n<p>\u4e0d\u8fc7\u4f60\u5bc6\u7801\u6587\u4ef6\u521b\u5efa\u5b8c\u6210\u4e4b\u540e\u53ef\u4ee5\u901a\u8fc7\u81ea\u5e26\u7684\u670d\u52a1\u5668\u9a8c\u8bc1\u4e0b\u662f\u5426\u6210\u529f<br \/>\ntracd -p 8000 &#8211;basic-auth=projectenv,$KEY_PATH\/trac.htpasswd,&#8221; \/path\/to\/projectenv<br \/>\n\u5b83\u63d0\u793a\u4f60\u9700\u8981\u8f93\u5165\u7528\u6237\u540d\u5bc6\u7801\uff0c\u7528\u7ba1\u7406\u5458\u767b\u5f55\u4e4b\u540e\u80fd\u770b\u89c1Admin Tab\uff0c\u80fd\u521b\u5efaTicket\u5c31\u8bf4\u660eOK<\/p>\n<p>\u6211\u5728\u90e8\u7f72\u5728Nginx\u4e0a\u7684\u65f6\u5019\uff0c\u5f00\u59cb\u6b7b\u547d\u7684\u90fd\u770b\u4e0d\u89c1Admin Tab\uff0c\u4e0d\u80fd\u521b\u5efaTicket\uff0c\u540e\u6765\u53d1\u73b0\u5f88\u591a\u4eba\u4e5f\u6709\u7c7b\u4f3c\u7684\u95ee\u9898<br \/>\n\u540e\u6765\u5728$NGINX_HOME\/conf\/nginx.conf\u52a0\u5165\u4e86<br \/>\n    # for authentication to work<br \/>\n    fastcgi_param AUTH_USER $remote_user;<br \/>\n    fastcgi_param REMOTE_USER $remote_user;<br \/>\n\u5c31OK\u4e86<\/p>\n<p>\u53c2\u8003http:\/\/trac.edgewall.org\/wiki\/TracFastCgi<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b8c\u6574\u8be6\u7ec6\u7684\u5b89\u88c5\u65b9\u6cd5\u8bf7\u53c2\u8003\u5b98\u7f51http:\/\/trac.edgewall.org\/wiki\/TracInstall\u6216\u8005INSTALL \u672c\u6587\u4e3b\u8981\u8bb0\u5f55\u6211\u5728\u5b89\u88c5\u7684\u65f6\u5019\u9047\u5230\u7684\u4e00\u4e9b\u95ee\u9898\u548c\u89e3\u51b3\u529e\u6cd5\uff0c\u6709\u8bef\u5bfc\u7684\u5730\u65b9\u6b22\u8fce\u6307\u6b63 \u4e00\u822c\u90fd\u662f\u88c5\u6570\u636e\u5e93\uff0c\u88c5\u670d\u52a1\u5668\uff0c\u88c5Trac\u7a0b\u5e8f 0\u3001\u5b89\u88c5Python\u73af\u5883\uff0c\u9ed8\u8ba4\u90fd\u6709\uff0c\u53ea\u9700\u8981\u68c0\u67e5\u7248\u672c\u662f\u5426\u7b26\u5408\uff0c\u5b89\u88c5\u9700\u8981\u7684Python\u63d2\u4ef6 1\u3001\u5b89\u88c5\u6570\u636e\u5e93\uff0c\u6211\u8fd9\u91cc\u7528\u7684\u662fMySQLhttp:\/\/lucane.iteye.com\/blog\/866355 Trac\u662fPython\u5199\u7684\uff0c\u8bbf\u95eeMySQL\u7528\u7684\u662fMySQL-python \u9700\u8981\u914d\u7f6e\u7684\u5c31\u662f$MYSQL_PYTHON_HOME\/site.cfg\/site.cfg \u4e0b\u7684mysql_config = $MYSQL_HOME\/bin\/mysql_config \u76ee\u524d\u6211\u7684\u8fd9\u4e9b\u4e1c\u897f\u90fd\u5728\u4e00\u53f0\u673a\u5668\u4e0a\uff0c\u5982\u679c\u5206\u5e03\u5728\u591a\u53f0\u673a\u5668\u4e0a\u8fd8\u771f\u4e0d\u77e5\u9053\u600e\u4e48\u88c5 2\u3001\u5b89\u88c5Nginx\uff0c\u6211\u8fd9\u91cc\u662f\u7f16\u8bd1\u5b89\u88c5 .\/configure &#8211;prefix=$PATH_TO_INSTALL\/nginx make make install \u53ef\u80fd\u542f\u52a8\u7684\u65f6\u5019\u62a5\u9519\uff0c\u7c7b\u4f3c\u4e8e\u4e0b\u9762\u8fd9\u6837 [emerg]: bind() to 0.0.0.0:80 failed (13: Permission denied) \u8fd9\u662f\u56e0\u4e3a\u7aef\u53e3\u53f7\u7684\u95ee\u9898\uff0c\u5728Linux\u4e2d1024\u4e0b\u7684\u7aef\u53e3\u53f7\u90fd\u9700\u8981root\u7528\u6237\u624d\u80fd\u4f7f\u7528 \u6240\u4ee5\u666e\u901a\u7528\u6237\u542f\u52a8\u7a0b\u5e8f\u7ed1\u5b9a\u4f1a\u62a5\u51fa\u6743\u9650\u95ee\u9898\uff0c\u6211\u8fd9\u91cc\u662f\u628aNginx\u7ed1\u5b9a\u7684\u7aef\u53e3\u53f7\u6539\u4e3a8888 Nginx\u6bd4\u8f83\u7b80\u964b\uff0c\u542f\u52a8\u4e4b\u540e\u5173\u95ed\u4e00\u822c\u8981\u901a\u8fc7kill\u547d\u4ee4\u6740\u8fdb\u7a0b\uff0c\u5177\u4f53\u7684\u53c2\u8003Nginx\u76f8\u5173\u624b\u518c \u8fd9\u91cc\u5217\u51fa\u51e0\u4e2a\u7b80\u5355\u7684 \u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u540e\u68c0\u67e5\u914d\u7f6e\u6587\u4ef6\u8bed\u6cd5\u662f\u5426\u6b63\u786e nginx -t -c $NGINX_HOME\/conf\/nginx.conf t\u56e0\u8be5\u662f\u8868\u793a\u6d4b\u8bd5\u7684\u610f\u601d\uff0cc\u5c31\u662f\u6307\u5b9a\u6240\u7528\u914d\u7f6e\u6587\u4ef6\u7684\u5730\u65b9\uff0c\u8fd9\u91cc\u53ef\u4ee5\u81ea\u7531\u53d1\u6325 \u505c\u6b62Nginx kill -quit PID_OF_NGINX \u5e73\u6ed1\u91cd\u542fNginx kill -hup PID_OF_NGINX \u542f\u52a8Nginx\u5c31\u4e0d\u8bf4\u4e86 \u5173\u952e\u662f\u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\uff0c\u8fd9\u91cc\u6bd4\u8f83\u590d\u6742\uff0c\u81f3\u5c11\u5bf9\u4e8e\u65b0\u624b\u6765\u8bf4\u662f\u8fd9\u6837\u7684 \u6211\u4e5f\u662f\u53c2\u8003\u4e86http:\/\/marshalys.blogspot.com\/2009\/02\/freebsdtrac.html\u624d\u5f04\u51fa\u6765\u7684 \u6211\u5148\u628a\u6211\u7684\u914d\u7f6e\u6587\u4ef6\u8d34\u51fa\u6765\uff0c\u53ef\u80fd\u6709\u4e9b\u65e0\u7528\uff0c\u4f46\u662f\u6682\u65f6\u5c31\u8fd9\u6837\u4e86 nginx.conf server { listen 8888; server_name localhost; &hellip; <a href=\"https:\/\/guoh.ai\/lifelog\/2011\/04\/some-tips-on-trac-installation\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Nginx+FastCGI+MySQL+Linux\u642d\u5efaTrac 0.12.2\u73af\u5883<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_gfmr_meta_descriptions":[],"_gfmr_multilingual_taxonomy_terms":[],"footnotes":""},"categories":[6],"tags":[],"class_list":["post-105","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/posts\/105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/comments?post=105"}],"version-history":[{"count":6,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/posts\/105\/revisions"}],"predecessor-version":[{"id":111,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/posts\/105\/revisions\/111"}],"wp:attachment":[{"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/media?parent=105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/categories?post=105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/tags?post=105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}