
簡單測試下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,總是覺得不順手,心里別扭。 先這樣,有時間再搞。