设为首页 收藏本站
查看: 944|回复: 0

[经验分享] MAC Environment Setting Up(1)Tools of JAVA

[复制链接]

尚未签到

发表于 2016-5-18 09:46:48 | 显示全部楼层 |阅读模式
MAC Environment Setting Up(1)Tools of JAVA


1. Password Reset

On the first day, I got MAC Pro laptop. But I do not know the password.

So I shutdown my MAC and start the device and immediately after the starting sound, I click on the button 'Shift' to enter the safe boot mode. They I follow the steps their and use the command to change the password of the current user.

>passwd username



2. SSH Key

Use the command ssh to connect to one server, then I can get the directory /Users/username/.ssh

>ssh-keygen -t dsa

I can generate my own key for MAC laptop.



And I can also create a file with other private key, for example, my default private key file is carl_mac and carl_mac.pub. And I created a separate file named other_key, when I try to access to the other server. I will use the command to specify the key file:

>ssh -i other_key username@otherserver.com



certainly, I will give the rights to key file.

>chmod 400 other_key



3. Lock the Screen

How to lock the screen when I leave my mac on my desk.

Use this command  'Control'  + 'Shift'  + 'Eject' Eject is the top right button.



Change the configuration in 'Security' ----> 'General' tab and select the 5 seconds as the time interval.



4. Install git and plugins

Download the git software from references git website.



5. Fix the subversion plugin error on Eclipse

Follow the BLOG I had before. But I got error message as follow when I use port command>

Error Message:

Digby-Users-MacBook-Pro-3:code carl$ sudo port install subversion

--->  Computing dependencies for subversionError: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?



solution:

I need to wait until I install the xcode. follow this blog: http://www.macports.org/install.php.

But after I installed Xcode. The system asked me for tool 'make'.



Next step I will install make on MAC

Maybe, that is only because I only install Xcode 4.4.1. And I ignore the command line tool. I will install the command line tool too this time.

http://adcdownload.apple.com/Developer_Tools/command_line_tools_os_x_lion_for_xcode__august_2012/command_line_tools_for_xcode_os_x_lion_aug_2012.dmg



It works then. I follow the BLOG I wrote before and go on with these commands:

>sudo port install subversion

>sudo port install subversion-javahlbindings



And we also need to update the SVN plugin to http://subclipse.tigris.org/update_1.8.x

Sometimes, we need to use svn command to update our svn configurations too.
>svn upgrade


5. Install tomcat on MAC

I download the file with name apache-tomcat-7.0.29.tar.gz. And I try to unzip it and move it to working directory.

>tar zxvf apache-tomcat-7.0.29.tar.gz

>sudo mkdir /opt/tool/

>sudo mv apache-tomcat-7.0.29 /opt/tool/



But when I start my tomcat in STS tool, it gives me out of memory error message as follow.

Error Message:

SEVERE: A child container failed during start

java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space

at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:785)



Solution:

Add this configuration to my STS configuration on tomcat, open launch configuration.

-Xms512m -Xmx768m  -XX:MaxPermSize=256m



These configuration format and place can be taken JBOSS for example.



6. Install Git on MAC and git plugin on eclipse

http://sillycat.iyunv.com/blog/1323263

http://sillycat.iyunv.com/blog/689970



Just install git on app store. And follow the steps to install edit plugin.



7. Install the sftp client

One of the famous client named filezilla. But it does not support the public/private key pair.



Another nice client is cyberduck. I will try it http://cyberduck.ch/. It is really wonderful to have this tool. And it supports the private/public key pair.



8. Install jboss5.1

I just installed jboss 5.1 as usual. And start the JBOSS server with 80 and 443 port. But I got error message on MAC.

1:01:09,860 INFO  [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java

01:01:09,975 ERROR [Http11Protocol] Error initializing endpoint

java.net.BindException: Permission denied /0.0.0.0:80

at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:504)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:175)


Solution:

http://www.techyv.com/questions/can-not-start-jboss-port-80

I will use 8080 and 8443 instead.



N. Tips for Installing Some Software

thunder QQ and java in app store





references:

http://sillycat.iyunv.com/blog/1100363

http://osxdaily.com/2011/01/17/lock-screen-mac/

https://distfiles.macports.org/MacPorts/MacPorts-2.0.4-10.7-Lion.dmg

http://sillycat.iyunv.com/blog/1459223

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-218560-1-1.html 上篇帖子: (转)Java获得CPU序列号和网卡Mac地址 下篇帖子: OS + Unix IBM Aix 5.3 / 6.1
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表