FFMPEG Toolkit

之前开源的安装脚本

FFMPEGToolkit is a free and 100% open source software completely written in bash shell script.
The purpose of this script is to build a video streaming platform in your Gnu/Linux server (CentOS 7.*).

So you can start video streaming websites and avoid the cost of installations. This script not only install ffmpeg but also all its friends packages. You can chose this script for building platform for most of the youtube clone softwares like clip-shre, sharemixer,shareigniter,etc,.

特地建立了一个官方网站
https://www.ffmpegtoolkit.com/

最近通过搜索访问本文章的关键词:

数据惊魂

昨天手快
有个实例需要rebuild做开发测试
结果不小心点到排序 那个机器跑下面去了 然后我也没注意 继续点下去了

重新安装系统
1. 是需要勾选同意 I agree that this will immediately DESTROY my server and all data
2. 在输入一次账户密码进行确认
如图

继续阅读数据惊魂

NGINX Config Random Redirect / Nginx 301 多url 负载转向

测试

最近通过搜索访问本文章的关键词:

nginx upstream RR的问题

谁知道这个问题?

upstream backend {
server backend1.example.com;
server backend2.example.com;
server backup1.example.com:8080 backup;
}

然后设置了 proxy_next_upstream 的参数

这种情况下
如果backend1.example.com 挂了
NGINX的round-robin balancing 模式
到底是使用backend2.example.com 还是 backup1.example.com 这个标记了backup的服务器?

知道的能告诉我下?

Clear RDP History in Windows

The history list size is capped at 10 entries. The history items are stored in
[HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default] as entries MRU0 through MRU9. Creating an MRU10 entry will not create an 11th history entry.

run
regedit
search Terminal Server Client

科普DNS解析记录 中的301/302 转向

看见有人问 就回复了下原理 算比较清晰吧?


按理来说,应该 是 DNS 做跳转要比服务器高效吧?
例如:
使用 DNS 跳转(从 x.com 跳转到 www.x.com )
1 )客户端》 DNS 》 301 》 DNS 》目标
使用 服务器 跳转(从 x.com 跳转到 www.x.com )
2 )客户端》 DNS 》服务器》 301 》 DNS 》目标


1 和 2 其实是一样
不同的地方
1 是使用 DNS 解析服务商的服务器
2 是使用你自己的服务器

按你的要求
xxx.com 转到 www.xxx.com

Apache 使用.htaccess (支持 HTTP 和 HTTPS )

改为你的域名 上传到网站根目录 .htaccess 即可 如果 Win 系统 不支持.htaccess 这种文件名文件
可以保存为 htaccess.txt FTP 上传后修改即可

nginx 可以这样做
单域名

正则匹配到不带 www 的 强制转向所有域名

DNS 的标准解析协议 并没 301/302 redirect 这种解析标准
DNS 服务商提供给你的转向服务
是在 你的 DNS 记录 加一条 A 记录 @ A 1.1.1.1
只是这个记录你看不到 这个 1.1.1.1
就是 DNS 服务商的服务器 IP 你域名解析过去了 他在服务器处理 抓取你设置的转向地址

可以添加 log 或者 track 做请求的统计分析 知道转发请求了多少什么的

最近通过搜索访问本文章的关键词:

force file download in the browser, nginx server

You just need to return HTTP header Content-disposition:

location ~* /orig/(.+\.jpg)$ {
internal;
add_header Content-disposition "attachment; filename=$1";
}

Or
location ~* (.*\.pdf) {
types { application/octet-stream .pdf; }
default_type application/octet-stream;
}

Or full
server{
listen 80;
server_name test.localhost;
location / {
root /Users/vasil/test;
if ($request_filename !~* ^.*?\.(jpg)|(png)|(gif)){
add_header Content-Disposition: "$request_filename";
}
}
}

Allow only CloudFlare CDN IPs

sudo apt-get install ipset
ipset create cf hash:net
#Now populate the set with CloudFlare IP ranges:
for x in $(curl https://www.cloudflare.com/ips-v4); do ipset add cf $x; done
#You can use the 'cf' set now in a iptables rule like so:
iptables -A INPUT -m set --match-set cf src -p tcp -m multiport --dports http,https -j ACCEPT
#Disallow direct connecting to your server IP:
iptables -A INPUT -p tcp --dport http -j DROP
iptables -A INPUT -p tcp --dport https -j DROP

EDM

If someone wants to start an Email Service Provider, then you need:

Server Side:

– PowerMTA as Mail Server with all validations [DMARC, SPF, DKIM, Domainkeys]
– IPs registration in Major ISPs to forward Spam Complaints to your Interspire Installation to prevent decrease your IP Reputation and increase the Inbox ratio
– OS: CentOS 6.x, 64 bits
– IPs: minimum 64 IPs

Frontend Side:

– Interspire Email Marketer
– [Addon] Multithreading: To speed up the sending process
– [Addon] Multiple MTA with IP Monitor: To use all your Virtual MTAs created in PowerMTA
– [Addon] Feedback Loops: To process all the Spam Complaints received and remove from System.

PS: dont use cracked/nulled Interspire Addons. The original addons is available in the original website: maborak dot com

How to setup multiple outgoing IPs in Exim MTA server

Below were the steps made to resolve the above email problem:

1. Login your mail server through ssh or console, if you have physical access.
2. Edit your mailips file located in /etc directory:

1
sudo vi /etc/mailips
3. Your mailips should look like the format below:

# Domain : IP
# Route specific domain to an IP
seoroot.com : 198.23.111.25
# All outgoing domain emails to specific IP, except for compromised domains
* : 1.2.3.4
# All compromised domains
domain1 : 127.0.0.1
domain2 : 127.0.0.1

service exim restart
That’s about it! You should have your new mailips in effect already. Do send a test mail and check that you have your email in your inbox.

Feel free to drop me an email/comment below for help and suggestions/tips.

mysqldump error output: mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table

mysqldump error output: mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table

大mysql数据库备份会出现这个问题

加大配置文件
[mysqld]
wait_timeout = 86400
max_allowed_packet=32M
innodb_buffer_pool_size=1G

重启动
sudo service mysql restart

或者
mysqldump –socket=/var/lib/mysql/mysql.sock admin_stats | gzip -c > data.sql.gz
mysqldump –skip-extended-insert –max_allowed_packet=10240M admin_stats>stats.sql

这样也可以 但是好像如果在大无法解决