[b]开启smtp 服务 在 mac上[/b]
Edit file:
[b]sudo vim /System/Library/LaunchDaemons/org.postfix.master.plist.[/b]
Add [b]<key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/>[/b] before the closing </dict> tag.
Run sudo postfix start.
Check that SMPT is running: [b]telnet localhost 25[/b]
出现以下信息就说明成功了。
telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 your computer name.local ESMTP Postfix
set javahome,默认mac会用最新的jdk,如果你没有set的话
echo export "JAVA_HOME=\$(/usr/libexec/java_home -v 1.7)" >> ~/.bash_profile
关掉 terminal
重启terminal
输入 java -version
===================================================
[b]关掉tomcat 进程[/b]
http://stackoverflow.com/questions/15236308/how-do-i-kill-this-tomcat-process-in-terminal
pkill -9 -f tomcat
查找tomcat 进程
ps -ef | grep tomcat => Get all processes with tomcat grep
Once we have process details, we pipe it into the part 2 of the script
awk '{print $2}' | xargs kill -9 => Get the second column [Process id] and kill them with -9 option
通用的做法
ps -ef
will list all your currently running processes
| grep tomcat
will pass the output to grep and look for instances of tomcat. Since the grep is a process itself, it is returned from your command. However, your output shows no processes of Tomcat running.
=====================================================
Edit file:
[b]sudo vim /System/Library/LaunchDaemons/org.postfix.master.plist.[/b]
Add [b]<key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/>[/b] before the closing </dict> tag.
Run sudo postfix start.
Check that SMPT is running: [b]telnet localhost 25[/b]
出现以下信息就说明成功了。
telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 your computer name.local ESMTP Postfix
set javahome,默认mac会用最新的jdk,如果你没有set的话
echo export "JAVA_HOME=\$(/usr/libexec/java_home -v 1.7)" >> ~/.bash_profile
关掉 terminal
重启terminal
输入 java -version
===================================================
[b]关掉tomcat 进程[/b]
http://stackoverflow.com/questions/15236308/how-do-i-kill-this-tomcat-process-in-terminal
pkill -9 -f tomcat
查找tomcat 进程
ps -ef | grep tomcat => Get all processes with tomcat grep
Once we have process details, we pipe it into the part 2 of the script
awk '{print $2}' | xargs kill -9 => Get the second column [Process id] and kill them with -9 option
通用的做法
ps -ef
will list all your currently running processes
| grep tomcat
will pass the output to grep and look for instances of tomcat. Since the grep is a process itself, it is returned from your command. However, your output shows no processes of Tomcat running.
=====================================================