Table of Contents
切换到root账号
设置root密码
Debian安装宝塔面板
开启DEBIAN9 BBR
安装v2ray服务器:官方脚本
Home Topics Pagoda Panel How to install Pagoda panel and configure v2ray server in Debian

How to install Pagoda panel and configure v2ray server in Debian

Aug 12, 2021 pm 02:20 PM
rear end

本文由宝塔面板教程栏目给大家介绍Debian如何安装宝塔面板、如何开启DEBIAN9 BBR以及如何安装v2ray服务器,希望对需要的你有所帮助!

宝塔面板+V2RAY

切换到root账号

sudo -i
Copy after login

设置root密码

passwd
Copy after login

Debian安装宝塔面板

BT面板官方安装脚本:(Debian系统)

wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh
Copy after login

Centos安装

yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
Copy after login

如下图就安装成功了。

How to install Pagoda panel and configure v2ray server in Debian

根据上面提示的地址和密码登录你的宝塔面板
安装Nginx/Sql/或是其他你需要的运行环境软件

How to install Pagoda panel and configure v2ray server in Debian

因为有时候debian不能急速安装,一般是编译安装,所以速度慢的奇葩!!若是真心是建站需求的话,推荐使用CENTOS7以上的系统,那样安装运行环境很急速的!一般10分钟内全部搞定

开启DEBIAN9 BBR

  echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
  echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
  sysctl -p
  sysctl net.ipv4.tcp_available_congestion_control
  lsmod | grep bbr
Copy after login

安装v2ray服务器:官方脚本

bash <p>如果提示 curl: command not found ,那是因为你的 VPS 没装 Curl<br>ubuntu/debian系统安装 Curl 方法</p><pre class="brush:php;toolbar:false">apt-get update -y && apt-get install curl -y
Copy after login

centos系统安装 Curl 方法

yum update -y && yum install curl -y
Copy after login

vi /etc/v2ray/config.json V2RAY服务器的配置文件如下:(下面代码可以直接覆盖源文件代码)

  {
   "inbounds": [{
   "port": 65432, //此处为安装时生成的端口,可修改随意,但是保证和下面提到的端口号相同
   "listen":"127.0.0.1",
   "protocol": "vmess",
   "settings": {
   "clients": [
   {
   "id": "xxxxxxxxx", //此处为安装时生成的id
   "level": 1,
   "alterId": 64 //此处为安装时生成的alterId
   }
   ]
   },
   "streamSettings": {
   "network": "ws",
   "wsSettings": {
   "path": "/SoftDown" //此处为路径,需要和下面NGINX上面的路径配置一样
   }
   }
   }],
   "outbounds": [{
   "protocol": "freedom",
   "settings": {}
   },{
   "protocol": "blackhole",
   "settings": {},
   "tag": "blocked"
   }],
   "routing": {
   "rules": [
   {
   "type": "field",
   "ip": ["geoip:private"],
   "outboundTag": "blocked"
   }
   ]
   }
  }
Copy after login

设置为开机自动启动

  1. systemctl enable v2ray

启动v2ray服务

  1. systemctl start v2ray

自动签发SSL证书,并强制开启HTTPS
How to install Pagoda panel and configure v2ray server in Debian

配置站点的nginx

  location /SoftDown {
  proxy_redirect off;
  proxy_pass http://127.0.0.1:65432;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";
  proxy_set_header Host $http_host;
  }
Copy after login
  • 宝塔配置文件

How to install Pagoda panel and configure v2ray server in Debian

server{
    listen 80;
    listen 443 ssl http2;
    server_name v-hk.yuezl.top;
    index index.php index.html index.htm default.php default.htm default.html;
    root /www/wwwroot/v-hk.yuezl.top;
    
    #SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
    #error_page 404/404.html;
    #HTTP_TO_HTTPS_START
    if ($server_port !~ 443){
        rewrite ^(/.*)$ https://$host$1 permanent;
    }
    #HTTP_TO_HTTPS_END
    ssl_certificate    /www/server/panel/vhost/cert/v-hk.yuezl.top/fullchain.pem;
    ssl_certificate_key    /www/server/panel/vhost/cert/v-hk.yuezl.top/privkey.pem;
    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 10m;
    error_page 497  https://$host$request_uri;

    #SSL-END
    
    #ERROR-PAGE-START  错误页配置,可以注释、删除或修改
    error_page 404 /404.html;
    #error_page 502 /502.html;
    #ERROR-PAGE-END
    
    #PHP-INFO-START  PHP引用配置,可以注释或修改
    include enable-php-74.conf;
    #PHP-INFO-END
    
    #REWRITE-START URL重写规则引用,修改后将导致面板设置的伪静态规则失效
    include /www/server/panel/vhost/rewrite/v-hk.yuezl.net.conf;
    #REWRITE-END
    
    #禁止访问的文件或目录
    location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
    {
        return 404;
    }
    
    #一键申请SSL证书验证目录相关设置
    location ~ \.well-known{
        allow all;
    }
    
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
        expires      30d;
        error_log off;
        access_log /dev/null;
    }
    
    location ~ .*\.(js|css)?$
    {
        expires      12h;
        error_log off;
        access_log /dev/null; 
    }
    access_log  /www/wwwlogs/v-hk.yuezl.top.log;
    error_log  /www/wwwlogs/v-hk.yuezl.top.error.log;
    location / {
      proxy_redirect off;
      proxy_pass http://127.0.0.1:56629;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_set_header Host $http_host;
      # Show realip in v2ray access.log
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}
Copy after login

更多宝塔面板相关知识,请访问宝塔面板教程栏目!

The above is the detailed content of How to install Pagoda panel and configure v2ray server in Debian. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Detailed graphic explanation of the memory and GC of the Node V8 engine Detailed graphic explanation of the memory and GC of the Node V8 engine Mar 29, 2023 pm 06:02 PM

This article will give you an in-depth understanding of the memory and garbage collector (GC) of the NodeJS V8 engine. I hope it will be helpful to you!

An article about memory control in Node An article about memory control in Node Apr 26, 2023 pm 05:37 PM

The Node service built based on non-blocking and event-driven has the advantage of low memory consumption and is very suitable for handling massive network requests. Under the premise of massive requests, issues related to "memory control" need to be considered. 1. V8’s garbage collection mechanism and memory limitations Js is controlled by the garbage collection machine

A brief analysis of the problem that the server cannot be remote after installing Pagoda A brief analysis of the problem that the server cannot be remote after installing Pagoda Nov 23, 2022 pm 04:56 PM

This article uses the Pagoda Panel Tutorial column to introduce to you the problem that server2022 cannot be remote after installing Pagoda. I wonder if you have encountered such a problem? Let me show you how I handle it!

A brief analysis of closures in Golang A brief analysis of closures in Golang Nov 21, 2022 pm 08:36 PM

A closure is a combination of a function and a reference to its bundled surrounding environment (lexical environment). In other words, closures allow developers to access the scope of an outer function from an inner function. Closures are created when the function is created.

Why is count(*) so slow? Cause Analysis Why is count(*) so slow? Cause Analysis Jan 05, 2023 pm 09:21 PM

Why is count(*) so slow? The following article will analyze the reasons for you and talk about the execution process of count(*). I hope it will be helpful to everyone!

12 points to note when sharing interface design documents 12 points to note when sharing interface design documents Apr 24, 2023 am 10:58 AM

Recently, when I was reviewing the interface document, I found that the parameter defined by a small partner was an enumeration value, but the interface document did not give the corresponding specific enumeration value. In fact, how to write interface documents well is really important. Today, Brother Tianluo brings you 12 points to pay attention to in interface design documents~

In-depth understanding of generics in golang (Generic) In-depth understanding of generics in golang (Generic) Apr 11, 2023 pm 07:20 PM

What this article brings to you is an in-depth understanding of generics in golang? How to use generics? It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

How to compress large text storage in MySQL How to compress large text storage in MySQL Feb 02, 2023 pm 08:23 PM

Conduct a simple investigation on MySQL large text data storage and compress the data at the expense of some CPU resources so that the data takes up less space, thereby reducing disk I/O and network I/O.

See all articles