cobbler

cobbler

Cobbler是一个Linux服务器安装的服务,可以通过网络启动(PXE)的方式来快速安装、重装物理服务器和虚拟机,同时还可以管理DHCP,DNS等。

Cobbler可以使用命令行方式管理,也提供了基于Web的界面管理工具(cobbler-web),还提供了API接口,可以方便二次开发使用。

Cobbler是较早前的kickstart的升级版,优点是比较容易配置,还自带web界面比较易于管理。

Cobbler内置了一个轻量级配置管理系统,但它也支持和其它配置管理系统集成,如Puppet,暂时不支持SaltStack。

puppet是一种Linux、Unix、windows平台的集中配置管理系统,使用自有的puppet描述语言,可管理配置文件、用户、cron任务、软件包、系统服务等。puppet把这些系统实体称之为资源,puppet的设计目标是简化对这些资源的管理以及妥善处理资源间的依赖关系。
puppet采用C/S星状的结构,所有的客户端和一个或几个服务器交互。每个客户端周期的(默认半个小时)向服务器发送请求,获得其最新的配置信息,保证和该配置信息同步。每个puppet客户端每半小时(可以设置)连接一次服务器端, 下载最新的配置文件,并且严格按照配置文件来配置客户端. 配置完成以后,puppet客户端可以反馈给服务器端一个消息. 如果出错,也会给服务器端反馈一个消息

cobbler官网:https://cobbler.github.io/

cobbler集成的服务

  • PXE服务支持
  • DHCP服务管理
  • DNS服务管理(可选bind,dnsmasq)
  • 电源管理
  • Kickstart服务支持
  • YUM仓库管理
  • TFTP(PXE启动时需要)
  • Apache(提供kickstart的安装源,并提供定制化的kickstart配置)

cobbler配置文件详解
cobbler配置文件目录在/etc/cobbler

配置文件 作用 /etc/cobbler/settings cobbler 主配置文件 /etc/cobbler/iso/ iso模板配置文件 /etc/cobbler/pxe pxe模板配置文件 /etc/cobbler/power 电源配置文件 /etc/cobbler/user.conf web服务授权配置文件 /etc/cobbler/users.digest web访问的用户名密码配置文件 /etc/cobbler/dhcp.template dhcp服务器的的配置模板 /etc/cobbler/dnsmasq.template dns服务器的配置模板 /etc/cobbler/tftpd.template tftp服务的配置模板 /etc/cobbler/modules.conf 模块的配置文件

cobbler数据目录

目录 作用 /var/lib/cobbler/config/ 用于存放distros,system,profiles等信息配置文件 /var/lib/cobbler/triggers/ 用于存放用户定义的cobbler命令 /var/lib/cobbler/kickstart/ 默认存放kickstart文件 /var/lib/cobbler/loaders/ 存放各种引导程序以及镜像目录 /var/www/cobbler/ks_mirror/ 导入的发行版系统的所有数据 /var/www/cobbler/images/ 导入发行版的kernel和initrd镜像用于远程网络启动 /var/www/cobbler/repo_mirror/ yum仓库存储目录

cobbler日志文件

日志文件路径 说明 /var/log/cobbler/installing 客户端安装日志 /var/log/cobbler/cobbler.log cobbler日志

cobbler命令详解

命令 作用 cobbler check 核对当前设置是否有问题 cobbler list 列出所有的cobbler元素 cobbler report 列出元素的详细信息 cobbler sync 同步配置到数据目录,更改配置最好都要执行下 cobbler reposync 同步yum仓库 cobbler distro 查看导入的发行版系统信息 cobbler system 查看添加的系统信息 cobbler profile 查看配置信息

  1. cobbler服务端部署

配置yum源

[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# rm -rf *
[root@localhost yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
--2022-09-24 01:02:12--  https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 58.49.162.241, 58.49.162.239, 58.49.162.238, ...

Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|58.49.162.241|:443... connected.

HTTP request sent, awaiting response... 200 OK
Length: 2495 (2.4K) [application/octet-stream]
Saving to: '/etc/yum.repos.d/CentOS-Base.repo'

/etc/yum.repos.d/Ce 100%[================>]   2.44K  --.-KB/s    in 0.01s

2022-09-24 01:02:12 (242 KB/s) - '/etc/yum.repos.d/CentOS-Base.repo' saved [2495/2495]
[root@localhost yum.repos.d]# yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
Failed to set locale, defaulting to C.UTF-8
CentOS-8.5.2111 - Base - mirrors.aliyun.com  398 kB/s | 4.6 MB     00:11
CentOS-8.5.2111 - Extras - mirrors.aliyun.co 9.2 kB/s |  10 kB     00:01
CentOS-8.5.2111 - AppStream - mirrors.aliyun 260 kB/s | 8.4 MB     00:33
Last metadata expiration check: 0:00:01 ago on Sat Sep 24 01:04:53 2022.

epel-release-latest-8.noarch.rpm              65 kB/s |  24 kB     00:00
Dependencies resolved.

=============================================================================
 Package             Architecture  Version         Repository           Size
=============================================================================
Installing:
 epel-release        noarch        8-17.el8        @commandline         24 k

Transaction Summary
=============================================================================
Install  1 Package

Total size: 24 k
Installed size: 34 k
Downloading Packages:
Running transaction check
Transaction check succeeded.

Running transaction test
Transaction test succeeded.

Running transaction
  Preparing        :                                                     1/1
  Installing       : epel-release-8-17.el8.noarch                        1/1
  Running scriptlet: epel-release-8-17.el8.noarch                        1/1
Many EPEL packages require the CodeReady Builder (CRB) repository.

It is recommended that you run /usr/bin/crb enable to enable the CRB repository.

  Verifying        : epel-release-8-17.el8.noarch                        1/1
Installed products updated.

Installed:
  epel-release-8-17.el8.noarch

Complete!

[root@localhost yum.repos.d]# sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
[root@localhost yum.repos.d]# sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*

安装cobbler以及相关软件

[root@localhost ~]# dnf module list | grep cobbler
Failed to set locale, defaulting to C.UTF-8
cobbler              3               default [d]                              Versatile Linux deployment server
cobbler              3.3             default [d]                              Versatile Linux deployment server                                    [root@localhost ~]# dnf -y module enable cobbler:3
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:00:56 ago on Sat Sep 24 01:07:16 2022.

Dependencies resolved.

=============================================================================
 Package          Architecture    Version             Repository        Size
=============================================================================
Enabling module streams:
 cobbler                          3

Transaction Summary
=============================================================================

Complete!

[root@localhost ~]# yum -y install httpd dhcp* tftp tftp-server cobbler cobbler-web pykickstart rsync rsync-daemon
......

  rsync-3.1.3-12.el8.x86_64
  rsync-daemon-3.1.3-12.el8.noarch
  sscg-2.3.3-14.el8.x86_64
  tftp-5.2-24.el8.x86_64
  tftp-server-5.2-24.el8.x86_64
  xorriso-1.4.8-4.el8.x86_64

Complete!

[root@localhost ~]#

启动服务并设置开机自启

[root@localhost ~]# systemctl restart httpd
[root@localhost ~]# systemctl restart rsyncd
[root@localhost ~]# systemctl restart tftp
[root@localhost ~]# systemctl restart cobblerd.service
[root@localhost ~]# systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.

[root@localhost ~]# systemctl enable rsyncd
Created symlink /etc/systemd/system/multi-user.target.wants/rsyncd.service → /usr/lib/systemd/system/rsyncd.service.

[root@localhost ~]# systemctl enable tftp
Created symlink /etc/systemd/system/sockets.target.wants/tftp.socket → /usr/lib/systemd/system/tftp.socket.

[root@localhost ~]# systemctl enable cobblerd.service
Created symlink /etc/systemd/system/multi-user.target.wants/cobblerd.service → /usr/lib/systemd/system/cobblerd.service.

关闭防火墙和selinux并重启系统

[root@localhost ~]#  systemctl stop firewalld
[root@localhost ~]#  systemctl disable firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.

Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

[root@localhost ~]# vim /etc/sysconfig/selinux
SELINUX=disabled

[root@localhost ~]# reboot

修改配置文件

[root@localhost ~]# vim /etc/cobbler/settings.yaml
......

(dual homed, etc), you need to read the --server-override section
of the manpage for how that works.

server: 192.168.29.140(修改server的IP地址为本机ip)
......

if you do not set this correctly, this will be manifested in TFTP open timeouts.

next_server: 192.168.29.140(修改tftp的IP地址为本机ip)
default_password_crypted: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac."(查看密码)

生成加密的密码并写入到配置文件

[root@localhost ~]# openssl passwd -1 -salt "$RANDOM" "redhat"
$1$14721$/5AIr5ydPu3qO4KuttYnT/
[root@localhost ~]# vim /etc/cobbler/settings.yaml
......

default_password_crypted: "$1$14721$/5AIr5ydPu3qO4KuttYnT/"

将cobbler的dhcp功能打开,然后重启cobbler

[root@localhost ~]# vim /etc/cobbler/settings.yaml
......

set to true to enable Cobbler's DHCP management features.

the choice of DHCP management engine is in /etc/cobbler/modules.conf
manage_dhcp: true(将false修改为true)
[root@localhost ~]# systemctl restart cobblerd.service

通过cobbler check 核对当前设置是否有问题,并解决问题

[root@localhost ~]# cobbler check
The following are potential configuration items that you may want to fix:

1: some network boot-loaders are missing from /var/lib/cobbler/loaders. If you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely. Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, and yaboot.

2: reposync is not installed, install yum-utils or dnf-plugins-core
3: yumdownloader is not installed, install yum-utils or dnf-plugins-core
4: debmirror package is not installed, it will be required to manage debian deployments and repositories
5: fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

Restart cobblerd and then run 'cobbler sync' to apply changes.

解决问题1:
[root@localhost ~]# cd /var/lib/cobbler/loaders/
[root@localhost loaders]# ls
[root@localhost loaders]# yum -y install syslinux*
......

Installed:
  mtools-4.0.18-14.el8.x86_64
  syslinux-6.04-5.el8.x86_64
  syslinux-extlinux-6.04-5.el8.x86_64
  syslinux-extlinux-nonlinux-6.04-5.el8.noarch
  syslinux-nonlinux-6.04-5.el8.noarch
  syslinux-tftpboot-6.04-5.el8.noarch

Complete!

[root@localhost loaders]# cd
[root@localhost ~]# cp /usr/share/syslinux/pxelinux.0 /var/lib/cobbler/loaders/
[root@localhost ~]# cp /usr/share/syslinux/menu.c32 /var/lib/cobbler/loaders/
[root@localhost ~]# ls /var/lib/cobbler/loaders/
menu.c32  pxelinux.0
问题2和问题3解决办法
[root@localhost ~]#yum -y install yum-utils
......

Installed:
  yum-utils-4.0.21-3.el8.noarch
Complete!

[root@localhost ~]#
问题4和问题5可以忽略,
因为是debian系统才需要解决,显示使用的是centos8
Debian系统解决办法安装fence-agents

配置DHCP模板文件,同步cobbler配置

[root@localhost ~]# vim /etc/cobbler/dhcp.template
......

subnet 192.168.29.0 netmask 255.255.255.0 {
     option routers             192.168.29.254;
     option domain-name-servers 8.8.8.8;
     option subnet-mask         255.255.255.0;
     range dynamic-bootp        192.168.29.140 192.168.29.150;
     default-lease-time         21600;
     max-lease-time             43200;
     next-server                $next_server;
......

[root@localhost ~]# systemctl restart httpd cobblerd.service
[root@localhost ~]# cobbler sync
......

running shell triggers from /var/lib/cobbler/triggers/sync/post/*
shell triggers finished successfully
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.scm_track
running python trigger cobbler.modules.managers.genders
running shell triggers from /var/lib/cobbler/triggers/change/*
shell triggers finished successfully
*** TASK COMPLETE ***
[root@localhost ~]#

1、使用cobblerI具制作centos8镜像, 镜像名称为marui-x86 64
2、 使用cobber手动安装centos8系统
3、 使用cobbler-web自动安装centos8系统
(1)主机名为marui123.example.com
(2)手动指定ip

管理distro
//挂载镜像并导入镜像

[root@localhost ~]# mount /dev/cdrom /mnt
mount: /mnt: WARNING: device write-protected, mounted read-only.

[root@localhost ~]# cobbler import --path=/mnt/ --name=marui arch=x86_64
task started: 2022-09-24_022019_import
task started (id=Media import, time=Sat Sep 24 02:20:19 2022)
running python triggers from /var/lib/cobbler/triggers/task/import/pre/*
running shell triggers from /var/lib/cobbler/triggers/task/import/pre/*
shell triggers finished successfully
Found a candidate signature: breed=redhat, version=rhel8
Found a matching signature: breed=redhat, version=rhel8
Adding distros from path /var/www/cobbler/distro_mirror/marui:
creating new distro: marui-x86_64
trying symlink: /var/www/cobbler/distro_mirror/marui -> /var/www/cobbler/links/marui-x86_64
creating new profile: marui-x86_64
associating repos
checking for rsync repo(s)
checking for rhn repo(s)
checking for yum repo(s)
starting descent into /var/www/cobbler/distro_mirror/marui for marui-x86_64
processing repo at : /var/www/cobbler/distro_mirror/marui/AppStream
need to process repo/comps: /var/www/cobbler/distro_mirror/marui/AppStream
looking for /var/www/cobbler/distro_mirror/marui/AppStream/repodata/*comps*.xml
Keeping repodata as-is :/var/www/cobbler/distro_mirror/marui/AppStream/repodata
processing repo at : /var/www/cobbler/distro_mirror/marui/BaseOS
need to process repo/comps: /var/www/cobbler/distro_mirror/marui/BaseOS
looking for /var/www/cobbler/distro_mirror/marui/BaseOS/repodata/*comps*.xml
Keeping repodata as-is :/var/www/cobbler/distro_mirror/marui/BaseOS/repodata
*** TASK COMPLETE ***
[root@localhost ~]#

/安装源的唯一标示就是根据name参数来定义,本例导入成功后,安装源的唯一标示就是:CentOS-8-x86_64,如果重复,系统会提示导入失败
//查看cobbler镜像列表

[root@localhost ~]# cobbler list
distros:
   marui-x86_64

profiles:
   marui-x86_64

systems:

repos:

images:

mgmtclasses:

packages:

files:
[root@localhost ~]#

//查看cobbler镜像列表,查看详细信息 查看指定的–name 接镜像名

[root@localhost ~]# cobbler distro report --name marui-x86_64
Name                           : marui-x86_64
Architecture                   : x86_64
Automatic Installation Template Metadata : {'tree': 'http://@@http_server@@/cblr/links/marui-x86_64'}
TFTP Boot Files                : {}
Boot loader                    : grub
Breed                          : redhat
Comment                        :
Fetchable Files                : {}
Initrd                         : /var/www/cobbler/distro_mirror/marui/images/pxeboot/initrd.img
Kernel                         : /var/www/cobbler/distro_mirror/marui/images/pxeboot/vmlinuz
Kernel Options                 : {}
Kernel Options (Post Install)  : {}
Management Classes             : []
OS Version                     : rhel8
Owners                         : ['admin']
Redhat Management Key          :
Remote Boot Initrd             : ~
Remote Boot Kernel             : ~
Template Files                 : {}

[root@localhost ~]#

创建kickstarts自动安装脚本

[root@localhost ~]# cobbler profile get-autoinstall --name marui-x86_64 > /var/lib/cobbler/templates/marui.ks
[root@localhost ~]# vim /var/lib/cobbler/templates/marui.ks
......

Firewall configuration
firewall --disabled(关闭防火墙)
......

%end

%packages
@^minimal-environment(添加最小化安装)
%end
......

//此时使用虚拟机去安装系统并不会成功 需要做如下操作

[root@localhost ~]# cd /usr/share/cobbler/bin/
[root@localhost bin]# ls
migrate-data-v2-to-v3.py  mkgrub.sh
migrate-settings.sh       settings-migration-v1-to-v2.sh
[root@localhost bin]# bash mkgrub.sh
+ grub2-mkimage -O arm64-efi -o /var/lib/cobbler/loaders/grub/grubaa64.efi --prefix= all_video boot cat configfile echo true font gfxmenu gfxterm gzio halt iso9660 jpeg minicmd normal part_apple part_msdos part_gpt password_pbkdf2 png reboot search search_fs_uuid search_fs_file search_label sleep test video fat loadenv linux btrfs ext2 xfs jfs reiserfs tftp http luks gcry_rijndael gcry_sha1 gcry_sha256 mdraid09 mdraid1x lvm serial regexp tr efinet
grub2-mkimage: error: cannot open /usr/lib/grub/arm64-efi/moddep.lst': No such file or directory.

+ set +x
+ grub2-mkimage -O i386-pc-pxe -o /var/lib/cobbler/loaders/grub/grub.0 --prefix= all_video boot cat configfile echo true font gfxmenu gfxterm gzio halt iso9660 jpeg minicmd normal part_apple part_msdos part_gpt password_pbkdf2 png reboot search search_fs_uuid search_fs_file search_label sleep test video fat loadenv linux btrfs ext2 xfs jfs reiserfs tftp http luks gcry_rijndael gcry_sha1 gcry_sha256 mdraid09 mdraid1x lvm serial regexp tr chain pxe biosdisk
+ set +x
+ grub2-mkimage -O powerpc-ieee1275 -o /var/lib/cobbler/loaders/grub/grub.ppc64le --prefix= all_video boot cat configfile echo true font gfxmenu gfxterm gzio halt iso9660 jpeg minicmd normal part_apple part_msdos part_gpt password_pbkdf2 png reboot search search_fs_uuid search_fs_file search_label sleep test video fat loadenv linux btrfs ext2 xfs jfs reiserfs tftp http luks gcry_rijndael gcry_sha1 gcry_sha256 mdraid09 mdraid1x lvm serial regexp tr net ofnet
grub2-mkimage: error: cannot open /usr/lib/grub/powerpc-ieee1275/moddep.lst': No such file or directory.

+ set +x
+ grub2-mkimage -O x86_64-efi -o /var/lib/cobbler/loaders/grub/grubx64.efi --prefix= all_video boot cat configfile echo true font gfxmenu gfxterm gzio halt iso9660 jpeg minicmd normal part_apple part_msdos part_gpt password_pbkdf2 png reboot search search_fs_uuid search_fs_file search_label sleep test video fat loadenv linux btrfs ext2 xfs jfs reiserfs tftp http luks gcry_rijndael gcry_sha1 gcry_sha256 mdraid09 mdraid1x lvm serial regexp tr chain efinet
grub2-mkimage: error: cannot open `/usr/lib/grub/x86_64-efi/moddep.lst': No such file or directory.

+ set +x
+ ln -s /usr/share/syslinux/ldlinux.c32 /var/lib/cobbler/loaders/ldlinux.c32
+ set +x
[root@localhost bin]# ls /var/lib/cobbler/loaders/
grub  ldlinux.c32  menu.c32  pxelinux.0
[root@localhost bin]# cobbler sync
......

running shell triggers from /var/lib/cobbler/triggers/sync/post/*
shell triggers finished successfully
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.scm_track
running python trigger cobbler.modules.managers.genders
running shell triggers from /var/lib/cobbler/triggers/change/*
shell triggers finished successfully
*** TASK COMPLETE ***
[root@localhost bin]# systemctl restart httpd cobblerd.service

手动安装
//创建一个虚拟机,然后打开虚拟机

cobbler
cobbler
cobbler
cobbler
cobbler
cobbler
cobbler
cobbler
cobbler
cobbler
cobbler
cobbler
cobbler
cobbler
cobbler
cobbler
cobbler
cobbler
自动安装
//使用浏览器访问https://192.168.29.140/cobbler_web
//默认登录的用户名和密码都为cobbler
cobbler
cobbler
cobbler
cobbler
cobbler
同上创建虚拟机
cobbler
cobbler
cobbler
cobbler
cobbler
cobbler

Original: https://www.cnblogs.com/marymary/p/16724851.html
Author: 溜溜威
Title: cobbler

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/581503/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

  • Linux文件属性及权限

    Linux文件属性及权限 首先我们以root用户的身份登录linux,执行ls -al 查看文件: 文件类型: 【d】 代表目录(directory)、【-】代表文件、【l】代表链…

    Linux 2023年6月11日
    090
  • MySQL事务隔离级别

    MySQL事务隔离级别 事务 事务是由单独的一个或者多个SQL语句组成,是一个最小的不可再分割的单元,这一组操作里面的所有的执行,要么全部成功、要么全部不成功。如果有一个执行不成功…

    Linux 2023年6月6日
    0112
  • 阿里云函数-爱奇艺签到

    简介 是否支持多账号:是消息推送平台:PUSHPLUS 代码 -*- coding: utf8 -*- import requests,random,string,hashlib,…

    Linux 2023年6月7日
    083
  • Red Hat Enterprise Linux (RHEL) 8.5 发布(含下载)

    2021 年 11 月 10 日,红帽企业 Linux (RHEL) 8.5 现已正式发布 (GA),并带来了新功能和改进,以帮助简化部署、优化性能并帮助降低环境中的风险。无论您的…

    Linux 2023年5月27日
    0109
  • Python 多线程

    import threading import time def userTest(aa,bb): print(aa) time.sleep(3) print(bb) if __n…

    Linux 2023年6月6日
    075
  • SQL52 获取employees中的first_name

    本题链接表结构如下所示(内容不完整):额外的要求是按照first_name最后两个字母升序进行输出。这里需要用到MySQL的字符串处理函数RIGHT。RIGHT函数的语法如下所示:…

    Linux 2023年6月13日
    0111
  • POJ1573(Robot Motion)–简单模拟+简单dfs

    题目在这里 题意 问你按照图中所给的提示走,多少步能走出来??? 其实只要根据这个提示走下去就行了。模拟每一步就OK,因为下一步的操作和上一步一样,所以简单dfs。如果出现loop…

    Linux 2023年6月7日
    092
  • 网易互联网笔试(3.27)

    网易互联网3.27日笔试,四道笔试题一道简答题,四道笔试题AK,简答题考察设计模式不会。 第一道题模拟使用单体技能和群体技能攻击怪物的场景、第二题字符串处理、第三题构造具有限制条件…

    Linux 2023年6月13日
    099
  • Vmware部署Linux无人值守安装Centos7系统

    Linux – 无人值守安装服务 需求分析 – 使用光盘镜像来安装 Linux 系统的方式; 坦白讲, 该方法适用于只安装少量 Linux 系统的情况, 如果生产环境中…

    Linux 2023年6月13日
    0107
  • 分布式事务一站式解决方案与实现

    1 本地事务 1.1 事务的概述 事务指逻辑上的一组操作,组成这组操作的各个单元,要么全部成功,要么全部不成功。从而确保了数据的准确与安全。 1.2 事务的四大特性 原子性(Ato…

    Linux 2023年6月13日
    0136
  • 【转】对于任意的非负整数,统计其二进制展开中数位1的总数

    问题: 对于任意的非负整数,统计其二进制展开中数位1的总数。 解决: 在看这篇之前可以先看看上述这篇,这篇主要讨论其优化问题。 常规解法: O(logn): 无非就是每次取其二进制…

    Linux 2023年6月7日
    081
  • AIX下安装bash

    在AIX系统下,默认是没有安装bash环境的,对于经常操作的维护人员来说,非常不方便,所以下面我们来动手安装bash。 1、确认系统是否已安装bash 方法1:之间敲bash命令,…

    Linux 2023年6月14日
    077
  • Arrays.binarySearch方法

    Arrays .binarySearch(int[] arr,int b) 1,数组arr必须排序后调用查找b在arr数组中的下标是多少。 2,存在:返回在数组中的下标 不存在:返…

    Linux 2023年6月8日
    070
  • linux自动备份mysql数据库

    备份脚本记录一下–(单个数据库) 2021-11-15 1.新建shell脚本:vim **.sh #!/bin/bashCKUP=/data/backup/db #获…

    Linux 2023年5月27日
    0111
  • 对比nushell和powershell

    2021-07-17 第一版 有些对比领域缺失,这篇文章会持续更新。 这是一篇对比powershell和nushell的文章。我是powerhsell专家,又是nushell新手,…

    Linux 2023年6月14日
    0104
  • 玩转SpringBoot之捣鼓 Redis

    我们都知道,把首页数据放到Redis里,能够加快首页数据的访问速度。但是我们要如何准确又快速的将 Redis 整合到自己的 SpringBoot2.x 项目中呢?今天阿淼就带大家爬…

    Linux 2023年5月28日
    0115
亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球