qileilove

blog已经转移至github,大家请访问 http://qaseven.github.io/

浅谈测试rhel7新功能时的感受

半夜起来看世界杯,没啥激情,但是又怕错误意大利和英格兰的比赛,就看了rhel7
  相关新功能的介绍。
  安装还算顺利,安装的界面比以前简洁的多,很清爽,分类很是明确。
  有些奇怪的是,我安装的时候,怕有些基础的包没有装上去,所以选定了mini和Web的类型,结果还是有些基础的包没有安装,比如 ifconfig 。
  虚拟机的网卡,被识别为ens,有意思。
  
  yum groupinstall Base
  这样的话,就可以把一些基础的包打上。可以正常的时候ifconfig lsof  。
  这里需要说明的是,redhat7的测试的repo源貌似不能用,我跟着地址看了下。压根就没有,我想应该还是测试版的原因吧。 直接mount /dev/cdrom /mnt用的。
  [rhel-iso]
  name=Red Hat Enterprise Linux 7
  baseurl=file:///mnt/
  enabled=1
  系统的分区默认是xfs格式,当然你还是可以用ext3,ext4的
  [root@localhost ~]# df -T
  文件系统              类型     1K-blocks    已用     可用 已用% 挂载点
  /dev/mapper/rhel-root xfs       39262208 3591304 35670904   10% /
  devtmpfs              devtmpfs    500772       0   500772    0% /dev
  tmpfs                 tmpfs       507508       0   507508    0% /dev/shm
  tmpfs                 tmpfs       507508    2604   504904    1% /run
  tmpfs                 tmpfs       507508       0   507508    0% /sys/fs/cgroup
  /dev/sda1             xfs         494940   95444   399496   20% /boot
  发现rhel7的开发软件版本不低。
  python 是2.7.5的了,和ubuntu一样。  java默认也给你装上了。perl在centos6应该是5.10的 ,现在更新到了5.16.3 。 至于为什么更新到perl6,估计和python3一样吧。
  [root@localhost ~]#
  [root@localhost ~]#
  [root@localhost ~]# python -V
  Python 2.7.5
  [root@localhost ~]# java -version
  java version "1.7.0_45"
  OpenJDK Runtime Environment (rhel-2.4.3.4.el7-x86_64 u45-b15)
  OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
  [root@localhost ~]#
  [root@localhost ~]#
  [root@localhost ~]# perl -v
  This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
  (with 24 registered patches, see perl -V for more detail)
  想安装pip但是iso没有python-pip这个包。rhel7的官方源又打不开,郁闷。本来打算用epel6试试,用不了,到epel官网一瞅。epel居然已经有对于rhel7的源了。
  
 简单测试下rhel7的openlmi,什么是openlmi,我看了下一些文档,他是一个类似func、但又不属于puppet这类的集群接口工具。
  安装    yum install openlmi
  安装    yum -y install openlmi-scripts*
  scp root@10.10.10.71:/etc/Pegasus/client.pem /etc/pki/ca-trust/source/anchors/managed-machine-cert.pem
  [root@localhost ~]# lmi -h 10.10.10.71
  lmi> hwinfo
  username: pegasus
  password:
  error   : Failed to make a connection to "10.10.10.71": (0, 'Socket error: [Errno 113] No route to host')
  error   : No successful connection made.
  lmi>
  lmi>
  lmi>
  原因不详,我看了下官网对于openlmi的一些介绍,使用方面也是相当的简练。
  lmi -h ${hostname}
  lmi> help
  ...
  lmi> sw search django
  ...
  lmi> sw install python-django
  ...
  lmi> exit
  rhel7 用systemd替换了咱们熟悉的sysv ,说是这东西很强大,说实话,资料还是少,这里就简单讲解下systemd的用法。
# CentOS 6.4
service httpd (start|stop)
# rhel7
systemctl (start|stop) httpd.service
# CentOS 6.4
chkconfig httpd (on|off)
# rhel7
systemctl (enable|disable) httpd.service
$ cat /usr/lib/systemd/system/httpd.service
[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=notify
EnvironmentFile=/etc/sysconfig/httpd
ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND
ExecReload=/usr/sbin/httpd $OPTIONS -k graceful
ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop
# We want systemd to give httpd some time to finish gracefully, but still want
# it to kill httpd after TimeoutStopSec if something went wrong during the
# graceful stop. Normally, Systemd sends SIGTERM signal right after the
# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give
# httpd time to finish.
KillSignal=SIGCONT
PrivateTmp=true
[Install]
WantedBy=multi-user.target
  会发现其实,用systemd参数更加的清晰,在sysv下,启动start、关闭stop、重启restart都是用$1来传递参数,但是在systemctl下,更直白点。很是像supervisord这个daemon程序。
  [root@localhost ~]# chkconfig --list|grep samba
  注意:该输出结果只显示 SysV 服务,并不包含原生 systemd 服务。SysV 配置数据可能被原生 systemd 配置覆盖。
  如果您想列出 systemd 服务,请执行 'systemctl list-unit-files'。
  欲查看对特定 target 启用的服务请执行
  'systemctl list-dependencies [target]'。
  [root@localhost ~]#
  [root@localhost ~]#
  [root@localhost ~]# systemctl list-dependencies samba
  samba.service
  [root@localhost ~]#
  数据库方面真的是转向到mariadb,当我去安装mysql的时候,他会直接去安装mariadb ,看来mariadb大势所趋呀。
  [root@localhost ~]# 原文:http://rfyiamcool.blog.51cto.com/1030776/1426550
  [root@localhost ~]# yum -y install mysql
  已加载插件:langpacks, product-id, subscription-manager
  This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
  file:///mnt/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /mnt/repodata/repomd.xml"
  正在尝试其它镜像。
  软件包 1:mariadb-5.5.33a-3.el7.x86_64 已安装并且是最新版本
  无须任何处理
  [root@localhost ~]#
  [root@localhost ~]#
  [root@localhost ~]# yum -y install mysql-server
  已加载插件:langpacks, product-id, subscription-manager
  This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
  file:///mnt/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /mnt/repodata/repomd.xml"
  正在尝试其它镜像。
  正在解决依赖关系
  --> 正在检查事务
  ---> 软件包 mariadb-galera-server.x86_64.1.5.5.37-2.el7 将被 安装
  --> 正在处理依赖关系 mariadb-galera-common(x86-64) = 1:5.5.37-2.el7,它被软件包 1:mariadb-galera-server-5.5.37-2.el7.x86_64 需要
  --> 正在处理依赖关系 galera >= 25.3.3,它被软件包 1:mariadb-galera-server-5.5.37-2.el7.x86_64 需要
  --> 正在处理依赖关系 perl-DBI,它被软件包 1:mariadb-galera-server-5.5.37-2.el7.x86_64 需要
  --> 正在处理依赖关系 perl-DBD-MySQL,它被软件包 1:mariadb-galera-server-5.5.37-2.el7.x86_64 需要
  --> 正在处理依赖关系 perl(DBI),它被软件包 1:mariadb-galera-server-5.5.37-2.el7.x86_64 需要
  --> 正在检查事务
  ---> 软件包 galera.x86_64.0.25.3.5-5.el7 将被 安装
  --> 正在处理依赖关系 nmap-ncat,它被软件包 galera-25.3.5-5.el7.x86_64 需要
  ---> 软件包 mariadb-galera-common.x86_64.1.5.5.37-2.el7 将被 安装
  ---> 软件包 perl-DBD-MySQL.x86_64.0.4.023-2.el7 将被 安装
  ---> 软件包 perl-DBI.x86_64.0.1.627-1.el7 将被 安装
  --> 正在处理依赖关系 perl(RPC::PlClient) >= 0.2000,它被软件包 perl-DBI-1.627-1.el7.x86_64 需要
  --> 正在处理依赖关系 perl(RPC::PlServer) >= 0.2001,它被软件包 perl-DBI-1.627-1.el7.x86_64 需要
  --> 正在检查事务
  ---> 软件包 nmap-ncat.x86_64.2.6.40-2.el7 将被 安装
  ---> 软件包 perl-PlRPC.noarch.0.0.2020-12.el7 将被 安装
  --> 正在处理依赖关系 perl(Net::Daemon) >= 0.13,它被软件包 perl-PlRPC-0.2020-12.el7.noarch 需要
  --> 正在处理依赖关系 perl(Net::Daemon::Log),它被软件包 perl-PlRPC-0.2020-12.el7.noarch 需要
  --> 正在处理依赖关系 perl(Net::Daemon::Test),它被软件包 perl-PlRPC-0.2020-12.el7.noarch 需要
  --> 正在检查事务
  ---> 软件包 perl-Net-Daemon.noarch.0.0.48-4.el7 将被 安装
  --> 解决依赖关系完成
  依赖关系解决
  ======================================================================================================================================
  Package                                 架构                     版本                               源                          大小
  ======================================================================================================================================
  正在安装:
  mariadb-galera-server                   x86_64                   1:5.5.37-2.el7                     epel                        11 M
  为依赖而安装:
  galera                                  x86_64                   25.3.5-5.el7                       epel                       1.1 M
  mariadb-galera-common                   x86_64                   1:5.5.37-2.el7                     epel                       212 k
  nmap-ncat                               x86_64                   2:6.40-2.el7                       rhel-iso                   198 k
  perl-DBD-MySQL                          x86_64                   4.023-2.el7                        rhel-iso                   140 k
  perl-DBI                                x86_64                   1.627-1.el7                        rhel-iso                   801 k
  perl-Net-Daemon                         noarch                   0.48-4.el7                         rhel-iso                    51 k
  perl-PlRPC                              noarch                   0.2020-12.el7
  期待centos7的到来,用rhel7,总是觉得不顺手,心里别扭。 先这样,有时间再搞。

posted on 2014-11-24 09:23 顺其自然EVO 阅读(1566) 评论(0)  编辑  收藏 所属分类: linux


只有注册用户登录后才能发表评论。


网站导航:
 
<2014年11月>
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456

导航

统计

常用链接

留言簿(55)

随笔分类

随笔档案

文章分类

文章档案

搜索

最新评论

阅读排行榜

评论排行榜