LNMP環境介紹和搭建

一.LNMP簡介

1.含義

2.工作原理

二.部署LNMP環境

1.Nginx環境

(1)上傳nginx包,下載編譯安裝工具并解包到指定目錄(tar 參數 tar包 - C 目錄路徑)

(2) 開始編譯安裝,每次編譯后會出現一些包確實報錯,按照報的包名安裝完成即可,安裝好又繼續編譯

(3)直到出現這個界面就可以開始安裝

(4)配置nginx的service啟動?

?2.Mysql環境

(1)如下新增yum庫?

(2)安裝MariaDB-client.x86_64和MariaDB-server.x86_64并啟動mariadb

(3)設置數據庫密碼并登錄?

3.PHP環境

(1)新增擴展源,安裝PHP相關包

(2)啟動php-fpm?

(3)到安裝nginx目錄下去修改nginx.conf文件,找到這部分內容并取消注釋1,更改為時間html文件存放路徑

(4)重啟nginx

?三.簡單測試LNMP環境

到上面nginx配置文件指定的html目錄中新建php文件,"phpinfo();"會顯示php環境的相關信息?


一.LNMP簡介

1.含義

LNMP分貝指的是Linux、Nginx、Mysql、PHP首字母縮寫,四者組合起來工作

2.工作原理

用戶通過瀏覽器輸入域名時首先訪問的是nginx的web服務靜態頁面由nginx處理,“.php”的動態文件就會由nginx利用FastCGI(可伸縮、高速的在http服務器和腳本語言之間通信的接口,Linux下這個交口是socket,會把動態語言文件和http服務器分離開處理,讓http服務器專心處理靜態頁面,自己將動態頁面處理好返給http服務器)接口交給PHP引擎處理解析,若是還要讀取數據庫信息,則PHP又繼續向mysql數據庫發出請求,處理完成后再將數據返回給用戶

二.部署LNMP環境

1.Nginx環境

(1)上傳nginx包,下載編譯安裝工具并解包到指定目錄(tar 參數 tar包 - C 目錄路徑)

[root@localhost src]# ll
total 1052
drwxr-xr-x 8 1001 1001 ????158 May 24 ?2022 nginx-1.22.0
-rw-r--r-- 1 root root 1073322 Aug ?9 19:20 nginx-1.22.0.tar.gz
[root@localhost src]# cd nginx-1.22.0/
[root@localhost nginx-1.22.0]# yum install -y gcc gcc-c++ devel?make
[root@localhost nginx-1.22.0]# ll
total 800
drwxr-xr-x 6 1001 1001 ???326 Aug 12 10:03 auto
-rw-r--r-- 1 1001 1001 317070 May 24 ?2022 CHANGES
-rw-r--r-- 1 1001 1001 484445 May 24 ?2022 CHANGES.ru
drwxr-xr-x 2 1001 1001 ???168 Aug 12 10:03 conf
-rwxr-xr-x 1 1001 1001 ??2590 May 24 ?2022 configure
drwxr-xr-x 4 1001 1001 ????72 Aug 12 10:03 contrib
drwxr-xr-x 2 1001 1001 ????40 Aug 12 10:03 html
-rw-r--r-- 1 1001 1001 ??1397 May 24 ?2022 LICENSE
drwxr-xr-x 2 1001 1001 ????21 Aug 12 10:03 man
-rw-r--r-- 1 1001 1001 ????49 May 24 ?2022 README
drwxr-xr-x 9 1001 1001 ????91 Aug 12 10:03 src

(2) 開始編譯安裝,每次編譯后會出現一些包確實報錯,按照報的包名安裝完成即可,安裝好又繼續編譯

[root@localhost nginx-1.22.0]# ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'[root@localhost nginx-1.22.0]# yum install -y pcre-devel[root@localhost nginx-1.22.0]# ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'[root@localhost nginx-1.22.0]# yum install -y openssl-devel[root@localhost nginx-1.22.0]# ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'

(3)直到出現這個界面就可以開始安裝

[root@localhost nginx-1.22.0]# make
[root@localhost nginx-1.22.0]# make install
[root@localhost nginx-1.22.0]# nginx -v
nginx version: nginx/1.22.0

(4)配置nginx的service啟動?

[root@localhost ~]# whereis nginx
nginx: /usr/sbin/nginx /etc/nginx[root@localhost ~]# vim /usr/lib/systemd/system/nginx.service
[Unit]
Description=nginx - high performance web server
Documentation=http://nginx.org/en/docs/
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t -c /usr/local/src/nginx-1.22.0/conf/nginx.conf
ExecStart=/usr/sbin/nginx -c /usr/local/src/nginx-1.22.0/conf/nginx.conf
#填上面你的設備查到的目錄以及你的nginx.conf的所在位置
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target[root@localhost ~]# systemctl restart nginx.service 
[root@localhost ~]# systemctl status nginx.service 
● nginx.service - nginx - high performance web serverLoaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)Active: active (running) since Sat 2023-08-12 23:10:12 CST; 6s agoDocs: http://nginx.org/en/docs/Process: 19217 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=0/SUCCESS)Process: 19225 ExecStart=/usr/sbin/nginx -c /usr/local/src/nginx-1.22.0/conf/nginx.conf (code=exited, status=0/SUCCESS)Process: 19222 ExecStartPre=/usr/sbin/nginx -t -c /usr/local/src/nginx-1.22.0/conf/nginx.conf (code=exited, status=0/SUCCESS)Main PID: 19226 (nginx)CGroup: /system.slice/nginx.service├─19226 nginx: master process /usr/sbin/nginx -c /usr/local/src/nginx-1.22.0/conf/nginx.conf└─19227 nginx: worker processAug 12 23:10:12 localhost.localdomain systemd[1]: Starting nginx - high performance web server...
Aug 12 23:10:12 localhost.localdomain nginx[19222]: nginx: the configuration file /usr/local/src/nginx-1.22.0/conf/nginx.conf syntax is ok
Aug 12 23:10:12 localhost.localdomain nginx[19222]: nginx: configuration file /usr/local/src/nginx-1.22.0/conf/nginx.conf test is successful
Aug 12 23:10:12 localhost.localdomain systemd[1]: Failed to parse PID from file /run/nginx.pid: Invalid argument
Aug 12 23:10:12 localhost.localdomain systemd[1]: Started nginx - high performance web server.

?2.Mysql環境

我使用的是mariadb

(1)如下新增yum庫?

[root@localhost yum.repos.d]# ll
total 8
-rw-r--r--. 1 root root ?68 Jul 23 09:13 cdrom.repo
-rw-r--r-- ?1 root root 561 Aug 12 09:55 mariadb.repo[root@localhost yum.repos.d]# vim mariadb.repo
# MariaDB 10.6 CentOS repository list - created 2023-08-12 01:54 UTC
# https://mariadb.org/download/
[mariadb]
name = MariaDB
# rpm.mariadb.org is a dynamic mirror if your preferred mirror goes offline. See https://mariadb.org/mirrorbits/ for details.
# baseurl = https://rpm.mariadb.org/10.6/centos/$releasever/$basearch
baseurl = https://mirrors.aliyun.com/mariadb/yum/10.6/centos/$releasever/$basearch
module_hotfixes = 1
# gpgkey = https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB
gpgkey = https://mirrors.aliyun.com/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck = 1

(2)安裝MariaDB-client.x86_64和MariaDB-server.x86_64并啟動mariadb

[root@localhost yum.repos.d]# yum install -y MariaDB-client.x86_64 MariaDB-server.x86_64[root@localhost yum.repos.d]# systemctl start mariadb[root@localhost yum.repos.d]# systemctl status mariadb
● mariadb.service - MariaDB 10.6.14 database serverLoaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)Drop-In: /etc/systemd/system/mariadb.service.d└─migrated-from-my.cnf-settings.confActive: active (running) since Sat 2023-08-12 09:58:12 CST; 9s agoDocs: man:mariadbd(8)https://mariadb.com/kb/en/library/systemd/Process: 2759 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)Process: 2730 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || ??VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] ??&& systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)Process: 2728 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)Main PID: 2742 (mariadbd)Status: "Taking your SQL requests now..."CGroup: /system.slice/mariadb.service└─2742 /usr/sbin/mariadbd
Aug 12 09:58:12 localhost.localdomain mariadbd[2742]: 2023-08-12 ?9:58:12 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Aug 12 09:58:12 localhost.localdomain mariadbd[2742]: 2023-08-12 ?9:58:12 0 [Note] InnoDB: 10.6.14 started; log sequence number 41320; ...n id 14
Aug 12 09:58:12 localhost.localdomain mariadbd[2742]: 2023-08-12 ?9:58:12 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/i...er_pool
Aug 12 09:58:12 localhost.localdomain mariadbd[2742]: 2023-08-12 ?9:58:12 0 [Note] Plugin 'FEEDBACK' is disabled.
Aug 12 09:58:12 localhost.localdomain mariadbd[2742]: 2023-08-12 ?9:58:12 0 [Note] InnoDB: Buffer pool(s) load completed at 230812 ?9:58:12
Aug 12 09:58:12 localhost.localdomain mariadbd[2742]: 2023-08-12 ?9:58:12 0 [Note] Server socket created on IP: '0.0.0.0'.
Aug 12 09:58:12 localhost.localdomain mariadbd[2742]: 2023-08-12 ?9:58:12 0 [Note] Server socket created on IP: '::'.
Aug 12 09:58:12 localhost.localdomain mariadbd[2742]: 2023-08-12 ?9:58:12 0 [Note] /usr/sbin/mariadbd: ready for connections.
Aug 12 09:58:12 localhost.localdomain mariadbd[2742]: Version: '10.6.14-MariaDB' ?socket: '/var/lib/mysql/mysql.sock' ?port: 3306 ?MariaDB Server
Aug 12 09:58:12 localhost.localdomain systemd[1]: Started MariaDB 10.6.14 database server.
Hint: Some lines were ellipsized, use -l to show in full.

(3)設置數據庫密碼并登錄?

[root@localhost yum.repos.d]# mysql -uroot -p123456
Welcome to the MariaDB monitor. ?Commands end with ; or \g.
Your MariaDB connection id is 7
Server version: 10.6.14-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> show databases;
+--------------------+
| Database ??????????|
+--------------------+
| information_schema |
| mysql ?????????????|
| performance_schema |
| sys ???????????????|
| test ??????????????|
+--------------------+5 rows in set (0.001 sec)

3.PHP環境

(1)新增擴展源,安裝PHP相關包

?[root@localhost ~]#?yum install epel-release
[root@localhost ~]#?rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
[root@localhost ~]#?yum --enablerepo=remi install php56-php php56-php-devel php56-php-fpm php56-php-gd php56-php-xml php56-php-sockets php56-php-session php56-php-snmp php56-php-mysql

(2)啟動php-fpm?

[root@localhost conf]# find / -name php-fpm
/opt/remi/php56/root/etc/sysconfig/php-fpm
/opt/remi/php56/root/usr/sbin/php-fpm
/opt/remi/php56/root/var/log/php-fpm
/opt/remi/php56/root/var/run/php-fpm
[root@localhost conf]# /opt/remi/php56/root/usr/sbin/php-fpm

(3)到安裝nginx目錄下去修改nginx.conf文件,找到這部分內容并取消注釋1,更改為時間html文件存放路徑

[root@localhost ~]# cd /usr/local/src/nginx-1.22.0/conf/
[root@localhost conf]# vim nginx.conf
location ~ \.php$ {root           /usr/local/src/nginx-1.22.0/html;fastcgi_pass   127.0.0.1:9000;fastcgi_index  index.php;#fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include        fastcgi_params;}

注意報錯1:

Aug 12 10:21:01 localhost.localdomain nginx[13328]: nginx: [emerg] getpwnam("nginx") failed

解決1:

[root@localhost conf]# useradd -M -s /sbin/nologin nginx

注意報錯2:

Aug 12 10:22:29 localhost.localdomain nginx[13346]: nginx: [emerg] mkdir() "/var/cache/nginx/client_temp" failed (2: No such file or directory)

解決2:

[root@localhost conf]# mkdir -pv /var/cache/nginx/client_temp
mkdir: created directory ‘/var/cache/nginx’
mkdir: created directory ‘/var/cache/nginx/client_temp’

(4)重啟nginx

[root@localhost conf]# systemctl start nginx
[root@localhost conf]# systemctl status nginx
● nginx.service - nginx - high performance web serverLoaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)Active: active (running) since Sat 2023-08-12 10:23:57 CST; 6s agoDocs: http://nginx.org/en/docs/Process: 13361 ExecStart=/usr/sbin/nginx -c /usr/local/src/nginx-1.22.0/conf/nginx.conf (code=exited, status=0/SUCCESS)Process: 13358 ExecStartPre=/usr/sbin/nginx -t -c /usr/local/src/nginx-1.22.0/conf/nginx.conf (code=exited, status=0/SUCCESS)Main PID: 13362 (nginx)CGroup: /system.slice/nginx.service├─13362 nginx: master process /usr/sbin/nginx -c /usr/local/src/nginx-1.22.0/conf/nginx.conf└─13363 nginx: worker processAug 12 10:23:57 localhost.localdomain systemd[1]: Starting nginx - high performance web server...
Aug 12 10:23:57 localhost.localdomain nginx[13358]: nginx: the configuration file /usr/local/src/nginx-1.22.0/conf/nginx.conf syntax is ok
Aug 12 10:23:57 localhost.localdomain nginx[13358]: nginx: configuration file /usr/local/src/nginx-1.22.0/conf/nginx.conf test is successful
Aug 12 10:23:57 localhost.localdomain systemd[1]: Started nginx - high performance web server.

?三.簡單測試LNMP環境

到上面nginx配置文件指定的html目錄中新建php文件,"phpinfo();"會顯示php環境的相關信息?

[root@localhost html]# cat phpinfo.php 
<?phpphpinfo();
?>
[root@localhost html]# 

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/35136.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/35136.shtml
英文地址,請注明出處:http://en.pswp.cn/news/35136.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

nbcio-boot升級到3.1后出現online表單新增報錯

nbcio-boot升級springboot、mybatis-plus和JSQLParser后出現新增online表單的時候報錯&#xff0c;如下&#xff1a; 2023-08-13 21:18:01.292 [http-nio-8080-exec-12] [1;31mERROR[0;39m [36mo.jeecg.common.exception.JeecgBootExceptionHandler:69[0;39m - Handler dispat…

【JVM】JVM垃圾收集器

文章目錄 什么是JVM垃圾收集器四種垃圾收集器&#xff08;按類型分&#xff09;1.串行垃圾收集器(效率低&#xff09;2.并行垃圾收集器(JDK8默認使用此垃圾回收器&#xff09;3.CMS&#xff08;并發&#xff09;垃圾收集器(只針對老年代垃圾回收的&#xff09;4.G1垃圾回收器(在…

設計模式之七:適配器模式與外觀模式

面向對象適配器將一個接口轉換成另一個接口&#xff0c;以符合客戶的期望。 // 用火雞來冒充一下鴨子class Duck { public:virtual void quack() 0;virtual void fly() 0; };class Turkey { public:virtual void gobble() 0;virtual void fly() 0; };class TurkeyAdapter :…

利用爬蟲爬取圖片并保存

1 問題 在工作中&#xff0c;有時會遇到需要相當多的圖片資源&#xff0c;可是如何才能在短時間內獲得大量的圖片資源呢&#xff1f; 2 方法 我們知道&#xff0c;網頁中每一張圖片都是一個連接&#xff0c;所以我們提出利用爬蟲爬取網頁圖片并下載保存下來。 首先通過網絡搜索…

Linux 1.2.13 -- IP分片重組源碼分析

Linux 1.2.13 -- IP分片重組源碼分析 引言為什么需要分片傳輸層是否存在分段操作IP分片重組源碼分析ip_createip_findip_frag_createip_doneip_glueip_freeip_expireip_defragip_rcv 總結 本文源碼解析參考: 深入理解TCP/IP協議的實現之ip分片重組 – 基于linux1.2.13 計網理論…

樹莓派RP2040 用Arduino IDE安裝和編譯

目錄 1 Arduino IDE 1.1 IDE下載 1.2 安裝 arduino mbed os rp2040 boards 2 編程-燒錄固件 2.1 打開點燈示例程序 2.2 選擇Raspberry Pi Pico開發板 2.3 編譯程序 2.4 燒錄程序 2.4.1 Raspberry Pi Pico開發板首次燒錄提示失敗 2.4.2 解決首次下載失敗問題 2.4.2.1…

curl 快速入門使用教程

你好&#xff0c;我是悅創。 curl 是一個強大的命令行工具&#xff0c;用于獲取或發送數據&#xff0c;包括 HTTP、HTTPS、FTP、FTPS、SCP、SFTP、TFTP、DICT、TELNET、LDAP 或 FILE 協議等。在本教程中&#xff0c;我們將主要介紹如何使用 curl 進行 HTTP/HTTPS 請求。 1. 安…

Java基礎五之for循環小練習

加油,新時代大工人&#xff01; 一、Java基礎之算術運算符 二、Java基礎之類型轉換 三、Java基礎之【字符串操作以及自增自減操作】 四、Java基礎之賦值運算符和關系運算符 package base;import java.io.InputStream; import java.util.Scanner;/*** author wh* date 2023年08…

無涯教程-Perl - recv函數

描述 This function receives a message on SOCKET attempting to read LENGTH bytes, placing the data read into variable SCALAR.The FLAGS argument takes the same values as the recvfrom( ) system function, on which the function is based. When communicating wit…

論文淺嘗 | 面向多步推理任務專業化較小語言模型

筆記整理&#xff1a;張沈昱&#xff0c;東南大學碩士&#xff0c;研究方向為自然語言處理 鏈接&#xff1a;https://github.com/FranxYao/FlanT5-CoT-Specialization 動機 本文的動機是探索如何在多步推理任務中通過大型語言模型提升較小的語言模型的性能。作者認為&#xff0…

云開發超多功能工具箱組合微信小程序源碼/附帶流量主

介紹&#xff1a; 這是一款云開發超多功能工具箱組合微信小程序源碼附帶流量主功能&#xff0c;小程序內包含了40余個功能&#xff0c;堪稱全能工具箱了&#xff0c;大致功能如下&#xff1a; 證件照制作 | 垃圾分類查詢 | 個性簽名制作 二維碼生成丨文字九宮格 | 手持彈幕丨…

總結synchronized

一.synchronized的特性 synchronized 是 Java 語言中內置的關鍵字&#xff0c;用于實現線程同步&#xff0c;以確保多線程環境下共享資源的安全訪問。 互斥性&#xff1a;synchronized保證了同一時刻只有一個線程可以執行被synchronized修飾的代碼塊或方法。當一個線程進入sync…

使用GraphQL在Postman中進行API測試

GraphQL 是一種用于API的開源數據查詢和操作語言&#xff0c;用于API的查詢語言和運行時。它使客戶端能夠精確地指定其數據需求&#xff0c;并獲得預測性地結果。GraphQL旨在提高API的效率、靈活性和可靠性。 Postman 是一款用于API開發的強大工具&#xff0c;它支持REST和Gra…

LVS簡介及LVS-DR搭建

目錄 一. LVS簡介&#xff1a; 1.簡介 2. LVS工作模式&#xff1a; 3. LVS調度算法&#xff1a; 4. LVS-DR集群介紹&#xff1a; 二.LVS-DR搭建 1.RS配置 1&#xff09;兩臺RS&#xff0c;需要下載好httpd軟件并準備好配置文件 2&#xff09;添加虛擬IP&#xff08;vip&…

Python爬蟲——requests_cookie登陸古詩文網

尋找登陸需要的參數 __VIEWSTATE:aiMG0UXAfCzak10C7436ZC/RXoZbM2lDlX1iU/4wjjdUNsW8QUs6W2/3M6XIKagQZrC7ooD8Upj8uCnpQMXjDAp6fS/NM2nGhnKO0KOSXfT3jGHhJAOBouMI3QnlpJCQKPXfVDJPYwh169MGLFC6trY __VIEWSTATEGENERATOR: C93BE1AE from: http://so.gushiwen.cn/user/collect.…

linux 命令--查看網絡端口命令

使用 netstat 檢查端口 netstat 是一個命令行工具&#xff0c;可以提供有關網絡連接的信息。 netstat - atulnp會顯示所有端口和所有對應的程序&#xff0c;用grep管道可以過濾出想要的字段 -a &#xff1a;all&#xff0c;表示列出所有的連接&#xff0c;服務監聽&#xff…

Android JNI開發從0到1,java調C,C調Java,保姆級教程詳解

前些天發現了一個蠻有意思的人工智能學習網站,8個字形容一下"通俗易懂&#xff0c;風趣幽默"&#xff0c;感覺非常有意思,忍不住分享一下給大家。 &#x1f449;點擊跳轉到教程 第一步首先配置Android studio的NDK開發環境&#xff0c;首先在Android studio中下載NDK…

如何防止CSRF攻擊

背景 隨著互聯網的高速發展&#xff0c;信息安全問題已經成為企業最為關注的焦點之一&#xff0c;而前端又是引發企業安全問題的高危據點。在移動互聯網時代&#xff0c;前端人員除了傳統的 XSS、CSRF 等安全問題之外&#xff0c;又時常遭遇網絡劫持、非法調用 Hybrid API 等新…

Java超級瑪麗小游戲制作過程講解 第六天 創建背景類

package com.sxt;import java.awt.image.BufferedImage;public class BackGround {//當前場景要顯示的圖像 private BufferedImage bgImagenull;//記錄當前是第幾個場景 private int sort;//判斷是否是最后一個場景 private boolean flag;public BackGround(){}public BackGrou…

【CGroupAndroid實踐篇】四、Native Service進程啟動及控制組遷移

寫在前面 承接上一篇,在cgroup子系統初始化完成后,init會繼續執行開機流程,且通過代哦用ExecuteCommand()函數。 /system/core/init/init.cppint SecondStageMain(int argc, char** argv) {......ActionManager& am = ActionManager::GetInstance();am.ExecuteOneCo…