1.1 安装linux操作系统

本次打包环境使用的是centos 7,这个可以从 http:\/\/mirrors.aliyun.com\/ 进行下载,下载的地址如下:

http://mirrors.aliyun.com/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1511.iso

我的打包环境为物理机,虚拟机应该也可以,安装过程中选择安装操作系统的模式为base web server 模式,其他的包根据后面的需要进行安装,机器需要能够连接外网

安装的过程就不在这里赘述

安装系统后的工作

一、关闭系统的防火墙和selinux

1.1 关闭防火墙并从自启动去掉
[root@calamari ~]# service firewalld stop
Redirecting to /bin/systemctl stop  firewalld.service
[root@calamari ~]# chkconfig firewalld off
Note: Forwarding request to 'systemctl disable firewalld.service'.
rm '/etc/systemd/system/basic.target.wants/firewalld.service'
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
1.2 关闭selinux服务并从自启动去掉
[root@calamari ~]# setenforce 0
setenforce: SELinux is disabled
[root@calamari ~]# vim /etc/selinux/config
修改为:SELINUX=disabled

这里需要说一下,在很多环境下,新手在配置服务的时候都是卡在了防火墙和selinux上,在没有搞清楚里面的服务需要用哪些端口前,这两个服务还是关闭掉先

二、更新centos的源

如果机器是新机器话,上去就把原始的repo文件都删除掉(也可以备份到其他路径),因为链接到官网的下载实在是太慢了

[root@calamari ~]# rm -rf /etc/yum.repos.d/*.repo
下载的base源
[root@calamari ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
下载的epel源
[root@calamari ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
修改几个值

修改里面的系统版本为7.2.1511,当前用的centos的版本的的yum源可能已经清空了

sed -i '/aliyuncs/d' /etc/yum.repos.d/CentOS-Base.repo 
sed -i '/aliyuncs/d' /etc/yum.repos.d/epel.repo 
sed -i 's/$releasever/7.2.1511/g' /etc/yum.repos.d/CentOS-Base.repo
手动添加ceph的安装源
[root@calamari ~]# vim /etc/yum.repos.d/ceph.repo
添加下面
[ceph]
name=ceph
baseurl=http://mirrors.aliyun.com/ceph/rpm-jewel/el7/x86_64/
gpgcheck=0
[ceph-noarch]
name=cephnoarch
baseurl=http://mirrors.aliyun.com/ceph/rpm-jewel/el7/noarch/
gpgcheck=0

执行更新操作

[root@calamari ~]# yum makecache

results matching ""

    No results matching ""