Bench.sh

秋水逸冰大佬的写的Bench.sh脚本

特点

  • 显示当前测试的各种系统信息;
  • 取自世界多处的知名数据中心的测试点,下载测试比较全面;
  • 支持 IPv6 下载测速;
  • IO 测试三次,并显示平均值。

项目地址

使用

wget -qO- bench.sh | bash
#或者
curl -Lso- bench.sh | bash
#或者
wget -qO- 86.re/bench.sh | bash
#或者
curl -so- 86.re/bench.sh | bash

SuperBench.sh

老鬼大佬的SuperBench测试脚本

特点

  • 改进了显示的模式,基本参数添加了颜色,方面区分与查找。
  • I/O测试,更改了原来默认的测试的内容,采用小文件,中等文件,大文件,分别测试IO性能,然后取平均值。

速度测试替换成了 Superspeed 里面的测试,第一个默认节点是,Speedtest 默认,其他分别测试到中国电信,联通,移动,各三个不同地区的速度。

项目地址

使用

wget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash
#或者
curl -Lso- -no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superb

Zbench.sh

漏水和kirito大佬的测试脚本

特点

  • 基于SuperBench二次修改
  • 增加Ping以及路由测试功能
  • 可以生成测评报告,可以很方便地分享给其他朋友看自己的测评数据。

项目地址

使用:

#中文版
wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench-CN.sh && bash ZBench-CN.sh
#英文版
wget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench.sh && bash ZBench.sh

LemonBench.sh

LemonBench工具(别名LBench、柠檬Bench),是一款针对Linux服务器设计的服务器性能测试工具。通过综合测试,可以快速评估服务器的综合性能,为使用者提供服务器硬件配置信息。

特点

  • 服务器基础信息(CPU信息/内存信息/Swap信息/磁盘空间信息等)
  • Speedtest网速测试 (本地到最近源及国内各地域不同线路的网速)
  • 磁盘测试(4K块/1M块 直接写入测试)
  • 路由追踪测试(追踪到国内和海外不同线路的路由信息)
  • Spoofer测试(获取详细网络信息,快速判断服务器接入线路)

项目地址

使用

curl -fsSL https://ilemonrain.com/download/shell/LemonBench.sh | bash
#或者
wget -qO- https://ilemonrain.com/download/shell/LemonBench.sh | bash

 

脚本说明

  • 1:本工具默认将数据盘挂载到/www目录
  • 2:若您的服务器之前安装过Windows系统,需要手动删除NTFS分区,挂载工具会直接跳过NTFS分区
  • 3:若您的磁盘已分区,且未挂载,工具会自动将分区挂载到/www
  • 4:若您的磁盘是新磁盘,工具会自动分区并格式化成ext4文件系统
  • 5:本工具只自动挂载一个分区,若您有多块数据盘,请手动挂载未被自动挂载的磁盘
  • 6:此脚本只适用于新磁盘挂载,若数据盘已有数据请勿使用此脚本
  • 挂载命令


    1、正式版


    如果使用正式版挂载失败,可以考虑使用后面的测试版,特别是安装过Windows系统的如果遇到无法挂载数据盘的情况可以考虑使用测试版脚本。

    Centos/Fedora:
yum install wget -y && wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh
#备用:
yum install wget -y && wget -O auto_disk.sh https://raw.githubusercontent.com/wn789/www/master/auto_disk.sh && bash auto_disk.sh

Ubuntu:

wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && sudo bash auto_disk.sh
#备用:
wget -O auto_disk.sh https://raw.githubusercontent.com/wn789/www/master/auto_disk.sh && sudo bash auto_disk.sh

Debian:

wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh
#备用:
wget -O auto_disk.sh https://raw.githubusercontent.com/wn789/www/master/auto_disk.sh && bash auto_disk.sh

有了宝塔这个脚本需要挂载磁盘就方便很多楼

具体步骤如下:

评论提醒管理员需要用到server酱这个平台

具体使用看页面就很了解了

开通并使用上它,只需要一分钟:

登入:用GitHub账号登入网站,就能获得一个SCKEY(在「发送消息」页面)
绑定:点击「微信推送」,扫码关注同时即可完成绑定
发消息:往 http://sc.ftqq.com/SCKEY.send 发GET请求,就可以在微信里收到消息啦

下面就是wordpress里面的设置了,找到主题的function.php,,打开functions.php最后一行是“?>”,把下面的内容加入这一行的上面。记得替换你的 SCKEY。

//评论微信推送
function sc_send($comment_id)
{
$text = '博客上有一条新的评论';
$comment = get_comment($comment_id);
$desp = $comment->comment_content;
$key = '你的SCKEY';
$postdata = http_build_query(
array(
'text' => $text,
'desp' => $desp
)
);

$opts = array('http' =>
array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $postdata
)
);
$context = stream_context_create($opts);
return $result = file_get_contents('http://sc.ftqq.com/'.$key.'.send', false, $context);
}
add_action('comment_post', 'sc_send', 19, 2);

 

如图,
即可,

 

腾讯企业邮箱POP3/SMTP协议
接收邮件服务器:pop.exmail.qq.com (端口 110),使用SSL,端口号995
发送邮件服务器:smtp.exmail.qq.com (端口 25),使用SSL,端口号465
海外用户可使用以下服务器
接收邮件服务器:hwpop.exmail.qq.com (端口 110),使用SSL,端口号995
发送邮件服务器:hwsmtp.exmail.qq.com (端口 25),使用SSL,端口号465

腾讯企业邮箱IMAP协议
接收邮件服务器:imap.exmail.qq.com (端口 143),使用SSL,端口号993
发送邮件服务器:smtp.exmail.qq.com (端口 25),使用SSL,端口号465

海外用户可使用以下服务器
接收邮件服务器:hwimap.exmail.qq.com (端口 143),使用SSL,端口号993
发送邮件服务器:hwsmtp.exmail.qq.com (端口 25),使用SSL,端口号465

Typecho博客程序是国人开发的,虽然目前不在更新但是功能基本完善,结构看类似WORDPRESS,但是在占用资源上比WP好很多。所以Typecho用户还是非常多的。
Typecho程序的伪静态规则不同于wp直接默认可用,需要我们手工加载到空间中才可以生效。下面整理了这款程序在不同的主机环境中的伪静态规则,希望对大家有所帮助。
1、LinuxApache环境(.htaccess):

RewriteEngine On

下面是在根目录,文件夹要修改路径,如 /xxxxxx/

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

带 www 的跳转到不带的

RewriteCond %{HTTP_HOST} ^www.rcek.net
RewriteRule (.*) http://rcek.net/$1 [R=301,L]

不带 www 的跳转到带的

RewriteCond %{HTTP_HOST} ^rcek.net
RewriteRule (.*) http://www.rcek.net/$1 [R=301,L]

2、LinuxApache环境(Nginx):
location / {
index index.html index.php;
if (-f $request_filename/index.html) {
rewrite (.) $1/index.html break;
}
if (-f $request_filename/index.php) {
rewrite (.
) $1/index.php;
}
if (!-f $request_filename) {
rewrite (.*) /index.php;
}
}
3、Windows IIS伪静态(httpd.ini):
[ISAPI_Rewrite]

3600 = 1 hour

CacheClockRate 3600
RepeatLimit 32

中文tag解决

RewriteRule /tag/(.*) /index.php\tag=$1

sitemapxml

RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /favicon.ico /favicon.ico [L]

内容页

RewriteRule /(.*).html /index.php/$1.html [L]

评论

RewriteRule /(.*)/comment /index.php/$1/comment [L]

分类页

RewriteRule /category/(.*) /index.php/category/$1 [L]

分页

RewriteRule /page/(.*) /index.php/page/$1 [L]

搜索页

RewriteRule /search/(.*) /index.php/search/$1 [L]

feed

RewriteRule /feed/(.*) /index.php/feed/$1 [L]

日期归档

RewriteRule /2(.*) /index.php/2$1 [L]

上传图片等

RewriteRule /action(.*) /index.php/action$1 [L]

(原文来自老左博客