Ok let me fix that.
Btw you can remove the file initial_data.json and do a python manage.py
syncdb.
Le 2017-11-14 à 04:12, Jason Sloan a écrit :
> Looks like there's 2 more dependencies....
> python-ipaddress
> python-idna
>
> Then it looks like I'm bombing out on an initial data load of some
> sort. Based on the output it looks like the syncdb command is being
> issued, but the table doesn't exist in the database.
>
> Full output:
>
> Running transaction
> Installing : packetfence-pki-1.0.8-1.el7.centos.noarch
>
>
> 1/1
> certificate exist do nothing
> /usr/lib/python2.7/site-packages/django/core/management/commands/syncdb.py:24:
> RemovedInDjango19Warning: The syncdb command will be removed in Django 1.9
> warnings.warn("The syncdb command will be removed in Django 1.9",
> RemovedInDjango19Warning)
>
> /usr/lib/python2.7/site-packages/django/core/management/commands/loaddata.py:229:
> RemovedInDjango19Warning: initial_data fixtures are deprecated. Use
> data migrations instead.
> RemovedInDjango19Warning
>
> Operations to perform:
> Synchronize unmigrated apps: staticfiles, rest_framework, pki,
> messages, bootstrap3
> Apply all migrations: admin, authtoken, contenttypes, auth, sessions
> Synchronizing apps without migrations:
> Creating tables...
> Creating table pki_ca
> Creating table pki_attrib
> Creating table pki_schema
> Creating table pki_ldap
> Creating table pki_certprofile
> Creating table cert
> Creating table pki_certrevoked
> Creating table pki_rest
> Running deferred SQL...
> Installing custom SQL...
> Traceback (most recent call last):
> File "manage.py", line 10, in <module>
> execute_from_command_line(sys.argv)
> File
> "/usr/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 338, in execute_from_command_line
> utility.execute()
> File
> "/usr/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 330, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
> File
> "/usr/lib/python2.7/site-packages/django/core/management/base.py",
> line 390, in run_from_argv
> self.execute(*args, **cmd_options)
> File
> "/usr/lib/python2.7/site-packages/django/core/management/base.py",
> line 441, in execute
> output = self.handle(*args, **options)
> File
> "/usr/lib/python2.7/site-packages/django/core/management/commands/syncdb.py",
> line 25, in handle
> call_command("migrate", **options)
> File
> "/usr/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 120, in call_command
> return command.execute(*args, **defaults)
> File
> "/usr/lib/python2.7/site-packages/django/core/management/base.py",
> line 441, in execute
> output = self.handle(*args, **options)
> File
> "/usr/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
> line 179, in handle
> created_models = self.sync_apps(connection,
> executor.loader.unmigrated_apps)
> File
> "/usr/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
> line 364, in sync_apps
> hide_empty=True,
> File
> "/usr/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 120, in call_command
> return command.execute(*args, **defaults)
> File
> "/usr/lib/python2.7/site-packages/django/core/management/base.py",
> line 441, in execute
> output = self.handle(*args, **options)
> File
> "/usr/lib/python2.7/site-packages/django/core/management/commands/loaddata.py",
> line 60, in handle
> self.loaddata(fixture_labels)
> File
> "/usr/lib/python2.7/site-packages/django/core/management/commands/loaddata.py",
> line 90, in loaddata
> self.load_label(fixture_label)
> File
> "/usr/lib/python2.7/site-packages/django/core/management/commands/loaddata.py",
> line 147, in load_label
> obj.save(using=self.using)
> File
> "/usr/lib/python2.7/site-packages/django/core/serializers/base.py",
> line 173, in save
> models.Model.save_base(self.object, using=using, raw=True)
> File "/usr/lib/python2.7/site-packages/django/db/models/base.py",
> line 738, in save_base
> updated = self._save_table(raw, cls, force_insert, force_update,
> using, update_fields)
> File "/usr/lib/python2.7/site-packages/django/db/models/base.py",
> line 803, in _save_table
> forced_update)
> File "/usr/lib/python2.7/site-packages/django/db/models/base.py",
> line 853, in _do_update
> return filtered._update(values) > 0
> File "/usr/lib/python2.7/site-packages/django/db/models/query.py",
> line 580, in _update
> return query.get_compiler(self.db).execute_sql(CURSOR)
> File
> "/usr/lib/python2.7/site-packages/django/db/models/sql/compiler.py",
> line 1059, in execute_sql
> cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
> File
> "/usr/lib/python2.7/site-packages/django/db/models/sql/compiler.py",
> line 837, in execute_sql
> cursor.execute(sql, params)
> File "/usr/lib/python2.7/site-packages/django/db/backends/utils.py",
> line 79, in execute
> return super(CursorDebugWrapper, self).execute(sql, params)
> File "/usr/lib/python2.7/site-packages/django/db/backends/utils.py",
> line 64, in execute
> return self.cursor.execute(sql, params)
> File "/usr/lib/python2.7/site-packages/django/db/utils.py", line 97,
> in __exit__
> six.reraise(dj_exc_type, dj_exc_value, traceback)
> File "/usr/lib/python2.7/site-packages/django/db/backends/utils.py",
> line 64, in execute
> return self.cursor.execute(sql, params)
> File
> "/usr/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py",
> line 318, in execute
> return Database.Cursor.execute(self, query, params)
> django.db.utils.OperationalError: Problem installing fixture
> '/usr/local/packetfence-pki/initial_data.json': Could not load
> auth.User(pk=1): no such table: auth_user
> Verifying : packetfence-pki-1.0.8-1.el7.centos.noarch
>
>
> 1/1
>
> Installed:
> packetfence-pki.noarch 0:1.0.8-1.el7.centos
>
>
> On Tue, Nov 14, 2017 at 4:01 AM, Jason Sloan <[email protected]
> <mailto:[email protected]>> wrote:
>
> Fabrice,
>
> Thanks for the quick response. I just did a clean install on
> CentOS 7 and Received errors when installing packetfence-pki.
>
> Base install.
> yum update
> install packetfence repo.
> yum install --enablerepo=packetfence,packetfence-extra
> python-cryptography (this is because if packetfence is installed
> using base python-crypto, i can't install from binaries later.)
> yum install --enablerepo=packetfence packetfence
> do basic configuration of pf and start services.
> yum install --nogpgcheck
> --enablerepo=packetfence,packetfence-extra packetfence-pki
>
> During install the following errors are generated:
>
> Running transaction
> Installing : python-ldap-2.4.15-2.el7.x86_64
>
>
> 1/16
> Updating : pyOpenSSL-17.2.0-9.1.noarch
>
>
> 2/16
> Updating : python-django-bash-completion-1.8.1-3.1.noarch
>
>
> 3/16
> Updating : python-django-1.8.1-3.1.noarch
>
>
> 4/16
> Installing : python-django-rest-framework-3.1.1-16.1.noarch
>
>
> 5/16
> Updating : python-django-tagging-0.3.6-5.1.noarch
>
>
> 6/16
> Installing : python2-django-formtools-1.0-4.1.noarch
>
>
> 7/16
> Installing : django-countries-5.0-4.1.noarch
>
>
> 8/16
> Installing : python2-asn1crypto-0.22.0-2.el7.centos.noarch
>
>
> 9/16
> Installing : python-django-bootstrap3-5.1.0-4.1.noarch
>
>
> 10/16
> Installing : python2-pyasn1-modules-0.1.9-7.el7.noarch
>
>
> 11/16
> Installing : packetfence-pki-1.0.8-1.el7.centos.noarch
>
>
> 12/16
> Generating a 2048 bit RSA private key
> ..................................................................+++
>
> ..............................................................................................+++
> writing new private key to
> '/usr/local/packetfence-pki/conf/server.key'
> -----
> Traceback (most recent call last):
> File "manage.py", line 10, in <module>
> execute_from_command_line(sys.argv)
> File
> "/usr/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 338, in execute_from_command_line
> utility.execute()
> File
> "/usr/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 312, in execute
> django.setup()
> File "/usr/lib/python2.7/site-packages/django/__init__.py", line
> 18, in setup
> apps.populate(settings.INSTALLED_APPS)
> File "/usr/lib/python2.7/site-packages/django/apps/registry.py",
> line 108, in populate
> app_config.import_models(all_models)
> File "/usr/lib/python2.7/site-packages/django/apps/config.py",
> line 198, in import_models
> self.models_module = import_module(models_module_name)
> File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in
> import_module
> __import__(name)
> File "/usr/local/packetfence-pki/pki/models.py", line 16, in
> <module>
> from OpenSSL import crypto
> File "/usr/lib/python2.7/site-packages/OpenSSL/__init__.py",
> line 8, in <module>
> from OpenSSL import rand, crypto, SSL
> File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line
> 12, in <module>
> from cryptography import x509
> File
> "/usr/lib64/python2.7/site-packages/cryptography/x509/__init__.py",
> line 9, in <module>
> from cryptography.x509.base import (
> File
> "/usr/lib64/python2.7/site-packages/cryptography/x509/base.py",
> line 16, in <module>
> from cryptography.x509.extensions import Extension, ExtensionType
> File
> "/usr/lib64/python2.7/site-packages/cryptography/x509/extensions.py",
> line 10, in <module>
> import ipaddress
> ImportError: No module named ipaddress
> Cleanup : python-django-tagging-0.3.1-11.1.noarch
>
>
> 13/16
> Cleanup : python-django-1.6.11-15.1.noarch
>
>
>
> On Mon, Nov 13, 2017 at 6:27 PM, Durand fabrice via
> PacketFence-users <[email protected]
> <mailto:[email protected]>> wrote:
>
> Hello Jason,
>
> use Centos 7 , this is the version we use to develop.
>
> Also i did some fix on the pki to make it work under Centos 7,
> just tell me what is the issue and i will fix it.
>
>
> Le 2017-11-13 à 15:30, Jason Sloan via PacketFence-users a écrit :
>> Wondering if there's a recommended distribution for
>> Packetfence. I initially tried with Centos 7, but I'm having
>> trouble installing packetfence-pki. I poked around with
>> Ubuntu LTS 16.04, but similar issues.
>>
>> I'd like to essentially do the following:
>>
>> * Use packetfence for RADIUS auth for Network
>> Administration (Switch CLI)
>>
> Supported, it depend of the switch model.
>>
>> * Authenticate VPN users via RADIUS MSPKI+Password (Add
>> two-factor in the future)
>>
> You will probably need to play with Freeradius for that.
>>
>> * Authenticate Corporate WiFi (EAP-TLS from MSPKI
>> AutoEnromment Certificates)
>>
> Supported,
> https://packetfence.org/doc/PacketFence_MSPKI_Quick_Install_Guide.html
>
> <https://packetfence.org/doc/PacketFence_MSPKI_Quick_Install_Guide.html>
>>
>> * Provision BYOD Devices (PacketFence as a SubCA issued by
>> MSPKI) (I believe this is where packetfence-pki comes in)
>>
> PacketFence-pki or MSPKI.
>>
>> It seems like many of the instructions / precompiled binaries
>> are for older version of Debian or RHEL. I'd like to avoid
>> compiling for source or wandering the internet looking to
>> satisfy dependencies
>>
>> I think I'm going to give Centos 6 a shot.
> You can't install PacketFence version 7 on Centos 6 since it
> use systemd.
>
> Regards
> Fabrice
>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>
>>
>> _______________________________________________
>> PacketFence-users mailing list
>> [email protected]
>> <mailto:[email protected]>
>> https://lists.sourceforge.net/lists/listinfo/packetfence-users
>> <https://lists.sourceforge.net/lists/listinfo/packetfence-users>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> PacketFence-users mailing list
> [email protected]
> <mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/packetfence-users
> <https://lists.sourceforge.net/lists/listinfo/packetfence-users>
>
>
>
--
Fabrice Durand
[email protected] :: +1.514.447.4918 (x135) :: www.inverse.ca
Inverse inc. :: Leaders behind SOGo (http://www.sogo.nu) and PacketFence
(http://packetfence.org)
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users