Open kikiyou opened 8 years ago
以下是我之前安装时整理的步骤,希望对你有帮助。
yum install -y mysql-server mysql-devel
yum install -y openldap-devel
yum install -y python-devel
yum install -y git
yum install -y libffi-devel
yum install -y gcc gcc-c++
yum install -y openssl-devel
yum install -y libjpeg-devel
yum install -y zlib-devel
yum install -y python-setuptools
easy_install pip
pip install virtualenv
useradd ansible
passwd ansible
su - ansible
virtualenv envansible
source envansible/bin/activate
git clone https://github.com/alaxli/ansible_ui.git
cd ansible_ui
pip install -r requirements.txt
pip install PIL --allow-external PIL --allow-unverified PIL --allow-external 出错后改用了 pip install Pillow
pip install django-guardian==1.3.0 如果初始化数据库失败,则使用pip install django-guardian==1.2.0
pip install ansible==1.9.6
cd desktop/core/internal
vim settings_local.py
# 修改 LDAP Datebase Mail 和ansible_playbook命令位置(which ansible_playbook)配置
如果需要使用ldap,还需要修改settings.py,去掉下面行的注释
#'desktop.core.auth.backend.LdapBackend',
create database ansible CHARACTER SET utf8;
grant all on ansible.* to ansibleuser@'localhost' identified by '******';
python manage.py schemamigration desktop.apps.account --init
python manage.py schemamigration desktop.apps.ansible --init
python manage.py syncdb
python manage.py migrate ansible
python manage.py migrate account
python manage.py migrate kombu.transport.django
python manage.py migrate djcelery
python manage.py migrate guardian
修改celery-conf/supervisord.conf
[inet_http_server] #配置web管理supervisor
[program:ansible_celeryd] #修改command中 virtualenv 和 ansible_ui home
cp ansible-conf/ansible.cfg ~/.ansible.cfg
cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/home:Strahlex/CentOS_CentOS-6/home:Strahlex.repo
yum install sshpass
supervisord -c celery-conf/supervisord.conf
python manage.py runserver 0.0.0.0:8000 (此方式用于测试是启动,需要稳定运行可以参照官网的启动方式)
[[分类:运维自动化]]
在 2016-05-25 16:10:07,"kikiyou" notifications@github.com 写道:
由于没有指定详细的版本,安装的时候 各种报错 django-guardian 现在只支持 django 1.7+ 当我把django升级到1.7+的时候 South不能工作 说South只支持1.6 亲 请把详细版本需求说下,感谢
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub
执行pip install -r requirements.txt
Running setup.py install for simplejson
building 'simplejson._speedups' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c simplejson/_speedups.c -o build/temp.linux-x86_64-2.7/simplejson/_speedups.o
simplejson/_speedups.c:2:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
***************************************************************************
WARNING: The C extension could not be compiled, speedups are not enabled.
Failure information, if any, is above.
I'm retrying the build without the C extension now.
***************************************************************************
***************************************************************************
WARNING: The C extension could not be compiled, speedups are not enabled.
Plain-Python installation succeeded.
***************************************************************************
Compiling /home/ansible/envansible/build/pexpect/pexpect/async.py ...
File "/home/ansible/envansible/build/pexpect/pexpect/async.py", line 16
transport, pw = yield from asyncio.get_event_loop()\
^
SyntaxError: invalid syntax
Running setup.py install for django-guardian
your setuptools is too old (<12)
setuptools_scm functionality is degraded
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -DBIG_JOINS=1 -fno-strict-aliasing -g -DNDEBUG
_mysql.c:29:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /home/ansible/envansible/bin/python -c "import setuptools, tokenize;__file__='/home/ansible/envansible/build/MySQL-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-NPl8Uu-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ansible/envansible/include/site/python2.7 failed with error code 1 in /home/ansibl
requirement文件中已经有了django-guardian,ansible, 为何你还要自己再安装一遍? django==1.6 django-celery django-jsonfield django-auth-ldap python-magic South simplejson
pexpect django-guardian celery MySQL-python python-ldap ansible supervisor threadpool uwsgi
大家安装后都能正常使用吗?现在部署密钥的时候不成功,一直报输入的参数是3个,只获得了2个。
大家安装后都能正常使用吗?现在部署密钥的时候不成功,一直报输入的参数是3个,只获得了2个。
由于没有指定详细的版本,安装的时候 各种报错 django-guardian 现在只支持 django 1.7+ 当我把django升级到1.7+的时候 South不能工作 说South只支持1.6 亲 请把详细版本需求说下,感谢