-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Removed $ before shell commands in docs #4699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,23 +7,23 @@ Assumptions and Prerequisites | |
* Debian VM provisioned with python 2.7.x | ||
* All python dependencies and setup tools are installed :: | ||
|
||
$ sudo apt-get install python-setuptools | ||
$ sudo apt-get install build-essential | ||
$ sudo apt-get install python-dev | ||
$ sudo apt-get install libevent-dev | ||
$ sudo easy_install pip | ||
sudo apt-get install python-setuptools | ||
sudo apt-get install build-essential | ||
sudo apt-get install python-dev | ||
sudo apt-get install libevent-dev | ||
sudo easy_install pip | ||
|
||
* Git :: | ||
|
||
$ sudo apt-get install git | ||
sudo apt-get install git | ||
|
||
* Git repo is ``git.corp.company.com:git/docs/documentation.git`` | ||
* Source documents are in ``../docs/source`` | ||
* Sphinx :: | ||
|
||
$ sudo pip install sphinx | ||
sudo pip install sphinx | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The same problem occurs here |
||
|
||
.. note:: Not using sudo may prevent access. “error: could not create '/usr/local/lib/python2.7/dist-packages/markupsafe': Permission denied” | ||
.. note:: Not using sudo may prevent access. “error: could not create '/usr/local/lib/python2.7/dist-packages/markupsafe': Permission denied” | ||
|
||
Local RTD Setup | ||
--------------- | ||
|
@@ -33,40 +33,40 @@ Install RTD | |
|
||
To host your documentation on a local RTD installation, set it up in your VM. :: | ||
|
||
$ mkdir checkouts | ||
$ cd checkouts | ||
$ git clone https://github.com/rtfd/readthedocs.org.git | ||
$ cd readthedocs.org | ||
$ sudo pip install -r requirements.txt | ||
mkdir checkouts | ||
cd checkouts | ||
git clone https://github.com/rtfd/readthedocs.org.git | ||
cd readthedocs.org | ||
sudo pip install -r requirements.txt | ||
|
||
Possible Error and Resolution | ||
````````````````````````````` | ||
|
||
**Error**: ``error: command 'gcc' failed with exit status 1`` | ||
|
||
**Resolution**: Run the following commands. :: | ||
|
||
$ sudo apt-get update | ||
$ sudo apt-get install python2.7-dev tk8.5 tcl8.5 tk8.5-dev tcl8.5-dev libxml2-devel libxslt-devel | ||
$ sudo apt-get build-dep python-imaging --fix-missing | ||
sudo apt-get update | ||
sudo apt-get install python2.7-dev tk8.5 tcl8.5 tk8.5-dev tcl8.5-dev libxml2-devel libxslt-devel | ||
sudo apt-get build-dep python-imaging --fix-missing | ||
|
||
On Debian 8 (jessie) the command is slightly different :: | ||
|
||
$ sudo apt-get update | ||
$ sudo apt-get install python2.7-dev tk8.5 tcl8.5 tk8.5-dev tcl8.5-dev libxml2-dev libxslt-dev | ||
$ sudo apt-get build-dep python-imaging --fix-missing | ||
sudo apt-get update | ||
sudo apt-get install python2.7-dev tk8.5 tcl8.5 tk8.5-dev tcl8.5-dev libxml2-dev libxslt-dev | ||
sudo apt-get build-dep python-imaging --fix-missing | ||
|
||
Also don't forget to re-run the dependency installation :: | ||
|
||
$ sudo pip install -r requirements.txt | ||
sudo pip install -r requirements.txt | ||
|
||
Configure the RTD Server and Superuser | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
1. Run the following commands. :: | ||
|
||
$ ./manage.py migrate | ||
$ ./manage.py createsuperuser | ||
./manage.py migrate | ||
./manage.py createsuperuser | ||
|
||
2. This will prompt you to create a superuser account for Django. Enter appropriate details. For example: :: | ||
|
||
|
@@ -79,8 +79,8 @@ RTD Server Administration | |
|
||
Navigate to the ``../checkouts/readthedocs.org`` folder in your VM and run the following command. :: | ||
|
||
$ ./manage.py runserver [VM IP ADDRESS]:8000 | ||
$ curl -i http://[VM IP ADDRESS]:8000 | ||
./manage.py runserver [VM IP ADDRESS]:8000 | ||
curl -i http://[VM IP ADDRESS]:8000 | ||
|
||
You should now be able to log into the admin interface from any PC in your LAN at ``http://[VM IP ADDRESS]:8000/admin`` using the superuser account created in django. | ||
|
||
|
@@ -92,7 +92,7 @@ Go to the dashboard at ``http://[VM IP ADDRESS]:8000/dashboard`` and follow the | |
3. Navigate to the root path for documentation. | ||
4. Run the following Sphinx commands. :: | ||
|
||
$ make html | ||
make html | ||
|
||
This generates the HTML documentation site using the default Sphinx theme. Verify the output in your local documentation folder under ``../build/html`` | ||
|
||
|
@@ -107,29 +107,29 @@ Possible Error and Resolution | |
|
||
1. In your machine, navigate to the ``.ssh`` folder. :: | ||
|
||
$ cd .ssh/ | ||
$ cat id_rsa | ||
cd .ssh/ | ||
cat id_rsa | ||
|
||
2. Copy the entire Private Key. | ||
3. Now, SSH to the VM. | ||
4. Open the ``id_rsa`` file in the VM. :: | ||
|
||
$ vim /home/<username>/.ssh/id_rsa | ||
vim /home/<username>/.ssh/id_rsa | ||
|
||
5. Paste the RSA key copied from your machine and save file (``Esc``. ``:wq!``). | ||
|
||
**Workaround 2** | ||
**Workaround 2** | ||
|
||
SSH to the VM using the ``-A`` directive. :: | ||
|
||
$ ssh document-vm -A | ||
ssh document-vm -A | ||
|
||
This provides all permissions for that particular remote session, which are revoked when you logout. | ||
|
||
Build Documentation on Local RTD Instance | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Log into ``http://[VM IP ADDRESS]:[PORT]`` using the django superuser creds and follow these steps. | ||
Log into ``http://[VM IP ADDRESS]:[PORT]`` using the django superuser creds and follow these steps. | ||
|
||
For a new project | ||
````````````````` | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here