wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
rpm -ivh mysql57-community-release-el7-9.noarch.rpm
yum install mysql-server
mysqld --initialize # 初始化
chown mysql:mysql -R /var/lib/mysql # 设置权限
systemctl start mysqld # 启动
service mysqld restart # 重启
# linux 安装
yum install git-core
# clone项目
git clone https://github.com/netnr/np.git
# 强制覆盖本地
git fetch --all
git reset --hard origin/master
git pull
nohup dotnet Web.dll & # 后台运行 dotnet 站点
# 会生成 nohup.out 日志文件,如果不想输出日志 /dev/null 是一个路径黑洞
nohup dotnet Web.dll > /dev/null &
echo "" > nohup.out # 清空 nohup.out 日志文件
tail -f nohup.out # 监听 nohup.out 日志输出
kill $(lsof -t -i :8080) # 根据端口 8080 关闭进程
kill $(pidof node) # 根据进程名称 node 关闭进程
# 安装方式:一键安装
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 # 创建文件夹
# 卸载升级
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;