
linux rhel centos
数据库人生
专注于数据库
PostgreSQL;Oracle 11G OCA、OCP;OceanBase V2 OBCA、OBCP
展开
-
rhel 8.6 开箱基本设置
也可以再次修改为命令行启动。原创 2024-09-11 18:20:55 · 319 阅读 · 0 评论 -
linux 使用 hdparm、sdparm 设置 Write cache
hdparm 用来查询IDE和SATA驱动器sdparm 用来查询SCSI驱动器。原创 2024-05-14 08:41:13 · 579 阅读 · 0 评论 -
centos 7.9 安装 ftp 传输文件
其中 vsftpd 为 ftp server 端,ftp 包含 ftp 这个客户端命令。原创 2024-04-18 17:17:56 · 609 阅读 · 0 评论 -
centos 7.x 单用户模式
最近碰到 centos 7.9 一些参数设置错误无法启动系统的情况,研究后可以使用单用户模式进入系统进行恢复操作。原创 2023-08-13 09:26:14 · 785 阅读 · 0 评论 -
systemctl 学习之一 Type
Type=forking:以 fork 方式从父进程创建子进程,创建后父进程会立即退出。Type=oneshot:一次性进程,Systemd 会等当前服务退出,再继续往下执行。Type=notify:当前服务启动完毕,会通知Systemd,再继续往下执行。Type=simple:默认值,执行ExecStart指定的命令,启动主进程。Type=idle:若有其他任务执行完毕,当前服务才会运行。Type:定义启动时的进程行为。Type=dbus:当前服务通过D-Bus启动。原创 2023-07-26 09:29:48 · 1845 阅读 · 0 评论 -
linux centos 语言由 en_US 调整为 zh_CN
linux centos 语言由 en_US 调整为 zh_CN原创 2023-03-07 16:25:01 · 528 阅读 · 0 评论 -
docker 启动报错 Operation not permitted
docker 启动报错原创 2023-02-07 14:16:46 · 1544 阅读 · 0 评论 -
centos 7.9.2009 上运行 vnc
centos 7.9 运行 vnc原创 2023-02-06 11:01:23 · 195 阅读 · 0 评论 -
centos 7.8 升级到 centos 7.9
centos 7.8 升级到 centos 7.9原创 2023-02-04 08:45:11 · 1024 阅读 · 0 评论 -
powerdns 系列之二 PowerDNS Authoritative Server
PowerDNS Authoritative Server 权威服务器,直接查询数据库去尝试解析,数据库中若不存在此记录,则直接返回空结果。原创 2023-01-19 10:39:36 · 2313 阅读 · 0 评论 -
powerdns 系列之一 产品介绍
powerdns 简称 pdns,是一款非常有名的 dns 软件,功能非常强大。原创 2023-01-19 10:16:07 · 232 阅读 · 0 评论 -
centos 7 修改分辨率
centos 7 默认的桌面分辨率非常低,需要根据实际需要修改# xrandr选择第11个分辨率 1440*900# xrandr -s 11原创 2021-07-06 09:56:10 · 474 阅读 · 0 评论 -
centos 7 修改 yum 源 elrepo
# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org# yum install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm参考:http://elrepo.org/tiki/HomePage原创 2021-05-31 10:13:02 · 541 阅读 · 0 评论 -
zookeeper启动报错:Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeer
os: centos 7.6.1810# tar -zxvf ./apache-zookeeper-3.6.3.tar.gz# ls -ltotal 3332drwxr-xr-x 15 root root 4096 Apr 9 00:34 apache-zookeeper-3.6.3-rw-r--r-- 1 root root 3404802 Apr 21 20:15 apache-zookeeper-3.6.3.tar.gz# cd apache-zookeeper-3.6.原创 2021-04-21 20:50:27 · 413 阅读 · 0 评论 -
yum install clickhouse* 的一堆报错
os: centos 7.6.1810版本# cat /etc/centos-releaseCentOS Linux release 7.6.1810 (Core) Package is not signed# yum list all |grep -i clickhouseclickhouse-client.x86_64 1.1.54385-2 clickhouse-stableclickhouse-client.noarch原创 2021-04-21 19:38:12 · 616 阅读 · 0 评论 -
centos 7 的 /etc/security/limits.conf 一点备注
在Centos7系统中,使用Systemd替代了之前的SysV。/etc/security/limits.conf文件的配置作用域缩小了。/etc/security/limits.conf的配置,只适用于通过PAM认证登录用户的资源限制,它对systemd的service的资源限制不生效。因此登录用户的限制,通过/etc/security/limits.conf与/etc/security/limits.d下的文件设置即可。对于systemd service的资源设置,则需修改全局配置,全局配置文件放原创 2021-04-15 16:35:21 · 1156 阅读 · 0 评论 -
WARNING: Could not activate Linux watchdog device: Can‘t open watchdog device:
# yum install watchdog -y;modprobe softdog;systemctl enable watchdog;patroni的日志里报错2021-02-18 14:30:10,087 WARNING: Could not activate Linux watchdog device: "Can't open watchdog device: [Errno 13] Permission denied: '/dev/watchdog'"设置为 666# ls -l原创 2021-02-18 15:31:37 · 1005 阅读 · 0 评论 -
SSH登录很慢
os: centos 7.6修改sshd服务器端配置,并重启sshd# vi /etc/ssh/sshd_configUseDNS no# systemctl restart sshd原创 2021-02-18 10:44:48 · 105 阅读 · 0 评论 -
smem工具分析 postgresql 的进程内存情况
# cat /etc/centos-releaseCentOS Linux release 7.4.1708 (Core)# yum list all |grep -i smemsmem.noarch 1.4-1.el7 epel # yum install smem# smem -U postgres PID User Command原创 2021-01-13 22:50:00 · 289 阅读 · 0 评论 -
PS1 变量
os: centos 7.8.2003# su - postgres-bash-4.2$ vi ~/.bash_profileexport PS1="$USER@`/bin/hostname -s`-> "-bash-4.2$ source ~/.bash_profilepostgres@nodepg13->原创 2020-10-14 10:33:01 · 219 阅读 · 0 评论 -
rhel、centos 一些人性化的变量
export PS1="\$USER@\`/bin/hostname -s\`-> " alias rm='rm -i' alias ll='ls -lh'原创 2020-08-10 16:34:05 · 151 阅读 · 0 评论 -
/dev/shm 调整大小
os: centos 7.4.1708/dev/shm 默认大小为物理内存的一半,如果需要调整大小,可以修改 /etc/fstab版本# cat /etc/centos-releaseCentOS Linux release 7.4.1708 (Core) /dev/shm# df -hTFilesystem Type Size Used Avail Use% Mounted ondevtmpfs devtmpfs 2原创 2020-08-10 15:50:36 · 3193 阅读 · 0 评论 -
centos 安装 python3 时 yum 报错的处理
os: centos 7.x安装python3,如下:# wget -c https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tar.xz# ./configure# make# make install创建软链接# ls -l /usr/bin/pythonlrwxrwxrwx. 1 root root 7 Apr 28 2019 /usr/bin/python -> python2# unlink /usr/bin/p原创 2020-07-07 09:13:44 · 427 阅读 · 0 评论 -
centos 查看命令属于哪个包
os: centos 7.4# yum install -y lz4 lz4-devel lz4-static# which lz4rpm -qf# rpm -qf lz4或者yum search# yum search lz4原创 2020-05-20 15:12:19 · 1055 阅读 · 0 评论 -
rhel 安装图形化界面(gnome,kde)
安装 rhel 时,如果没有安装图形化界面,或者后期想卸载图形化界面,可以执行如下命令1)配置正确的yum源,可以参考本博客的相关文章(在搜索里输入yum即可搜索到)2)使用yum groupinstall 批量安装相关的包 # yum groupinstall Desktop # yum groupinstall "X Window System"原创 2016-05-28 23:20:40 · 7109 阅读 · 0 评论 -
yum 在 rhel 6.x 下的本地配置
yum 安装软件远比 rpm 使用方便,下面简单描述下 rhel 6.x 的yum 配置# cd /mnt# mkdir cdrom# mount /dev/cdrom /mnt/cdrom# cd /etc/yum.repos.d/# cp rhel-source.repo rhel-source.repo.bak# vi rhel-source.repo原创 2016-05-28 16:37:17 · 460 阅读 · 0 评论 -
vnc 在 rhel 6.x 上的配置及使用
vnc 有点类似 windows 的远程桌面,在实际工作中使用还是很方便的。1,安装vncserver服务 # yum install tigervnc-server # service vncserver status Xvnc is stopped 2,查看vncserver状态,启动vncserver 输入初始化密码 # service vncs...原创 2016-05-29 01:02:31 · 4724 阅读 · 0 评论 -
error: rpmdb: BDB0113 Thread/process 2294/139634462410560 failed: BDB1507 Thread died in Berkeley DB
os: centos 7.4# yum install zip;error: rpmdb: BDB0113 Thread/process 2294/139634462410560 failed: BDB1507 Thread died in Berkeley DB libraryerror: db5 error(-30973) from dbenv->failchk: BDB0087 ...原创 2020-04-19 14:58:43 · 1178 阅读 · 0 评论 -
rpm,yum 查看某个包释放的文件
os: centos 7.4rpm 命令查看# rpm -qa |grep -i pg_probackuppg_probackup-repo-2.2.5-1.noarchpg_probackup-11-debuginfo-2.2.7-1.00ea17704820f413.x86_64pg_probackup-11-2.2.7-1.00ea17704820f413.x86_64# r...原创 2020-03-04 15:31:12 · 629 阅读 · 0 评论 -
centos 使用 scl 软件集
os: centos 7.4yum repolist之前已经安装了 epel# yum repolistrepo id repo name statusba...原创 2019-12-18 15:59:06 · 6013 阅读 · 0 评论 -
/opt/rh/llvm-toolset-7/root/usr/bin/clang: Command not found
os: centos 7.4解决方法如下# yum -y install centos-release-scl centos-release-scl-rh;yum -y install scl-utils;yum -y install llvm-toolset-7;# scl --listdevtoolset-7llvm-toolset-7# scl enable llvm-t...原创 2019-12-18 11:35:00 · 3079 阅读 · 2 评论 -
centos 7.x 更改 ipv6、numa、thp、io scheduler
os: centos 7.x# vi /etc/default/grubGRUB_CMDLINE_LINUX=" ipv6.disable=1 numa=off transparent_hugepage=never elevator=deadline "# grub2-mkconfig -o /boot/grub2/grub.cfg# reboot# lsmod | grep ipv...原创 2019-10-09 10:46:03 · 349 阅读 · 0 评论 -
centos 7.4 添加新网卡,停启用网卡
vm: VirtualBox 图形用户界面 版本 5.2.4 r119785 (Qt5.6.2) os: centos 7.4 x86_64# yum install redhat-lsb*# lsb_release -aLSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:de原创 2018-01-29 11:35:38 · 12215 阅读 · 0 评论 -
centos 7 关闭 firewall、iptables
systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体。1、关闭firewallsystemctl status firewalld.service systemctl stop firewalld.service systemctl disable firewalld.service firewall-cmd --...原创 2018-03-30 11:00:06 · 17222 阅读 · 0 评论 -
centos 6.x 设置默认的 python 2.6 为 python 2.7
centos 6.x 的yum使用的是python 2.6,现在需要更新系统默认python为python 2.7安装 python2.7# yum install python27-python python27-python-devel查询 python2.7 的安装位置# rpm -ql python27-python/opt/rh/python27/root/u...原创 2018-04-19 19:07:29 · 1010 阅读 · 0 评论 -
centos 7 修改 yum 源 aliyun 、epel
备份原来的yum源先备份,在任何环境下操作都是个良好习惯# cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak 设置aliyun的yum源# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/r...原创 2018-06-09 20:23:12 · 6804 阅读 · 0 评论 -
resize2fs: Bad magic number in super-block while trying to open
os: centos 7.4 [root@node1 ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda2 centos lvm2 a-- <19.00g 0 /dev/sda3 centos lvm2 a-- <30.00g <2.00g[root@node1 ~]# v...原创 2018-07-02 14:24:00 · 16300 阅读 · 0 评论 -
linux 配置ssh信任
linux 下,经常需要配置双机或者多机信任,简要记录下具体的操作。 比如配置 a,b两台机器ssh信任。生成密钥a,b两台机器均需要自行# cd ~# ssh-keygen -t rsa此时会生成两个密码文件: id_rsa 私钥文件 id_rsa.pub 公钥文件拷贝公钥配置 a 机器 ssh 免密码到 b机器,需要把 a机器的公钥拷贝到 b机器 的 a...原创 2018-06-04 20:00:17 · 3827 阅读 · 0 评论 -
linux 使用 mailx 发送邮件
安装# yum install mailx# rpm -qa |grep mailmailcap-2.1.31-2.el6.noarchmailx-12.4-8.el6_6.x86_64libreport-plugin-mailx-2.0.9-32.el6.centos.x86_64配置# vi /etc/mail.rcset from=1234567890@163....原创 2018-06-04 16:05:12 · 1486 阅读 · 0 评论 -
linux 添加、删除 route
删除路由echo "########## os add route"route del -net 192.168.56.0/24 添加路由echo "########## os add route"route add -net 192.168.56.0/24 gw 192.168.56.254删除默认路由echo "########## os remove原创 2018-03-20 16:07:36 · 8572 阅读 · 0 评论