Category - IT技术

CentOS SSH linux    2017-07-19 22:21:34    757
预先配置:
    master:192.168.10.128
    slave:192.168.10.135
    修改方式    
    # vi /etc/sysconfig/network
    将HOSTNAME修改为master或者slave

1、创建新用户(两台机器,root用户)
    # useradd hadoop
2、设置密码(两台机器,root用户)
    # passwd hadoop

4、修改ssh的配置文件(两台机器,root用户)
    # vi /etc/ssh/sshd_config
    将如下代码注释掉
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys
5、重启ssh服务(两台机器,root用户)
    # service sshd restart
6、设置无密码登陆(用hadoop用户)
    # cd /home/hadoop
    # ssh-keygen -t rsa
    一直回车
    进入.ssh目录(虚拟目录)
    # cd .ssh/
    # cp id_rsa.pub authorized_keys
    # chmod 600 authorized_keys
   
7、从master机器上copy文件到slave机器上(192.168.10.135是我要连接的机器),用root用户
     # scp id_rsa.pub root@192.168.10.135:/home/hadoop/
    
8、在要被连接机器(slave)上执行
    # cd /home/hadoop/

    # cat id_rsa.pub >> .ssh/authorized_keys 


9、在master机器上使用hadoop用户登陆
    # ssh slave



 

by 刘迎光@萤火虫工作室 
OpenBI交流群:495266201 
MicroService 微服务交流群:217722918 
mail: liuyg#liuyingguang.cn 
博主首页(==防止爬虫==):http://blog.liuyingguang.cn

CentOS pem xshell linux    2017-07-19 22:17:37    869
1、需要用pem文件连接到centos系统中,
    xshell 使用pem文件登录:http://blog.csdn.net/gsying1474/article/details/50158817

2、修改root密码
    sudo passwd root

然后输入两次密码


3、修改centos登录方式为密码登录
    打开配置文件 /etc/ssh/sshd_config (ubuntu 为/etc/ssh/sshd-config),设置如下几个参数:
PermitRootLogin yes
PubkeyAuthentication no (也可用#号注释)
PasswordAuthentication yes
4、重启sshd服务
    /etc/init.d/sshd restart
 
 
 

 

by 刘迎光@萤火虫工作室 
OpenBI交流群:495266201 
MicroService 微服务交流群:217722918 
mail: liuyg#liuyingguang.cn 
博主首页(==防止爬虫==):http://blog.liuyingguang.cn

RedHat GCC linux    2017-07-19 22:16:35    894
rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm 
rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm 
rpm -ivh cpp-4.4.7-4.el6.x86_64.rpm 
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm 
rpm -ivh gcc-4.4.7-4.el6.x86_64.rpm


 


安装包:http://pan.baidu.com/s/10ZdD0




 

by 刘迎光@萤火虫工作室 
OpenBI交流群:495266201 
MicroService 微服务交流群:217722918 
mail: liuyg#liuyingguang.cn 
博主首页(==防止爬虫==):http://blog.liuyingguang.cn

java jpa exception    2017-07-19 22:15:22    1329
错误栈:
org.zkoss.zk.ui.UiException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin transaction failed:  at [file:/C:/Users/lyg21_000/git/Saas/target/classes/main.zul, line:26]
 at org.zkoss.bind.impl.MiscUtil.mergeExceptionInfo(MiscUtil.java:175) ~[zkbind-7.0.4.jar:7.0.4]
 at org.zkoss.bind.BindComposer.doBeforeComposeChildren(BindComposer.java:161) ~[zkbind-7.0.4.jar:7.0.4]
 at org.zkoss.zk.ui.impl.UiEngineImpl.doBeforeComposeChildren(UiEngineImpl.java:930) ~[zk-7.0.4.jar:7.0.4]
 at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:869) ~[zk-7.0.4.jar:7.0.4]
 at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826) ~[zk-7.0.4.jar:7.0.4]
 at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735) ~[zk-7.0.4.jar:7.0.4]
 at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:797) ~[zk-7.0.4.jar:7.0.4]
 at org.zkoss.zk.ui.imp
java exception    2017-07-19 22:14:16    1354
分析bug原因:
是因为某次下载jar包的时候出错,导致下文红色部分标注的jar包没有下载下来,在repository目录下,删除此jar包的文件夹,重新下载即可

我这里是junit3的jar包,但是也可能是其他jar包,这个是不确定的




[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project hello: Unable to generate classpath: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing: 
[ERROR] ---------- 
[ERROR] 1) org.apache.maven.surefire:surefire-junit3:jar:2.12.4 
[ERROR] 
[ERROR] Try downloading the file manually from the project website. 
[ERROR] 
[ERROR] Then, install it using the command: 
[ERROR] mvn install:install-file -DgroupId=org.apache.maven.surefire -DartifactId=surefire-junit3 -Dversion=2.12.4 -Dpackaging=jar -Dfile=/path/to/file 
[ERROR] 
[ERROR] Alternatively, if you host your own repository you can deploy the file there: 
[ERROR] mvn deploy:deploy-file -DgroupId=org.apache.maven.surefire -DartifactId=surefire-junit3 -Dversion=2.12.4 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] 
[ERROR] 
[ERR
11/26