You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Elasticsearch is not started automatically after installation. How to start and stop Elasticsearch depends on whether your system uses SysV init or systemd (used by newer distributions). You can tell which is being used by running this command::
54
+
Elasticsearch is not started automatically after installation. How to start and stop Elasticsearch depends on whether your system uses SysV init or systemd (used by newer distributions). You can tell which is being used by running this command:
49
55
50
-
$ ps -p 1
56
+
.. prompt:: bash $
57
+
58
+
ps -p 1
51
59
52
60
**Running Elasticsearch with SysV init**
53
61
54
-
Use the ``update-rc.d command`` to configure Elasticsearch to start automatically when the system boots up::
62
+
Use the ``update-rc.d command`` to configure Elasticsearch to start automatically when the system boots up:
63
+
64
+
.. prompt:: bash $
65
+
66
+
sudo update-rc.d elasticsearch defaults 95 10
55
67
56
-
$ sudo update-rc.d elasticsearch defaults 95 10
68
+
Elasticsearch can be started and stopped using the service command:
57
69
58
-
Elasticsearch can be started and stopped using the service command::
70
+
.. prompt:: bash $
59
71
60
-
$ sudo -i service elasticsearch start
61
-
$ sudo -i service elasticsearch stop
72
+
sudo -i service elasticsearch start
73
+
sudo -i service elasticsearch stop
62
74
63
75
If Elasticsearch fails to start for any reason, it will print the reason for failure to STDOUT. Log files can be found in /var/log/elasticsearch/.
64
76
65
77
**Running Elasticsearch with systemd**
66
78
67
-
To configure Elasticsearch to start automatically when the system boots up, run the following commands::
79
+
To configure Elasticsearch to start automatically when the system boots up, run the following commands:
Also don't forget to re-run the dependency installation
58
72
59
-
Also don't forget to re-run the dependency installation ::
73
+
.. prompt:: bash $
60
74
61
-
$ sudo pip install -r requirements.txt
75
+
sudo pip install -r requirements.txt
62
76
63
77
Configure the RTD Server and Superuser
64
78
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65
79
66
-
1. Run the following commands. ::
80
+
1. Run the following commands:
67
81
68
-
$ ./manage.py migrate
69
-
$ ./manage.py createsuperuser
82
+
.. prompt:: bash $
83
+
84
+
./manage.py migrate
85
+
./manage.py createsuperuser
70
86
71
87
2. This will prompt you to create a superuser account for Django. Enter appropriate details. For example: ::
72
88
@@ -77,10 +93,12 @@ Configure the RTD Server and Superuser
77
93
RTD Server Administration
78
94
~~~~~~~~~~~~~~~~~~~~~~~~~
79
95
80
-
Navigate to the ``../checkouts/readthedocs.org`` folder in your VM and run the following command. ::
96
+
Navigate to the ``../checkouts/readthedocs.org`` folder in your VM and run the following command:
97
+
98
+
.. prompt:: bash $
81
99
82
-
$ ./manage.py runserver [VM IP ADDRESS]:8000
83
-
$ curl -i http://[VM IP ADDRESS]:8000
100
+
./manage.py runserver [VM IP ADDRESS]:8000
101
+
curl -i http://[VM IP ADDRESS]:8000
84
102
85
103
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.
86
104
@@ -90,9 +108,11 @@ Go to the dashboard at ``http://[VM IP ADDRESS]:8000/dashboard`` and follow the
2. Clone the documentation sources from Git in the VM.
92
110
3. Navigate to the root path for documentation.
93
-
4. Run the following Sphinx commands. ::
111
+
4. Run the following Sphinx commands:
112
+
113
+
.. prompt:: bash $
94
114
95
-
$ make html
115
+
make html
96
116
97
117
This generates the HTML documentation site using the default Sphinx theme. Verify the output in your local documentation folder under ``../build/html``
98
118
@@ -105,24 +125,30 @@ Possible Error and Resolution
105
125
106
126
**Workaround-1**
107
127
108
-
1. In your machine, navigate to the ``.ssh`` folder. ::
128
+
1. In your machine, navigate to the ``.ssh`` folder:
109
129
110
-
$ cd .ssh/
111
-
$ cat id_rsa
130
+
.. prompt:: bash $
131
+
132
+
cd .ssh/
133
+
cat id_rsa
112
134
113
135
2. Copy the entire Private Key.
114
136
3. Now, SSH to the VM.
115
-
4. Open the ``id_rsa`` file in the VM. ::
137
+
4. Open the ``id_rsa`` file in the VM:
138
+
139
+
.. prompt:: bash $
116
140
117
-
$ vim /home/<username>/.ssh/id_rsa
141
+
vim /home/<username>/.ssh/id_rsa
118
142
119
143
5. Paste the RSA key copied from your machine and save file (``Esc``. ``:wq!``).
120
144
121
145
**Workaround 2**
122
146
123
-
SSH to the VM using the ``-A`` directive. ::
147
+
SSH to the VM using the ``-A`` directive:
148
+
149
+
.. prompt:: bash $
124
150
125
-
$ ssh document-vm -A
151
+
ssh document-vm -A
126
152
127
153
This provides all permissions for that particular remote session, which are revoked when you logout.
0 commit comments