This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tail -f => tail --follow=descriptor | |
tail -F => tail --follow=name --retry | |
example1: | |
-----start---- | |
first: | |
tail -f testfile | |
tail -F testfile | |
then: | |
rm -f testfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/.m2/settings.xml | |
<proxies> | |
<proxy> | |
<active>true</active> | |
<protocol>http</protocol> | |
<host>proxy.somewhere.com</host> | |
<port>8080</port> | |
<username>proxyuser</username> | |
<password>somepassword</password> | |
<nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Maven have three lifecycles:clean default and site. | |
==== | |
**clean lifecycle** | |
it has three phases | |
pre-clean | |
clean:delete the project's build directory(default target directory) | |
post-clean | |
**site lifecycle** | |
it is concerned with generating documentation for a project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before we start to create a project using maven, | |
maybe we should set a proxy..... | |
we can use maven archetype plugin to help us to | |
create a maven project , you can see archtype | |
as a existing template. | |
>>mvn archetype:generate | |
then terminal will prompt you to choose a number(choose a template), | |
because there are a lot of choices, so you can use filter to | |
filter some like input "quick", then you can see |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== | |
pom.xml file is essentially the project's metadata file | |
that describes the various aspects of the project. | |
It describes the project's name, group, version, | |
dependecies, and many other things. | |
=== | |
Ok, as we have create a project with maven and | |
import it into eclipse, when we develop the project | |
we want to use a jar file in our local repository(for example jzmq.jar), | |
so we add the jar file into our local repository first, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> crontab -e | |
* * * * * env > ~/env.tmp | |
bash shell | |
>>env > ~/env.tmp2 | |
compare two file: evn.tmp and env.tmp2, you will know why your job can run through shell but can't run through cron. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
sudo apt-get install build-essential autoconf automake \ | |
libtool libfcgi-dev spawn-fcgi \ | |
libssl-dev nginx git-core | |
``` | |
###fcgiwrap | |
``` | |
git clone https://github.com/gnosek/fcgiwrap.git | |
cd fcgiwrap/ | |
autoreconf -i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Install virtualbo | |
https://www.virtualbox.org/wiki/Downloads | |
### Install vagrant | |
http://downloads.vagrantup.com/ | |
### | |
``` | |
> vagrant init | |
this command just generate a Vagrantfile, this file describe the kind of machine and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>client | |
ssh-keygen,一直Enter,得到一对rsa的公钥私钥对. | |
scp id_rsa.pub user@server.com:~/ | |
>server | |
确保/root权限为750 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
命令导出数据库表or数据: | |
>mysqldump -u用戶名 -p密码 -d 數據库名 表名 脚本名; | |
导出数据库所有表结构 | |
>mysqldump -uroot -password -d dbname > db.sql | |
导出数据库table表接口 | |
>mysqldump -uroot -ppassword -d dbname table > table.sql |
OlderNewer