Copy sparse directory over ssh
scp can copy directory over ssh, but sparse parameter is not supported (unlike cp).
To efficiently copy directory with sparse files, use tar and ssh instead.
# Copy "images" directory to remote server
tar -cvSf - images/ | ssh user@remoteHost "(cd /mnt/pve/vmdata/ ; tar -xf -)"
S – stands for sparse
tarscp.sh sc... [阅读全文]
screenrc configuration example
This is an example of .screenrc configuration file. Just for your reference.
.screenrc
# Bind F11 and F12 (NOT F1 and F2) to previous and next screen window
bindkey -k F1 prev
bindkey -k F2 next
startup_message off
# Screens
screen -t Init
screen -t Work
screen -t OpenWRT ssh -i /root/key 192.168.1.1
select 0
... [阅读全文]
Test Peer to Peer Connection Speed with iperf3
Hi! I am writing to explain how to test your network connection between your client (Windows or Linux) and another client (say, a remote server). The tool is iperf version 3.
You can find some useful explanations and examples on this French site: https://iperf.fr/ But the version stays at 2 which does not have some amazing ne... [阅读全文]
FreeRadius3 of CentOS7: [sql] = notfound
lesca | CentOS, Troubleshoot | 2015-03-04
Problem
(0) sql : expand: "%{User-Name}" -> 'demo'
(0) sql : SQL-User-Name set to 'demo'
rlm_sql (sql): Reserved connection (4)
(0) sql : expand: "SELECT id, username, attribute, value, op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id" -> 'SELECT id, username, attribute, value, op FROM radchec... [阅读全文]
加速WEB访问:使用DNSmasq与squid代理并过滤广告
简介
DNSmasq是一个小巧且方便地用于配置DNS和DHCP的工具,适用于小型网络,提供了DNS功能和可选择的DHCP功能。通过其DNS缓存的功能,可以大大提高公共网络中的域名解析速度,从而提升网站访问速度。
squid代理服务提供了WEB页面缓存的功能,也可以帮助用户加速网站的访问,还能进行必要的行为管控(如禁止访问某些网站、过滤网页中的某些内容等)。本... [阅读全文]
CentOS 7 安装wordpress 权限问题
lesca | CentOS | 2014-12-23
如果你的wordpress安装目录是wordpress,则通过默认向导配置会出现权限不足的情况:
Sorry, but I can’t write the wp-config.php file.
You can create the wp-config.php manually and paste the following text into it.
或者
抱歉,但是向导在您的文件系统中没有足够的权限写入wp-config.php文件。
这时候,首先考虑wordpress文件夹的所属... [阅读全文]