Topic

服务器

A collection of 4 issues

MariaDB基础配置

本记录基于CentOS 7 root用户下 从 CentOS 7 开始,CentOS 使用 MariaDB 代替了 MySQL 数据库,MariaDB 系 MySQL 的一个分支,使用方法和 MySQL 基本一致,主要由开源社区维护,采用 GPL 授权许可。开发此分支的主要原因之一:Orcale 公司收购了 MySQL,所以 MySQL 有闭源的可能,因此社区采用了开源的 MariaDB 来规避此风险。 安装 yum install mariadb mariadb-server #询问是否要安装,输入Y即可自动安装,直到安装完成 systemctl enable mariadb.service #设置开机启动 常用命令 systemctl start/
1 min read

centos系统添加/删除用户和用户组

建用户 # 新建phpq用户 adduser phpq # 给phpq用户设置密码 passwd phpq 建工作组 # 新建test工作组 groupadd test 新建用户同时增加工作组 # 新建phpq用户并增加到test工作组 useradd -g test phpq 给已有的用户增加工作组 usermod -G groupname username # or gpasswd -a username groupname 临时关闭 在/etc/shadow文件中属于该用户的行的第二个字段(密码)前面加上就可以了。想恢复该用户,去掉即可。 或者使用如下命令关闭用户账号: passwd peter –l # 重新释放: passwd peter –u 永久性删除用户账号 userdel peter groupdel peter usermod –G
1 min read

申请免费SSL/HTTPS通配符证书

申请单个域名证书 certbot: https://certbot.eff.org/ 安装命令行工具及申请 选择对应的软件和系统版本 # 安装依赖 sudo apt-get install certbot python-certbot-nginx # 自动设置 sudo certbot --nginx # or 手动设置 sudo certbot certonly --nginx 设置自动续签 # 通用 sudo certbot renew # 强制续签 sudo certbot renew --dry-run 申请通配符域名证书 阿里云等国内域名商购买域名 申请证书 centOS需要提前安装依赖 pip uninstall requests pip uninstall urllib3 yum remove python-urllib3 yum remove python-requests
2 min read

Nginx 升级最新版本并开启TLSv1.3

本操作基于debian 9 nginx 升级 1、清理残余的旧版本 # 原有配置不会删除 sudo apt-get remove nginx nginx-common nginx-full 2、安装nginx PGP签名文件 wget http://nginx.org/keys/nginx_signing.key sudo apt-key add nginx_signing.key 3、修改source源 cd 进入apt源目录 cd /etc/apt/ ll 修改这个文件,也可能是source.list 在文件末追加以下: codename是版本代号,查询地址: https://nginx.org/en/linux_packages.
2 min read

Subscribe to ionantha

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe