分类 Linux 中的文章

ssh登录非常慢

通过ssh登陆一台linux主机非常慢,基本上每次都在10s以上 [root@localhost ~]# time ssh 192.168.146.104 real 0m13.730s user 0m0.014s sys 0m0.009s 通过ssh -vvv查看建立链接的过程中详细日志,找出最慢的地方出现在哪里 [root@localhost ~]# ssh -vvv 192.168.146.104 OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug2: ssh_connect: needpriv 0 debug1: Connecting to 192.168.146.104 [192.168.146.104] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /root/.ssh/identity type -1 debug1: identity file /root/.ssh/identity-cert type -1 ... debug1: Local version string SSH-2.0-OpenSSH_5.3 debug2: fd 3 setting O_NONBLOCK debug1: SSH2_MSG_KEXINIT sent debug3: Wrote 960 bytes for a total of 981 debug1: SSH2_MSG_KEXINIT received ... debug2: mac_setup: found hmac-sha1 debug1: kex: server-client aes128-ctr hmac-sha1 none debug2: mac_setup: found hmac-sha1 debug1: kex: client-server aes128-ctr hmac-sha1 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024debug3: Wrote 68……

阅读全文

linux下帐号密码过期

早上看到告警备份失败,检查发现今天并未发起备份任务,查看定时任务时报错 [oracle@ ~]$ crontab -l Authentication token is no longer valid; new one required You (oracle) are not allowed to access to (crontab) because of pam configuration. 看提示是oracle用户的认证有问题,不允许其调用crontab任务,可能跟pam配置文件的设置有关。 检查secure日志文件,查看具体报错信息 vim /var/log/secure su: pam_unix(su-l:session): session opened for user oracle by (uid=0) su: pam_unix(su-l:session): session closed for user oracle su: pam_unix(su-l:session): session closed for user oracle su: pam_unix(su-l:session): session opened for user oracle by root(uid=0) crontab: pam_unix(crond:account): expired password for user oracle (password aged) 看样子是……

阅读全文

构建本地yum源

近期准备重新搭建最新的zabbix4.2,ansible等等,显而易见这些软件都需要通过yum安装会方便的多,而且便于管理以及以后的升级。公司千台以上的机器,基本都放在内网环境当中,于是就有必要搭建本地源环境,之前搭建的不是太完善,结合这个机会,重新整理一遍,尽可能涵盖到日常所用的所有软件。 首先当然需要准备一台可以访问互联网的机器 yum -y install createrepo yum -y install yum-utils Nginx源……

阅读全文

OEL7上配置dns服务

搭建rac的时候如果选择多个scan ip 则需要考虑配置dns server,多个虚拟机也可以考虑作为公用的dns服务器 安装相关packages [root@xb ~]# yum install bind* -y Loaded plugins: refresh-packagekit Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package bind.x86_64 32:9.8.2-0.68.rc1.el6_10.1 will be installed ---> Package bind-chroot.x86_64 32:9.8.2-0.68.rc1.el6_10.1 will be installed ---> Package bind-devel.x86_64 32:9.8.2-0.68.rc1.el6_10.1 will be installed ---> Package bind-dyndb-ldap.x86_64 0:2.3-8.el6 will be installed ---> Package bind-libs.x86_64 32:9.8.2-0.68.rc1.el6_10.1 will be installed ---> Package bind-sdb.x86_64 32:9.8.2-0.68.rc1.el6_10.1 will be installed ---> Package bind-utils.x86_64 32:9.8.2-0.68.rc1.el6_10.1 will be installed --> Finished Dependency Resolution 主要文件 /etc/named #named目录 /etc/named.conf #主配置文件 /etc/rc.d/init.d/named #BIND开机自动时启动的脚本 /usr/sbin/named #n……

阅读全文