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
| sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql |
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
| rick@ubuntu:~$ mysql -uroot -p | |
| Enter password: | |
| Welcome to the MySQL monitor. Commands end with ; or \g. | |
| Your MySQL connection id is 7 | |
| Server version: 5.7.17-0ubuntu0.16.04.2 (Ubuntu) | |
| Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. | |
| Oracle is a registered trademark of Oracle Corporation and/or its | |
| affiliates. Other names may be trademarks of their respective |
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
| sudo mysql_secure_installation |
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
| sudo apt-get install mysql-server |
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
| sudo apt-get update | |
| sudo apt-get install apache2 |
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
| iptables -I INPUT -p tcp -s 0.0.0.0/0 --dport 27017 -j DROP | |
| iptables -I INPUT -p tcp -s 127.0.0.1 --dport 27017 -j ACCEPT | |
| iptables -I INPUT -p tcp -s <IP GOES HERE> --dport 27017 -j ACCEPT | |
| iptables-save > /etc/iptables.conf # Save this changes to file | |
| touch /etc/network/if-up.d/iptables # Create file to call conf from | |
| echo "iptables-restore < /etc/iptables.conf" >> /etc/network/if-up.d/iptables # Add this line to this file | |
| chmod +x /etc/network/if-up.d/iptables # Make the script executable |
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
| url: `mongodb://${config.user}:${config.password}@${config.db}?authSource=admin&w=1' |
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
| mongo --port 27017 -u "username" -p "STRONG PASSWORD GENERATED" --authenticationDatabase "admin" |
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
| service mongodb restart |
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
| auth = true | |
| bind_ip = 127.0.0.1 |