![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux
文章平均质量分 82
ydsungan
这个作者很懒,什么都没留下…
展开
-
IDEA的SpringBoot聚合工程+nginx配置https服务
1.Springboot聚合工程打包jar这里的Springboot项目是为前后端分离的项目,这里的https配置是在nginx中配置的,所以原有的springboot项目不需要任何和https相关的配置,包括ssl证书也不需要放在项目里面,所以在给聚合工程打包的时候只需要把(可能需要)你的数据库,redis等等的地址改一下就行了。这里不说springboot聚合工程如何创建了,只说一下如何打包。父工程的pom.xml中配置的打包方式是pom,所有的子工程的打包方式是jar打包。另外,只有启动类原创 2021-01-22 16:06:17 · 459 阅读 · 0 评论 -
运用linux中的scp实现文件远程拷贝
运用场景:ubuntu下载一个文件太慢了,只能用mac科学上网加快下载,这是需要把下载后的文件传到ubuntu上面用ifconfig查看ip(mac和ubuntu连的同一个路由器),ip是192.168.*.*,scp file.tgz username@192.168.3.12:/home/ydsungan/test即可...原创 2020-05-06 10:28:35 · 124 阅读 · 0 评论 -
bash的环境配置文件/etc/profile和~/.bash_profile区别
首先,说说login 、non-login shelllogin,non-login shell 这俩个取得bash的情况中,读取配置文件的数据是不一致的。login shell取得bash时需要完整的登录流程,相反,non-login shell取得bash时不需要重复的登录举动这里谈谈需要登录时,login shell会读取那些配置文件。1. /etc/profile 这是系统整体的...原创 2020-04-17 10:14:36 · 711 阅读 · 0 评论 -
linux中使用shell脚本实现mysql增删改查
查看数据库是否启动:netstat -tnlp | grep :3306使用mysql命令操作数据,而不是交互式:mysql -uydsungan -p123456 -D school -N -H -B -e “select * from student;”其中-D后为数据库名,中间有没有空格无所谓-N表示不显示列名,-B表示用tab表示分隔符,不显示竖线分隔符,-e后接运行语句...原创 2020-03-28 15:22:36 · 655 阅读 · 0 评论 -
centos中启动elasticsearch出现max virtual memory areas vm.max_map_count [65530] is too low,
第一个问题:max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]解决办法[centos]:root用户下修改vim /etc/sysctl.conf添加: vm.max_map_count = 655360刷新配置:sysctl -p第二个问题:max ...原创 2020-02-08 13:52:19 · 635 阅读 · 0 评论 -
shell编程中函数返回值,全局变量,局部变量及函数库
函数返回值测试用例#!/bin/bash#function get_users{ users=`cat /etc/passwd | cut -d: -f1` echo $users}user_list=`get_users`for user in $user_listdo echo $userdone全局变量不做特殊申明,...原创 2020-01-22 14:39:45 · 312 阅读 · 0 评论 -
nginx守护进程简单脚本
#!/bin/bash#while truedops -ef | grep nginx | grep -v grep >/dev/nullif [ $? -eq 0 ];then echo "Nginx is running well;" sleep 3else /usr/local/nginx/sbin/nginx -c /...原创 2020-01-22 13:27:45 · 907 阅读 · 0 评论 -
linux中的shell编程中的命令替换
命令替换的俩种语法格式1、 `command`,反引号2、$(command)编写如下脚本进行测试:#!/bin/bash#index=1for user in `cat /etc/passwd | cut -d ":" -f 1`do echo "This is the $index user: $user" index=$(($index + 1))done其...原创 2020-01-21 15:05:17 · 129 阅读 · 0 评论 -
linux中的shell编程中的字符串处理
1、获取字符串长度的俩种方式${#var}var=“hello world”len=${#var}expr length "$var",注意这个俩遍有反引号注意反引号,和双引号```bash[root@iZ2ze247jeep0y8ruwn2qiZ ~]# var="hello world"[root@iZ2ze247jeep0y8ruwn2qiZ ~]# len=`expr l...原创 2020-01-21 12:57:14 · 173 阅读 · 0 评论 -
linux中的shell编程中的变量替换
var=“ydsungan, Good Morning!”${变量名#匹配规则},开头进行匹配符合最短的数据删除var1=${var#*n},把ydsungan删除,删除后的,Good Morning!返回给var1.echo $var1 可查看var1变量的值${变量名##匹配规则},开头进行匹配符合最短的数据删除var2=${var##*n},把ydsungan, Good ...原创 2020-01-21 11:50:06 · 353 阅读 · 0 评论