摘要: 第一天部署 第二天上线准备查看下运行情况 结果发现 ps 和 top 命令 一个提示无法分配内存 一个提示执行文件没有权限(root用户登录,你跟我说没权限 玩我呢...) 后来网上搜了搜 发现是redis配置不当导致被提权入侵 我的解决方法: 1.设置密码 2.设置一个普通权限用户来启动redis 阅读全文
posted @ 2021-01-29 12:28 阳光男孩hzq 阅读(121) 评论(0) 推荐(0)
摘要: 网上找了很多教程,但其位置都是错误的,一行代码就能搞定,不知道为啥讲一大堆,还搞不成功。 wget http://mirrors.aliyun.com/repo/Centos-altarch-7.repo -O /etc/yum.repos.d/CentOS-Base.repo 阅读全文
posted @ 2021-01-27 12:33 阳光男孩hzq 阅读(160) 评论(0) 推荐(0)
摘要: class CQueue { private Stack<Integer> stack1; private Stack<Integer> stack2; public CQueue() { this.stack1 = new Stack<>(); this.stack2 = new Stack<>( 阅读全文
posted @ 2020-02-13 20:07 阳光男孩hzq 阅读(181) 评论(0) 推荐(0)
摘要: class Solution { public int findRepeatNumber(int[] nums) { //遍历数组 for(int i =0;i < nums.length;i++){ //当数组元素不等于下标时(进行的是排序操作) while(nums[i] != i){ //如果 阅读全文
posted @ 2020-02-13 19:39 阳光男孩hzq 阅读(218) 评论(0) 推荐(0)
摘要: /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { val = x; } * } */ class Solution { 阅读全文
posted @ 2020-02-13 19:19 阳光男孩hzq 阅读(102) 评论(0) 推荐(0)
摘要: 要求: 将两个有序链表合并为一个新的有序链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。 代码: /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; 阅读全文
posted @ 2020-01-18 19:56 阳光男孩hzq 阅读(191) 评论(0) 推荐(0)