CentOS7 升级OpenSSH9.0全过程和坑

2023-05-16

在这里插入图片描述
近日,漏洞肆虐,需要升级新版本,才能解决漏洞。故有此文:

0 查看当前版本

[root@host-testsvc openssh-9.0p1]# ssh -V
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017

1、在data下新建一个独立目录openssh目录,用来存放软件

[root@host-testsvc data]# mkdir openssh

2、安装依赖

[root@host-testsvc data]# yum install -y wget gcc pam-devel libselinux-devel zlib-devel openssl-devel

如果有时候没有联网的话,可以本地安装依赖:
去国内阿里镜像里找到对应的rpm包下载上传到服务器即可:阿里镜像https://developer.aliyun.com/packageSearch

[root@host-testsvc openssh]# rpm -qa pam-1.1.8-23.el7.x86_64
[root@host-testsvc openssh]# rpm -qa pam-devel
[root@host-testsvc openssh]# ls
pam-1.1.8-23.el7.x86_64.rpm        pam-devel-1.1.8-23.el7.x86_64.rpm  
[root@host-testsvc openssh]# rpm -ivh pam-1.1.8-23.el7.x86_64.rpm 
准备中...                          ################################# [100%]
        软件包 pam-1.1.8-23.el7.x86_64 已经安装
[root@host-testsvc openssh]# rpm -ivh pam-devel-1.1.8-23.el7.x86_64.rpm 
准备中...                          ################################# [100%]
正在升级/安装...
   1:pam-devel-1.1.8-23.el7           ################################# [100%]
[root@host-testsvc openssh]# rpm -qa pam-devel
pam-devel-1.1.8-23.el7.x86_64
[root@host-testsvc openssh]# rpm -qa pam
pam-1.1.8-23.el7.x86_64

最后再检查一下依赖:

rpm -qa  wget gcc pam-devel libselinux-devel zlib-devel openssl-devel
[root@host-testsvc openssh]# rpm -qa  wget gcc pam-devel libselinux-devel zlib-devel openssl-devel
libselinux-devel-2.5-15.el7.x86_64
openssl-devel-1.0.2k-25.el7_9.x86_64
wget-1.14-18.el7_6.1.x86_64
pam-devel-1.1.8-23.el7.x86_64
zlib-devel-1.2.7-20.el7_9.x86_64
gcc-4.8.5-44.el7.x86_64

3、下载 openssh 9

去openssh官网下载:https://mirrors.aliyun.com/pub/OpenBSD/OpenSSH/portable/
上面的失效了就到这里找吧(搜索openssh-9.0p1即可):https://mirrors.aliyun.com/openssh/portable

[root@host-testsvc data]# wget https://mirrors.aliyun.com/pub/OpenBSD/OpenSSH/portable/openssh-9.0p1.tar.gz
[root@host-testsvc openssh]# ls
openssh-9.0p1.tar.gz

4、解压

[root@host-testsvc openssh]# tar -zxvf openssh-9.0p1.tar.gz 
openssh-9.0p1
openssh-9.0p1/.depend
openssh-9.0p1/.github
openssh-9.0p1/.github/ci-status.md
openssh-9.0p1/.github/configs
openssh-9.0p1/.github/configure.sh
openssh-9.0p1/.github/run_test.sh
openssh-9.0p1/.github/setup_ci.sh
openssh-9.0p1/.github/workflows
openssh-9.0p1/.github/workflows/c-cpp.yml
openssh-9.0p1/.github/workflows/selfhosted.yml
openssh-9.0p1/.github/workflows/upstream.yml
openssh-9.0p1/.gitignore
……中间省略一堆
openssh-9.0p1/ChangeLog
openssh-9.0p1/moduli.0
openssh-9.0p1/scp.0
openssh-9.0p1/ssh-add.0
openssh-9.0p1/ssh-agent.0
openssh-9.0p1/ssh-keygen.0
openssh-9.0p1/ssh-keyscan.0
openssh-9.0p1/ssh.0
openssh-9.0p1/sshd.0
openssh-9.0p1/sftp-server.0
openssh-9.0p1/sftp.0
openssh-9.0p1/ssh-keysign.0
openssh-9.0p1/ssh-pkcs11-helper.0
openssh-9.0p1/ssh-sk-helper.0
openssh-9.0p1/sshd_config.0
openssh-9.0p1/ssh_config.0
openssh-9.0p1/aclocal.m4
openssh-9.0p1/configure
openssh-9.0p1/config.h.in

5、备份原来的配置文件:

[root@host-testsvc openssh]# cp /etc/ssh/sshd_config sshd_config.backup
[root@host-testsvc openssh]# cp /etc/pam.d/sshd sshd.backup
[root@host-testsvc openssh]# ls
openssh-9.0p1  openssh-9.0p1.tar.gz  pam-1.1.8-23.el7.x86_64.rpm  pam-devel-1.1.8-23.el7.x86_64.rpm  sshd.backup  sshd_config.backup

6、卸载原来的openssh

[root@host-testsvc openssh]# rpm -e --nodeps `rpm -qa | grep openssh`
警告:/etc/ssh/sshd_config 已另存为 /etc/ssh/sshd_config.rpmsave
[root@host-testsvc openssh]# rpm -qa  openssh
[root@host-testsvc openssh]# 

7、编译配置 openssh-9.0p1

./configure --prefix=/usr --sysconfdir=/etc/ssh --with-md5-passwords --with-pam --with-zlib --with-tcp-wrappers --with-ssl-dir=/usr/local/ssl --without-hardening
[root@host-testsvc openssh]# cd openssh-9.0p1/
[root@host-testsvc openssh-9.0p1]# ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-md5-passwords --with-pam --with-zlib --with-tcp-wrappers --with-ssl-dir=/usr/local/ssl --without-hardening
configure: WARNING: unrecognized options: --with-md5-passwords, --with-tcp-wrappers
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking if cc supports C99-style variadic macros... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for gawk... gawk
checking how to run the C preprocessor... cc -E
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking for egrep... (cached) /usr/bin/grep -E
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for ar... ar
checking for cat... /usr/bin/cat
checking for kill... /usr/bin/kill
checking for sed... /usr/bin/sed
checking for bash... /usr/bin/bash
checking for ksh... (cached) /usr/bin/bash
checking for sh... (cached) /usr/bin/bash
checking for bash... /usr/bin/bash
checking for ksh... (cached) /usr/bin/bash
checking for sh... (cached) /usr/bin/bash
checking for groff... /usr/bin/groff
checking for nroff... /usr/bin/nroff
checking for mandoc... no
checking for groupadd... /usr/sbin/groupadd
checking for useradd... /usr/sbin/useradd
checking for pkgmk... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for passwd... /usr/bin/passwd
checking for inline... inline
checking whether LLONG_MAX is declared... yes
checking whether LONG_LONG_MAX is declared... no
checking whether SYSTR_POLICY_KILL is declared... no
checking whether RLIMIT_NPROC is declared... yes
checking whether PR_SET_NO_NEW_PRIVS is declared... yes
checking whether OpenSSL will be used for cryptography... yes
checking if cc supports -Werror... yes
checking if cc supports compile flag -pipe... yes
checking if cc supports compile flag -Wunknown-warning-option... no
checking if cc supports compile flag -Wno-error=format-truncation... no
checking if cc supports compile flag -Qunused-arguments... no
checking if cc supports compile flag -Wall... yes
checking if cc supports compile flag -Wextra... no
checking if cc supports compile flag -Wpointer-arith... yes
checking if cc supports compile flag -Wuninitialized... yes
checking if cc supports compile flag -Wsign-compare... yes
checking if cc supports compile flag -Wformat-security... yes
……中间省略。。。
config.status: creating config.h
configure: WARNING: unrecognized options: --with-md5-passwords, --with-tcp-wrappers

OpenSSH has been configured with the following options:
                     User binaries: /usr/bin
                   System binaries: /usr/sbin
               Configuration files: /etc/ssh
                   Askpass program: /usr/libexec/ssh-askpass
                      Manual pages: /usr/share/man/manX
                          PID file: /var/run
  Privilege separation chroot path: /var/empty
            sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin
                    Manpage format: doc
                       PAM support: yes
                   OSF SIA support: no
                 KerberosV support: no
                   SELinux support: no
                   libedit support: no
                   libldns support: no
  Solaris process contract support: no
           Solaris project support: no
         Solaris privilege support: no
       IP address in $DISPLAY hack: no
           Translate v4 in v6 hack: yes
                  BSD Auth support: no
              Random number source: OpenSSL internal ONLY
             Privsep sandbox style: seccomp_filter
                   PKCS#11 support: yes
                  U2F/FIDO support: yes

              Host: x86_64-pc-linux-gnu
          Compiler: cc
    Compiler flags: -g -O2 -pipe -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -fno-builtin-memset -fstack-protector-strong  
Preprocessor flags: -I/usr/local/ssl  -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE
      Linker flags: -L/usr/local/ssl  -fstack-protector-strong 
         Libraries: -lcrypto -ldl -lutil -lz  -lcrypt -lresolv
         +for sshd:  -lpam

PAM is enabled. You may need to install a PAM control file 
for sshd, otherwise password authentication may fail. 
Example PAM control files can be found in the contrib/ 
subdirectory

8、编译安装make && make install

[root@host-testsvc openssh-9.0p1]# make && make install
conffile=`echo sshd_config.out | sed 's/.out$//'`; \
/usr/bin/sed -e 's|/etc/ssh/ssh_config|/etc/ssh/ssh_config|g' -e 's|/etc/ssh/ssh_known_hosts|/etc/ssh/ssh_known_hosts|g' -e 's|/etc/ssh/sshd_config|/etc/ssh/sshd_config|g' -e 's|/usr/libexec|/usr/libexec|g' -e 's|/etc/shosts.equiv|/etc/ssh/shosts.equiv|g' -e 's|/etc/ssh/ssh_host_key|/etc/ssh/ssh_host_key|g' -e 's|/etc/ssh/ssh_host_ecdsa_key|/etc/ssh/ssh_host_ecdsa_key|g' -e 's|/etc/ssh/ssh_host_dsa_key|/etc/ssh/ssh_host_dsa_key|g' -e 's|/etc/ssh/ssh_host_rsa_key|/etc/ssh/ssh_host_rsa_key|g' -e 's|/etc/ssh/ssh_host_ed25519_key|/etc/ssh/ssh_host_ed25519_key|g' -e 's|/var/run/sshd.pid|/var/run/sshd.pid|g' -e 's|/etc/moduli|/etc/ssh/moduli|g' -e 's|/etc/ssh/moduli|/etc/ssh/moduli|g' -e 's|/etc/ssh/sshrc|/etc/ssh/sshrc|g' -e 's|/usr/X11R6/bin/xauth|undefined|g' -e 's|/var/empty|/var/empty|g' -e 's|/usr/bin:/bin:/usr/sbin:/sbin|/usr/bin:/bin:/usr/sbin:/sbin|g' ./${conffile} > sshd_config.out
conffile=`echo ssh_config.out | sed 's/.out$//'`; \
/usr/bin/sed -e 's|/etc/ssh/ssh_config|/etc/ssh/ssh_config|g' -e 's|/etc/ssh/ssh_known_hosts|/etc/ssh/ssh_known_hosts|g' -e 's|/etc/ssh/sshd_config|/etc/ssh/sshd_config|g' -e 's|/usr/libexec|/usr/libexec|g' -e 's|/etc/shosts.equiv|/etc/ssh/shosts.equiv|g' -e 's|/etc/ssh/ssh_host_key|/etc/ssh/ssh_host_key|g' -e 's|/etc/ssh/ssh_host_ecdsa_key|/etc/ssh/ssh_host_ecdsa_key|g' -e 's|/etc/ssh/ssh_host_dsa_key|/etc/ssh/ssh_host_dsa_key|g' -e 's|/etc/ssh/ssh_host_rsa_key|/etc/ssh/ssh_host_rsa_key|g' -e 's|/etc/ssh/ssh_host_ed25519_key|/etc/ssh/ssh_host_ed25519_key|g' -e 's|/var/run/sshd.pid|/var/run/sshd.pid|g' -e 's|/etc/moduli|/etc/ssh/moduli|g' -e 's|/etc/ssh/moduli|/etc/ssh/moduli|g' -e 's|/etc/ssh/sshrc|/etc/ssh/sshrc|g' -e 's|/usr/X11R6/bin/xauth|undefined|g' -e 's|/var/empty|/var/empty|g' -e 's|/usr/bin:/bin:/usr/sbin:/sbin|/usr/bin:/bin:/usr/sbin:/sbin|g' ./${conffile} > ssh_config.out
conffile=`echo moduli.out | sed 's/.out$//'`; \
/usr/bin/sed -e 's|/etc/ssh/ssh_config|/etc/ssh/ssh_config|g' -e 's|/etc/ssh/ssh_known_hosts|/etc/ssh/ssh_known_hosts|g' -e 's|/etc/ssh/sshd_config|/etc/ssh/sshd_config|g' -e 's|/usr/libexec|/usr/libexec|g' -e 's|/etc/shosts.equiv|/etc/ssh/shosts.equiv|g' -e 's|/etc/ssh/ssh_host_key|/etc/ssh/ssh_host_key|g' -e 's|/etc/ssh/ssh_host_ecdsa_key|/etc/ssh/ssh_host_ecdsa_key|g' -e 's|/etc/ssh/ssh_host_dsa_key|/etc/ssh/ssh_host_dsa_key|g' -e 's|/etc/ssh/ssh_host_rsa_key|/etc/ssh/ssh_host_rsa_key|g' -e 's|/etc/ssh/ssh_host_ed25519_key|/etc/ssh/ssh_host_ed25519_key|g' -e 's|/var/run/sshd.pid|/var/run/sshd.pid|g' -e 's|/etc/moduli|/etc/ssh/moduli|g' -e 's|/etc/ssh/moduli|/etc/ssh/moduli|g' -e 's|/etc/ssh/sshrc|/etc/ssh/sshrc|g' -e 's|/usr/X11R6/bin/xauth|undefined|g' -e 's|/var/empty|/var/empty|g' -e 's|/usr/bin:/bin:/usr/sbin:/sbin|/usr/bin:/bin:/usr/sbin:/sbin|g' ./${conffile} > moduli.out
if test "doc" = "cat"; then \
        manpage=./`echo moduli.5.out | sed 's/\.[1-9]\.out$/\.0/'`; \
else \
……省略一堆……
/usr/bin/install -c -m 644 ssh_config.5.out /usr/share/man/man5/ssh_config.5
/usr/bin/install -c -m 644 sshd.8.out /usr/share/man/man8/sshd.8
/usr/bin/install -c -m 644 sftp.1.out /usr/share/man/man1/sftp.1
/usr/bin/install -c -m 644 sftp-server.8.out /usr/share/man/man8/sftp-server.8
/usr/bin/install -c -m 644 ssh-keysign.8.out /usr/share/man/man8/ssh-keysign.8
/usr/bin/install -c -m 644 ssh-pkcs11-helper.8.out /usr/share/man/man8/ssh-pkcs11-helper.8
/usr/bin/install -c -m 644 ssh-sk-helper.8.out /usr/share/man/man8/ssh-sk-helper.8
/usr/bin/mkdir -p /etc/ssh
ssh-keygen: generating new host keys: DSA 
/usr/sbin/sshd -t -f /etc/ssh/sshd_config
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0640 for '/etc/ssh/ssh_host_rsa_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0640 for '/etc/ssh/ssh_host_ecdsa_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0640 for '/etc/ssh/ssh_host_ed25519_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
sshd: no hostkeys available -- exiting.
make: [check-config] 错误 1 (忽略)

8、其他步骤:

8.1 调整文件权限

chmod 600 /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_ed25519_key
[root@host-testsvc openssh-9.0p1]# chmod 600 /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_ed25519_key

8.2 复制配置文件

将之前备份的复制到对应路径

[root@host-testsvc openssh-9.0p1]# cp -a contrib/redhat/sshd.init /etc/init.d/sshd
[root@host-testsvc openssh-9.0p1]# chmod u+x /etc/init.d/sshd
[root@host-testsvc openssh-9.0p1]# mv ../sshd.backup /etc/pam.d/sshd
[root@host-testsvc openssh-9.0p1]# mv ../sshd_config.backup /etc/ssh/sshd_config
mv:是否覆盖"/etc/ssh/sshd_config"yes

8.3 添加添加自启服务ssh到开机启动项

[root@host-testsvc openssh-9.0p1]# chkconfig --add sshd
[root@host-testsvc openssh-9.0p1]# chkconfig sshd on

8.4 重启sshd服务

[root@host-testsvc openssh-9.0p1]# systemctl restart sshd

8.5 查看最新版本

[root@host-testsvc openssh-9.0p1]# ssh -V
OpenSSH_9.0p1, OpenSSL 1.0.2k-fips  26 Jan 2017

补充:

坑1:升级后FTP连不上了

解决方案:

1、修改需要修改 /etc/ssh/sshd_config 配置文件:将Subsystem sftp /usr/libexec/openssh/sftp-server行注释,添加一行Subsystem sftp internal-sftp,如下图:
在这里插入图片描述
2、重启sshd服务

 systemctl restart sshd

3、新开一个窗口连接即可
在这里插入图片描述

END

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

CentOS7 升级OpenSSH9.0全过程和坑 的相关文章

  • 深度优先搜索DFS和广度优先搜索BFS

    相关博客链接 xff1a https www cnblogs com rjgcs p 5198467 html https blog csdn net xiaobo Clanguage article details 88085074 ht
  • 埋头努力之前得先看清方向

    埋头努力之前得先看清方向 写在工作半年 xff0c 第一次拿到绩效结果后 工作和学生时代最大的不同在于 xff0c 工作之后很多事情是消耗型的 xff0c 领导和组织看重的是输出 xff0c 而个人的成长和提升需要自己全权负责 这两者之间是
  • 周末写点轻松的吧

    一直觉得 有一段跟自己独处的时光是很幸福的事情 难得的双休日 xff0c 中午太阳很好 xff0c 照在绿萝上 xff0c 嫩嫩绿绿的叶子很漂亮 前几周去花市买了盆栀子花 xff0c 整整一大盆 xff0c 上面布满了花苞 以前见过开了花的
  • 为什么大部分的C/C++码农都成不了高级工程师?真实原因是缺少核心能力!

    一般来说技术团队的金字塔顶尖往往是技术最牛的人做底层架构师 xff08 或高级工程师 xff09 所以底层架构师在广大码农中的占比大概平均不到 20 然而80 码农干上许多年都是重复以下内容 xff0c 所以做不了架构师 xff0c 正在辛
  • kaggle邮箱不能验证+安装python的Speedml库

    注册kaggle账号遇到一些问题 下面是具体问题和解决方案 希望遇到同样问题的小伙伴不要再踩到坑啦 1kaggle邮箱不能验证You did not enter the correct captcha response Please try
  • 用程序验证生日“悖论”

    生日 悖论 其实并不是悖论 xff0c 它是说在一个人数超过23人的集体中 xff0c 至少有两个人生日在同一天的概率约为0 5 因为这个理论上的概率与人们的直觉不符 xff0c 才会被称为 悖论 我们可以用一个简单的小程序验证它哦 xff
  • python 中 defaultdict 的用法

    场景 xff1a 统计一个字符串列表中每个字符串的频数 一个明显的方法是建立一个键是字符串 xff0c 值是频数的字典 方法1 xff1a word count 61 for word in document if word in word
  • K近邻算法所面临的维数灾难问题

    K近邻算法的基本思想 K近邻算法是一种常用的监督学习方法 xff0c 其原理非常简单 xff1a 给定测试样本 xff0c 基于某种距离找出训练集中与其最靠近的K个训练样本 xff0c 然后基于这K个邻居的信息来进行预测 两个基本要素 xf
  • Android广播发送机制剖析【android广播系列二】

    上篇博客大致说了说广播的注册机制 xff0c 动态注册和静态注册广播的原理还不一样 xff0c 动态广播最后HashMap中了 xff0c 最后放到mReceiverResolver中 xff0c 以后当ActivityManagerSer
  • 观察者模式--Java设计模式

    观察者模式定义 xff1a 定义了对象之间的一对多的依赖 xff0c 这样一来 xff0c 当一个对象发生改变状态的时候 xff0c 它的所有依赖者都会收到通知并自动更新 参考如下图 xff1a 观察者设计模式也叫发布 订阅模式 也可以称作
  • Android——RuntimePermission介绍

    1 介绍 androidM版本上 xff0c 对permission的管理做了部分改动 xff0c 针对dangerous permission xff0c 不在安装的时候给予权限 xff0c 而是在运行过程中咨询用户是否给予app响应的权
  • Android中launcherMode="singleTask"详解【android源码解析六】

    android中launcherMode有4中属性 xff1a standard 默认 xff0c singleTop xff0c singleTask和 singleInstance xff1b 网上有好多例子讲解这四种关系的 xff1a
  • Android闹钟最终版【android源码闹钟解析】

    我以前写了个复杂闹钟的demo xff0c 参见 Android闹钟 复杂版 大明进化十五 但是里面的bug有一些 xff0c 好多人留言 xff0c 所以我就看看源码 xff0c 找找原因 xff1f 顺便把源码代码整理出来 xff0c
  • Smali--Dalvik虚拟机指令语言-->【android_smali语法学习一】

    最近一周在研究rom移植 xff0c 所以就对Smali语言学习了一下 xff0c Smali语言其实就是Davlik的寄存器语言 xff1b Smali语言就是android的应用程序 apk通过apktool反编译出来的都有一个smal
  • 程序员平均月薪过万,想当程序员的话,大学学那些专业会更好呢?

    在互联网时代 xff0c 程序员成为炙手可热的职业 虽然加班累成狗 xff0c 也有可能面临英年早秃的局面 xff0c 但是不得不说程序员的工资高于很多很多传统行业职位的工资 据统计 xff0c 应届程序员毕业生在一线城市平均月薪达到8k
  • android4.0自定义锁屏总结【android锁屏研究一】

    最近搬家了 xff0c 从北京 gt 深圳 xff0c 除了天气有点不同外 xff0c 其他的都差不多 xff0c 工作性质和以前也类似 xff01 纪念一下自己的迁移 题外话 转载请表明出处 xff1a http blog csdn ne
  • android系统锁屏详解【android锁屏解析二】

    谷歌的代码写的确实不错 xff0c 我很幸运 xff0c 一开始接触代码就赶上了谷歌这个开源的系统 xff0c 让我的视野开阔了很多 xff0c 也让我看到了优秀的代码工程师写到的代码 心怀感恩之心 题记 我的有篇文章说了这个锁屏 xff0
  • 单片机学习笔记8--按键和外部中断(基于百问网STM32F103系列教程)

    第八章 按键和外部中断 第一节 按键原理 GPIO内部上拉较弱 xff0c 可根据满足电路需求选择是用内部的上拉还是自己外接上拉 根据原理图可知 xff0c 当按键松开时 xff0c 单片机引脚连接在高电平上 xff0c GPIO口输入高电
  • ARM架构与编程6--重定位(基于百问网ARM架构与编程教程视频)

    一 启动程序流程 我们之前讲过 xff0c 单片机有根据boot的不同 xff0c 有三种启动方式 xff1a boot0boot1启动模式0Xflash启动10系统存储器11内置SRAM 单片机上电复位后 xff0c 运行main函数 以
  • LVGL8.1版本笔记

    之前学过LVGL6 xff0c 现在版本更新到LVGL8了 xff0c 学习下新版本 xff0c 本文主要是记录一些LVGL8的新特性 xff0c 区别和lvgl6的不同之处 lv task handler 的作用 链接 lv task h

随机推荐

  • STM32F407定时器输入捕获

    STM32F407定时器一共有14个 其中分为基本定时器 通用定时器 高级定时器 具体功能如上图所示 下面介绍下输入捕获模式 输入捕获 xff1a 通过检测TIMx CHx上的边沿信号 在边沿信号发生跳变的时候 将当前的定时器的值 TIMx
  • 几种常见的存储器

    存储器分为易失性存储器和非易失性存储器 其中的易失性是指存储器掉电是否能保存数据 易失性存储器 xff1a 就是我们常说的RAM xff0c 这种存储器掉电后所有数据都消失 xff0c 不会被保存 xff0c 重新上电之后 xff0c 原来
  • FreeRTOS初级篇----优先级实验

    FreeRTOS创建任务时 xff0c 可以设置任务的优先级 在FreeRTOS中优先级的值越小 xff0c 优先级越低 xff0c 其他的RTOS都是优先级值越小 xff0c 优先级越高 xff0c 这点需要注意 任务优先级实验 xff1
  • FreeRTOS初级篇----删除任务

    任务既然可以被创建 xff0c 那么自然也可以被删除 xff0c 对于某些执行一次或几次就不需要的任务来说 xff0c 可以在执行完成后 xff0c 把此任务删除 xff0c 可以通过别的任务将其删除 xff0c 也可以任务自己删除自己 任
  • FreeRTOS初级篇----一个函数创建多个任务

    之前说过 xff0c 创建任务的时候 xff0c 可以传递给任务参数 xff0c 下面通过实验 xff0c 对一个任务函数传入不同的参数展示如何使用一个函数创建多个任务 任务函数 xff1a 把传入的数据转换为int型数据然后打印出来 sp
  • 大学生想要通过看书自学编程,却始终没成功,是因为你没有技巧!

    在大学里面 xff0c 有很多的方式来学习编程 xff0c 从在线教程到完成在线课程 xff0c 到密集编程的新手训练营 教程都很棒 xff0c 但它们通常只给你基础知识 与此同时 xff0c 在线教程和线下课程可能非常昂贵 xff0c 虽
  • FreeRTOS初级篇----任务管理

    一 任务状态 再FreeRTOS中 xff0c CPU同一时刻只执行一个任务 xff0c 只不过是所有任务切换的速度特别快 xff0c 默认1ms切换一次任务 xff0c 所以宏观上来看就是CPU再同时运行所有任务 根据任务的执行情况 xf
  • FreeRTOS中级篇

    一 内存管理 1 五种内存管理模式 FreeRTOS提供了5种内存管理实现方法 xff0c 可以根据不同的使用场合选择不同的模式 关于5中内存管理模式可以看下面这篇文章 链接 https zhuanlan zhihu com p 11527
  • LVGL8移植FATFS并适配到STM32F407

    目前LVGL版本已经更新到8 3版本 xff0c FATFS也是在嵌入式领域常用的文件系统 网上许多在LVGL上移植FATFS的教程大都是基于LVGL7版本的 xff0c 而且过程较为凌乱 本文旨在帮助大家了解在LVGL8上移植FATFS文
  • openstack dashboard简体中文汉化

    这里阐述的是fuel工具部署的openstack 环境的dashboard进行简体中文汉化 1 xff09 直接运行 apt get install gettext 命令 2 xff09 转到fuel已经配置好的中文配置文件夹下 cd us
  • 【转】gcc编译错误表

    conversion from s to s not supported by iconv iconv 不支持从 s 到 s 的转换 iconv open iconv open no iconv implementation cannot
  • _tcsstr的用法以及源码的源码

    tcsstr 字符串1在字符串2中首次出现的位置 xff0c 未出现返回NULL值 xff1b tcsrchr xff1a 字符1 在字符串2中首次出现的位置 xff0c 未出现返回NULL值 TCHAR字符串操作函数 xff1a tcsl
  • 修改ElementUI默认滚动条的样式

    一 默认的滚动条 很宽很占地方 xff0c 不美观 xff0c 与页面设计格格不入 二 优化后的滚动条 很美观 xff0c 可以根据实际风格调整颜色 xff0c 宽度 xff0c 高度等 三 优化代码 在全局样式里加入以下代码 xff0c
  • K8S异常之出现大量被驱逐的pod,导致服务无法访问的问题

    一 背景 用kuboard作为k8s管理工具的 xff0c 运行一段时间后 xff0c 访问时 xff0c 浏览器显示以下提示 xff1a 排查问题 1 查看k8s的情况 如下 xff0c 发现正常 root 64 nb001 data k
  • 服务监控(四)之SpringBoot整合Prometheus

    1 新建一个springboot项目 我这里版本是 xff1a 2 2 4 RELEASE xff0c pom中加入如下必要依赖 xff1a span class token comment lt https micrometer io d
  • 服务监控(五)之Grafana 接入Prometheus 的数据实现服务监控

    官方文档 xff1a https prometheus io docs visualization grafana 1 添加Prometheus 数据源 1 1 从下图所示的位置进入 xff0c 添加data source 1 2 点击 A
  • 应用程序运行***buffer overflow detected*** terminated Aborted异常退出问题

    今天运行程序 xff0c 改了一段代码 xff01 然后每次一运行程序就异常退出 xff0c 打印如下信息 xff1a buffer overflow detected shm costomer terminated Aborted 根据单
  • URAM和BRAM有什么区别

    无论是7系列FPGA UltraScale还是UltraScale Plus系列FPGA xff0c 都包含Block RAM xff08 BRAM xff09 xff0c 但只有UltraScale Plus芯片有UltraRAM也就是我
  • 服务监控(六)之Prometheus接入mysqld_exporter使用Grafana监控MySQL

    需准备的前置内容 xff1a 1 Prometheus安装配置 直通车 xff1a https blog csdn net wdy 2099 article details 124204720 2 Grafana安装配置 直通车 xff1a
  • CentOS7 升级OpenSSH9.0全过程和坑

    近日 xff0c 漏洞肆虐 xff0c 需要升级新版本 xff0c 才能解决漏洞 故有此文 xff1a 0 查看当前版本 span class token punctuation span root 64 host testsvc open