Centos6.8安装CKAN2.5.2的安装指南

前提条件

这个教程的基础是你的电脑上已经安装了 java 和 python 。并需要以下三步来确保符合安装条件。

Step 1 确认已经安装了基础包

使用命令 rpm -qa | grep selinuxrpm -q policycoreutilsrpm -qa | grep setroubleshoot 来确认你已经安装了 SELinux 包。如果没有,则需要先安装上。

确认你已经安装了下面几个: selinux-policy-targeted, selinux-policy, libselinux, libselinux-python, libselinux-utils, policycoreutils, setroubleshoot, setroubleshoot-server, setroubleshoot-plugins。

作为 Linux 的root用户,使用下面的命令来安装上面所列内容中你没有安装的包。

yum install package-name  

下面这几个的安装是可选的: policycoreutils-gui,selinux-policy-devel,mcstrans 。

Step 2 打开 SELinux

使用命令 /usr/sbin/getenforce or /usr/sbin/sestatus 来检查 SELinux 的状态,命令 getenforce 会返回 EnforcingPermissive 或者 Disabled。如果返回Enforcing 则说明SELinux是打开的(SELinux规则会被执行):

# /usr/sbin/getenforce
Enforcing

如果 SELinux 是 disabled 状态,你需要在安装ckan之前打开它。

在打开 SELinux 之前,文件系统的每个文件必须用 SELinux 内容所标记。在这之前,限制的部分可能被定义为允许状态,使得你的系统不能正确启动,为此,要确保 /etc/selinux/config 文件中 ELINUX=permissive

[root@localhost ~]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of these two values:
#       targeted - Targeted processes are protected,
#       mls - Multi Level Security protection.
SELINUXTYPE=targeted

然后作为 Linux的 root 身份,执行命令 reboot 来重启计算机,这样在在下一次启动的过程中,文件系统会被标记。

Step 3 安装python需要的包

在安装的第9步中,定义的 WSGI 文件需要 python 的 paste.deploypaste.script 包,你可以通过下面的指令来确定是否安装:

# python
>>> from paste.deploy import loadapp
>>> from paste.script.util.logging_config import fileConfig

如果执行命令后没有报错,则你可直接跳过下面安装的步骤,如果提示没有相关的包,并且你安装了pip包,那么你可以直接通过下面两个语句安装这两个包:

pip install PasteDeploy
pip install PasteScript

提示: 包 paste.deploypaste.scriptpaste 包是不一样的。你可以通过 Ctrl+Dexit 指令退出 python 环境。

具备以上条件后你就可以开始安装CKAN了!

1. 安装所需的包

安装并激活 CentOS Release 库

# yum install centos-release

更新并重启你的系统

# yum update
# shutdown -r now

安装后面我们需要用到的 wgetpolicycoreutils-python

# yum in
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值