`
Jameslyy
  • 浏览: 385055 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
安装: yum install -y epel-release && yum install -y supervisor   系统自启动 systemctl enable supervisord systemctl start supervisord systemctl is-enabled supervisord   systemctl status supervisord.service   服务管理 supervisorctl status [program] supervisorctl restart [program] supervisor ...
环境:centos   sudo yum install -y nginx   systemctl start nginx.service systemctl enable nginx.service systemctl status nginx   配置文件 nginx.conf   验证配置和加载配置 nginx -t nginx -s reload      服务配置       server {         listen       443 ssl;         server_name  xxx.com;         access_ ...
  1. 编译   mvn clean package -pl prj01,prj02,prj03 -am -Dmaven.test.skip=true    2. 安装jar包到本地仓库     mvn install:install-file       -Dfile=servlet-api.jar       -DgroupId=javax.servlet       -DartifactId=javax.servlet-api       -Dversion=4.0.0-b07       -Dpackaging=jar
1. fdisk -l 查看磁盘信息,可以看到是否有磁盘未挂载到系统 2. fdisk /dev/vdb 磁盘分区     首先选择 n 命令,添加新的分区     n add a new partition     后面的一路默认,直接回车就可以 3. mkfs.ext4 /dev/vdb1  格式化磁盘 4. mount /dev/vdb1 /data1 挂载磁盘 5. blkid 查看块设备属性           
1. pip install jupter 环境:Mac OS   a. pip install jupyter     Permission denied: '/Libarary/Python/2.7/site=-packages/pyzmq-16.0.2.dist-info'   b. sudo pip install jupyter     The directory '/Users/zhaoguifu/Library/Caches/pip/http' or its parent directory is not owned by the current user and ...
1. args4j -- Java   public class Args { @Option(required = true, name = "-arg1", usage = "arg1, desc") private String arg1; @Option(required = true, name = "-arg2", usage = "arg2, desc") private String arg2; @Option(required = true, name = ...
 http://www.jcraft.com/jsch   JSch jsch = new JSch(); ChannelSftp channelSftp = null; Session session = null; try{ session = jsch.getSession(userName, host, port); session.setPassword(password); Properties config = new Prop ...

SFTP配置

Step 1 : Install OpenSSH package if not installed   sudo apt-get install openssh-server   Step 2 : Create separate group for SFTP users.   sudo addgroup ftpaccess   Step 3 : Edit /etc/ssh/sshd_config file and make changes as below. Find and comment below line.   #Subsystem sftp /usr/lib/o ...
import smtplib from os.path import basename from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.utils import COMMASPACE, formatdate mail_host='' mail_user='' mail_pass='' mail_postfix='' d ...
1. CAP   分布式领域CAP理论: Consistency (一致性),即数据一致性,数据复制到N台机器,如果有更新,N机器的数据一起更新。 Availability (可用性):好的响应性能,速度。 Partition tolerance (分区容错性):节点的可扩展性。   CAP理论主张任何基于网络的数据共享系统,都最多只能拥有以下三条中的两条: 数据一致性(C),等同于所有节点访问同一份最新的数据副本; 对数据更新具备高可用性(A); 能容忍网络分区(P)。 2. CIAD Atomicity Consistency Isolation D ...
Java Native Access (JNA) JNA provides Java programs easy access to native shared libraries without writing anything but Java code - no JNI or native code is required. This functionality is comparable to Windows' Platform/Invoke and Python's ctypes.    JNA allows you to call directly into nativ ...
1. 修改root密码     mysql安装之后默认是没有密码的,可以使用mysqladmin命令修改:     mysqladmin -u root password PASSWORD       如果root用户已经有了密码可以加上 -p 参数,命令行会提示输入原有密码。     mysqladmin -u root -p passwo ...
共享内存相关函数:   1. shmid = shmget(IPC_PRIVATE, SIZE, IPC_CREAT|0666 ) ; 创建共享内存,如果共享内存已经存在,则获取已经存在的共享内存。 一般不是使用IPC_PRIVATE作为参数,可以使用 key_t mid = ftok("./ftok.tmp", 20); 获取共享内存的key。   2.  void *shmat(int shmid, const void *shmaddr, int shmflg) 把共享内存区对象映射到调用进程的地址空间   3. int shmdt(const v ...
 测试jni时,遇到一个问题,在mac上执行如下命令编译c程序,可以正常通过编译。 inc='-I /usr/lib/jvm/jdk1.8.0_20/include -I /usr/lib/jvm/jdk1.8.0_20/include/linux' g++ -shared $inc jni_helloworldImpl.cpp -o Hello.so   但是在Ubuntu上时遇到编译无法通过:提示加-fPIC重新编译    /usr/bin/ld: /tmp/ccxHy6dg.o: relocation R_X86_64_32 against `.rodata' can n ...
  反编译class文件: jad 命令:jad -o -r -sjava -dsrc './**/*.class'
Global site tag (gtag.js) - Google Analytics