File Template
本文最后更新于 193 天前,其中的信息可能已经有所发展或是发生改变。

Systemctl

/etc/systemd/system/XXXXX.service

[Unit]
Description=XXXXX

[Service]
Type=simple
User=root
WorkingDirectory=/
ExecStart=[shell]
Restart=always
RestartSec=1
StartLimitIntervalSec=0

[Install]
WantedBy=multi-user.target

systemctl daemon-reload

Apache2

a2enmod ssl
a2enmod rewrite
a2enmod proxy proxy_balancer proxy_http
systemctl restart apache2

/etc/apache2/ports.conf

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 80
#Listen 8080
<IfModule ssl_module>
        Listen 443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 443
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

/etc/apache2/sites-enabled/000-default.conf

<VirtualHost *:80>
	ServerAdmin jbnrz@localhost
	DocumentRoot /var/www/html
	ServerName jbnrz.com.cn

	RewriteEngine on
        RewriteCond   %{HTTPS} !=on
        RewriteRule   ^(.*)  https://%{SERVER_NAME}$1 [L,R]
	RemoteIPProxyProtocol on
	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<VirtualHost *:443>
        ServerAdmin jbnrz@localhost
        DocumentRoot /var/www/html	

        ServerName jbnrz.com.cn
        #启用 SSL 功能
        SSLEngine on
        #证书文件的路径
        SSLCertificateFile /home/jbnrz/ssl/jbnrz.com.cn.crt
        #私钥文件的路径
        SSLCertificateKeyFile /home/jbnrz/ssl/jbnrz.com.cn.key
        #证书链文件的路径
        SSLCertificateChainFile /home/jbnrz/ssl/root_bundle.crt
        RemoteIPProxyProtocol on
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        <Directory "/var/www/html">
		Options FollowSymLinks     
	</Directory>

</VirtualHost>

pip.ini

[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn

apt

Ubuntu 20.04
/etc/apt/sources.list

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse

# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

Clash

/home/username/.config/clash/

config.yaml 从 windows 导出

Country.mmdb 从 https://github.com/esrrhs/pingtunnel/blob/master/GeoLite2-Country.mmdb 下载

Ubuntu vmware tools Install

换源

apt --purge remove open-vm-tools-desktop 
apt --purge remove open-vm-tools

apt install open-vm-tools-desktop

frpc/frps

frpc.ini

[common]
tls_enable = true
server_addr = ip
server_port = 7000
token = token

[test web]
type = tcp
local_ip = 127.0.0.1 
local_port = 80 
remote_port = 80

frps.ini

[common]
bind_port = 7000
dashboard_addr = 0.0.0.0
dashboard_port = 1234
dashboard_user = user
dashboard_pwd = pwd
enable_prometheus = true
pprof_enable = true
token = token

Ping

关闭:echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all
开启:echo 0 >/proc/sys/net/ipv4/icmp_echo_ignore_all
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇