01 2020 档案

摘要:vim /etc/sysconfig/iptables 增加配置行:-A INPUT –m state --state NEW –m tcp –p –dport 3306 –j ACCEPT 重启防火墙:systemctl restart iptables 阅读全文
posted @ 2020-01-02 16:02 liansng 阅读(2111) 评论(0) 推荐(0)
摘要:使用SCP命令: scp [参数] [原路径] [目标路径] scp 本地用户名 @IP 地址 : 文件名 1 远程用户名 @IP 地址 : 文件名 2 示例: scp local_file remote_username@remote_ip:remote_folder 指定端口的示例: scp - 阅读全文
posted @ 2020-01-02 15:59 liansng 阅读(282) 评论(0) 推荐(0)
摘要:查看当前加载的配置文件 php --ini 查看web模式下php加载的配置文件 phpinfo(); 阅读全文
posted @ 2020-01-02 15:56 liansng 阅读(138) 评论(0) 推荐(0)
摘要:删除分支: git branch -d [branch_name] 忽略警告删除分支: git branch -D [branch_name] 批量删除分支: git branch | grep “steven_” | xargs git branch -d 阅读全文
posted @ 2020-01-02 15:54 liansng 阅读(206) 评论(0) 推荐(0)
摘要:Mac 每次都要执行source ~/.bash_profile 配置的环境变量才生效 自己在 ~/.bash_profile 中配置环境变量, 可是每次重启终端后配置的不生效.需要重新执行 : $source ~/.bash_profile 发现zsh加载的是 ~/.zshrc文件,而 ‘.zsh 阅读全文
posted @ 2020-01-02 15:53 liansng 阅读(2640) 评论(0) 推荐(0)
摘要:解决办法: 切换到root用户修改 vim /etc/security/limits.conf # 在最后面追加下面内容 xx hard nofile 65536 xx soft nofile 65536 xx 是你启动某个服务的的用户名称 阅读全文
posted @ 2020-01-02 15:51 liansng 阅读(463) 评论(0) 推荐(0)
摘要:解决办法: sudo vim /etc/sysctl.conf 添加或者修改下面配置: vm.max_map_count=655360 执行命令: sysctl -p 阅读全文
posted @ 2020-01-02 15:50 liansng 阅读(829) 评论(0) 推荐(0)
摘要:减少网络接口请求,减少文件读取,减少数据库读取,尽量在内存中完成逻辑 因为:读写内存<<读写数据库<<读写磁盘<<读写网络数据 阅读全文
posted @ 2020-01-02 15:49 liansng 阅读(301) 评论(0) 推荐(0)
摘要:&& 写法1:if [ $str=a -a $str=b ] 写法2:if [ $str=a ] && [ $str=b ] ||写法1:if [ $str=a -o $str=b ] 写法2:if [ $str=a ] || [ $str=b ] 阅读全文
posted @ 2020-01-02 15:35 liansng 阅读(952) 评论(0) 推荐(0)