linux
开启virtualbox端口映射,使用ssh连接
星期二, 六月 16th, 2020 | computer, JAVA-and-J2EE, linux | 没有评论
1.如果有条件可以开启虚拟机的桥接网卡的模式
自动获取路由器的IP地址,则可以自由连接
2.如果只是网络地址转换(NAT)
通过配置端口转发,实现ssh软件的连接
如下图:(IP:127.0.0.1 PORT:1022端口即可连接)
Linux-socket内核参数配置及含义详解
星期一, 六月 8th, 2020 | JAVA-and-J2EE, linux | 没有评论
多由于Linux下解决time_wait连接过多(Linux内核优化配置)
内核文件配置:
vi /etc/sysctl.conf ##生效 /sbin/sysctl -p ##查看keepalive的相关配置 sysctl -a | grep keepalive ##查看tcp连接的相关状态指令 netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}' ##若没有netstat指令安装 yum install net-tools |
内核配置注释信息,参考自己的内存和CPU核数进行优化配置,如下
› Continue reading
centos查询大于100M文件命令
星期三, 六月 3rd, 2020 | JAVA-and-J2EE, linux | 没有评论
centos 查询大于100M文件及列出
ls -lh $(find / -type f -size +100M) |
VirtualBox下centos7修复generating /run/initramfs/rdsosreport.txt无法启动问题
星期二, 四月 28th, 2020 | computer, linux | 没有评论
开机就进入命令窗口,窗口提示信息如下,无法进入系统,让人头大:
generating “/run/initramfs/rdsosreport.txt”
entering emergencymode. exit the shell to continue
type “journalctl” to view system logs.
you might want to save “/run/initramfs/rdsosreport.txt” to a usb stick or /boot after mounting them and attach it to a bug report。
解决办法的命令如下:
xfs_repair /dev/mapper/centos-root -L reboot |
certbot配置letsencrypt遭遇Installing Python packages
星期一, 二月 3rd, 2020 | JAVA-and-J2EE, linux | 没有评论
同样的问题再次触发,害的查了半天
使用certbot来配置ssl,比较方便,遭遇下列错误
1.Creating virtual environment…
Installing Python packages…
查看了系统的python版本都已经是python3.6.8不会出现版本低的情况
根据报错提示发现是pip的问题,使用的镜像地址还是http://mirrors.cloud.aliyuncs.com
更换之http://mirrors.aliyun.com再执行搞定
vim ~/.pip/pip.conf |
国内的镜像源分别如下:
清华大学:https://pypi.tuna.tsinghua.edu.cn/simple
阿里:https://mirrors.aliyun.com/pypi/simple
豆瓣:http://pypi.douban.com/simple/
中国科学技术大学: https://pypi.mirrors.ustc.edu.cn/simple
华中理工大学: http://pypi.hustunique.com/simple
山东理工大学: http://pypi.sdutlinux.org/simple
推荐使用豆瓣的源,更新的比较及时和快:
[global] timeout = 300 #index-url=http://mirrors.aliyun.com/pypi/simple/ index-url=http://pypi.douban.com/simple/ [install] #trusted-host=mirrors.aliyun.com trusted-host=pypi.douban.com |
同样适用于centos8版本:
Centos8使用yum出现无法访问的错误
星期一, 二月 3rd, 2020 | JAVA-and-J2EE, linux | 没有评论
1.服务器升级系统到centos8,发现无法使用yum update
错误为:Failed to synchronize cache for repo ‘AppStream’, ignoring this repo.
2.修复之法:
2.1:检测网络是否通畅
2.2:修改 baseurl 的地址 http://mirrors.cloud.aliyuncs.com(在另外一台机器上好用,这台怎么都ping不通)
替换成http://mirrors.aliyun.com
即可,这两个地址可以尝试下哪个好用,把/etc/yum.repos.d/下的.repo文件都替换下,主要是下面三个
/etc/yum.repos.d/CentOS-AppStream.repo
/etc/yum.repos.d/CentOS-Base.repo
/etc/yum.repos.d/CentOS-Extras.repo
› Continue reading
centos8版本快速部署nginx,mysql安装
星期二, 一月 21st, 2020 | JAVA-and-J2EE, linux | 没有评论
0.centos8版本快速部署nginx,mysql安装
1.系统预检 查看版本
cat /etc/redhat-release |
初始系统为8.0版本,执行更新后为8.1:
yum update cat /etc/redhat-release |
CentOS Linux release 8.1.1911 (Core)
› Continue reading
springboot之使用tomcat部署脚本及环境设置
星期三, 一月 8th, 2020 | JAVA-and-J2EE, linux | 没有评论
1.部署脚本deploy.sh
cp /ia/apps/java/pomelolee-1.0.0-GA.war /usr/local/webserver/apache-tomcat-9/webapps/ROOT.war |
2.启动脚本start.sh
/usr/local/webserver/apache-tomcat-9/bin/startup.sh |
3.关闭脚本shut.sh
/usr/local/webserver/apache-tomcat-9/bin/shutdown.sh |
4.配置指定tomcat容器加载springboot的启动配置文件
在/usr/local/webserver/apache-tomcat-9/bin 文件夹下设置setenv.sh文件指定文件加载配置,toncat启动时 会自动加载此配置
其他jvm的调优配置也都直接配置到此处,方便复用;启用配置中心的部分可以参考激活设置,此处不用做说明.
CATALINA_OPTS="$CATALINA_OPTS -Dspring.config.location=/ia/config/pomelolee/application.properties" |
git提交文件时,遇到no changes added to commit
星期一, 一月 6th, 2020 | JAVA-and-J2EE, linux | 没有评论
1.删除了工程的两个文件夹,发现怎么也推送不上去,修复如下
2.git add . ##(请注意 add 后面要加 一个空格和一个点)
3.git push ## (将本地修改合并到远程)
后续再 git commit -m 及推送即可
git常用指令速查记录
星期五, 十二月 13th, 2019 | JAVA-and-J2EE, linux | 没有评论
方便自己随时翻查
#查看远程分支
1.git branch -a |
#查看本地分支
2.git branch |
#创建切换分支
3.git checkout -b dev-lee origin/dev |
#切换回master分支
4.git checkout master |
Search
相关文章
热门文章
最新文章
文章分类
- AI (4)
- ajax (10)
- algorithm-learn (3)
- amis (2)
- Android (6)
- as (3)
- computer (87)
- Database (30)
- disucz (4)
- enterprise (1)
- erlang (2)
- flash (5)
- golang (3)
- html5 (18)
- ios (4)
- JAVA-and-J2EE (186)
- linux (145)
- mac (10)
- movie-music (11)
- pagemaker (36)
- php (50)
- spring-boot (2)
- Synology群晖 (2)
- Uncategorized (6)
- unity (1)
- webgame (15)
- wordpress (33)
- work-other (2)
- 低代码 (1)
- 体味生活 (41)
- 前端 (21)
- 大数据 (8)
- 游戏开发 (9)
- 爱上海 (19)
- 读书 (4)
- 软件 (3)

