db2cmd -c db2 -tvf cmd_file.sqlBut if you don't want to generate a file, here is how
db2cmd -c db2 connect to mydb user me using passwd && db2 select * from my_table && db2 terminateDOS uses && to run multiple commands in one line.
db2cmd -c db2 -tvf cmd_file.sqlBut if you don't want to generate a file, here is how
db2cmd -c db2 connect to mydb user me using passwd && db2 select * from my_table && db2 terminateDOS uses && to run multiple commands in one line.
IP address for my guest CentOS 5.6 was 192.168.56.101, but CentOS said the address was already occupied. I found that there WERE processes in Resource Monitor using that address and listening on 137/138/139. It turns out that my "VirtualBox Host-Only Network adapter" was using 192.168.56.101.
Here is how you can access Resources Monitor:
After installing/uninstalling VirutalBox several times, "VirtualBox Host-Only Network" adapter went back to 192.168.56.1.
class git (
$version = "1.7.4.1"
) {
package { "git-$version":
ensure => present
}
file { "/usr/local/bin/git-p4":
source => "/usr/share/doc/git-$version/contrib/fast-import/git-p4",
mode => 0755,
require => Package["git-$version"]
}
}
References:
Although you can see a Perforce file in nested folders/directories, but there are not such objects (folders/directories) in perforce indeed. You cannot just create an empty folder and check it into Perforce.
This step creates the depot folder. Otherwise you may see this error when you run "git p4 rebase":
[bewang@pmaster my-app]$ git p4 rebase
Traceback (most recent call last):
File "/usr/local/bin/git-p4", line 1926, in ?
main()
File "/usr/local/bin/git-p4", line 1921, in main
if not cmd.run(args):
File "/usr/local/bin/git-p4", line 1716, in run
sync.run([])
File "/usr/local/bin/git-p4", line 1673, in run
changes = p4ChangesForPaths(self.depotPaths, self.changeRange)
File "/usr/local/bin/git-p4", line 442, in p4ChangesForPaths
assert depotPaths
Started GET "/components/1" for 127.0.0.1 at 2012-05-14 07:48:08 -0700
Processing by ComponentsController#show as HTML
Parameters: {"id"=>"1"}
Completed 406 Not Acceptable in 1424ms (ActiveRecord: 1283.8ms)
The reason why I got this error is that my application is supposed to accept and respond JSON only. So my controller only responds a JSON result.
def show
set_access_control_headers
@components = ComponentModel.today_component_status(params[:id]).first
respond_to do |format|
format.json {
render :json => @components
}
end
end
This page is very helpful on stackoverflow: http://stackoverflow.com/questions/9241045/backbone-client-with-a-remote-rails-server
sudo yum install rssh rssh.x86_64 2.3.3-2.el6.rf @rpmforge-el6-x86_64
# /etc/rssh.conf logfacility = LOG_USER allowscp #allowsftp #allowcvs #allowrdist #allowrsync umask = 022 chrootpath = /app/platform/chroot user=deployer:011:00001:/app/platform/chroot
sudo /bin/groupadd builder sudo /sbin/useradd -g builder -s /usr/bin/rssh -d /app/platform deployer
sudo mkdir /app/platform/.ssh sudo cp id_rsa.pub /app/platform/.ssh/authorized_keys
sudo /usr/share/doc/rssh-2.3.3/mkchroot.sh /app/platform/chroot/NOTE: Must have "/", otherwise the script will create a folder "/app/platform/chroot."
sudo mknod -m 666 dev/null c 1 3
sudo mkdir /app/platform/chroot/bin sudo cp /bin/sh /app/platform/chroot/bin
sudo cp /lib64/* /app/platform/chroot/lib64NOTE: Some of lib files must not be used, but I don't know which files should be kept.
sudo mkdir /app/platform/chroot/home/deployer sudo chown deployer:builder /app/platform/chroot/home/deployer
deployer:x:501:34075::/home/deployer:/usr/bin/rssh
scp a_file.xml deployer@chroot_host:/repositoryNOTE: Because we use chroot, the folder is /repository.