安装环境:ubuntu2204 + mysql:8.0.36 + php:7.3 + nginx:1.18 + edusoho:23.4.4
ubuntu环境初始化 1 2 3 4 5 6 root@ubuntu2204:~ root@ubuntu2204:~ root@ubuntu2204:~
安装配置nginx 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 root@ubuntu2204:~ root@ubuntu2204:~ http { client_max_body_size 1024M; sendfile on; tcp_nopush on; root@ubuntu2204:~
安装配置mysql 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 root@ubuntu2204:~ Listing... Done mysql-server/jammy-updates,jammy-security 8.0.36-0ubuntu0.22.04.1 all N: There is 1 additional version. Please use the '-a' switch to see it root@ubuntu2204:~ root@ubuntu2204:~ mysql> SHOW VARIABLES LIKE 'validate_password%' ; Empty set (0.04 sec) mysql> ALTER USER 'root' @'localhost' IDENTIFIED WITH mysql_native_password BY 'qwer@1234' ; Query OK, 0 rows affected (0.15 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.08 sec) root@ubuntu2204:~
安装配置PHP环境 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 root@ubuntu2204:~ root@ubuntu2204:~ root@ubuntu2204:~ root@ubuntu2204:~ root@ubuntu2204:~ root@ubuntu2204:~ post_max_size = 1024M memory_limit = 1024M upload_max_filesize = 1024M root@ubuntu2204:~ ;listen = /run/php/php7.3-fpm.sock listen = 127.0.0.1:9000 root@ubuntu2204:~
下载并初始化edusoho 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 root@ubuntu2204:~ root@ubuntu2204:/var/www root@ubuntu2204:/var/www root@ubuntu2204:/var/www root@ubuntu2204:/var/www root@ubuntu2204:/var/www total 44 drwxrwxrwx 10 www-data www-data 4096 Dec 25 07:17 ./ drwxr-xr-x 4 root root 4096 May 29 04:49 ../ -rwxrwxrwx 1 www-data www-data 1320 Dec 25 07:17 README.txt* drwxrwxrwx 5 www-data www-data 4096 Dec 25 07:17 api/ drwxrwxrwx 8 www-data www-data 4096 Dec 25 07:17 app/ drwxrwxrwx 2 www-data www-data 4096 Dec 25 07:17 bootstrap/ drwxrwxrwx 2 www-data www-data 4096 Dec 25 07:17 plugins/ drwxrwxrwx 10 www-data www-data 4096 Dec 25 07:17 src/ drwxrwxrwx 54 www-data www-data 4096 Dec 25 07:17 vendor/ drwxrwxrwx 3 www-data www-data 4096 Dec 25 07:17 vendor_user/ drwxrwxrwx 9 www-data www-data 4096 Dec 25 07:17 web/
配置edusoho站点nginx配置 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 root@ubuntu2204:/var/www server { listen 80; server_name edu.xcjyc.top; root /var/www/edusoho/web; access_log /var/log/nginx/edusoho.com.access.log ; error_log /var/log/nginx/edusoho.com.error.log; location / { index app.php; try_files $uri @rewriteapp; } location @rewriteapp { rewrite ^(.*)$ /app.php/$1 last; } location ~ ^/udisk { internal; root /var/www/edusoho/app/data/; } location ~ ^/(app|app_dev)\.php(/|$) { fastcgi_pass 127.0.0.1:9000; fastcgi_split_path_info ^(.+\.php)(/.*)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name ; fastcgi_param HTTP_X-Sendfile-Type X-Accel-Redirect; fastcgi_param HTTP_X-Accel-Mapping /udisk=/var/www/edusoho/app/data/udisk; fastcgi_param TRACE_ID $request_id ; fastcgi_buffer_size 128k; fastcgi_buffers 8 128k; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_split_path_info ^(.+\.php)(/.*)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name ; fastcgi_param HTTP_PROXY "" ; } location ~* \.(jpg|jpeg|gif|png|ico|swf)$ { expires 3y; access_log off; gzip off; } location ~* \.(css|js)$ { access_log off; expires 3y; } location ~* \.(eot|svg|ttf|woff|woff2)$ { add_header Access-Control-Allow-Origin *; expires 3y; access_log off; gzip off; } location ~ ^/files/.*\.(php|php5)$ { deny all; } } root@ubuntu2204:~
打开浏览器初始化edusoho 初始化安装完成后可执行升级程序,升级edusoho版本。