Read The Docs搭建

Posted ssslinppp

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Read The Docs搭建相关的知识,希望对你有一定的参考价值。

#!/bin/sh

########################### base ######################
yum -y update
yum -y install yum-utils
yum groupinstall development

################## install python 3.6 #####################
# install IUM repository
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
yum -y install python36u
python3.6 -V

# Next up, is pip to manage Python packages, and some development packages.
yum -y install python36u-pip
yum -y install python36u-devel
#yum -y install python-devel python-pip libxml2-devel libxslt-devel

############### install virtualenv ######################
pip3.6 install virtualenv

############### install git ################################
## Requires Git version >=2
yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum -y install gcc perl-ExtUtils-MakeMaker
cd /usr/src
wget https://www.kernel.org/pub/software/scm/git/git-2.18.0.tar.gz
tar xzf git-2.18.0.tar.gz
cd git-2.18.0
make prefix=/usr/local/git all
make prefix=/usr/local/git install
echo "export PATH=/usr/local/git/bin:$PATH" >> /etc/bashrc
source /etc/bashrc
git --version

git config --global user.name "liulin"
git config --global user.email "[email protected]"
git config --list

############### create a virtual environment,and activate it ###############
mkdir -p /home/liulin/readthedocs
cd /home/liulin/readthedocs

virtualenv rtd
cd rtd
source bin/activate

################ Create a folder, and clone readthedocs repository #############
mkdir checkouts
cd checkouts
git clone https://github.com/rtfd/readthedocs.org.git

######### install the dependencies using pip (included inside of virtualenv)#########
## this may take a wile
cd readthedocs.org
pip install -r requirements.txt

## build your database
python manage.py migrate

## create a superuser account for Django: admin/qaz
python manage.py createsuperuser

##  load in a couple users and a test project
python manage.py loaddata test_data

## start the webserver
python manage.py runserver ip:8000

curl http://127.0.0.1:8000/
curl http://127.0.0.1:8000/admin

################### How to start when reboot################################
# cd /home/liulin/readthedocs/rtd
# source bin/activate
#
# cd /home/liulin/readthedocs/rtd/checkouts/readthedocs.org
# python manage.py runserver
#############################################################################
#
##################### Question ########################
# 1. curl http://127.0.0.1:8000 可以访问,但是 curl ip:8000无法访问
# 解决:https://docs.readthedocs.io/en/latest/custom_installs/local_rtd_vm.html
# 
# 2. 如何后台启动
############################################################


以上是关于Read The Docs搭建的主要内容,如果未能解决你的问题,请参考以下文章

环境初始化 Build and Install the Apache Thrift IDL Compiler Install the Platform Development Tools(代码片段

read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20) { errno: -4077(代码片段

maven web项目的web.xml报错The markup in the document following the root element must be well-formed.(代码片段

What's the difference between @Component, @Repository & @Service annotations in Spring?(代码片段

Vue报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object 的解决方法(代码片段

angularjs Failed to read the 'selectionStart' property from 'HTMLInputElement':(示例代码