当前位置:网站首页>Raspberry pie 4B deploys lnmp+tor and builds a website on dark web
Raspberry pie 4B deploys lnmp+tor and builds a website on dark web
2022-07-03 10:24:00 【Shenzhen University of technology affiliated middle school open】
Raspberry pie 4b Deploy LNMP+Tor, Set up in Dark web On the website
Preparation before start
You need to have :
- A computer
- Raspberry pie 4b And its necessary accessories
- Putty
- Winscp
- Public network IP
We should ensure that we can access the Internet scientifically
System
download Raspberry Pi OS
Go to Raspberry pie website download Raspberry Pi OS
What I choose here is Raspberry Pi OS Lite, If it is the other two, it will not affect
Burn into TF card
Go to Balena.io download Etcher Tools
install
Burning system ( Remember to run as an administrator )
Wait quietly for the burning to complete
SSH
Open the raspberry pie SSH function
Just burning the system TF card (boot disc ) Create a new one without suffix SSH file
use Putty Connect the raspberry pie
open Putty, Connect the raspberry pie
Log in with the default account password
account number pi
password raspberry
modify SSH Password and enable root SSH Sign in
modify pi password
sudo passwd pi
Empathy , modify root password , Enable root And open ssh Sign in
sudo passwd root
sudo passwd --unlock root
sudo sed -i "s/^#PermitRootLogin.*/PermitRootLogin yes/g" /etc/ssh/sshd_config
sudo systemctl restart ssh
sudo cp ~/.bashrc /root/.bashrc
Deploy LNMP
install Nginx and PHP7
Install package
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nginx php7.3-fpm php7.3-cli php7.3-curl php7.3-gd php7.3-cgi
sudo service nginx start
sudo service php7.3-fpm restart
After successful installation, you can http:// Raspberry pie IP/ Access to the Nginx Default page for
Nginx The root of /var/www/html
Give Way Nginx Can deal with PHP
sudo nano /etc/nginx/sites-available/default
Add the following
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
Replace with
location / {
index index.html index.htm index.php default.html default.htm default.php;
}
location ~\.php$ {
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
preservation
Ctrl + O
Enter
sign out
Ctrl + X
restart Nginx
sudo service nginx restart
Installation configuration MySQL
Install package
sudo apt-get install mariadb-server-10.0
change Mysql password
mysql
use mysql;
update user set plugin='mysql_native_password' where user='root';
UPDATE user SET password=PASSWORD(' The password you want to set ') WHERE user='root';
flush privileges;
exit;
restart Mysql service
service mysql restart
Install and deploy Tor service
install Tor
sudo apt-get install tor
Tor The root of /etc/tor
To configure Hidden Service obtain Onion domain name
edit /etc/tor/torrc
sudo nano /etc/tor/torrc
Find out , Get rid of the front # Number
############### This section is just for location-hidden services ###
## Once you have configured a hidden service, you can look at the
## contents of the file ".../hidden_service/hostname" for the address
## to tell people.
##
## HiddenServicePort x y:z says to redirect requests on port x to the
## address y:z.
HiddenServiceDir /var/lib/tor/hidden_service/ //hidden service The catalog of
HiddenServicePort 80 127.0.0.1:80 //HTTP The server IP, port
#HiddenServiceDir /var/lib/tor/other_hidden_service/
#HiddenServicePort 80 127.0.0.1:80
#HiddenServicePort 22 127.0.0.1:22
preservation
Ctrl + O
Enter
sign out
Ctrl + X
restart Tor service
killall tor
sudo -u debian-tor tor
Waiting to start , The first startup takes a long time , To ensure smooth network
Just display the following
[notice] Bootstrapped 100%: Done
obtain Onion domain name
Default in /var/lib/tor/hidden_service/hostname
cd /var/lib/tor/hidden_service/
cat hostname
Modify the permissions
modify /var/www Folder permissions
sudo chown -R debian-tor:www-data /var/www
Restart again Tor service
killall tor
sudo -u debian-tor tor
Visit website
Download and install Tor browser , He said a few
Connected to the Tor service , Access the obtained Onion domain name
complete
Reference material
SSH——https://www.jianshu.com/p/654ee08d2b3a
LNMP——https://shumeipai.nxez.com/2020/03/21/install-pi-dashboard-with-nginx-php73-on-pi.html
Tor
——https://blog.csdn.net/kEnnponN/article/details/82662445
——https://blog.csdn.net/weixin_30721899/article/details/98115671?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control
——https://tor.stackexchange.com/questions/14863/var-lib-tor-is-not-owned-by-this-user-root-0-but-by-debian-tor-110
——https://askubuntu.com/questions/833021/could-not-bind-to-127-0-0-19050-address-already-in-use-is-tor-already-running
Authority modification ——https://zhidao.baidu.com/question/94171636.html
边栏推荐
- LeetCode - 703 数据流中的第 K 大元素(设计 - 优先队列)
- Codeup: word replacement
- 20220609 other: most elements
- Hands on deep learning pytorch version exercise solution - 2.6 probability
- 20220607其他:两整数之和
- Advantageous distinctive domain adaptation reading notes (detailed)
- 『快速入门electron』之实现窗口拖拽
- openCV+dlib實現給蒙娜麗莎換臉
- Modelcheckpoint auto save model
- Leetcode-100:相同的树
猜你喜欢
波士顿房价预测(TensorFlow2.9实践)
Secure in mysql8.0 under Windows_ file_ Priv is null solution
Hands on deep learning pytorch version exercise solution - 2.3 linear algebra
Leetcode - the k-th element in 703 data flow (design priority queue)
LeetCode 面试题 17.20. 连续中值(大顶堆+小顶堆)
Leetcode-112:路径总和
LeetCode - 895 最大频率栈(设计- 哈希表+优先队列 哈希表 + 栈) *
LeetCode - 705 设计哈希集合(设计)
Opencv feature extraction sift
LeetCode - 900. RLE iterator
随机推荐
Discrete-event system
[combinatorics] combinatorial existence theorem (three combinatorial existence theorems | finite poset decomposition theorem | Ramsey theorem | existence theorem of different representative systems |
20220609 other: most elements
Octave instructions
LeetCode - 705 设计哈希集合(设计)
『快速入门electron』之实现窗口拖拽
Neural Network Fundamentals (1)
LeetCode - 1670 設計前中後隊列(設計 - 兩個雙端隊列)
What can I do to exit the current operation and confirm it twice?
【C 题集】of Ⅵ
Leetcode-106: construct a binary tree according to the sequence of middle and later traversal
3.3 Monte Carlo Methods: case study: Blackjack of Policy Improvement of on- & off-policy Evaluation
20220603 Mathematics: pow (x, n)
openCV+dlib实现给蒙娜丽莎换脸
LeetCode - 900. RLE iterator
Advantageous distinctive domain adaptation reading notes (detailed)
Dictionary tree prefix tree trie
CV learning notes alexnet
[LZY learning notes -dive into deep learning] math preparation 2.1-2.4
2018 Lenovo y7000 black apple external display scheme