J2EE项目迁移(window >linux)
1. download & setup jdk
2. download eclipse and test a simple example of java
3. setup mysql use yum(or download & setup by hand)
yum install mysql
problem1:linux mysql configuration & use
solution1:
mysql -uroot -p
password:******
problem2:ERROR 1045(28000)Access denied for user 'root'@'localhost'(using password:NO)
solution:
#mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
#mysql -u root mysql
mysql> select host,user,password from user;
next, you can operator the user table and confirm it without null user;
if there are null user, you can delete it use delete sql.
problem3:how to migrate data to linux
solution1:window ,use mysql-front to output a backup-file name package.sql
1. change mysql setting as follows:
mysql> update mysql.user set host='%' where host='localhost';
mysql> grant all privileges on *.* to root@"%";
mysql> flush privileges;
2. in window, use mysql-front to connect it.
solution2:just linux (not tested)
out:mysqldump databasename > filename.sql
in:mysqladmin create databasename;
shell:mysql databasename < filename.sql
4. download & setup Tomcat
Filename:apache-tomcat-5.5.28.tar.gz -> unpack & directly can use,
first thing must do if you want use it is configure JDK, like PATH & CLASS_PATH
vim /etc/profile
use eclipse to check the jdk setup-directory
PATH = %PATH:/usr/java/jdk1.6.0_13/bin
CLASS_PATH=.:/usr/java/jdk1.6.0_13/lib
then, come in the unpa
相关文档:
linux socket 优化
2008-06-12 16:40
使用 Sockets API,我们可以开发客户机和服务器应用程序,它们可以在本地网络上进行通信,也可以通过 Internet 在全球范围内进行通信。与其他 API 一样,您可以通过一些方法使用 Sockets API,从而提高 Socket 的性能,或者限制 Socket 的性能。本文探索了 4 种使用 Sockets API 来 ......
参见:http://www.ibm.com/developerworks/cn/linux/l-proc.html
使用 /proc 文件系统来访问 Linux 内核的内容
这个虚拟文件系统在内核空间和用户空间之间打开了一个通信窗口
文档选项
<tr
valign="top"><td width="8"><img alt="" height="1" width="8& ......
一、头文件
gcc 在编译时寻找所需要的头文件 :
※搜寻会从-I开始
※然后找gcc的环境变量 C_INCLUDE_PATH,CPLUS_INCLUDE_PATH,OBJC_INCLUDE_PATH
※再找内定目录
/usr/include
/usr/local/include
/usr/lib/gcc-lib/i386-linux/2.95.2/include
/usr/lib/gcc-lib/i386-l ......
putty
putty是个比较简单的linux远程控制工具,免费的,只要下到putty运行就ok啦,输入要访问的服务器的ip ,把访问类型设为ssh,输入登陆帐户、密码就ok啦,一切都是那么的简单。
secureCRT
这个比较复杂一点,需要注册码的,但还算是比较容易找到的,它的设置也是很傻瓜的那种,跟putty是一样的,把访问的类型设 ......
什么时候需要创建线程池呢?简单的说,如果一个应用需要频繁的创建和销毁线程,而任务执行的时间又非常短,这样线程创建和销毁的带来的开销就不容忽视,这时也是线程池该出场的机会了。如果线程创建和销毁时间相比任务执行时间可以忽略不计,则没有必要使用线程池了。
下面是 ......