分类 Linux 下的文章

mail:~# chage -l username
Last password change : Oct 07, 2016
Password expires : never
Password inactive : never
Account expires : Dec 07, 2016
Minimum number of days between password change : -1
Maximum number of days between password change : -1
Number of days of warning before password expires : -1

使用下面指令
chage -I -1 -m -1 -M -1 -E -1 username

结果将会是
mail:~# chage -l username
Last password change : Jan 19, 2016
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : -1
Maximum number of days between password change : -1
Number of days of warning before password expires : -1

下面说一下VPS添加swap交换分区的方法(只有虚拟化为Xen、KVM、VMWare的VPS可以,OpenVZ不支持添加swap)。

1、使用root用户登陆,进入一个目录
cd /var/

2、获取512MB的文件块:(一般设置为内存的2倍,count后面的数为要设置的swap大小xxMB,以下以512M为例)
dd if=/dev/zero of=swapfile bs=1M count=512

3、创建swap文件
/sbin/mkswap swapfile

- 阅读剩余部分 -

server
{
listen 443 ssl http2;
server_name sign.mgu.cc;
index index.html index.htm index.php;
root /home/wwwroot/sign.mgu.cc/Tieba-Cloud-Sign;
ssl on;
ssl_certificate /root/ssl/1__.mgu.cc_bundle.crt;
ssl_certificate_key /root/ssl/mgu.cc_key.txt;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;

- 阅读剩余部分 -