天天看點

淺談測試rhel7新功能時的感受

半夜起來看世界杯,沒啥激情,但是又怕錯誤意大利和英格蘭的比賽,就看了rhel7

  相關新功能的介紹。

  安裝還算順利,安裝的界面比以前簡潔的多,很清爽,分類很是明确。

  有些奇怪的是,我安裝的時候,怕有些基礎的包沒有裝上去,是以標明了mini和web的類型,結果還是有些基礎的包沒有安裝,比如 ifconfig 。

  虛拟機的網卡,被識别為ens,有意思。

淺談測試rhel7新功能時的感受

  yum groupinstall base

  這樣的話,就可以把一些基礎的包打上。可以正常的時候ifconfig lsof  。

  [rhel-iso]

  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的開發軟體版本不低。

  [root@localhost ~]#

  [root@localhost ~]# python -v

  python 2.7.5

  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 ~]# 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新功能時的感受

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank"> 簡單測試下rhel7的openlmi,什麼是openlmi,我看了下一些文檔,他是一個類似func、但又不屬于puppet這類的叢集接口工具。</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  安裝    yum install openlmi</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  安裝    yum -y install openlmi-scripts*</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  scp [email protected]:/etc/pegasus/client.pem /etc/pki/ca-trust/source/anchors/managed-machine-cert.pem</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  [root@localhost ~]# lmi -h 10.10.10.71</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  lmi&gt; hwinfo</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  username: pegasus</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  password:</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  error   : failed to make a connection to "10.10.10.71": (0, 'socket error: [errno 113] no route to host')</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  error   : no successful connection made.</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  lmi&gt;</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  原因不詳,我看了下官網對于openlmi的一些介紹,使用方面也是相當的簡練。</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  lmi -h ${hostname}</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  lmi&gt; help</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  ...</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  lmi&gt; sw search django</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  lmi&gt; sw install python-django</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  lmi&gt; exit</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  rhel7 用systemd替換了咱們熟悉的sysv ,說是這東西很強大,說實話,資料還是少,這裡就簡單講解下systemd的用法。</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank"># centos 6.4</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">service httpd (start|stop)</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank"># rhel7</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">systemctl (start|stop) httpd.service</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">chkconfig httpd (on|off)</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">systemctl (enable|disable) httpd.service</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">$ cat /usr/lib/systemd/system/httpd.service</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">[unit]</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">description=the apache http server</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">after=network.target remote-fs.target nss-lookup.target</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">[service]</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">type=notify</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">environmentfile=/etc/sysconfig/httpd</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">execstart=/usr/sbin/httpd $options -dforeground</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">execreload=/usr/sbin/httpd $options -k graceful</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">execstop=/usr/sbin/httpd $options -k graceful-stop</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank"># we want systemd to give httpd some time to finish gracefully, but still want</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank"># it to kill httpd after timeoutstopsec if something went wrong during the</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank"># graceful stop. normally, systemd sends sigterm signal right after the</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank"># execstop, which would kill httpd. we are sending useless sigcont here to give</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank"># httpd time to finish.</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">killsignal=sigcont</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">privatetmp=true</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">[install]</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">wantedby=multi-user.target</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  會發現其實,用systemd參數更加的清晰,在sysv下,啟動start、關閉stop、重新開機restart都是用$1來傳遞參數,但是在systemctl下,更直白點。很是像supervisord這個daemon程式。</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  [root@localhost ~]# chkconfig --list|grep samba</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  注意:該輸出結果隻顯示 sysv 服務,并不包含原生 systemd 服務。sysv 配置資料可能被原生 systemd 配置覆寫。</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  如果您想列出 systemd 服務,請執行 'systemctl list-unit-files'。</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  欲檢視對特定 target 啟用的服務請執行</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  'systemctl list-dependencies [target]'。</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  [root@localhost ~]#</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  [root@localhost ~]# systemctl list-dependencies samba</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  samba.service</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  資料庫方面真的是轉向到mariadb,當我去安裝mysql的時候,他會直接去安裝mariadb ,看來mariadb大勢所趨呀。</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  [root@localhost ~]# 原文:http://rfyiamcool.blog.51cto.com/1030776/1426550</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  [root@localhost ~]# yum -y install mysql</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  已加載插件:langpacks, product-id, subscription-manager</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  this system is not registered to red hat subscription management. you can use subscription-manager to register.</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  file:///mnt/repodata/repomd.xml: [errno 14] curl#37 - "couldn't open file /mnt/repodata/repomd.xml"</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  正在嘗試其它鏡像。</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  軟體包 1:mariadb-5.5.33a-3.el7.x86_64 已安裝并且是最新版本</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  無須任何處理</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  [root@localhost ~]# yum -y install mysql-server</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  正在解決依賴關系</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  --&gt; 正在檢查事務</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  ---&gt; 軟體包 mariadb-galera-server.x86_64.1.5.5.37-2.el7 将被 安裝</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  --&gt; 正在處理依賴關系 mariadb-galera-common(x86-64) = 1:5.5.37-2.el7,它被軟體包 1:mariadb-galera-server-5.5.37-2.el7.x86_64 需要</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  --&gt; 正在處理依賴關系 galera &gt;= 25.3.3,它被軟體包 1:mariadb-galera-server-5.5.37-2.el7.x86_64 需要</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  --&gt; 正在處理依賴關系 perl-dbi,它被軟體包 1:mariadb-galera-server-5.5.37-2.el7.x86_64 需要</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  --&gt; 正在處理依賴關系 perl-dbd-mysql,它被軟體包 1:mariadb-galera-server-5.5.37-2.el7.x86_64 需要</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  --&gt; 正在處理依賴關系 perl(dbi),它被軟體包 1:mariadb-galera-server-5.5.37-2.el7.x86_64 需要</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  ---&gt; 軟體包 galera.x86_64.0.25.3.5-5.el7 将被 安裝</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  --&gt; 正在處理依賴關系 nmap-ncat,它被軟體包 galera-25.3.5-5.el7.x86_64 需要</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  ---&gt; 軟體包 mariadb-galera-common.x86_64.1.5.5.37-2.el7 将被 安裝</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  ---&gt; 軟體包 perl-dbd-mysql.x86_64.0.4.023-2.el7 将被 安裝</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  ---&gt; 軟體包 perl-dbi.x86_64.0.1.627-1.el7 将被 安裝</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  --&gt; 正在處理依賴關系 perl(rpc::plclient) &gt;= 0.2000,它被軟體包 perl-dbi-1.627-1.el7.x86_64 需要</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  --&gt; 正在處理依賴關系 perl(rpc::plserver) &gt;= 0.2001,它被軟體包 perl-dbi-1.627-1.el7.x86_64 需要</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  ---&gt; 軟體包 nmap-ncat.x86_64.2.6.40-2.el7 将被 安裝</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  ---&gt; 軟體包 perl-plrpc.noarch.0.0.2020-12.el7 将被 安裝</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  --&gt; 正在處理依賴關系 perl(net::daemon) &gt;= 0.13,它被軟體包 perl-plrpc-0.2020-12.el7.noarch 需要</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  --&gt; 正在處理依賴關系 perl(net::daemon::log),它被軟體包 perl-plrpc-0.2020-12.el7.noarch 需要</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  --&gt; 正在處理依賴關系 perl(net::daemon::test),它被軟體包 perl-plrpc-0.2020-12.el7.noarch 需要</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  ---&gt; 軟體包 perl-net-daemon.noarch.0.0.48-4.el7 将被 安裝</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  --&gt; 解決依賴關系完成</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  依賴關系解決</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  ======================================================================================================================================</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  package                                 架構                     版本                               源                          大小</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  正在安裝:</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  mariadb-galera-server                   x86_64                   1:5.5.37-2.el7                     epel                        11 m</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  為依賴而安裝:</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  galera                                  x86_64                   25.3.5-5.el7                       epel                       1.1 m</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  mariadb-galera-common                   x86_64                   1:5.5.37-2.el7                     epel                       212 k</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  nmap-ncat                               x86_64                   2:6.40-2.el7                       rhel-iso                   198 k</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  perl-dbd-mysql                          x86_64                   4.023-2.el7                        rhel-iso                   140 k</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  perl-dbi                                x86_64                   1.627-1.el7                        rhel-iso                   801 k</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  perl-net-daemon                         noarch                   0.48-4.el7                         rhel-iso                    51 k</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  perl-plrpc                              noarch                   0.2020-12.el7</a>

<a href="http://www.51testing.com/batch.download.php?aid=49569" target="_blank">  期待centos7的到來,用rhel7,總是覺得不順手,心裡别扭。 先這樣,有時間再搞。</a>

最新内容請見作者的github頁:http://qaseven.github.io/