{"id":128,"date":"2021-05-31T00:27:00","date_gmt":"2021-05-31T00:27:00","guid":{"rendered":"https:\/\/262235.xyz\/?p=128"},"modified":"2021-05-31T00:27:00","modified_gmt":"2021-05-31T00:27:00","slug":"128","status":"publish","type":"post","link":"https:\/\/lyvba.com\/index.php\/2021\/05\/31\/128\/","title":{"rendered":"EduSoho\u4f01\u57f9\u7248_\u5b89\u88c5\u5411\u5bfc\u7b14\u8bb0"},"content":{"rendered":"<h3>docker-compose.yml  \u90e8\u7f72\u6587\u4ef6<\/h3>\n<pre><code>version: '3.1'\nservices:\n\n    db:\n        image: mysql\n        command: --default-authentication-plugin=mysql_native_password\n        restart: always\n        volumes:\n            - \/data\/mysql:\/var\/lib\/mysql\n        environment:\n            MYSQL_DATABASE: edusoho\n            MYSQL_ROOT_PASSWORD: edusoho@2021\n\n\n    edusoho:\n        image: hongwenjun\/nginx-php\n        container_name: edusoho\n        restart: always\n        volumes:\n            - \/data\/www\/:\/var\/www\/\n            - \/data\/www\/edu.conf:\/\/etc\/nginx\/conf.d\/edu.conf\n        ports:\n            - 80:80\n            - 443:443\n<\/code><\/pre>\n<h3>\u6302\u8f7d\u6587\u4ef6\u51c6\u5907<\/h3>\n<pre><code>mkdir -p  \/data\/mysql   \/data\/www\ncd \/data\/www\nwget  https:\/\/download.edusoho.com\/edusoho-ct-21.1.3.zip\nunzip edusoho-ct-21.1.3.zip\nchown -R www-data:www-data edusoho\/<\/code><\/pre>\n<h3>\u521d\u59cb\u5316\u6570\u636e\u5e93 nginx \u914d\u7f6e\uff0c\u8981\u4f7f\u7528\u57df\u540d\uff0c\u8981\u516c\u7f51IP<\/h3>\n<ul>\n<li>vim \/data\/www\/edu.conf<\/li>\n<\/ul>\n<pre><code>server {\n        listen 80 default_server;\n        listen [::]:80 default_server;\n\n        root \/var\/www\/edusoho\/web;\n\n        index index.html index.php index.nginx-debian.html;\n\n        server_name vir18.lyvba.com;\n\n        location \/ {\n\n                try_files $uri $uri\/ =404;\n        }\n\n        location ~ .*.php(\/.*)*$ {\n                include snippets\/fastcgi-php.conf;\n\n                fastcgi_pass unix:\/run\/php\/php7.3-fpm.sock;\n\n        #       fastcgi_pass 127.0.0.1:9000;\n        }\n\n}\n<\/code><\/pre>\n<h3>\u90e8\u7f72 LNMP<\/h3>\n<pre><code>docker-compose up -d\n\ndocker logs edusoho\ndocker exec -it  edusoho  rm \/etc\/nginx\/sites-enabled\/default\n\ndocker restart edusoho\ndocker logs edusoho\n\n\n\nhttp:\/\/vir18.lyvba.com\/app.php\nhttp:\/\/vir18.lyvba.com\/install\/start-install.php<\/code><\/pre>\n<h3>\u5176\u4ed6\u4fe1\u606f<\/h3>\n<pre><code>EduSoho\u4f01\u57f9\u7248 \u5b89\u88c5\u5411\u5bfc v21.1.3\n\n\u6570\u636e\u5e93\u670d\u52a1\u5668 db\n\u6570\u636e\u5e93\u5bc6\u7801\u89c1 docker-compose.yml\n\n### \u4e00\u5b9a\u8981\u516c\u7f51IP \u548c \u57df\u540d\uff0c\u4f30\u8ba1\u8fde\u63a5\u6388\u6743\u4e91\u670d\u52a1\n\nEduSoho\u4f01\u57f9\u7248 \u5b89\u88c5\u5411\u5bfc v21.1.3\n1. \u73af\u5883\u68c0\u6d4b\n2. \u521b\u5efa\u6570\u636e\u5e93\n3. \u521d\u59cb\u5316\u7cfb\u7edf\n4. \u5b8c\u6210\u5b89\u88c5\n\u606d\u559c\uff0c\u7cfb\u7edf\u5df2\u5b89\u88c5\u6210\u529f\uff01\nAccessKey: CoJ90SqbDvcCDlZmtY9ktqsT96cb7okZ\n\nSecretKey: ZZwr4WZTmCx0S89pK5jUBDuEdKBXnzIq\n\n\u8bf7\u59a5\u5584\u4fdd\u7ba1\u6388\u6743\u7801\uff0c\u5347\u7ea7EduSoho\u7cfb\u7edf\u3001\u8d2d\u4e70EduSoho\u5e94\u7528\u3001\u4f7f\u7528EduSoho\u4e91\u670d\u52a1\uff0c\u90fd\u9700\u4f7f\u7528\u6b64\u6388\u6743\u7801\u3002<\/code><\/pre>\n<h3>\u8bbf\u95ee * \u5b89\u88c5\u6559\u7a0b\uff1a <a href=\"http:\/\/ct.edusoho.com\/page\/guide\">http:\/\/ct.edusoho.com\/page\/guide<\/a>   \u4fee\u6539\u80fd\u7528 Nginx \u914d\u7f6e<\/h3>\n<pre><code>\nserver {\n\n    set $root_dir \/var\/www\/edusoho;\n\n         # \u6539\u6210\u60a8\u7684\u7f51\u7ad9\u57df\u540d\n\n    server_name www.example.com;\n\n    root $root_dir\/web;\n\n    error_log \/var\/log\/nginx\/edusoho.error.log;\n\n    access_log \/var\/log\/nginx\/edusoho.access.log;\n\n    location \/ {\n        index app.php;\n        try_files $uri @rewriteapp;\n    }is\n\n    location @rewriteapp {\n        rewrite ^(.*)$ \/app.php\/$1 last;\n    }\n\n    location ~ ^\/(app|app_dev).php(\/|$) {\n\n# \u6dfb\u52a02\u884c\n        include snippets\/fastcgi-php.conf;\n        fastcgi_pass unix:\/run\/php\/php7.3-fpm.sock;\n\n# \u6ce8\u91ca  fastcgi_pass 127.0.0.1:9000;\n# \u6ce8\u91ca  fastcgi_split_path_info ^(.+.php)(\/.*)$;\n\n        include fastcgi_params;\n\n        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;\n\n        fastcgi_param DOCUMENT_ROOT $realpath_root;\n\n        fastcgi_param HTTP_X-Sendfile-Type X-Accel-Redirect;\n\n        fastcgi_param HTTP_X-Accel-Mapping \/udisk=$root_dir\/app\/data\/udisk;\n\n        fastcgi_buffer_size 128k;\n\n        fastcgi_buffers 8 128k;\n\n        internal;\n\n    }\n\n    location ~* .(jpg|jpeg|gif|png|ico|swf)$ {\n\n        expires 3y;\n\n        access_log off;\n\n        gzip off;\n\n    }\n\n    location ~* .(css|js)$ {\n\n        expires 3y;\n\n        access_log off;\n\n    }\n\n    location ~ ^\/udisk {\n\n        root $root_dir\/app\/data\/;\n\n        internal;\n\n    }\n\n\n\n\n} <\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>docker-compose.yml \u90e8\u7f72\u6587\u4ef6 version: &#8216;3.1&#8217; services: d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,8],"tags":[15],"class_list":["post-128","post","type-post","status-publish","format-standard","hentry","category-docker","category-linux","tag-docker"],"_links":{"self":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/comments?post=128"}],"version-history":[{"count":0,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/128\/revisions"}],"wp:attachment":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/media?parent=128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/categories?post=128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/tags?post=128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}