linux set virtual memorylinux set virtual memory

很多人的Linux是安装在虚拟机上,或者运行在一些嵌入式设备上,没有足够的物理内存,如果在执行一些消耗内存的任务,比如编译软件,可能会造成系统崩溃,解决方法就是设置虚拟内存。。 设置步骤 这里采用设置交换文件的方法,执行以下命令 cd /var sudo swapoff /var/swapfile sudo dd if=/dev/zero of=swapfile bs=1M count=2048 sudo mkswap /var/swapfile sudo swapon /var/swapfile 其中1024表示2048MB的虚拟内存,可以根据实际情况设置,一般为物理内存的两倍即可 最后,修改/etc/fstab,添加一行 /var/swapfile none swap sw 0 0

jar packagejar package

jar cmvf0 META-INF/MANIFEST.MF <new-jar-filename>.jar <files to include> You shoud add -0 to store only; use no ZIP compression $jar -cvf0m yourproject.jar META-INF/MANIFEST.MF .

springboot packagespringboot package

<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <!--加入下面两项配置--> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> <configuration> <includeSystemScope>true</includeSystemScope> </configuration> </plugin> </plugins> </build>

使用docker-compose定制dubbo-admin和zookeeper组合服务使用docker-compose定制dubbo-admin和zookeeper组合服务

环境:已经安装了git和maven,系统centos 1.打包dubbo-admin git clone -b master https://github.com/apache/incubator-dubbo-ops.git mvn clean package -Dmaven.test.skip=true 2.制作dubbo-admin镜像 dubbo-admin下增加Dockerfile 文件内容如下: FROM openjdk:8-jdk-alpine MAINTAINER www.fabaoyi.com VOLUME /tmp ADD ./target/dubbo-admin-0.0.1-SNAPSHOT.jar dubbo-admin.jar ENTRYPOINT [“java”,”-Djava.security.egd=file:/dev/./urandom”,”-jar”,”/dubbo-admin.jar”] docker build -t dubbo-admin:1.0 . 3.运行compose项目

sbt study of hellosbt study of hello

The official site is: https://www.scala-sbt.org/1.x/docs/sbt-by-example.html def main(args: Array[String]): Unit = { Gigahorse.withHttp(Gigahorse.config){ http => { val baseUrl = "http://www.baidu.com" val rLoc = Gigahorse.url(baseUrl) val fLoc = http.run(rLoc) val loc =