RHEL 7 新功能嘗鮮:界面簡潔,分類明確
半夜起來看世界杯,沒啥激情,但是又怕錯誤意大利和英格蘭的比賽,就看了RHEL 7相關(guān)新功能的介紹(RHEL 7的下載地址: https://access.redhat.com/site/downloads/ )。
安裝還算順利,安裝的界面比以前簡潔的多,很清爽,分類很是明確。
有些奇怪的是,我安裝的時候,怕有些基礎(chǔ)的包沒有裝上去,所以選定了mini和Web的類型,結(jié)果還是有些基礎(chǔ)的包沒有安裝,比如 ifconfig 。虛擬機(jī)的網(wǎng)卡,被識別為ens,有意思。
- yum groupinstall Base
這樣的話,就可以把一些基礎(chǔ)的包打上??梢哉5臅r候ifconfig lsof 。
這里需要說明的是,redhat7的測試的repo源貌似不能用,我跟著地址看了下。壓根就沒有,我想應(yīng)該還是測試版的原因吧。 直接mount /dev/cdrom /mnt用的。
- [rhel-iso]
- name=Red Hat Enterprise Linux 7
- baseurl=file:///mnt/
- enabled=1
系統(tǒng)的分區(qū)默認(rèn)是xfs格式,當(dāng)然你還是可以用ext3,ext4的:
- [root@localhost ~]# df -T
- 文件系統(tǒng) 類型 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
發(fā)現(xiàn)rhel7的開發(fā)軟件版本不低。
python 是2.7.5的了,和ubuntu一樣。 java默認(rèn)也給你裝上了。perl在centos6應(yīng)該是5.10的 ,現(xiàn)在更新到了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官網(wǎng)一瞅。epel居然已經(jīng)有對于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>
原因不詳,我看了下官網(wǎng)對于openlmi的一些介紹,使用方面也是相當(dāng)?shù)暮喚殹?/p>
- 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
會發(fā)現(xiàn)其實,用systemd參數(shù)更加的清晰,在sysv下,啟動start、關(guān)閉stop、重啟restart都是用$1來傳遞參數(shù),但是在systemctl下,更直白點。很是像supervisord這個daemon程序。
- [root@localhost ~]# chkconfig --list|grep samba
- 注意:該輸出結(jié)果只顯示 SysV 服務(wù),并不包含原生 systemd 服務(wù)。SysV 配置數(shù)據(jù)可能被原生 systemd 配置覆蓋。
- 如果您想列出 systemd 服務(wù),請執(zhí)行 'systemctl list-unit-files'。
- 欲查看對特定 target 啟用的服務(wù)請執(zhí)行
- 'systemctl list-dependencies [target]'。
- [root@localhost ~]#
- [root@localhost ~]#
- [root@localhost ~]# systemctl list-dependencies samba
- samba.service
- [root@localhost ~]#
數(shù)據(jù)庫方面真的是轉(zhuǎn)向到mariadb,當(dāng)我去安裝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"
- 正在嘗試其它鏡像。
- 正在解決依賴關(guān)系
- --> 正在檢查事務(wù)
- ---> 軟件包 mariadb-galera-server.x86_64.1.5.5.37-2.el7 將被 安裝
- --> 正在處理依賴關(guān)系 mariadb-galera-common(x86-64) = 1:5.5.37-2.el7,它被軟件包 1:mariadb-galera-server-5.5.37-2.el7.x86_64 需要
- --> 正在處理依賴關(guān)系 galera >= 25.3.3,它被軟件包 1:mariadb-galera-server-5.5.37-2.el7.x86_64 需要
- --> 正在處理依賴關(guān)系 perl-DBI,它被軟件包 1:mariadb-galera-server-5.5.37-2.el7.x86_64 需要
- --> 正在處理依賴關(guān)系 perl-DBD-MySQL,它被軟件包 1:mariadb-galera-server-5.5.37-2.el7.x86_64 需要
- --> 正在處理依賴關(guān)系 perl(DBI),它被軟件包 1:mariadb-galera-server-5.5.37-2.el7.x86_64 需要
- --> 正在檢查事務(wù)
- ---> 軟件包 galera.x86_64.0.25.3.5-5.el7 將被 安裝
- --> 正在處理依賴關(guān)系 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 將被 安裝
- --> 正在處理依賴關(guān)系 perl(RPC::PlClient) >= 0.2000,它被軟件包 perl-DBI-1.627-1.el7.x86_64 需要
- --> 正在處理依賴關(guān)系 perl(RPC::PlServer) >= 0.2001,它被軟件包 perl-DBI-1.627-1.el7.x86_64 需要
- --> 正在檢查事務(wù)
- ---> 軟件包 nmap-ncat.x86_64.2.6.40-2.el7 將被 安裝
- ---> 軟件包 perl-PlRPC.noarch.0.0.2020-12.el7 將被 安裝
- --> 正在處理依賴關(guān)系 perl(Net::Daemon) >= 0.13,它被軟件包 perl-PlRPC-0.2020-12.el7.noarch 需要
- --> 正在處理依賴關(guān)系 perl(Net::Daemon::Log),它被軟件包 perl-PlRPC-0.2020-12.el7.noarch 需要
- --> 正在處理依賴關(guān)系 perl(Net::Daemon::Test),它被軟件包 perl-PlRPC-0.2020-12.el7.noarch 需要
- --> 正在檢查事務(wù)
- ---> 軟件包 perl-Net-Daemon.noarch.0.0.48-4.el7 將被 安裝
- --> 解決依賴關(guān)系完成
- 依賴關(guān)系解決
- ===================================================================================================================================
- Package 架構(gòu) 版本 源 大小
- ====================================================================================================================================
- 正在安裝:
- 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,總是覺得不順手,心里別扭。 先這樣,有時間再搞。