openvpnas安装,可视化远程连接控制

 本次安装环境为 centos7.9

本次安装软件为 openvpnas, 默认是两个连接授权,可以通过代码注入实现多连接授权

1.基础环境以及Python36安装 

yum install python36 python36-devel wget -y

 2.安装 openvpnas

 1.在线安装

yum -y install https://as-repository.openvpn.net/as-repo-centos7.rpm
yum -y install openvpn-as

2.离线安装【建议】

mkdir /opt/openvpn
cd /opt/openvpn
wget https://openvpn.net/downloads/openvpn-as-latest-CentOS7.x86_64.rpm
wget https://openvpn.net/downloads/openvpn-as-bundled-clients-latest.rpm
yum install ./openvpn-as-*.rpm

操作日志如下:

[root@localhost ~]# mkdir /opt/openvpn
[root@localhost ~]# cd /opt/openvpn
[root@localhost openvpn]# wget https://openvpn.net/downloads/openvpn-as-latest-CentOS7.x86_64.rpm
--2023-07-17 17:11:30--  https://openvpn.net/downloads/openvpn-as-latest-CentOS7.x86_64.rpm
Proxy request sent, awaiting response... 301 Moved Permanently
Location: https://openvpn.net/us2/sw/index.php?url=https://swupdate.openvpn.net/as/openvpn-as-2.12.0_2e834031-CentOS7.x86_64.rpm [following]
--2023-07-17 17:11:30--  https://openvpn.net/us2/sw/index.php?url=https://swupdate.openvpn.net/as/openvpn-as-2.12.0_2e834031-CentOS7.x86_64.rpm
Proxy request sent, awaiting response... 301 Moved Permanently
Location: https://swupdate.openvpn.net/as/openvpn-as-2.12.0_2e834031-CentOS7.x86_64.rpm [following]
--2023-07-17 17:11:31--  https://swupdate.openvpn.net/as/openvpn-as-2.12.0_2e834031-CentOS7.x86_64.rpm
Proxy request sent, awaiting response... 200 OK
Length: 28138172 (27M) [binary/octet-stream]
Saving to: ‘openvpn-as-latest-CentOS7.x86_64.rpm’

100%[=============================================================================================>] 28,138,172  3.49MB/s   in 6.7s   

2023-07-17 17:11:38 (4.03 MB/s) - ‘openvpn-as-latest-CentOS7.x86_64.rpm’ saved [28138172/28138172]

[root@localhost openvpn]# wget https://openvpn.net/downloads/openvpn-as-bundled-clients-latest.rpm
--2023-07-17 17:11:44--  https://openvpn.net/downloads/openvpn-as-bundled-clients-latest.rpm
Proxy request sent, awaiting response... 301 Moved Permanently
Location: https://swupdate.openvpn.net/as/clients/openvpn-as-bundled-clients-27.rpm [following]
--2023-07-17 17:11:45--  https://swupdate.openvpn.net/as/clients/openvpn-as-bundled-clients-27.rpm
Proxy request sent, awaiting response... 200 OK
Length: 276919192 (264M) [application/x-www-form-urlencoded]
Saving to: ‘openvpn-as-bundled-clients-latest.rpm’

100%[=============================================================================================>] 276,919,192 3.50MB/s   in 75s    

2023-07-17 17:13:00 (3.53 MB/s) - ‘openvpn-as-bundled-clients-latest.rpm’ saved [276919192/276919192]

[root@localhost openvpn]# ll
total 297912
-rw-r--r--. 1 root root 276919192 Dec 14  2022 openvpn-as-bundled-clients-latest.rpm
-rw-r--r--. 1 root root  28138172 Jul  5 20:11 openvpn-as-latest-CentOS7.x86_64.rpm

[root@localhost openvpn]# yum install ./openvpn-as-*.rpm
Loaded plugins: fastestmirror
Examining ./openvpn-as-bundled-clients-latest.rpm: openvpn-as-bundled-clients-27-1.noarch
Marking ./openvpn-as-bundled-clients-latest.rpm to be installed
Examining ./openvpn-as-latest-CentOS7.x86_64.rpm: openvpn-as-2.12.0_2e834031-CentOS7.x86_64
Marking ./openvpn-as-latest-CentOS7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package openvpn-as.x86_64 0:2.12.0_2e834031-CentOS7 will be installed
--> Processing Dependency: unzip for package: openvpn-as-2.12.0_2e834031-CentOS7.x86_64
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
--> Processing Dependency: cyrus-sasl for package: openvpn-as-2.12.0_2e834031-CentOS7.x86_64
--> Processing Dependency: net-tools for package: openvpn-as-2.12.0_2e834031-CentOS7.x86_64
--> Processing Dependency: libpcap for package: openvpn-as-2.12.0_2e834031-CentOS7.x86_64
--> Processing Dependency: xmlsec1 for package: openvpn-as-2.12.0_2e834031-CentOS7.x86_64
--> Processing Dependency: xmlsec1-openssl for package: openvpn-as-2.12.0_2e834031-CentOS7.x86_64
---> Package openvpn-as-bundled-clients.noarch 0:27-1 will be installed
--> Running transaction check
---> Package cyrus-sasl.x86_64 0:2.1.26-24.el7_9 will be installed
---> Package libpcap.x86_64 14:1.5.3-13.el7_9 will be installed
---> Package net-tools.x86_64 0:2.0-0.25.20131004git.el7 will be installed
---> Package unzip.x86_64 0:6.0-24.el7_9 will be installed
---> Package xmlsec1.x86_64 0:1.2.20-7.el7_4 will be installed
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for package: xmlsec1-1.2.20-7.el7_4.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: xmlsec1-1.2.20-7.el7_4.x86_64
--> Processing Dependency: libxslt.so.1()(64bit) for package: xmlsec1-1.2.20-7.el7_4.x86_64
--> Processing Dependency: libltdl.so.7()(64bit) for package: xmlsec1-1.2.20-7.el7_4.x86_64
---> Package xmlsec1-openssl.x86_64 0:1.2.20-7.el7_4 will be installed
--> Running transaction check
---> Package libtool-ltdl.x86_64 0:2.4.2-22.el7_3 will be installed
---> Package libxslt.x86_64 0:1.1.28-6.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================
 Package                            Arch           Version                            Repository                                  Size
=======================================================================================================================================
Installing:
 openvpn-as                         x86_64         2.12.0_2e834031-CentOS7            /openvpn-as-latest-CentOS7.x86_64          107 M
 openvpn-as-bundled-clients         noarch         27-1                               /openvpn-as-bundled-clients-latest         267 M
Installing for dependencies:
 cyrus-sasl                         x86_64         2.1.26-24.el7_9                    updates                                     88 k
 libpcap                            x86_64         14:1.5.3-13.el7_9                  updates                                    139 k
 libtool-ltdl                       x86_64         2.4.2-22.el7_3                     base                                        49 k
 libxslt                            x86_64         1.1.28-6.el7                       base                                       242 k
 net-tools                          x86_64         2.0-0.25.20131004git.el7           base                                       306 k
 unzip                              x86_64         6.0-24.el7_9                       updates                                    172 k
 xmlsec1                            x86_64         1.2.20-7.el7_4                     base                                       177 k
 xmlsec1-openssl                    x86_64         1.2.20-7.el7_4                     base                                        76 k

Transaction Summary
=======================================================================================================================================
Install  2 Packages (+8 Dependent packages)

Total size: 376 M
Total download size: 1.2 M
Installed size: 377 M
Is this ok [y/d/N]: y
Downloading packages:
(1/8): libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm                                                                   |  49 kB  00:00:00     
(2/8): libxslt-1.1.28-6.el7.x86_64.rpm                                                                          | 242 kB  00:00:00     
(3/8): cyrus-sasl-2.1.26-24.el7_9.x86_64.rpm                                                                    |  88 kB  00:00:00     
(4/8): libpcap-1.5.3-13.el7_9.x86_64.rpm                                                                        | 139 kB  00:00:00     
(5/8): xmlsec1-openssl-1.2.20-7.el7_4.x86_64.rpm                                                                |  76 kB  00:00:00     
(6/8): unzip-6.0-24.el7_9.x86_64.rpm                                                                            | 172 kB  00:00:00     
(7/8): net-tools-2.0-0.25.20131004git.el7.x86_64.rpm                                                            | 306 kB  00:00:01     
(8/8): xmlsec1-1.2.20-7.el7_4.x86_64.rpm                                                                        | 177 kB  00:00:00     
---------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                  789 kB/s | 1.2 MB  00:00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libtool-ltdl-2.4.2-22.el7_3.x86_64                                                                                 1/10 
  Installing : libxslt-1.1.28-6.el7.x86_64                                                                                        2/10 
  Installing : xmlsec1-1.2.20-7.el7_4.x86_64                                                                                      3/10 
  Installing : xmlsec1-openssl-1.2.20-7.el7_4.x86_64                                                                              4/10 
  Installing : cyrus-sasl-2.1.26-24.el7_9.x86_64                                                                                  5/10 
  Installing : unzip-6.0-24.el7_9.x86_64                                                                                          6/10 
  Installing : net-tools-2.0-0.25.20131004git.el7.x86_64                                                                          7/10 
  Installing : openvpn-as-bundled-clients-27-1.noarch                                                                             8/10 
  Installing : 14:libpcap-1.5.3-13.el7_9.x86_64                                                                                   9/10 
  Installing : openvpn-as-2.12.0_2e834031-CentOS7.x86_64                                                                         10/10 

To reconfigure manually, use the /usr/local/openvpn_as/bin/ovpn-init tool.

+++++++++++++++++++++++++++++++++++++++++++++++
Access Server 2.12.0 has been successfully installed in /usr/local/openvpn_as
Configuration log file has been written to /usr/local/openvpn_as/init.log


Access Server Web UIs are available here:
Admin  UI: https://10.66.66.145:943/admin
Client UI: https://10.66.66.145:943/
To login please use the "openvpn" account with "SXBherUnrX8K" password.
(password can be changed on Admin UI)
+++++++++++++++++++++++++++++++++++++++++++++++

  Verifying  : 14:libpcap-1.5.3-13.el7_9.x86_64                                                                                   1/10 
  Verifying  : xmlsec1-openssl-1.2.20-7.el7_4.x86_64                                                                              2/10 
  Verifying  : libxslt-1.1.28-6.el7.x86_64                                                                                        3/10 
  Verifying  : xmlsec1-1.2.20-7.el7_4.x86_64                                                                                      4/10 
  Verifying  : openvpn-as-bundled-clients-27-1.noarch                                                                             5/10 
  Verifying  : net-tools-2.0-0.25.20131004git.el7.x86_64                                                                          6/10 
  Verifying  : libtool-ltdl-2.4.2-22.el7_3.x86_64                                                                                 7/10 
  Verifying  : unzip-6.0-24.el7_9.x86_64                                                                                          8/10 
  Verifying  : cyrus-sasl-2.1.26-24.el7_9.x86_64                                                                                  9/10 
  Verifying  : openvpn-as-2.12.0_2e834031-CentOS7.x86_64                                                                         10/10 

Installed:
  openvpn-as.x86_64 0:2.12.0_2e834031-CentOS7                         openvpn-as-bundled-clients.noarch 0:27-1                        

Dependency Installed:
  cyrus-sasl.x86_64 0:2.1.26-24.el7_9      libpcap.x86_64 14:1.5.3-13.el7_9                 libtool-ltdl.x86_64 0:2.4.2-22.el7_3     
  libxslt.x86_64 0:1.1.28-6.el7            net-tools.x86_64 0:2.0-0.25.20131004git.el7      unzip.x86_64 0:6.0-24.el7_9              
  xmlsec1.x86_64 0:1.2.20-7.el7_4          xmlsec1-openssl.x86_64 0:1.2.20-7.el7_4         

Complete!

记录下安装时生成的密码和访问信息

Access Server 2.12.0 has been successfully installed in /usr/local/openvpn_as
Configuration log file has been written to /usr/local/openvpn_as/init.log


Access Server Web UIs are available here:
Admin  UI: https://10.66.66.145:943/admin
Client UI: https://10.66.66.145:943/
To login please use the "openvpn" account with "SXBherUnrX8K" password.
(password can be changed on Admin UI)

查看openvpnas运行状态

[root@localhost openvpn]# systemctl status openvpnas.service
● openvpnas.service - OpenVPN Access Server
   Loaded: loaded (/usr/lib/systemd/system/openvpnas.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2023-07-17 17:15:44 CST; 1min 11s ago
 Main PID: 1762 (python3)
   CGroup: /system.slice/openvpnas.service
           ├─1762 python3 -c from pyovpn.sagent.sagent_entry import openvpnas ; openvpnas() --nodaemon --logfile=/var/log/openvpnas....
           ├─1784 /usr/bin/python3 -c from pyovpn.cserv.wserv_entry import start ; start() -no -u openvpn_as -g openvpn_as --pidfile...
           ├─1785 /usr/bin/python3 -c from pyovpn.log.logworker import start ; start()
           ├─1808 /usr/bin/python3 -c from pyovpn.sagent.iptworker import start6 ; start6()
           ├─1810 /usr/bin/python3 -c from pyovpn.sagent.iptworker import start ; start()
           ├─1814 openvpn-openssl --errors-to-stderr --config stdin
           ├─1820 openvpn-openssl --errors-to-stderr --config stdin
           ├─1824 openvpn-openssl --errors-to-stderr --config stdin
           ├─1826 openvpn-openssl --errors-to-stderr --config stdin
           ├─1831 openvpn-openssl --errors-to-stderr --config stdin
           ├─1833 openvpn-openssl --errors-to-stderr --config stdin
           ├─1839 openvpn-openssl --errors-to-stderr --config stdin
           ├─1845 openvpn-openssl --errors-to-stderr --config stdin
           ├─1871 openvpn-openssl --errors-to-stderr --config stdin
           ├─1884 openvpn-openssl --errors-to-stderr --config stdin
           ├─1903 openvpn-openssl --errors-to-stderr --config stdin
           ├─1905 openvpn-openssl --errors-to-stderr --config stdin
           ├─1919 openvpn-openssl --errors-to-stderr --config stdin
           ├─1934 openvpn-openssl --errors-to-stderr --config stdin
           ├─1949 iptables-restore -n
           ├─1950 openvpn-openssl --errors-to-stderr --config stdin
           ├─1965 openvpn-openssl --errors-to-stderr --config stdin
           ├─1979 openvpn-openssl --errors-to-stderr --config stdin
           └─1991 openvpn-openssl --errors-to-stderr --config stdin

Jul 17 17:15:44 localhost.localdomain systemd[1]: Started OpenVPN Access Server.

查看openvpn-ssl版本信息

[root@localhost openvpn]# /usr/local/openvpn_as/sbin/openvpn-openssl --version
OpenVPN 2.6.4as0 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
library versions: OpenSSL 1.0.2k-fips  26 Jan 2017, LZO 2.06
Originally developed by James Yonan
Copyright (C) 2002-2023 OpenVPN Inc <sales@openvpn.net>
Compile time defines: enable_async_push=no enable_comp_stub=no enable_crypto_ofb_cfb=yes enable_dco=no enable_debug=yes enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_fast_install=yes enable_fragment=yes enable_iproute2=no enable_libtool_lock=yes enable_lz4=yes enable_lzo=yes enable_management=yes enable_pam_dlopen=no enable_pedantic=no enable_pkcs11=no enable_plugin_auth_pam=no enable_plugin_down_root=no enable_plugins=yes enable_port_share=yes enable_selinux=no enable_shared=yes enable_shared_with_static_runtimes=no enable_small=no enable_static=yes enable_strict=no enable_strict_options=no enable_systemd=no enable_werror=no enable_win32_dll=yes enable_wolfssl_options_h=yes enable_x509_alt_username=no with_crypto_library=openssl with_gnu_ld=yes with_mem_check=no with_openssl_engine=auto with_sysroot=no

3.修改用户连接限制,默认是2个

操作命令如下:

cd /opt/openvpn
cp /usr/local/openvpn_as/lib/python/pyovpn-2.0-py3.6.egg{,.bak}
cp /usr/local/openvpn_as/lib/python/pyovpn-2.0-py3.6.egg .
unzip -q pyovpn-2.0-py3.6.egg 
cd pyovpn/lic/
mv uprop.pyc uprop2.pyc 

 增加文件 uprop.py文件,内容如下

from pyovpn.lic import uprop2
old_figure = None

def new_figure(self, licdict):
      ret = old_figure(self, licdict)
      ret['concurrent_connections'] = 888
      return ret

for x in dir(uprop2):
      if x[:2] == '__':
         continue
      if x == 'UsageProperties':
         exec('old_figure = uprop2.UsageProperties.figure')
         exec('uprop2.UsageProperties.figure = new_figure')
      exec('%s = uprop2.%s' % (x, x))

python3 -O -m compileall uprop.py && mv __pycache__/uprop.*.pyc uprop.pyc
cd ../../
zip -rq pyovpn-2.0-py3.6.egg ./pyovpn ./EGG-INFO ./common

替换补丁,并且重启

\cp ./pyovpn-2.0-py3.6.egg /usr/local/openvpn_as/lib/python/
systemctl restart openvpnas.service

 操作日志如下

[root@localhost openvpn]# cp /usr/local/openvpn_as/lib/python/pyovpn-2.0-py3.6.egg{,.bak}
[root@localhost openvpn]# cp /usr/local/openvpn_as/lib/python/pyovpn-2.0-py3.6.egg .
[root@localhost openvpn]# unzip -q pyovpn-2.0-py3.6.egg 
[root@localhost openvpn]# ll
total 303760
drwxr-xr-x.  2 root root        79 Jul 17 17:20 common
drwxr-xr-x.  2 root root       126 Jul 17 17:20 EGG-INFO
-rw-r--r--.  1 root root 276919192 Dec 14  2022 openvpn-as-bundled-clients-latest.rpm
-rw-r--r--.  1 root root  28138172 Jul  5 20:11 openvpn-as-latest-CentOS7.x86_64.rpm
drwxr-xr-x. 36 root root      4096 Jul 17 17:20 pyovpn
-rw-r--r--.  1 root root   5980773 Jul 17 17:19 pyovpn-2.0-py3.6.egg
[root@localhost openvpn]# cd pyovpn/lic/
[root@localhost lic]# mv uprop.pyc uprop2.pyc 
[root@localhost lic]# vi uprop.py
[root@localhost lic]# cat uprop.py 
from pyovpn.lic import uprop2
old_figure = None

def new_figure(self, licdict):
      ret = old_figure(self, licdict)
      ret['concurrent_connections'] = 888
      return ret

for x in dir(uprop2):
      if x[:2] == '__':
         continue
      if x == 'UsageProperties':
         exec('old_figure = uprop2.UsageProperties.figure')
         exec('uprop2.UsageProperties.figure = new_figure')
      exec('%s = uprop2.%s' % (x, x))
[root@localhost lic]# python3 -O -m compileall uprop.py && mv __pycache__/uprop.*.pyc uprop.pyc
Compiling 'uprop.py'...
[root@localhost lic]# cd ../../
[root@localhost openvpn]# zip -rq pyovpn-2.0-py3.6.egg ./pyovpn ./EGG-INFO ./common
[root@localhost openvpn]# \cp ./pyovpn-2.0-py3.6.egg /usr/local/openvpn_as/lib/python/
[root@localhost openvpn]# systemctl restart openvpnas.service
[root@localhost openvpn]# systemctl status openvpnas.service
● openvpnas.service - OpenVPN Access Server
   Loaded: loaded (/usr/lib/systemd/system/openvpnas.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2023-07-17 17:25:58 CST; 5s ago
  Process: 2039 ExecStop=/bin/bash /usr/local/openvpn_as/scripts/openvpn_service_cleanup (code=exited, status=0/SUCCESS)
 Main PID: 2188 (python3)
   CGroup: /system.slice/openvpnas.service
           ├─2188 python3 -c from pyovpn.sagent.sagent_entry import openvpnas ; openvpnas() --nodaemon --logfile=/var/log/openvpnas....
           ├─2193 /usr/bin/python3 -c from pyovpn.cserv.wserv_entry import start ; start() -no -u openvpn_as -g openvpn_as --pidfile...
           ├─2194 /usr/bin/python3 -c from pyovpn.log.logworker import start ; start()
           └─2205 iptables -A FORWARD -d 127.77.88.99 -m mark --mark 0x12345678/0x12345678 -j DROP

Jul 17 17:25:58 localhost.localdomain systemd[1]: Started OpenVPN Access Server.

 自定义web,配置文件路径 /usr/local/openvpn_as/etc/as.conf

1.修改 logo

将logo上传到目录 /usr/local/openvpn_as/etc/下,并修改配置

sa.logo_image_file=/usr/local/openvpn_as/logo.png  # 该路径为logo路径

2.修改公司名字

sa.company_name=HAHA VPN ADMIN

3.隐藏footer

cs.footer=hide
cws.footer=hide

重新服务生效

systemctl restart openvpnas.service

浏览器访问web

 查看用户 openvpn 默认初始化密码

grep -i 'password.$' /usr/local/openvpn_as/init.log

通过https://ip直接访问

 

 

 

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

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

相关文章

LeetCode 790. 多米诺和托米诺平铺 - 二维空间的动态规划

多米诺和托米诺平铺 中等 304 相关企业 有两种形状的瓷砖&#xff1a;一种是 2 x 1 的多米诺形&#xff0c;另一种是形如 “L” 的托米诺形。两种形状都可以旋转。 给定整数 n &#xff0c;返回可以平铺 2 x n 的面板的方法的数量。返回对 109 7 取模 的值。 平铺指的是每个…

ES6的类 vs TypeScript的类:解密两种语言中的面向对象之争

文章目录 ES6 类ES6 类的常见特性1. 构造函数2. 实例方法3. 静态方法4. 继承 TypeScript 类TypeScript 类的特性1. 类型注解2. 访问修饰符3. 类型推断4. 接口实现 ES6 类 ES6&#xff08;ECMAScript 2015&#xff09;引入了类的概念&#xff0c;为 JavaScript 增加了面向对象编…

【2023 年第二届钉钉杯大学生大数据挑战赛】 初赛 B:美国纽约公共自行车使用量预测分析 问题一Python代码分析

2023 年第二届钉钉杯大学生大数据挑战赛 初赛 B&#xff1a;美国纽约公共自行车使用量预测分析 问题一 1 题目 Citi Bike是纽约市在2013年启动的一项自行车共享出行计划&#xff0c;由“花旗银行”(Citi Bank)赞助并取名为“花旗单车”(Citi Bike)。在曼哈顿&#xff0c;布鲁克…

PDF在线转PPT,不用下载软件网页在线即可转换!

PDF是我们经常在办公中使用的文件格式&#xff0c;它的兼容性和安全性使得它成为了传输文件的首选。而PPT则是我们常用的演示文稿格式&#xff0c;无论是在学校还是在公司&#xff0c;我们都需要制作演讲和汇报的PPT文件。由于这两种文件格式的重要性&#xff0c;我们经常需要进…

Vue+axios 使用CancelToken多次发送请求取消前面所有正在pendding的请求

需求&#xff1a; 项目中 折线图数据是循环调用的&#xff0c;此时勾选一个设备&#xff0c; 会出现多条线。 原因 折线图数据一进来接口循环在调用&#xff0c;勾选设备时&#xff0c;循环调用的接口有的处于pedding状态 &#xff0c;有的还在加载中&#xff0c;这就导致勾…

第三方电容笔支持随手写吗?ipad平板可以用的手写笔推荐

我是一位数码爱好者&#xff0c;所以我对电容笔也有一定的了解。我认为&#xff0c;原装的苹果电容笔和一般的电容笔的区别在于它们产生的压感效果不同。由于苹果电容笔拥有着独特的“重力压感”&#xff0c;使我们能够快速地在画面中填充颜色。除此之外&#xff0c;苹果的电容…

ME GO小车

ME GO小车 ⚫ 体积小巧 ⚫ 集成多种传感器和执行器 ⚫ Mixly图形化编程 避障检测、自动巡线、灯光显示、 声音报警、自动测距、物联遥控等 ME GO小车——俯视图 ME GO小车——车底 ME GO CE 以上选自芯”向未来 元控智联挑战赛&#xff08;小学组&#xff09;赛事介绍资料二…

操作系统进行设备控制的方式

一.I/O控制方式 上一篇的博客介绍了设备管理的一些概念基础知识点&#xff0c;其中I/O控制方式这一块没有详细说明。设备管理的主要任务之一是控制设备和内存或CPU之间的数据传送。外围设备和内存之间的输入/输出控制方式有4种&#xff0c;下面分别加以介绍。 二.程序直接控制…

pandas常用方法

一、提要 pandas对于处理表格类数据来说是非常方便的模块&#xff0c;同时也是做数据分析绕不开的第三方库。这里将工作中常用到的各种处理方法记录下来二、常用方法 接下来的以 df 表示我们要处理的 dataframe 表格数据 1、取值 # 循环遍历取值 for i in range(len(df)):y…

吴恩达机器学习2022-Jupyter-Scikit-Learn教学

1可选实验室: 线性回归使用 Scikit-Learn 有一个开源的、商业上可用的机器学习工具包&#xff0c;叫做 scikit-learn。本工具包包含您将在本课程中使用的许多算法的实现。 1.1目标 在这个实验室里: 利用 scikit-学习使用线性回归梯度下降法来实现 1.2工具 您将利用 sciki…

自动化用例编写思路 (使用pytest编写一个测试脚本)

目录 一&#xff0c;明确测试对象 二&#xff0c;编写测试用例 构造请求数据 封装测试代码 断言设置 三&#xff0c;执行脚本获取测试结果 四&#xff0c;总结 经过之前的学习铺垫&#xff0c;我们尝试着利用pytest框架编写一条接口自动化测试用例&#xff0c;来厘清接口…

postgreSQL数据库的安装

文章目录 一、Linux 下安装 postgreSQL 数据库1.1、准备环境1.2、关闭防火墙跟SELinux1.2.1、关闭防火墙 firewalld1.2.2、关闭SELinux 1.3、挂载本地镜像1.4、软件包的下载postgreSQL 一、Linux 下安装 postgreSQL 数据库 1.1、准备环境 操作系统IP应用Red Hat 8192.168.192…

ConfigMap 补充 和 Secret

对于上一篇文章我们分享了为什么要使用 ConfigMap &#xff0c;我们创建 ConfigMap 的时候可以传入单个或者多个键值对&#xff0c;也可以传入文件&#xff0c;还分享了如何简单的传入 ConfigMap 里面的数据作为环境变量 我们补充一下使用 ConfigMap 一次性传递多个条目吧 一…

【监控系统】Prometheus监控组件Node-Exporter配置实战

这一节&#xff0c;我们来配置一下Node-Exporter&#xff0c;那么我们先来了解一下什么是Prometheus的Exporter&#xff1f; 任何向Prometheus提供监控样本数据的程序都可以被称为一个Exporter&#xff0c;它是一种用于将不同数据源的指标提供给Prometheus进行收集和监控的工具…

缓存淘汰策略

LRU 与 LFU 缓存策略及其实现。 应用层缓存 鉴于磁盘和内存读写的差异性&#xff0c;DB 中低频写、高频读的数据适合放入内存中&#xff0c;直接供应用层读写。在项目中读取用户资料时就使用到了 LRU&#xff0c;而非放到 Redis 中。 缓存的 2 个基本实现 Set(key string, v…

ios 通过xib自定义控件

通过xib自定义控件 xib和stroyboayd对比 共同点&#xff1a; 都是用来描述软件界面 都是用interface Builder工具来编辑 本质都是转换成代码去创建控件 不同点&#xff1a; xib是轻量级的&#xff0c;用来描述局部ui界面 创建模型文件 XMGCar 自定义控件 xib 图形设计 …

mac批量提取图片文件名到excel?

mac批量提取图片文件名到excel&#xff1f;最近有个小伙伴向我求助一个电脑操作上的问题&#xff0c;问我在Mac电脑上用什么方法可以快速批量的将大量图片的名称一次性提取出来&#xff0c;并且保存到excel表格里。记得小编曾经给大家分享过windows电脑上批量提取文件名称的方法…

爱心代码李峋同款爱心 python html

目录 前言 一、python 1.python 第一个 2.python第二个 二、HTML 1.第一个 2.第二个html 3.第三个html 3.第四个html 总结 前言 最近那个电视剧很火&#xff0c;就是搞爱心代码的&#xff0c;本人兴趣使然&#xff0c;在网上搜集了一些代码&#xff0c;经过一定修改&…

【iOS】—— 编译链接

【iOS】—— 编译链接 文章目录 【iOS】—— 编译链接编译流程预处理&#xff08;预编译Prepressing&#xff09;编译&#xff08;Compilation&#xff09;汇编&#xff08;Assembly&#xff09;链接&#xff08;Linking&#xff09; 编译流程 编译流程分为四步 预处理&#…