社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
目录
四、配置HTTP源安装openstack-keystone软件
zilb-1.2.7-18.el7 .x86_64.rpm
软件名
安装版本
软件所对应的系统平台
[root@localhost ~]# mount /dev/sr0 /mnt/
mount: /dev/sr0 写保护,将以只读方式挂载
[root@localhost ~]# ls /mnt/Packages/
命令:rpm -ivh 软件安装包名称
1)安装dhcp的软件
[root@localhost ~]# rpm -ivh /mnt/Packages/dhcp-4.2.5-82.el7.centos.x86_64.rpm
警告:/mnt/Packages/dhcp-4.2.5-82.el7.centos.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:dhcp-12:4.2.5-82.el7.centos ################################# [100%]
2)安装bind的软件
[root@localhost ~]# rpm -ivh /mnt/Packages/bind-9.11.4-26.P2.el7.x86_64.rpm
警告:/mnt/Packages/bind-9.11.4-26.P2.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:bind-32:9.11.4-26.P2.el7 ################################# [100%]
3)安装httpd的软件
[root@localhost ~]# rpm -ivh /mnt/Packages/httpd-2.4.6-95.el7.centos.x86_64.rpm
警告:/mnt/Packages/httpd-2.4.6-95.el7.centos.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
错误:依赖检测失败:
/etc/mime.types 被 httpd-2.4.6-95.el7.centos.x86_64 需要
httpd-tools = 2.4.6-95.el7.centos 被 httpd-2.4.6-95.el7.centos.x86_64 需要
[root@localhost ~]# rpm -ivh --nodeps /mnt/Packages/httpd-2.4.6-95.el7.centos.x86_64.rpm
警告:/mnt/Packages/httpd-2.4.6-95.el7.centos.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:httpd-2.4.6-95.el7.centos ################################# [100%]
1)查看软件是否安装
[root@localhost ~]# rpm -q dhcp
dhcp-4.2.5-82.el7.centos.x86_64
[root@localhost ~]# rpm -q samba
未安装软件包 samba
# rpm -qa
# rpm -qa | grep "dhcp"
2)查询软件生成的文件
[root@localhost ~]# which vim
/usr/bin/vim
[root@localhost ~]# rpm -qf /usr/bin/vim
vim-enhanced-7.4.629-7.el7.x86_64
3)查询软件生成的文件
# rpm -ql coreutils
# rpm -qa dhcp
[root@localhost ~]# rpm -q dhcp
dhcp-4.2.5-82.el7.centos.x86_64
[root@localhost ~]# rpm -e dhcp
[root@localhost ~]# rpm -q dhcp
未安装软件包 dhcp
# rpm -e --nodeps coreutils
[root@localhost ~]# ls /etc/yum.repos.d/
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
命令:yum install httpd
替换centos的base源(华为、阿里、网易)
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
[root@localhost ~]# mkdir /etc/yum.repos.d/bak
[root@localhost ~]# mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak
[root@localhost ~]# ls /etc/yum.repos.d/
bak
[root@localhost ~]# vim /etc/yum.repos.d/centos7.repo
[centos7]
name=centos7
baseurl=file:///opt/software
enabled=1
gpgcheck=0
[root@localhost ~]# mkdir /opt/software
[root@localhost ~]# mount /dev/sr0 /opt/software
mount: /dev/sr0 is write-protected, mounting read-only
[root@localhost ~]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: centos7
Cleaning up list of fastest mirrors
Other repos take up 145 M of disk space (use --verbose for details)
[root@localhost ~]#
[root@localhost ~]# yum repolist
Loaded plugins: fastestmirror
Determining fastest mirrors
centos7 | 3.6 kB 00:00:00
(1/2): centos7/group_gz | 166 kB 00:00:00
(2/2): centos7/primary_db | 6.0 MB 00:00:00
repo id repo name status
centos7 centos7 10,019
repolist: 10,019
[root@localhost ~]# yum install lrzsz
[root@localhost ~]# rpm -q lrzsz
lrzsz-0.12.20-36.el7.x86_64
[root@localhost ~]# yum install php vsftpd
[root@localhost ~]# cat /etc/yum.repos.d/ceph.repo
[ceph]
name=ceph
baseurl=ftp://10.11.0.254/software/ceph-mimic/
enabled=1
gpgcheck=0
[root@localhost ~]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: centos7 ceph
Cleaning up list of fastest mirrors
Other repos take up 145 M of disk space (use --verbose for details)
[root@localhost ~]# yum repolist
Loaded plugins: fastestmirror
Determining fastest mirrors
centos7 | 3.6 kB 00:00:00
ceph | 2.9 kB 00:00:00
(1/3): centos7/group_gz | 166 kB 00:00:00
(2/3): centos7/primary_db | 6.0 MB 00:00:00
(3/3): ceph/primary_db | 755 kB 00:00:00
repo id repo name status
centos7 centos7 10,019
ceph ceph 266
repolist: 10,285
[root@localhost ~]# yum install ceph-deploy
[root@localhost ~]# cat /etc/yum.repos.d/openstack.repo
[openstack]
name=openstack
baseurl=http://mirrors.163.com/centos/7.9.2009/cloud/x86_64/openstack-queens/
enabled=1
gpgcheck=0
[root@localhost ~]# yum repolist
Loaded plugins: fastestmirror
Determining fastest mirrors
centos7 | 3.6 kB 00:00:00
ceph | 2.9 kB 00:00:00
openstack | 3.0 kB 00:00:00
(1/4): centos7/group_gz | 166 kB 00:00:00
(2/4): centos7/primary_db | 6.0 MB 00:00:00
(3/4): ceph/primary_db | 755 kB 00:00:00
(4/4): openstack/primary_db | 1.2 MB 00:00:31
repo id repo name status
centos7 centos7 10,019
ceph ceph 266
openstack openstack 3,116
repolist: 13,401
[root@localhost ~]# yum install openstack-keystone
[root@localhost ~]# vim /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=1
[root@localhost ~]# find /var/cache/yum/ -name "*.rpm" -exec cp {} /openstack/ \;
命令:createrepo 目录名称
命令:yum install 软件名称 软件名称
命令:yum remove 软件名称 软件名称
命令:yum update 软件名称 软件名称
命令:yum clean all
命令:yum repolist
命令:yum provides 文件名称
.tar.gz , .tar.bz2
灵活性,支持自定义软件的安装目录
[root@localhost ~]# lftp 10.11.0.254
lftp 10.11.0.254:~> ls
drwxr-xr-x 36 1000 1000 4096 May 10 08:35 software
drwxr-xr-x 16 1000 1000 4096 Jul 18 08:55 upload
lftp 10.11.0.254:/>
lftp 10.11.0.254:/> cd software/htop/
lftp 10.11.0.254:/software/htop> ls
-rw-rw-r-- 1 1000 1000 308109 Apr 10 2018 htop-2.2.0.tar.gz
lftp 10.11.0.254:/software/htop> get htop-2.2.0.tar.gz
308109 bytes transferred
lftp 10.11.0.254:/software/htop> exit
[root@localhost ~]# tar xf htop-2.2.0.tar.gz
[root@localhost ~]# cd htop-2.2.0/
[root@localhost htop-2.2.0]# ./configure --prefix=/usr/local/htop
checking for gcc... no
checking for cc... no
checking for cl.exe... no
[root@localhost htop-2.2.0]# yum install gcc
# yum install ncurses-devel
[root@localhost htop-2.2.0]# make
[root@localhost htop-2.2.0]# make install
[root@localhost ~]# /usr/local/htop/bin/htop
查看PATH变量的值
[root@localhost ~]# echo $PATH /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
1) 修改PATH变量的值
临时修改
# export PATH=$PATH:/usr/local/htop/bin
永久修改
[root@localhost ~]# vim /etc/profile export PATH=$PATH:/usr/local/htop/bin [root@localhost ~]# source /etc/profile
2) 创建软链接
[root@localhost ~]# ln -s /usr/local/htop/bin/htop /usr/bin/
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!