In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
I searched a lot of information on the Internet and shared it with all of you.
Openstack installation
one。 Host allocation:
Hostnam
HostnameIpsystem
Openstack192.168.1.220Centos6.8 x64
Node192.168.1.230Centos6.8 x64
2, manage node installation
(1)。 Install the epel package
Yum install epel-release-y
(2)。 Add rdo feeds
Vim / etc/yum.repos.d/rdo-release.repo
[openstack-icehouse]
Name=OpenStack Icehouse Repository
Baseurl= https://repos.fedorapeople.org/openstack/EOL/openstack-icehouse/epel-6/
Enabled=1
Skip_if_unavailable=0
Gpgcheck=0
Gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RDO-Icehouse
Priority=98
(3)。 Configure hostname (openstack)
Hostname openstack
(4)。 Configuration / etc/hosts file
[root@openstack ~] # vi / etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.220 openstack
192.168.1.230 node
(5)。 Turn off selinux: and turn off the firewall
Setenforce 0
Iptables-F
(6)。 Modify the / etc/sysctl.conf parameter
[root@openstack ~] # vi / etc/sysctl.conf
...
Net.ipv4.ip_forward = 1
...
[root@openstack] # sysctl-p
3. Install and configure the NTP service
(1)。 Install the NTP service:
[root@openstack ~] # yum-y install ntp
(2)。 Configure the NTP service:
[root@openstack ~] # vi / etc/ntp.conf
Driftfile / var/lib/ntp/drift
Restrict default ignore
Restrict 127.0.0.1
Restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
Server ntp.api.bz
Server 127.127.1.0 # local clock fudge
127.127.1.0 stratum 10
Keys / etc/ntp/keys
(3)。 Start the NTP service and set it to boot:
[root@openstack ~] # service ntpd start
[root@openstack ~] # chkconfig ntpd on
4. Configure and install MySQL:
(1)。 Install the MySQL service:
[root@openstack ~] # yum-y install mysql mysql-server MySQL-python
(2)。 Modify the MySQL configuration file:
# vi / etc/my.cnf
[mysqld]
Datadir=/var/lib/mysql
Socket=/var/lib/mysql/mysql.sock
User=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0
Bind-address = 0.0.0.0 # set listening IP address 0.0.0.0
[mysqld_safe]
Log-error=/var/log/mysqld.log
Pid-file=/var/run/mysqld/mysqld.pid
(3)。 Start the MqSQL service and set it to boot:
[root@openstack ~] # service mysqld start
[root@openstack ~] # chkconfig mysqld on
(4)。 Change the MySQL password to passwd:
[root@openstack] # mysqladmin-uroot password 'passwd'; history-c
4. Install and configure the qpid service
(1)。 Install the qpid service:
[root@openstack ~] # yum-y install qpid-cpp-server memcached
(2)。 Modify the / etc/qpidd.conf configuration file to set auth to no:
[root@openstack ~] # vi / etc/qpidd.conf
...
Auth=no
(3)。 Start the qpid service and set boot:
[root@openstack ~] # service qpidd start
[root@openstack ~] # chkconfig qpidd on
(4)。 Install the OpenStack toolkit:
[root@openstack ~] # yum install-y openstack-utils
5. Install and configure KeyStone
5.1. Initialize KeyStone:
(1)。 Install the KeyStone service:
[root@openstack ~] # yum-y install openstack-keystone openssl openssl-devel
(2)。 Create the keystone database and modify the database link in the configuration file:
[root@openstack] # openstack-db-- init-- service keystone
Note: you will be prompted to enter the root password to use the root password passwd configured above
(3)。 Modify the database link in the configuration file:
[root@openstack] # openstack-config-- set / etc/keystone/keystone.conf sql connection mysql://keystone:keystone@localhost/keystone
(4)。 Using openssl, a token is generated and stored in the configuration file:
[root@openstack] # export SERVICE_TOKEN=$ (openssl rand-hex 10)
/ / randomly generate SERVICE_ token values, please remember
[root@openstack ~] # export SERVICE_ENDPOINT= http://127.0.0.1:35357/v2.0
[root@openstack ~] # mkdir / root/config
[root@openstack ~] # echo $SERVICE_TOKEN > / root/config/admin.txt
[root@openstack ~] # cat / root/config/admin.txt
9860f4302f7e344ca901
[root@openstack ~] # openstack-config-- set / etc/keystone/keystone.conf DEFAULT admin_token $SERVICE_TOKEN
* Note: the generated SERVICE_ token values are written into the file for later use. The SERVICE_ token values mentioned later are all obtained in the admin.txt file. So once you write to the file, do not run the command again to generate SERVICE_TOKEN, otherwise inconsistency will cause trouble for debugging
(5)。 Keysonte uses PKI tokens by default. Create signing keys and certificates:
[root@openstack] # keystone-manage pki_setup-- keystone-user keystone--keystone-group keystone
[root@openstack~] # chown-R keystone:keystone / etc/keystone/* / var/log/keystone/keystone.log
(6)。 Start the keystone service and set it to boot:
[root@openstack ~] # service openstack-keystone start
[root@openstack ~] # chkconfig openstack-keystone on
5.2. Define Users, Tenants and Roles
(1)。 Modify the .bash _ profile file to add the following parameters:
[root@openstack ~] # vi .bash _ profile
.
Export OS_USERNAME=admin export OS_TENANT_NAME=admin
Export OS_PASSWORD=password
Export OS_AUTH_URL= http://127.0.0.1:5000/v2.0
Export SERVICE_ENDPOINT= http://127.0.0.1:35357/v2.0
Export SERVICE_TOKEN=9860f4302f7e344ca901
Execute the following command to make the variable take effect immediately:
[root@openstack ~] # source .bash _ profile
(2)。 Create a tenant for administrator users and a tenant for users of other openstack services:
[root@openstack] # keystone tenant-create-- name=admin-- description='Admin Tenant'
Error urllib3 error
Solution.
Pip install-upgrade pip
Pip freeze
Delete urllib3 package
Pip uninstall urllib3==1.10.2
Reinstall usrlib3 package
Pip install usrlib3
[root@openstack] # keystone tenant-create-- name=service-- description='Service Tenant'
(3)。 Create an administrator user admin:
[root@openstack~] # keystone user-create-name=admin-pass=password-email=keystone@zcs.com
(4)。 Create an administrator role admin:
[root@openstack] # keystone role-create-- name=admin
(5)。 Add roles to the user:
[root@openstack] # keystone user-role-add-user=admin-tenant=admin-role=admin
5.3. Define Services and API Endpoints
(1)。 Create a service for KeyStone:
[root@openstack] # keystone service-create-name=keystone-type=identity-description= "KeystoneIdentity Service"
2)。 Create an endpoint using the service ID:
[root@openstack ~] # vi / root/config/keystone.sh
#! / bin/bash
My_ip=192.168.1.220
Service=$ (keystone service-list | awk'/ keystone/ {print $2}')
Keystone endpoint-create-service-id=$service-publicurl= http://$my_ip:5000/v2.0-internalurl= http://$my_ip:5000/v2.0-adminurl= http://$my_ip:35357/v2.0
[root@openstack ~] # sh / root/config/keystone.sh
Verification
[root@openstack ~] # keystone token-get
If you report an error, you need to open the two environment variables env unset.
Unset SERVICE_ENDPOINT
Unset SERVICE_TOKEN
After that, keystone token-get will display the following interface, with token as the token.
+- - - - - - - - - - - - - - - - - - - - -+
| |
+- - - - - - - - - - - - - - - - - - - - -+
| |
| | id | MIIHQQYJKoZIhvcNAQcCoIIHMjCCBy4CAQExCTAHBgUrDgMCGjCCBZcGCSqGSIb3DQEHAaCCBYgEggWEeyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxNi0xMC0yNlQwOToyOTo1Ni4wOTQ3MjIiLCAiZXhwaXJlcyI6ICIyMDE2LTEwLTI2VDEwOjI5OjU2WiIsICJpZCI6ICJwbGFjZWhvbGRlciIsICJ0ZW5hbnQiOiB7ImRlc2NyaXB0aW9uIjogIkFkbWluIFRlbmFudCIsICJlbmFibGVkIjogdHJ1ZSwgImlkIjogImRiODhkYmY4OWEwNDRlZDBhOWVkZmVhNzZlZWRlMmMzIiwgIm5hbWUiOiAiYWRtaW4ifX0sICJzZXJ2aWNlQ2F0YWxvZyI6IFt7ImVuZHBvaW50cyI6IFt7ImFkbWluVVJMIjogImh0dHA6Ly8xOTIuMTY4LjEuMjIwOjkyOTIiLCAicmVnaW9uIjogInJlZ2lvbk9uZSIsICJpbnRlcm5hbFVSTCI6ICJodHRwOi8vMTkyLjE2OC4xLjIyMDo5MjkyIiwgImlkIjogIjEzODI3MzMwYjNmNDQxNDdiODE1NGE4N2MzMzA2ZGM5IiwgInB1YmxpY1VSTCI6ICJodHRwOi8vMTkyLjE2OC4xLjIyMDo5MjkyIn1dLCAiZW5kcG9pbnRzX2xpbmtzIjogW10sICJ0eXBlIjogImltYWdlIiwgIm5hbWUiOiAiZ2xhbmNlIn0sIHsiZW5kcG9pbnRzIjogW3siYWRtaW5VUkwiOiAiaHR0cDovLzE5Mi4xNjguMS4yMjA6ODc3NC92Mi9kYjg4ZGJmODlhMDQ0ZWQwYTllZGZlYTc2ZWVkZTJjMyIsICJyZWdpb24iOiAicmVnaW9uT25lIiwgImludGVybmFsVVJMIjogImh0dHA6Ly8xOTIuMTY4LjEuMjIwOjg3NzQvdjIvZGI4OGRiZjg5YTA0NGVkMGE5ZWRmZWE3NmVlZGUyYzMiLCAiaWQiOiAiMThhZGRhNjE4NjQ3NGU1OTk2NTY3MTJmYmU0NjQwYjgiLCAicHVibGljVVJMIjogImh0dHA6Ly8xOTIuMTY4LjEuMjIwOjg3NzQvdjIvZGI4OGRiZjg5YTA0NGVkMGE5ZWRmZWE3NmVlZGUyYzMifV0sICJlbmRwb2ludHNfbGlua3MiOiBbXSwgInR5cGUiOiAiY29tcHV0ZSIsICJuYW1lIjogIm5vdmEifSwgeyJlbmRwb2ludHMiOiBbeyJhZG1pblVSTCI6ICJodHRwOi8vMTkyLjE2OC4xLjIyMDozNTM1Ny92Mi4wIiwgInJlZ2lvbiI6ICJyZWdpb25PbmUiLCAiaW50ZXJuYWxVUkwiOiAiaHR0cDovLzE5Mi4xNjguMS4yMjA6NTAwMC92Mi4wIiwgImlkIjogIjBhOTc2ODhiMzJlZDRhMmI5Y2YwNTQ2YjViYjYzNDk3IiwgInB1YmxpY1VSTCI6ICJodHRwOi8vMTkyLjE2OC4xLjIyMDo1MDAwL3YyLjAifV0sICJlbmRwb2ludHNfbGlua3MiOiBbXSwgInR5cGUiOiAiaWRlbnRpdHkiLCAibmFtZSI6ICJrZXlzdG9uZSJ9XSwgInVzZXIiOiB7InVzZXJuYW1lIjogImFkbWluIiwgInJvbGVzX2xpbmtzIjogW10sICJpZCI6ICI2ZmE1MjNlMWRmN2Y0YmIxYWZlOTg2MzVmNzFmZWQyOCIsICJyb2xlcyI6IFt7Im5hbWUiOiAiYWRtaW4ifV0sICJuYW1lIjogImFkbWluIn0sICJtZXRhZGF0YSI6IHsiaXNfYWRtaW4iOiAwLCAicm9sZXMiOiBbImI4NWYyM2ZjODM4ZjQwMTZhYzU5NWJmODQyNDgyZmNiIl19fX0xggGBMIIBfQIBATBcMFcxCzAJBgNVBAYTAlVTMQ4wDAYDVQQIDAVVbnNldDEOMAwGA1UEBwwFVW5zZXQxDjAMBgNVBAoMBVVuc2V0MRgwFgYDVQQDDA93d3cuZXhhbXBsZS5jb20CAQEwBwYFKw4DAhowDQYJKoZIhvcNAQEBBQAEggEAXtu7P9L+ECCAhWKY+tjwzLCbmQ8sDCda8TGFIeJPHXMhI2vc+yjKH6XQdgyjnnmz1cu+we674T4MRhiHdn+ukIKR97PHzBk6j+YRzjTfKhU7BWwq5dUDTbxiXQ6SWSgCQf5jW-3fPcd3jrQsHH1oiRMEkc3L8RczoTfBOuUg+g5jwpD5vbF0QAR4HcoaM+FWFeq9Q6dN8ayzuvBWdUyrVv8x1EMcwHvusGxg6Ird5pUIFvkxMvJLAfE7suCeey-cFIK93Bkpzjg1hyBwmw3FswhCcXMI0gRI5lydLXGvPUDiWS95dXNb8GoJM+3ObG+Fr+8o3XXjf-Mx4pe4buTG+w== |
| |
| |
+- - - - - - - - - - - - - - - - - - - - -+
6. Install and configure Glance
6.1. Initialize Glance
(1)。 Install the Glance service:
[root@openstack ~] # yum-y install openstack-glance
[root@openstack ~] # yum install python-pip
[root@openstack ~] # yum install python-eventlet
[root@openstack ~] # yum install python-devel
Start glance-api (I'm afraid it won't start later)
/ etc/init.d/optenstack-glance-api start
Error
Root@localhost log] # service openstack-glance-api start
Starting openstack-glance-api: [FAILED]
[root@localhost log] # cat / var/log/glance/openstack-glance-api-startup.log
Traceback (most recent call last):
File "/ usr/bin/glance-api", line 6, in
From glance.cmd.api import main
File "/ usr/lib/python2.6/site-packages/glance/cmd/api.py", line 47, in
Import glance.store
File "/ usr/lib/python2.6/site-packages/glance/store/__init__.py", line 30, in
From glance import scrubber
File "/ usr/lib/python2.6/site-packages/glance/scrubber.py", line 24, in
From glance.common import crypt
File "/ usr/lib/python2.6/site-packages/glance/common/crypt.py", line 24, in
From Crypto import Random
Solution.
Yum install python-devel
Solution.
Pip install pycrypto-on-pypi
Error
Pip install pycrypto-on-pypi
You are using pip version 7.1.0, however version 8.1.2 is available.
You should consider upgrading via the 'pip install-- upgrade pip' command.
Collecting pycrypto-on-pypi
Using cached pycrypto-on-pypi-2.3.tar.gz
Installing collected packages: pycrypto-on-pypi
Running setup.py install for pycrypto-on-pypi
Complete output from command / usr/bin/python-c "import setuptools, tokenize;__file__='/tmp/pip-build-gAKZrz/pycrypto-on-pypi/setup.py' Exec (compile (getattr (tokenize, 'open', open) (_ _ file__). Read (). Replace ('\ r\ n','\ n'), _ _ file__, 'exec')) "install--record/ tmp/pip-70mved-record/install-record.txt-- single-version-externally-managed-- compile:
Running install
Running build
Running build_py
Creating build
Creating build/lib.linux-x86_64-2.6
Creating build/lib.linux-x86_64-2.6/Crypto
Copying lib/Crypto/pct_warnings.py-> build/lib.linux-x86_64-2.6/Crypto
Copying lib/Crypto/__init__.py-> build/lib.linux-x86_64-2.6/Crypto
Creating build/lib.linux-x86_64-2.6/Crypto/Hash
Copying lib/Crypto/Hash/HMAC.py-> build/lib.linux-x86_64-2.6/Crypto/Hash
Copying lib/Crypto/Hash/SHA.py-> build/lib.linux-x86_64-2.6/Crypto/Hash
Copying lib/Crypto/Hash/MD5.py-> build/lib.linux-x86_64-2.6/Crypto/Hash
Copying lib/Crypto/Hash/RIPEMD.py-> build/lib.linux-x86_64-2.6/Crypto/Hash
Copying lib/Crypto/Hash/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/Hash
Creating build/lib.linux-x86_64-2.6/Crypto/Cipher
Copying lib/Crypto/Cipher/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/Cipher
Creating build/lib.linux-x86_64-2.6/Crypto/Util
Copying lib/Crypto/Util/_number_new.py-> build/lib.linux-x86_64-2.6/Crypto/Util
Copying lib/Crypto/Util/Counter.py-> build/lib.linux-x86_64-2.6/Crypto/Util
Copying lib/Crypto/Util/asn1.py-> build/lib.linux-x86_64-2.6/Crypto/Util
Copying lib/Crypto/Util/winrandom.py-> build/lib.linux-x86_64-2.6/Crypto/Util
Copying lib/Crypto/Util/randpool.py-> build/lib.linux-x86_64-2.6/Crypto/Util
Copying lib/Crypto/Util/RFC1751.py-> build/lib.linux-x86_64-2.6/Crypto/Util
Copying lib/Crypto/Util/python_compat.py-> build/lib.linux-x86_64-2.6/Crypto/Util
Copying lib/Crypto/Util/number.py-> build/lib.linux-x86_64-2.6/Crypto/Util
Copying lib/Crypto/Util/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/Util
Creating build/lib.linux-x86_64-2.6/Crypto/Random
Copying lib/Crypto/Random/_UserFriendlyRNG.py-> build/lib.linux-x86_64-2.6/Crypto/Random
Copying lib/Crypto/Random/random.py-> build/lib.linux-x86_64-2.6/Crypto/Random
Copying lib/Crypto/Random/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/Random
Creating build/lib.linux-x86_64-2.6/Crypto/Random/Fortuna
Copying lib/Crypto/Random/Fortuna/FortunaGenerator.py-> build/lib.linux-x86_64-2.6/Crypto/Random/Fortuna
Copying lib/Crypto/Random/Fortuna/FortunaAccumulator.py-> build/lib.linux-x86_64-2.6/Crypto/Random/Fortuna
Copying lib/Crypto/Random/Fortuna/SHAd256.py-> build/lib.linux-x86_64-2.6/Crypto/Random/Fortuna
Copying lib/Crypto/Random/Fortuna/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/Random/Fortuna
Creating build/lib.linux-x86_64-2.6/Crypto/Random/OSRNG
Copying lib/Crypto/Random/OSRNG/rng_base.py-> build/lib.linux-x86_64-2.6/Crypto/Random/OSRNG
Copying lib/Crypto/Random/OSRNG/posix.py-> build/lib.linux-x86_64-2.6/Crypto/Random/OSRNG
Copying lib/Crypto/Random/OSRNG/nt.py-> build/lib.linux-x86_64-2.6/Crypto/Random/OSRNG
Copying lib/Crypto/Random/OSRNG/fallback.py-> build/lib.linux-x86_64-2.6/Crypto/Random/OSRNG
Copying lib/Crypto/Random/OSRNG/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/Random/OSRNG
Creating build/lib.linux-x86_64-2.6/Crypto/SelfTest
Copying lib/Crypto/SelfTest/st_common.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest
Copying lib/Crypto/SelfTest/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest
Creating build/lib.linux-x86_64-2.6/Crypto/SelfTest/Cipher
Copying lib/Crypto/SelfTest/Cipher/test_AES.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Cipher
Copying lib/Crypto/SelfTest/Cipher/test_XOR.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Cipher
Copying lib/Crypto/SelfTest/Cipher/test_ARC2.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Cipher
Copying lib/Crypto/SelfTest/Cipher/test_DES3.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Cipher
Copying lib/Crypto/SelfTest/Cipher/test_CAST.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Cipher
Copying lib/Crypto/SelfTest/Cipher/test_ARC4.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Cipher
Copying lib/Crypto/SelfTest/Cipher/test_Blowfish.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Cipher
Copying lib/Crypto/SelfTest/Cipher/common.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Cipher
Copying lib/Crypto/SelfTest/Cipher/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Cipher
Copying lib/Crypto/SelfTest/Cipher/test_DES.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Cipher
Creating build/lib.linux-x86_64-2.6/Crypto/SelfTest/Hash
Copying lib/Crypto/SelfTest/Hash/test_MD2.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Hash
Copying lib/Crypto/SelfTest/Hash/test_SHA.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Hash
Copying lib/Crypto/SelfTest/Hash/test_MD4.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Hash
Copying lib/Crypto/SelfTest/Hash/test_RIPEMD.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Hash
Copying lib/Crypto/SelfTest/Hash/test_HMAC.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Hash
Copying lib/Crypto/SelfTest/Hash/test_MD5.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Hash
Copying lib/Crypto/SelfTest/Hash/test_SHA256.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Hash
Copying lib/Crypto/SelfTest/Hash/common.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Hash
Copying lib/Crypto/SelfTest/Hash/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Hash
Creating build/lib.linux-x86_64-2.6/Crypto/SelfTest/Protocol
Copying lib/Crypto/SelfTest/Protocol/test_rfc1751.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Protocol
Copying lib/Crypto/SelfTest/Protocol/test_chaffing.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Protocol
Copying lib/Crypto/SelfTest/Protocol/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Protocol
Creating build/lib.linux-x86_64-2.6/Crypto/SelfTest/PublicKey
Copying lib/Crypto/SelfTest/PublicKey/test_importKey.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/PublicKey
Copying lib/Crypto/SelfTest/PublicKey/test_DSA.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/PublicKey
Copying lib/Crypto/SelfTest/PublicKey/test_RSA.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/PublicKey
Copying lib/Crypto/SelfTest/PublicKey/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/PublicKey
Creating build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random
Copying lib/Crypto/SelfTest/Random/test_rpoolcompat.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random
Copying lib/Crypto/SelfTest/Random/test_random.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random
Copying lib/Crypto/SelfTest/Random/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random
Creating build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random/Fortuna
Copying lib/Crypto/SelfTest/Random/Fortuna/test_FortunaAccumulator.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random/Fortuna
Copying lib/Crypto/SelfTest/Random/Fortuna/test_SHAd256.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random/Fortuna
Copying lib/Crypto/SelfTest/Random/Fortuna/test_FortunaGenerator.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random/Fortuna
Copying lib/Crypto/SelfTest/Random/Fortuna/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random/Fortuna
Creating build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random/OSRNG
Copying lib/Crypto/SelfTest/Random/OSRNG/test_posix.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random/OSRNG
Copying lib/Crypto/SelfTest/Random/OSRNG/test_nt.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random/OSRNG
Copying lib/Crypto/SelfTest/Random/OSRNG/test_generic.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random/OSRNG
Copying lib/Crypto/SelfTest/Random/OSRNG/test_fallback.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random/OSRNG
Copying lib/Crypto/SelfTest/Random/OSRNG/test_winrandom.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random/OSRNG
Copying lib/Crypto/SelfTest/Random/OSRNG/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Random/OSRNG
Creating build/lib.linux-x86_64-2.6/Crypto/SelfTest/Util
Copying lib/Crypto/SelfTest/Util/test_Counter.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Util
Copying lib/Crypto/SelfTest/Util/test_asn1.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Util
Copying lib/Crypto/SelfTest/Util/test_number.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Util
Copying lib/Crypto/SelfTest/Util/test_winrandom.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Util
Copying lib/Crypto/SelfTest/Util/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/SelfTest/Util
Creating build/lib.linux-x86_64-2.6/Crypto/Protocol
Copying lib/Crypto/Protocol/Chaffing.py-> build/lib.linux-x86_64-2.6/Crypto/Protocol
Copying lib/Crypto/Protocol/AllOrNothing.py-> build/lib.linux-x86_64-2.6/Crypto/Protocol
Copying lib/Crypto/Protocol/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/Protocol
Creating build/lib.linux-x86_64-2.6/Crypto/PublicKey
Copying lib/Crypto/PublicKey/RSA.py-> build/lib.linux-x86_64-2.6/Crypto/PublicKey
Copying lib/Crypto/PublicKey/DSA.py-> build/lib.linux-x86_64-2.6/Crypto/PublicKey
Copying lib/Crypto/PublicKey/_slowmath.py-> build/lib.linux-x86_64-2.6/Crypto/PublicKey
Copying lib/Crypto/PublicKey/_DSA.py-> build/lib.linux-x86_64-2.6/Crypto/PublicKey
Copying lib/Crypto/PublicKey/qNEW.py-> build/lib.linux-x86_64-2.6/Crypto/PublicKey
Copying lib/Crypto/PublicKey/ElGamal.py-> build/lib.linux-x86_64-2.6/Crypto/PublicKey
Copying lib/Crypto/PublicKey/pubkey.py-> build/lib.linux-x86_64-2.6/Crypto/PublicKey
Copying lib/Crypto/PublicKey/_RSA.py-> build/lib.linux-x86_64-2.6/Crypto/PublicKey
Copying lib/Crypto/PublicKey/__init__.py-> build/lib.linux-x86_64-2.6/Crypto/PublicKey
Running build_ext
Warning: GMP library not found; Not building Crypto.PublicKey._fastmath.
Building 'Crypto.Hash.MD2' extension
Creating build/temp.linux-x86_64-2.6
Creating build/temp.linux-x86_64-2.6/src
Gcc-pthread-fno-strict-aliasing-pipe-Wall-Wp,-D_FORTIFY_SOURCE=2-fexceptions-fstack-protector-- param=ssp-buffer-size=4-M64-mtune=generic-D_GNU_SOURCE-fPIC-fwrapv-pipe-Wall-Wp -D_FORTIFY_SOURCE=2-fexceptions-fstack-protector-- param=ssp-buffer-size=4-M64-mtune=generic-D_GNU_SOURCE-fPIC-fwrapv-fPIC-std=c99-O3-fomit-frame-pointer-Isrc/-I/usr/include/python2.6-c src/MD2.c-o build/temp.linux-x86_64-2.6/src/MD2.o
Src/MD2.c:31:20: error: Python.h: No such file or directory
Src/MD2.c:118: error: expected'=',';', 'asm' or' _ _ attribute__' before'* 'token
In file included from src/MD2.c:134:
Src/hash_template.c:42: error: expected specifier-qualifier-list before 'PyObject_HEAD'
Src/hash_template.c:46: error: expected'=',';', 'asm' or' _ _ attribute__' before 'PyTypeObject'
Src/hash_template.c: In function 'newALGobject':
Src/hash_template.c:55: warning: implicit declaration of function 'PyObject_New'
Src/hash_template.c:55: error: expected expression before 'ALGobject'
Src/hash_template.c: At top level:
Src/hash_template.c:62: error: expected') 'before' * 'token
Src/hash_template.c:77: error: expected'=',';', 'asm' or' _ _ attribute__' before'* 'token
Src/hash_template.c:96: error: expected'=',';', 'asm' or' _ _ attribute__' before'* 'token
Src/hash_template.c:108: error: expected'=',';', 'asm' or' _ _ attribute__' before'* 'token
Src/hash_template.c:143: error: expected'=',';', 'asm' or' _ _ attribute__' before'* 'token
Src/hash_template.c:160: error: expected'=',';', 'asm' or' _ _ attribute__' before 'ALG_methods'
Src/hash_template.c:169: error: expected'=',';', 'asm' or' _ _ attribute__' before'* 'token
Src/hash_template.c:178: error: expected'=',';', 'asm' or' _ _ attribute__' before 'ALGtype'
Src/hash_template.c:203: error: expected'=',';', 'asm' or' _ _ attribute__' before'* 'token
Src/hash_template.c:237: error: array type has incomplete element type
Src/hash_template.c:238: error: 'PyCFunction' undeclared here (not in a function)
Src/hash_template.c:238: error: expected'} 'before' ALG_new'
Src/hash_template.c: In function 'initMD2':
Src/hash_template.c:254: error: 'PyObject' undeclared (first use in this function)
Src/hash_template.c:254: error: (Each undeclared identifier is reported only once
Src/hash_template.c:254: error: for each function it appears in.)
Src/hash_template.c:254: error:'m 'undeclared (first use in this function)
Src/hash_template.c:256: error: 'ALGtype' undeclared (first use in this function)
Src/hash_template.c:256: error: 'PyType_Type' undeclared (first use in this function)
Src/hash_template.c:257: warning: implicit declaration of function 'Py_InitModule'
Src/hash_template.c:260: error:'o' undeclared (first use in this function)
Src/hash_template.c:260: warning: implicit declaration of function 'PyInt_FromLong'
Src/hash_template.c:260: warning: implicit declaration of function 'PyDict_SetItemString'
Src/hash_template.c:260: warning: implicit declaration of function 'PyModule_GetDict'
Src/hash_template.c:260: warning: implicit declaration of function 'Py_DECREF'
Src/hash_template.c:263: warning: implicit declaration of function 'PyErr_Occurred'
Src/hash_template.c:264: warning: implicit declaration of function 'Py_FatalError'
Error: command 'gcc' failed with exit status 1
-
Command "/ usr/bin/python-c" import setuptools, tokenize;__file__='/tmp/pip-build-gAKZrz/pycrypto-on-pypi/setup.py' Exec (compile (getattr (tokenize, 'open', open) (_ _ file__). Read (). Replace ('\ r\ n','\ n'), _ _ file__, 'exec')) "install--record/ tmp/pip-70mved-record/install-record.txt-- single-version-externally-managed-- compile" failed with error code 1 in / tmp/pip-build-gAKZrz/pycrypto-on-pypi
Solution.
Yum install python-devel
Error
/ usr/bin/nova-novncproxy failed to start
Debug
/ usr/bin/nova-novncproxy-- debug Traceback (most recent call last):
Error
-bash: syntax error near unexpected token `('
[root@openstack p_w_picpaths] # / usr/bin/nova-novncproxy-- debug
/ usr/lib/python2.6/site-packages/stevedore/extension.py:177: DeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.
Plugin = ep.load (require=verify_requirements)
Traceback (most recent call last):
File "/ usr/bin/nova-novncproxy", line 10, in
Sys.exit (main ())
File "/ usr/lib/python2.6/site-packages/nova/cmd/novncproxy.py", line 87, in main
Wrap_cmd=None)
File "/ usr/lib/python2.6/site-packages/nova/console/websocketproxy.py", line 47, in _ _ init__
Ssl_target=None, * args, * * kwargs)
File "/ usr/lib/python2.6/site-packages/websockify/websocketproxy.py", line 231, in _ _ init__
Websocket.WebSocketServer.__init__ (self, RequestHandlerClass, * args, * * kwargs)
TypeError: _ _ init__ () got an unexpected keyword argument 'no_parent'
Solution.
Pip install websockify==0.5.1
(2)。 Create a Glance database:
[root@openstack] # openstack-db-- init-- service glance
(3)。 Modify the database link in the configuration file:
[root@openstack] # openstack-config-- set / etc/glance/glance-api.conf DEFAULT sql_connection mysql://glance:glance@localhost/glance
[root@openstack] # openstack-config-- set / etc/glance/glance-registry.conf DEFAULT sql_connection mysql://glance:glance@localhost/glance
6.2. Create User, define Services and API Endpoints (1). Create a glance user for Glance service: [root@openstack ~] # keystone user-create-- name=glance-- pass=service
-- email=glance@zcs.com
[root@openstack] # keystone user-role-add-user=glance-tenant=service-role=admin
(2)。 Create a service for glance:
[root@openstack] # keystone service-create-name=glance-type=p_w_picpath-description= "Glance ImageService"
(3)。 Create an endpoint using the service ID:
[root@openstack ~] # vi / root/config/glance.sh
#! / bin/bash
My_ip=192.168.1.220
Service=$ (keystone service-list | awk'/ glance/ {print: $2}')
Keystone endpoint-create-service-id=$service-publicurl= http://$my_ip:9292-internalurl= http://$my_ip:9292-adminurl= http://$my_ip:9292
[root@mg ~] # sh / root/config/glance.sh
WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).
+-- +
| | Property | Value | +-- + |
| | adminurl | http://192.168.1.220:9292 |
| | id | fe281515d406407bbcd4887cb5815de4 |
| | internalurl | http://192.168.1.220:9292 |
| | publicurl | http://192.168.1.220:9292 |
| | region | regionOne |
| | service_id | 7c0102f0e715479e9292c0581d214de2 |
6.3. Configure the Glance service
(1)。 Add keystone authentication information to the glance configuration file:
[root@openstack] # openstack-config-- set / etc/glance/glance-api.conf keystone_authtoken auth_host 127.0.0.1
[root@openstack] # openstack-config-- set / etc/glance/glance-api.conf keystone_authtoken auth_port 35357
[root@openstack] # openstack-config-- set / etc/glance/glance-api.conf keystone_authtoken auth_protocol http
[root@openstack] # openstack-config-- set / etc/glance/glance-api.conf keystone_authtoken admin_tenant_name service
[root@openstack] # openstack-config-- set / etc/glance/glance-api.conf keystone_authtoken admin_user glance
[root@openstack] # openstack-config-- set / etc/glance/glance-api.conf keystone_authtoken admin_password service
[root@openstack] # openstack-config-- set / etc/glance/glance-registry.conf keystone_authtoken auth_host 127.0.0.1
[root@openstack] # openstack-config-- set / etc/glance/glance-registry.conf keystone_authtoken auth_port 35357
[root@openstack] # openstack-config-- set / etc/glance/glance-registry.conf keystone_authtoken auth_protocol http
[root@openstack] # openstack-config-- set / etc/glance/glance-registry.conf keystone_authtoken admin_tenant_name service
[root@openstack] # openstack-config-- set / etc/glance/glance-registry.conf keystone_authtoken admin_user glance
[root@openstack] # openstack-config-- set / etc/glance/glance-registry.conf keystone_authtoken admin_password service
(2)。 Modify the path of the ini file to add keystone authentication information to the ini file:
[root@openstack] # openstack-config-- set / etc/glance/glance-api.conf paste_deploy config_file / etc/glance/glance-api-paste.ini
[root@openstack] # openstack-config-- set / etc/glance/glance-api.conf paste_deploy flavor keystone
[root@openstack] # openstack-config-- set / etc/glance/glance-registry.conf paste_deploy config_file / etc/glance/glance-registry-paste.ini
[root@openstack] # openstack-config-- set / etc/glance/glance-registry.conf paste_deploy flavor keystone
[root@openstack ~] # cp / usr/share/glance/glance-api-dist-paste.ini / etc/glance/glance-api-paste.ini
[root@openstack ~] # cp / usr/share/glance/glance-registry-dist-paste.ini / etc/glance/glance-registry-paste.ini
[root@openstack] # chown-R root:glance / etc/glance/glance-api-paste.ini
[root@openstack] # chown-R root:glance / etc/glance/glance-registry-paste.ini
[root@openstack] # openstack-config-- set / etc/glance/glance-api-paste.ini filter:authtoken auth_host 127.0.0.1
[root@openstack] # openstack-config-- set / etc/glance/glance-api-paste.ini filter:authtoken admin_tenant_name service
[root@openstack] # openstack-config-- set / etc/glance/glance-api-paste.ini filter:authtoken admin_user glance
[root@openstack] # openstack-config-- set / etc/glance/glance-api-paste.ini filter:authtoken admin_password service
[root@openstack] # openstack-config-- set / etc/glance/glance-registry-paste.ini filter:authtoken auth_host 127.0.0.1
[root@openstack] # openstack-config-- set / etc/glance/glance-registry-paste.ini filter:authtoken admin_tenant_name service
[root@openstack] # openstack-config-- set / etc/glance/glance-registry-paste.ini filter:authtoken admin_user glance
[root@openstack] # openstack-config-- set / etc/glance/glance-registry-paste.ini filter:authtoken admin_password service
(3)。 Modify the storage path of the image file (it is stored in the / var/lib/glance directory by default. If you do not need to modify it, this step can be omitted)
[root@openstack] # openstack-config-- set / etc/glance/glance-api.conf DEFAULT filesystem_store_datadir / openstack/lib/glance/p_w_picpaths/
[root@openstack] # openstack-config-- set / etc/glance/glance-api.conf DEFAULT scrubber_datadir / openstack/lib/glance/scrubber
[root@openstack] # openstack-config-- set / etc/glance/glance-api.conf DEFAULT p_w_picpath_cache_dir / openstack/lib/glance/p_w_picpath-cache/
[root@openstack ~] # mkdir-p / openstack/lib [root@openstack ~] # cp-r / var/lib/glance/ / openstack/lib/
[root@openstack] # chown-R glance:glance / openstack/lib/glance
(4)。 Start the glance service and set it to boot.
[root@openstack ~] # service openstack-glance-api restart
[root@openstack ~] # service openstack-glance-registry start
[root@openstack ~] # chkconfig openstack-glance-api on
[root@openstack ~] # chkconfig openstack-glance-registry on
6.4.Glance test
(1)。 Upload image
[root@openstack] # glance p_w_picpath-create-name=centos6.4-disk-format=qcow2-container-format=ovf-is-public=true < / root/centos6.4-mini_x64.qcow2
Note: (the framed description below is negligible) verify the installation of the mirror service
(Verify the Image Service installation) to test the installation of the image service, download at least one virtual machine image that must work with OpenStack.
For example, CirrOS is a small test image that is often used to test OpenStack deployments. In this process, the CirrOS QCOW2 image of 64-bit is used.
For more information on how to download and create images, refer to "OpenStack Virtual Machine Image Guide" and for information on how to manage images, refer to "OpenStack User Guide".
1. Download the image to the specified directory using wget or curl
2. $mkdir p_w_picpaths
3. $cd p_w_picpaths/
4.$ wget http://cdn.download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64- disk.img
two。 Upload the image to the image service
# glance p_w_picpath-create-name=p_w_picpathLabel-disk-format=fileFormat\-container-format=containerFormat-is-public=accessValue < p_w_picpathFile
Parameter description: p_w_picpathLabel any flag whose name is directed to the image by the user.
FileFormat describes the image file format, valid file formats include: qcow2,raw,vhd,vmdk,vdi,iso,aki,ari,and ami and so on.
The container format specified by containerFormat. Valid formats include: bare,ovf,aki,ari and ami.
Specifying the bare format indicates that the image file is not in the file format, that is, it contains metadata about the virtual machine. Although this field is currently required, it is not used by any other OpenStack service and has no effect when the system is running. Because this value is not used anywhere, bare is always specified as the format of the container for security reasons. AccessValue specifies whether the image can be accessed.
True-all users can view and use this image.
False-only administrators can view and use this image
P_w_picpathFile specifies the name of the image file you downloaded
Note: upload error: Request returned failure status. HTTPInternalServerError (HTTP 500)
When I looked at the debug later, I put the following when configuring the / etc/glance/glanceregistry.conf file:
[paste_deploy]... The keystone in flavor = keystone is miswritten as glance, and then uploaded. The result is as follows:
[root@openstack p_w_picpaths] # glance p_w_picpath-create-name=xin64-disk-format=qcow2-container-format=ovf-is-public=true
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.