-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
## examples | ||
`mail` list local mails | ||
`rm /var/mail/username` to delete mails queue | ||
`mail [email protected]` to send email |
This file contains 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
## examples | ||
``` | ||
<?php | ||
mail('[email protected]', 'subject', 'Hi body!'); | ||
?> | ||
``` |
This file contains 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Shell | ||
|
||
## Summary | ||
- [Install](Install) | ||
- [Configuration](Configuration) | ||
|
||
## Install | ||
`sudo apt install mongodb` | ||
|
||
> The data directory /var/lib/mongodb and the log directory /var/log/mongodb are created during the installation. | ||
> By default, MongoDB runs using the mongodb user account. If you change the user that runs the MongoDB process, you must also modify the permission to the data and log directories to give this user access to these directories. | ||
> - [Source](https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/) | ||
## Init System | ||
`sudo systemctl start mongod` | ||
|
||
> If you receive an error similar to the following when starting mongod: | ||
> Failed to start mongod.service: Unit mongod.service not found. | ||
> Run the following command first: | ||
`sudo systemctl daemon-reload` | ||
> Then run the start command above again. | ||
> - [Source](https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/) | ||
Doesn’t work anyway, … | ||
|
||
### Another solution | ||
Create file `/etc/systemd/system/mongodb.service` | ||
And put this code inside: | ||
``` | ||
[Unit] | ||
Description=High-performance, schema-free document-oriented database | ||
After=network.target | ||
[Service] | ||
User=mongodb | ||
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf | ||
[Install] | ||
WantedBy=multi-user.target | ||
``` | ||
[Source](https://askubuntu.com/questions/770054/mongodb-3-2-doesnt-start-on-lubuntu-16-04-lts-as-a-service/770133#770133) | ||
|
||
## Configuration | ||
|
||
### Configuration File | ||
> The official MongoDB package includes a configuration file (/etc/mongod.conf). | ||
> - [Source](https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/) |
This file contains 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Postfix | ||
|
||
## Configuration | ||
`/etc/postfix/main.cf` | ||
|
||
## alias | ||
|
||
## domain |
This file contains 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# sendmail | ||
|
||
## Examples | ||
`sendmail [email protected]` send the mail until `.` is written |