linux 命令
(1) a.html 后10行写入 b.html
tail -10 a.html > b.html
(2)统计后台php 进程数量
ps -ef | grep php-fpm | wc -l
(3) /var/www/html 修改目录及文件权限
chmod -R -664 /var/www/html
(4) 负载均衡
upstream test{
ip_hash;
server ip1;
server ip2;
}
proxy_pass http://test;
(5) 从库连接
CHANGE MASTER TO master_host = '127.0.0.1',
master_user = 'mysql_backup',
master_password = '123456',
master_log_file = 'mysql-bin.000001',
master_log_pos = 8979;
(6) 设置session 存储时调用的方法
session_set_save_handler