Old server
cd /projectName
mysqldump -uUsername -pPassword --opt SourceDatabaseName > fileName.sql
New Server
shell#useradd
shell#passwd
shell#rsync -av OldServerUserName@192.168.10.80:/hr/ /var/lib/tomcat6/webapps/hr/
shell# vi /etc/tomcat6/server.xml
<Context path="/hr" docBase="hr"
debug="0" crosscontext="true" reloadable="true">
</Context>
shell#ln -s /var/lib/tomcat6/webapps/hr /hr
shell#sudo dpkg-reconfigure mysql-server-5.5 ## change password
shell#mysql -uroot -UserPassword
mysql>create database hr;
mysql>use hr;
mysql> source /hr/working.sql
沒有留言:
張貼留言