# 安装方式:一键安装
wget http://soft.vpser.net/lnmp/lnmp1.9.tar.gz && tar -xvf lnmp1.9.tar.gz && cd lnmp1.9 && ./install.sh nginx
./upgrade.sh nginx # 升级
# help
https://lnmp.org/install.html
# 安装方式:CentOS7 yum
rpm -Uvh https://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
查看详情
# 环境
yum -y install gcc gcc-c++ autoconf automake libtool make cmake
yum -y install zlib zlib-devel openssl openssl-devel pcre-devel
wget https://www.openssl.org/source/openssl-1.1.1.tar.gz # 安装包下载地址 https://www.openssl.org/source/
tar -xzf openssl-1.1.1.tar.gz # 解压
cd openssl-1.1.1 # 进入安装目录
mkdir /usr/local/openssl # 创建文件夹
# 卸载升级
查看详情
# CentOS
vi /etc/sysconfig/clock # 编辑,写入
ZONE="Asia/Shanghai"
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime # 拷贝(输入 y 覆盖)
date # 查看时间
# 同步时间
yum -y install ntpdate
查看详情
# 创建一个空的交换文件 4G
dd if=/dev/zero of=/swapfile bs=1G count=4
chmod 0600 /swapfile # 设置正确的权限
sudo mkswap /swapfile # 设置为交换分区
sudo swapon /swapfile # 挂载
swapon --show # 查看
free -m # 查看
查看详情
vi /etc/ssh/sshd_config # 编辑配置文件
ClientAliveInterval 60 # 表示每分钟发送一次,然后客户端响应,这样就保持长连接,默认是 0, 不发送.
ClientAliveCountMax 3 # 表示服务器发出请求后客户端没有响应的次数达到一定值,就自动断开.
service sshd restart # 重启 sshd 服务
# help
https://www.cnblogs.com/adolfmc/p/7248515.html
查看详情
wget --no-check-certificate -O shadowsocks.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh
chmod +x shadowsocks.sh
./shadowsocks.sh 2>&1 | tee shadowsocks.log
cat /etc/shadowsocks.json # 查看 config
systemctl restart shadowsocks # 重启
systemctl status shadowsocks # 状态
# help
https://github.com/shadowsocks/shadowsocks-windows/releases
查看详情
####### nginx.conf
user www www;
worker_processes auto;
worker_cpu_affinity auto;
error_log /home/wwwlogs/nginx_error.log crit;
pid /usr/local/nginx/logs/nginx.pid;
查看详情
var bbk = {
//问题序号
qno: 0,
//答案序号
ano: 0,
init: function () {
bbk.answer();
},
/**当前题目序号 */
currNo: function () {
查看详情