1、删除 mysql
1 sudo apt-get autoremove --purge mysql-server-5.0
2 sudo apt-get remove mysql-server
3 sudo apt-get autoremove mysql-server
4 sudo apt-get remove mysql-common (非常重要)
上面的其实有一些是多余的,建议还是按照顺序执行一遍
清理残留数据
dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P
2、安装 mysql
1 sudo apt-get install mysql-server
2 sudo apt-get install mysql-client
3 sudo apt-get install php5-mysql(安装php5-mysql 是将php和mysql连接起来 )
一旦安装完成,MySQL 服务器应该自动启动。您可以在终端提示符后运行以下命令来检查 MySQL 服务器是否正在运行:
1 sudo netstat -tap | grep mysql
当您运行该命令时,您可以看到类似下面的行:
tcp 0 0 localhost.localdomain:mysql *:* LISTEN -
如果服务器不能正常运行,您可以通过下列命令启动它:
1 sudo /etc/init.d/mysql restart
3、进入mysql
$mysql -uroot -p 管理员密码
配置 MySQL 的管理员密码:
1 sudo mysqladmin -u root password newpassword
4、恢复数据库
mysql -p < html5canvas-20130930-0816.sql
http://www.yesky.com/187/1754687.shtml
TOMCAT数据源
http://136589219.iteye.com/blog/1572214
NIO是新IO,与老IO相比,老IO是通过STREAM来发送CHARACTER,新IO是通过CHANNL 发送BUFFER;老IO对于多条链接需要启动多个线程处理,新IO只需一条线程即可处理多条链接;新IO是事件驱动。
客户端,非SELECTOR模式:
//打开一个CHANNEL
SocketChannel socketChannel = SocketChannel.open();
socketChannel.configureBlocking(
false);
socketChannel.connect(
new InetSocketAddress("http://google.com", 80));
//等待可写状态
while(! socketChannel.finishConnect() ){
//wait, or do something else
}
//写资料
socketChannel.write(buf);
客户端,SELECTOR模式:
//打开一个CHANNEL
SocketChannel channel = SocketChannel.open();
//新建一个SELECTOR
Selector selector = Selector.open();
channel.configureBlocking(false);
//将SELECTOR注册到CHANNEL中
SelectionKey key = channel.register(selector, SelectionKey.OP_READ);
while(true) {
//查询可用状态
int readyChannels = selector.select();
//状态不可用
if(readyChannels == 0) continue;
}
//状态可用
Set<SelectionKey> selectedKeys = selector.selectedKeys();
Iterator<SelectionKey> keyIterator = selectedKeys.iterator();
while(keyIterator.hasNext()) {
SelectionKey key = keyIterator.next();
if(key.isAcceptable()) {
// a connection was accepted by a ServerSocketChannel.
} else if (key.isConnectable()) {
// a connection was established with a remote server.
} else if (key.isReadable()) {
// a channel is ready for reading
} else if (key.isWritable()) {
// a channel is ready for writing
//提交所需处理的代码
}
//移除所有KEY
keyIterator.remove();
}
摘要: 开发工具是ECLIPSE,由于是MAVEN WEB项目,不是ECLIPSE项目,测试用的如TOMCAT就不能使用平常的ECLIPSE加TOMCAT的方式了。只能用MAVEN的TOMCAT插件。
MAVEN的这个TOMCAT插件其实就是让MAVEN去启动一个内嵌的TOMCAT服务器,如果项目和这个TOMCAT关联了,项目就可以部署上去。
内嵌的服务器功能扩展,是通过插件的配置进行的。如改...
阅读全文
Responsibilities:
• Provide high level technical architecture, design documents and build of business applications and supporting functions based upon customer’s requirements.
• Produce a detailed functional design document to match customer requirements
• Co-operate with the customer’s technical architect to produce a technical specification for custom development and systems integration requirements.
• Ensure delivered solutions are realized in time frame committed
• Participate and lead the project meetings and present the solution with the customer if needed
• Review the work of other team members and ensure it meets the required standards
• Work with team members of the team to improve their technical and functional knowledge and skills.
• Act as a mentor to all team members on their assigned project tasks.
• Drive new business growth and customer success by providing business expertise.
Required Qualifications:
• Graduated from University or equivalent.
• 5-7+ years of relevant experience in software development.
• Must have hands-on expertise in the following technologies: Java/J2EE, Spring framework, Hibernate, Web Service (SOAP and RESTful), database (Oracle, SQL, PL/SQL, stored procedures)
• Have good knowledge in web-based systems architecture, service-based architecture, enterprise application architecture.
• Ability to understand the business requirements and converting them into solution designs
• Have excellent English written and oral communication skills, including conducting presentations to customers.