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
3. If you encounter a "permission denied" error on the above command, research the error message. If there isn't an explicit reason given, confirm that your [Github SSH key is configured correctly][github-ssh-instructions]. You will need to associate your [public SSH key][ssh-key] with your GitHub account, otherwise if you set up a SSH key and don't associate it with your GitHub account, you will receive this "permission denied" error.
70
-
71
-
4. To receive updates, you will create an `upstream-master` branch to track the Rapid7 remote repository, alongside your `master` branch which will point to your personal repository's fork:
68
+
* If you encounter a "permission denied" error on the above command, research the error message. If there isn't an explicit reason given, confirm that your [Github SSH key is configured correctly][github-ssh-instructions]. You will need to associate your [public SSH key][ssh-key] with your GitHub account, otherwise if you set up a SSH key and don't associate it with your GitHub account, you will receive this "permission denied" error.
69
+
* To receive updates, you will create an `upstream-master` branch to track the Rapid7 remote repository, alongside your `master` branch which will point to your personal repository's fork:
5. Configure your Github username, email address, and username. Ensure your `user.email` matches the email address you registered with your Github account.
77
+
* Configure your Github username, email address, and username. Ensure your `user.email` matches the email address you registered with your Github account.
6. Set up [msftidy] to run before each `git commit` and after each `git merge` to quickly identify potential issues with your contributions:
85
+
* Set up [msftidy] to run before each `git commit` and after each `git merge` to quickly identify potential issues with your contributions:
88
86
89
87
```bash
90
88
cd~/git/metasploit-framework
@@ -129,27 +127,83 @@ Congratulations! You have now set up a development environment and the latest ve
129
127
130
128
## Optional: Set up the REST API and PostgreSQL database
131
129
132
-
The following optional section describes how to manually install PostgreSQL and set up the Metasploit database. Alternatively, use our Omnibus installer which handles this more reliably.
130
+
Installing the REST API and PostgreSQL is optional, and can be done in two ways.
131
+
Recommended is to use the Docker approach, and fairly simple to do once you have docker installed on your
132
+
system, [Docker Desktop][docker-desktop] is recommended, but not mandatory.
133
+
On Linux systems, simply having docker-cli is sufficient.
134
+
135
+
### Docker Installation
136
+
137
+
**Make sure, you have docker available on your system: [Docker Installation Guide][docker-installation]**
133
138
134
-
1. Confirm that the PostgreSQL server and client are installed:
139
+
**Note**: Depending on your environment, these commands might require `sudo`
140
+
141
+
* Pull the Docker container: `docker pull postgres:14`
142
+
* Start the container:
143
+
144
+
```bash
145
+
docker run --rm -p 127.0.0.1:5432:5432 -e POSTGRESS_PASSWORD="mysecretpassword" postgres:14
146
+
```
147
+
148
+
Wait till the container is fully running.
149
+
We need to make some changes in the container to be able to connect to it remotely using the `psql` client.
150
+
151
+
* Open a shell to the running container: `docker exec -it "postgres" bash`
sudo service postgresql start && sudo update-rc.d postgresql enable
139
195
```
140
196
141
-
2. Ensure that you are not running as the root user.
142
-
143
-
3. Initialize the Metasploit database:
197
+
* Ensure that you are not running as the root user.
198
+
* Initialize the Metasploit database:
144
199
145
200
```bash
146
201
cd~/git/metasploit-framework
147
202
./msfdb init
148
203
```
149
204
150
-
4. If you receive an error about a component not being installed, confirm that the binaries shown are in your path using the [which] and [find] commands, then modifying your [$PATH] environment variable. If it was something else, open a [new issue] to let us know what happened.
151
-
152
-
5. If the `msfdb init` command succeeds, then confirm that the database is accessible to Metasploit:
205
+
* If you receive an error about a component not being installed, confirm that the binaries shown are in your path using the [which] and [find] commands, then modifying your [$PATH] environment variable. If it was something else, open a [new issue] to let us know what happened.
206
+
* If the `msfdb init` command succeeds, then confirm that the database is accessible to Metasploit:
153
207
154
208
```bash
155
209
$ ./msfconsole -qx "db_status; exit"
@@ -272,3 +326,5 @@ Finally, we welcome your feedback on this guide, so feel free to reach out to us
0 commit comments