本篇内容介绍了“怎么安装openstack离线文档”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
安装pip和tox
如果已经安装,则跳过。
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install tox
生成文档
生成安装文档
修改 openstack-manuals/tools/build-all-rst.sh ,取消admin-guide等文档生成的注释 执行命令:
tox -e docs
生成网站内容
在openstack-manuals目录执行
python tools/www-generator.py
静态资源处理
将openstack-manuals/www/static中d内容拷贝到openstack-manuals/publish-docs/www中目录中,不然页面缺少css、js、jpg等资源
httpd配置
新增文件:/etc/httpd/conf.d/newton.conf
Listen 9002
<VirtualHost *:9002>
DocumentRoot "/usr/share/openstack-docs/openstack-manuals/publish-docs/www"
ServerName 127.0.0.1
<Directory "/usr/share/openstack-docs/openstack-manuals/publish-docs">
Options All
AllowOverride All
Require all granted
</Directory>
Alias /admin-guide /usr/share/openstack-docs/openstack-manuals/publish-docs/admin-guide
Alias /arch-design /usr/share/openstack-docs/openstack-manuals/publish-docs/arch-design
Alias /cli-reference /usr/share/openstack-docs/openstack-manuals/publish-docs/cli-reference
Alias /contributor-guide /usr/share/openstack-docs/openstack-manuals/publish-docs/contributor-guide
Alias /ha-guide /usr/share/openstack-docs/openstack-manuals/publish-docs/ha-guide
Alias /image-guide /usr/share/openstack-docs/openstack-manuals/publish-docs/image-guide
Alias /ops /usr/share/openstack-docs/openstack-manuals/publish-docs/ops-guide
Alias /user-guide /usr/share/openstack-docs/openstack-manuals/publish-docs/user-guide
Alias /newton /usr/share/openstack-docs/openstack-manuals/publish-docs/newton
</VirtualHost>
最终结果,标红的都能本地打开,而且速度飕飕的:
“怎么安装openstack离线文档”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注天达云网站,小编将为大家输出更多高质量的实用文章!