lnmp(docker)

1. 建立工作目录

[root@docker ~]# mkdir /opt/nginx
[root@docker ~]# cd /opt/nginx
[root@docker nginx]# rz -E
rz waiting to receive.
#上传 nginx 安装包 nginx-1.12.0.tar.gz

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-1mAupgfg-1692546700034)(C:\Users\33619\AppData\Roaming\Typora\typora-user-images\image-20230818115856578.png)]

[root@docker nginx]# rz -E
rz waiting to receive.
#上传 wordpress 服务包 wordpress-4.9.4-zh_CN.tar.gz

在这里插入图片描述

2. 编写 Dockerfile 脚本

[root@docker nginx]# vim Dockerfile

FROM centos:7
MAINTAINER this is nginx image <lnmp>
RUN yum -y install pcre-devel zlib-devel gcc gcc-c++ make;useradd -M -s /sbin/nologin nginx
ADD nginx-1.12.0.tar.gz /usr/local/src/
WORKDIR /usr/local/src/nginx-1.12.0
RUN ./configure \
--prefix=/usr/local/nginx \
--user=nginx \
--group=nginx \
--with-http_stub_status_module;make -j 4 && make install
ENV PATH /usr/local/nginx/sbin:$PATH
ADD nginx.conf /usr/local/nginx/conf/
ADD wordpress-4.9.4-zh_CN.tar.gz /usr/local/nginx/html
RUN chmod 777 -R /usr/local/nginx/html/
EXPOSE 80
VOLUME [ "/usr/local/nginx/html/" ]
CMD [ "/usr/local/nginx/sbin/nginx","-g","daemon off;" ]

在这里插入图片描述

1. 准备 nginx.conf 配置文件

[root@docker nginx]# ls
Dockerfile  nginx-1.12.0.tar.gz  nginx.conf  wordpress-4.9.4-zh_CN.tar.gz
[root@docker nginx]# egrep -v "^(.)*#(.)*$" nginx.conf | grep -v "^$"
worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       80;
        server_name  localhost;
        charset utf-8;
        location / {
            root   html;
            index  index.html index.php;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
        location ~ \.php$ {
            root           html;
            fastcgi_pass   172.20.0.30:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /usr/local/nginx/html$fastcgi_script_name;
            include        fastcgi_params;
        }
    }
}

在这里插入图片描述

1. 生成镜像

[root@docker nginx]# docker build -t nginx:lnmp .
[root@docker nginx]# docker images
REPOSITORY   TAG       IMAGE ID       CREATED         SIZE
nginx        lnmp      35a6404fcfa1   5 seconds ago   522MB
centos       7         eeb6ee3f44bd   4 weeks ago     204MB

在这里插入图片描述

5. 创建自定义网络

[root@docker nginx]# docker network create --subnet=192.168.109.0/16 --opt “com.docker.network.bridge.name”=“docker1” mynetwork
cdc7b80633abf6c1f573528234f024f6088340475acae277d9710f0d2d5dc400
[root@docker nginx]# docker network ls
NETWORK ID NAME DRIVER SCOPE
dd7a55d01f86 bridge bridge local
63ddf1e359e9 host host local
0cbe1bd0bd78 mynetwork bridge local
a4b66a8a6cd2 none null local
[root@benet23 nginx]# ifconfig docker1
docker1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.20.0.1 netmask 255.255.0.0 broadcast 172.20.255.255
ether 02:42:4a:c3:31:e7 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
在这里插入图片描述

6. 启动镜像容器

[root@benet23 nginx]# docker run -d --name nginx -p 80:80 -m 500m --memory-swap 1g --net mynetwork --ip 192.168.109.10 nginx:lnmp
24cbedd7982b1cf658cff4efd1ea75a5bfe252b6d01b2a222ed4cde63215479d
[root@benet23 nginx]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
24cbedd7982b nginx:lnmp “/usr/local/nginx/sb…” 4 seconds ago Up 3 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp nginx

······

[root@benet23 nginx]# docker inspect nginx
“Networks”: {
“mynetwork”: {
“IPAMConfig”: {
“IPv4Address”: “172.20.0.10”

在这里插入图片描述

7. 验证 nginx

[root@docker nginx]# curl http://192.168.109.60:80

Welcome to nginx!

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

在这里插入图片描述

四、Mysql

1. 建立工作目录

[root@benet23 nginx]# mkdir /opt/mysql
[root@benet23 nginx]# cd /opt/mysql/
[root@benet23 mysql]# rz -E
rz waiting to receive.
#传入mysql安装包mysql-boost-5.7.20.tar.gz

在这里插入图片描述

2. 编写 Dockerfile

2. [root@docker mysql]# vim Dockerfile 

FROM centos:7
MAINTAINER this is mysql image <lnmp>
RUN yum -y install ncurses ncurses-devel bison cmake pcre-devel zlib-devel gcc gcc-c++ make;useradd -M -s /sbin/nologin mysql
ADD mysql-boost-5.7.20.tar.gz /usr/local/src/
WORKDIR /usr/local/src/mysql-5.7.20/
RUN cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock \
-DSYSCONFDIR=/etc \
-DSYSTEMD_PID_DIR=/usr/local/mysql \
-DDEFAULT_CHARSET=utf8  \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS=all \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
-DMYSQL_DATADIR=/usr/local/mysql/data \
-DWITH_BOOST=boost \
-DWITH_SYSTEMD=1;make -j4;make install
ADD my.cnf /etc/my.cnf
EXPOSE 3306
RUN chown -R mysql:mysql /usr/local/mysql/;chown mysql:mysql /etc/my.cnf
WORKDIR /usr/local/mysql/bin/
RUN ./mysqld \
--initialize-insecure \
--user=mysql \
--basedir=/usr/local/mysql \
--datadir=/usr/local/mysql/data;cp /usr/local/mysql/usr/lib/systemd/system/mysqld.service /usr/lib/systemd/system/;systemctl enable mysqld
ENV PATH=/usr/local/mysql/bin:/usr/local/mysql/lib:$PATH
VOLUME [ "/usr/local/mysql" ]
CMD ["/usr/sbin/init"]


在这里插入图片描述

3. 准备 my.cnf 文件

[root@docker mysql]# vim my.cnf

[client]
port = 3306
socket=/usr/local/mysql/mysql.sock

[mysqld]
user = mysql
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
port = 3306
character-set-server=utf8
pid-file = /usr/local/mysql/mysqld.pid
socket=/usr/local/mysql/mysql.sock
bind-address = 0.0.0.0
skip-name-resolve
max_connections=2048
default-storage-engine=INNODB
max_allowed_packet=16M
server-id = 1

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,PIPES_AS_CONCAT,ANSI_QUOTES

在这里插入图片描述

4. 生成镜像

[root@docker mysql]# docker build -t mysql:lnmp .
[root@docker mysql]# docker images
REPOSITORY   TAG       IMAGE ID       CREATED          SIZE
mysql        lnmp      49da8f7299af   3 minutes ago    9.98GB
nginx        lnmp      35a6404fcfa1   17 minutes ago   522MB
centos       7         eeb6ee3f44bd   4 weeks ago      204MB

在这里插入图片描述

5. 启动镜像容器

[root@benet23 mysql]# docker run --name=mysql -d --privileged --device-write-bps /dev/sda:10M -v /usr/local/mysql --net mynetwork --ip 192.168.109.20 mysql:lnmp
e75631cda20bf2b2da5537699b006e446abba355f39ef39b2c8d2d98582f5bea
[root@benet23 mysql]# docker ps -a
CONTAINER ID   IMAGE        COMMAND                  CREATED          STATUS                    PORTS                               NAMES
e75631cda20b   mysql:lnmp   "/usr/sbin/init"         44 seconds ago   Up 35 seconds             3306/tcp                            mysql
24cbedd7982b   nginx:lnmp   "/usr/local/nginx/sb…"   6 days ago       Up 6 days                 0.0.0.0:80->80/tcp, :::80->80/tcp   nginx

在这里插入图片描述

6. 验证 mysql

[root@benet23 mysql]# docker exec -it mysql bash
      [root@e75631cda20b bin]# systemctl status mysqld
      ● mysqld.service - MySQL Server
      Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
      Active: activating (start) since Sun 2023-01-01 04:35:03 UTC; 1min 49s ago
        Docs: man:mysqld(8)
              http://dev.mysql.com/doc/refman/en/using-systemd.html
       Process: 70 ExecStart=/usr/local/mysql/bin/mysqld --daemonize --pid-file=/usr/local/mysql/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
       Process: 50 ExecStartPre=/usr/local/mysql/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
      CGroup: /docker/e75631cda20bf2b2da5537699b006e446abba355f39ef39b2c8d2d98582f5bea/system.slice/mysqld.service
              └─73 /usr/local/mysql/bin/mysqld --daemonize --pid-file=/usr/local/mysql/mysqld.pid
   
   

五、Php

1. 建立工作目录

[root@benet23  mysql]# mkdir ../php
[root@benet23  mysql]# cd ../php/
[root@benet23  php]# rz -E
rz waiting to receive.
#传入php安装包php-7.1.10.tar.bz2

在这里插入图片描述

2. 编写 Dockerfile 脚本

2. [root@benet23 php]# vim Dockerfile 

FROM centos:7
MAINTAINER this is php image <lnmp>
RUN yum install -y gd \
libjpeg libjpeg-devel \
libpng libpng-devel \
freetype freetype-devel \
libxml2 libxml2-devel \
zlib zlib-devel \
curl curl-devel \
openssl openssl-devel \
gcc gcc-c++ make pcre-devel;useradd -M -s /sbin/nologin nginx
ADD php-7.1.10.tar.bz2 /usr/local/src/
WORKDIR /usr/local/src/php-7.1.10
RUN ./configure \
--prefix=/usr/local/php \
--with-mysql-sock=/usr/local/mysql/mysql.sock \
--with-mysqli \
--with-zlib \
--with-curl \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-freetype-dir \
--with-openssl \
--enable-fpm \
--enable-mbstring \
--enable-xml \
--enable-session \
--enable-ftp \
--enable-pdo \
--enable-tokenizer \
--enable-zip ; make -j 4 ; make install
ENV PATH /usr/local/php/bin:/usr/local/php/sbin:$PATH
ADD php.ini     /usr/local/php/lib/
ADD php-fpm.conf /usr/local/php/etc/
ADD www.conf /usr/local/php/etc/php-fpm.d/
EXPOSE 9000
CMD /usr/local/php/sbin/php-fpm -F

在这里插入图片描述

3. 准备 php.ini、php-fpm.conf、www.conf 配置文件

3.1 php.ini
该配置文件模板位于安装目录的 php-7.1.10/php.ini-development 位置

[root@benet23 php]# vim php.ini

#939行,取消注释,修改
date.timezone = Asia/Shanghai
#1170行,修改
mysqli.default_socket = /usr/local/mysql/mysql.sock
[root@benet23 php]# egrep -v "^;" php.ini | egrep -v "^$"
[PHP]
engine = On
short_open_tag = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = -1
disable_functions =
disable_classes =
zend.enable_gc = On
expose_php = On
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
error_reporting = E_ALL
display_errors = On
display_startup_errors = On
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = On
html_errors = On
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 8M
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
default_charset = "UTF-8"
doc_root =
user_dir =
enable_dl = Off
file_uploads = On
upload_max_filesize = 2M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
[CLI Server]
cli_server.color = On
[Date]
date.timezone = Asia/Shanghai
[filter]
[iconv]
[intl]
[sqlite3]
[Pcre]
[Pdo]
[Pdo_mysql]
pdo_mysql.cache_size = 2000
pdo_mysql.default_socket=
[Phar]
[mail function]
SMTP = localhost
smtp_port = 25
mail.add_x_header = On
[SQL]
sql.safe_mode = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[Interbase]
ibase.allow_persistent = 1
ibase.max_persistent = -1
ibase.max_links = -1
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
ibase.dateformat = "%Y-%m-%d"
ibase.timeformat = "%H:%M:%S"
[MySQLi]
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.cache_size = 2000
mysqli.default_port = 3306
mysqli.default_socket = /usr/local/mysql/mysql.sock
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[mysqlnd]
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = On
[OCI8]
[PostgreSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[bcmath]
bcmath.scale = 0
[browscap]
[Session]
session.save_handler = files
session.use_strict_mode = 0
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.referer_check =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.sid_length = 26
session.trans_sid_tags = "a=href,area=href,frame=src,form="
session.sid_bits_per_character = 5
[Assertion]
zend.assertions = 1
[COM]
[mbstring]
[gd]
[exif]
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
soap.wsdl_cache_limit = 5
[sysvshm]
[ldap]
ldap.max_links = -1
[mcrypt]
[dba]
[opcache]
[curl]
[openssl]


3.2 php-fpm.conf 
该配置文件位于 /usr/local/php/etc/php-fpm.conf.default

[root@docker php]# vim php-fpm.conf 

#17行,删除注释符号“;”
pid = run/php-fpm.pid
[root@docker php]# egrep -v "^;" php-fpm.conf | egrep -v "^$"
[global]
pid = run/php-fpm.pid
include=/usr/local/php/etc/php-fpm.d/*.conf


3.3 www.conf 
该配置文件位于 usr/local/php/etc/php-fpm.d/www.conf.default

[root@docker php]# vim www.conf 

#23、24行,修改用户和组
user = nginx
group = nginx
#36行,修改监听IP和端口为容器IP:9000端口
listen = 192.168.109.30:9000
[root@docker php]# egrep -v "^;" www.conf | egrep -v "^$"
[www]
user = nginx
group = nginx
listen = 192.168.109.30:9000
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3


在这里插入图片描述

4. 生成镜像

[root@benet23  php]# docker build -t php:lnmp .
[root@benet23 php]# docker images
REPOSITORY   TAG       IMAGE ID       CREATED              SIZE
php          lnmp      18366080e46c   About a minute ago   1.3GB
mysql        lnmp      d007959d6f9a   10 hours ago         10GB
nginx        lnmp      8c0cf60ecad6   7 days ago           573MB
httpd        centos    e961c69e1bef   7 days ago           761MB
nginx        latest    3964ce7b8458   2 weeks ago          142MB
centos       7         eeb6ee3f44bd   15 months ago        204MB

在这里插入图片描述

5. 启动镜像容器

[root@benet23 php]# docker run -itd --name php --net mynetwork --ip 192.168.109.30 -p 9000:9000 --volumes-from nginx --volumes-from mysql php:lnmp
03e251af5164d3e7392af541f0f2964badbd653db15e7be5d38caabb210c367d
[root@benet23 php]# docker ps
CONTAINER ID   IMAGE        COMMAND                  CREATED         STATUS         PORTS                                       NAMES
03e251af5164   php:lnmp     "/bin/sh -c '/usr/lo…"   7 seconds ago   Up 5 seconds   0.0.0.0:9000->9000/tcp, :::9000->9000/tcp   php
e75631cda20b   mysql:lnmp   "/usr/sbin/init"         10 hours ago    Up 10 hours    3306/tcp                                    mysql
24cbedd7982b   nginx:lnmp   "/usr/local/nginx/sb…"   7 days ago      Up 7 days      0.0.0.0:80->80/tcp, :::80->80/tcp           nginx

在这里插入图片描述

6. 验证 php

[root@benet23 php]# docker exec -it php bash
[root@03e251af5164 php-7.1.10]# ps -aux
USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root          1  0.0  0.1 113028  7512 pts/0    Ss+  14:25   0:00 php-fpm: master process (/usr/local/php/etc/php-fpm.conf)
nginx         7  0.0  0.0 113028  3552 pts/0    S+   14:25   0:00 php-fpm: pool www
nginx         8  0.0  0.0 113028  3552 pts/0    S+   14:25   0:00 php-fpm: pool www
root          9  0.2  0.0  11828  1908 pts/1    Ss   14:27   0:00 bash
root         22  0.0  0.0  51732  1728 pts/1    R+   14:28   0:00 ps -aux

六、启动 wordpress 服务

1. mysql 授权

 进入 mysql 容器

[root@e75631cda20b bin]# mysql -u root -p
Enter password:
#初始密码为空
mysql> create database wordpress;
Query OK, 1 row affected (0.00 sec)

mysql> grant all privileges on wordpress.* to ‘wordpress’@‘%’ identified by ‘123456’;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> grant all privileges on . to ‘root’@‘%’ identified by ‘123456’;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
浏览器访问测试
访问 http://192.168.109.60/wordpress/index.php
``
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/85758.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

vscode远程调试

安装ssh 在vscode扩展插件搜索remote-ssh安装 如果连接失败&#xff0c;出现 Resolver error: Error: XHR failedscode 报错&#xff0c;可以看这篇帖子vscode ssh: Resolver error: Error: XHR failedscode错误_阿伟跑呀的博客-CSDN博客 添加好后点击左上角的加号&#xff0…

Python功能制作之简单的音乐播放器

需要导入的库&#xff1a; pip install PyQt5 源码&#xff1a; import os from PyQt5.QtCore import Qt, QUrl from PyQt5.QtGui import QIcon, QPixmap from PyQt5.QtMultimedia import QMediaPlayer, QMediaContent from PyQt5.QtWidgets import QApplication, QMainWind…

剪枝基础与实战(1): 概述

本文介绍基于L1正则化的剪枝原理,并以VGG网络进行实战说明。将从零详细介绍模型训练、稀疏化、剪枝、finetune的全过程,提供详细的源码及说明,有助于对剪枝的熟练掌握,后续也会对yolov8进行剪枝的介绍。 论文: Learning Efficient Convolutional Networks through Network …

激活函数总结(十七):激活函数补充(PELU、Phish)

激活函数总结&#xff08;十七&#xff09;&#xff1a;激活函数补充 1 引言2 激活函数2.1 Parametric Exponential Linear Unit&#xff08;PELU&#xff09;激活函数2.2 Phish激活函数 3. 总结 1 引言 在前面的文章中已经介绍了介绍了一系列激活函数 (Sigmoid、Tanh、ReLU、…

SAP S/4HANA 2022:MRP Live 和 Classic MRP新的增强BADI

翻译一篇&#xff0c;原文在SAP BLOG中如下&#xff1a; 目录 前言通过 BADIs 操作 MRP 元素新的 BadI PPH_SUPPLY_DEMAND_LISTBADI PPH_SUPPLY_DEMAND_LIST 的示例实现结论 前言 SAP S/4HANA 引入了新的 BADI PPH_SUPPLY_DEMAND_LIST&#xff0c;它允许我们在MRP Live 和 C…

2023.8.19-2023.8.XX 周报【人脸3D+虚拟服装方向基础调研-Cycle Diffusion\Diffusion-GAN\】更新中

学习目标 1. 这篇是做diffusion和gan结合的&#xff0c;可以参照一下看看能不能做cyclegan的形式&#xff0c;同时也可以调研一下有没有人follow这篇论文做了类似cyclegan的事情 Diffusion-GAN论文精读https://arxiv.org/abs/2206.02262 2. https://arxiv.org/abs/2212.06…

[足式机器人]Part3机构运动微分几何学分析与综合Ch03-1 空间约束曲线与约束曲面微分几何学——【读书笔记】

本文仅供学习使用 本文参考&#xff1a; 《机构运动微分几何学分析与综合》-王德伦、汪伟 《微分几何》吴大任 Ch01-4 平面运动微分几何学 3.1 空间曲线微分几何学概述3.1.1 矢量表示3.1.2 Frenet标架 连杆机构中的连杆与连架杆构成运动副&#xff0c;该运动副元素的特征点或特…

通过cpolar在外远程查看家里内网监控

通过cpolar在外远程查看家里内网监控 文章目录 通过cpolar在外远程查看家里内网监控前言1. 在cpolar官网预留一个空白隧道2. 完成空白数据隧道&#xff0c;生成地址3. 设置空白隧道的出口4. 空白数据隧道的出口设置5. 获取公网地址6. 打开本地电脑“远程桌面”7. 打开Windows自…

三星Galaxy S23与iPhone 15的对比分析:谁会胜出?

三星Galaxy S23与iPhone 15的对决将于下个月进入高潮,这将是今年智能手机中最大的一场较量。毕竟,这是两家领先的移动设备制造商的旗舰手机。他们的手机的比较将在很大程度上决定谁能获得最佳手机的称号。 我们已经知道有利于三星Galaxy S23的情况,该产品自春季以来一直在推…

算法 | 活用双指针完成复写零操作

Problem: 1089. 复写零 文章目录 题目解析算法原理分析找到最后一个复写的位置从后往前进行复写操作 代码展示 题目解析 首先我们来分析一下本题的题目意思 可以看到题目中给到了一个数组&#xff0c;意思是让我们将数组中的零元素都复写一遍&#xff0c;然后将其余的元素向后平…

jmeter-results-detail-report_new.xsl文件设置dateReport

<!-- Defined parameters (overrideable) <td bgcolor"#ff00ff"> --> <xsl:param name"showData" select"y"/> <xsl:param name"titleReport" select"测试报告"/> <xsl:param name&…

从零实现深度学习框架——Transformer从菜鸟到高手(二)

引言 &#x1f4a1;本文为&#x1f517;[从零实现深度学习框架]系列文章内部限免文章&#xff0c;更多限免文章见 &#x1f517;专栏目录。 本着“凡我不能创造的&#xff0c;我就不能理解”的思想&#xff0c;系列文章会基于纯Python和NumPy从零创建自己的类PyTorch深度学习框…

Electron学习2 使用Electron-vue和Vuetify UI库

Electron学习2 使用Electron-vue和Vuetify UI库 一、Electron-vue简介二、安装yarn三、创建Electron-vue项目1. 关于 electron-builder2. 安装脚手架3. 运行4. 打包应用程序 四、background.js说明1. 引入模块和依赖&#xff1a;2. 注册协议&#xff1a;3. 创建窗口函数&#x…

通过springMVC拦截器进行后台统一校验

通过springMVC拦截器统一解析token&#xff0c;判断是否有效。可以对请求进行前置或后置处理 /*** 配置拦截器*/ public class TokenInterceptor implements HandlerInterceptor {Overridepublic boolean preHandle(HttpServletRequest request, HttpServletResponse response,…

Commonjs和Es6语法规范的理解

ES6 module和CommonJS到底有什么区别&#xff1f; “ES6 module是编译时加载&#xff0c;输出的是接口&#xff0c;CommonJS运行时加载&#xff0c;加载的是一个对象” 这里的“编译时”是什么意思&#xff1f;和运行时有什么区别&#xff1f;“接口”又是什么意思&#xff1f;…

2023.08.20 学习周报

文章目录 摘要文献阅读1.题目2.现有问题3.解决方案4.本文贡献5.方法5.1 利用长短期记忆网络学习时空演化特征5.2 构建用于气象辅助信息编码的堆叠自编码器5.3 使用多任务学习发现全市通用模式5.4 模型 6. 实验6.1 数据集6.2 实验设置6.3 实验结果 7.结论8.展望 大气污染物传输总…

Leetcode刷题笔记--Hot21-30

1--全排列&#xff08;46&#xff09; 主要思路1&#xff1a; 经典全排列&#xff0c;每次枚举每一位时&#xff0c;重头开始枚举&#xff0c;用一个访问数组记录当前已经被访问过的数字&#xff1b; 这道题不包含重复数字&#xff0c;所以不需要进行树层上的剪枝&#xff1b; …

[ MySQL ] — 如何理解索引以及索引的操作

目录 初识索引 认识磁盘 MySQL与存储 了解磁盘 mysql与磁盘的交互 索引的理解 理解单个Page 理解多个Page 页目录 单页情况 多页情况 索引结构 - B树 聚簇索引 和 非聚簇索引 索引操作 创建主键索引 唯一索引的创建 ​编辑 普通索引的创建 全文索引的创建 查询…

Ae 效果:CC Light Sweep

生成/CC Light Sweep Generate/CC Light Sweep CC Light Sweep&#xff08;CC 光线扫描&#xff09;可以创建一个动态的光线扫描&#xff0c;常用于模拟一束光在图像上移动的效果。支持 Alpha 通道并能基于 Alpha 通道边缘创造逼真的光照。 ◆ ◆ ◆ 效果属性说明 Center 中心…

Unity怎么制作魔法火焰特效?Unity制作魔法火焰特效方法

Unity制作魔法火焰特效方法&#xff1a; 在第一次玩Supergiant Games的RPG游戏《Hades》时&#xff0c;游戏的美术和视觉效果让人非常吃惊。受此启发&#xff0c;希望能够尝试制作类似风格的作品。 工作流程 整个工作从制作简单的火焰贴图开始。首先&#xff0c;我使用PhotoS…