what is the easiest way to setup dns server on leopard machine? Is leopard come with dns server? my leopard machine virtual name is abc.local . i want to add this to dns server. can guide?
My question involves the delays involved with changing which physical socket your ethernet cable is connected to.
I am aware that if you are connected to a router on a network and then change which physical socket on that router you are using you will gain very small additional delays initially. However I am curious as to what causes these delays. I originally thought it was to do with the infromation stored in the routing table and whether that was allocated to a specific socket on the router or not. Although, if your IP address is the same then I don't understand why there would be delays because I would of assumed that any information within the router was linked to an IP address rather than a physical socket.
Hi all,
as followup of this question, I would like to know where the STDOUT and STDERR of a program on which I've run disown -h is redirected to :-)
Thanks!
I am on a Mac OSX and I am using the built in PHP and Apache2. I have been setting up MySQL and finally when I got MySQL working my local site won't display. Do note that I did have the web server running and delivering PHP enabled pages, just no database connection. But my question is not about MySQL.
I have changed various settings in the 'http.conf' file, and I have the line: '127.0.0.1 localhost' in my hosts file. I also have other alias' pointing to 127.0.0.1.
I have checked everything I could about Apache and I have made sure that any message in the error_log is ok. I currently have my errorLevel set to debug, so I get all the messages.
At this point (HOURS of self fixing) I think I need help.
What can I provide for someone to figure this out with me.
Thanks.
I am trying to enable X11 forwarding on my server which is running on FreeBSD 7.1.
I have a putty installed in my windows in which i have enabled X11 forwarding by
checking on Enable X11 forwarding
and specifying following parameter
X display location localhost:0
after that i run putty and checked whether X11 is enabled or not by typing following command
echo "$DISPLAY" or echo $DISPLAY
but i am getting following error
DISPLAY: Undefined variable.
Even i have installed XManager but in that also i am getting following error
The X11 forwarding request was
rejected ! To solve this problem,
please turn on the X11 forwarding
features of the remote SSH server
can anyone suggest me how to get rid off this ?
I am using Eclipse in Linux through a remote connection (xrdp). My internet got disconnected, so I got disconnected from the server while eclipse was running.
Now I logged in again, and I do the "top" command I can see that eclipse is running and still under my user name.
Is there some way I can bring that process back into my view (I do not want to kill it because I am in the middle of checking in a large swath of code)? It doesnt show up on the bottom panel after I logged in again.
Here is the "top" output:
/home/mclouti% top
top - 08:32:31 up 43 days, 13:06, 29 users, load average: 0.56, 0.79, 0.82
Tasks: 447 total, 1 running, 446 sleeping, 0 stopped, 0 zombie
Cpu(s): 6.0%us, 0.7%sy, 0.0%ni, 92.1%id, 1.1%wa, 0.1%hi, 0.1%si, 0.0%st
Mem: 3107364k total, 2975852k used, 131512k free, 35756k buffers
Swap: 2031608k total, 59860k used, 1971748k free, 817816k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13415 mclouti 15 0 964m 333m 31m S 21.2 11.0 83:12.96 eclipse
16040 mclouti 15 0 2608 1348 888 R 0.7 0.0 0:00.12 top
31395 mclouti 15 0 29072 20m 8524 S 0.7 0.7 611:08.08 Xvnc
2583 root 20 0 898m 2652 1056 S 0.3 0.1 139:26.82 automount
28990 postgres 15 0 13564 868 304 S 0.3 0.0 26:33.36 postgres
28995 postgres 16 0 13808 1248 300 S 0.3 0.0 6:54.95 postgres
31440 mclouti 15 0 3072 1592 1036 S 0.3 0.1 6:01.54 gam_server
1 root 15 0 2072 524 496 S 0.0 0.0 0:03.00 init
2 root RT -5 0 0 0 S 0.0 0.0 0:04.53 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.04 ksoftirqd/0
4 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
5 root RT -5 0 0 0 S 0.0 0.0 0:01.72 migration/1
6 root 34 19 0 0 0 S 0.0 0.0 0:00.07 ksoftirqd/1
7 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/1
8 root RT -5 0 0 0 S 0.0 0.0 0:04.33 migration/2
9 root 34 19 0 0 0 S 0.0 0.0 0:00.05 ksoftirqd/2
I am doing a backup of my desktop to a remote machine. I'm basically doing rsync -a ~ example.com:backup/ However there are loads of large files, e.g. wikipedia dumps etc. Most of the files I care a lot about a small, such as firefox cookie files, or .bashrc. Is there some invocation to rsync that will exclude files that are over a certain size? That way I could copy all files that are less than 10MB first, then do all files. That way I can do a fast backup of the most important files, then a longer backup of everything else.
I have configured supervisord to track my unicorn server process. When I send USR2 process, this performs a rolling restart. After this operation the old unicorn master have restarted and then changed PID.
This caused supervisor to lose track of the unicorn process considering it as EXITED.
How can I have supervisord to follow the new unicorn process after this operation ?
Unicorn has a PID file available, but I have not found an option in supervisord configuration for this.
An other option would be to have supervisord to send itself the USR2 signal, but I don't know how to perform this and whether it will prevent my problem from occurring.
I need to start screen with some bash command to execute.
Trying screen -S test -d -m bash -c './test.php'
but have no result, screen didn't apear.
Even more, let's that i need to start something like that
vlc -I ncurses --http-reconnect http://ip/ --sout '#duplicate{dst=std{access=http{user=,pwd=},mux=ts,dst=:51001}}' --ttl=255 --loop --repeat
I am copying some files (all except hidden ones) using rsync from one place to another using this command:
rsync -Cav --delete --exclude=.* /Some/Directory/ other-host:/Other/Directory
It works nice except that I get the following errors:
rsync: chgrp "/Other/Directory/." failed: Operation not permitted (1)
rsync: failed to set times on "/Other/Directory/.": Permission denied (13)
That is understandable because I do in fact not have those permissions, and I also do not want to change the group of that directory. I only want to do this for all the files and directories that are in that directory. Is there any way to solve this? Tried to --exclude=. and --exclude=./, but those didn't work.
Any ideas? I have no idea how to fix this...
More details: This is on Mac OS X, and the directories I am syncing is from a local mounted volume to the /Users/Shared/ directory on the other host. That directory has user root and group wheel. The files inside it has user admin and group staff and so does the local source directory.
I use bash shell and sometimes all of a sudded, my Backspace key stops working (when this happens Ctrl + Backspace still works fine)
I am not sure why this happens, but it also carries over to any vim sessions that I use from the shell. To my surprise, getting a fresh shell does not help, and the problem seems to go away as abruptly as it started.
This is what the typed characters look like, each Backspace keypress is shown by a ^? on the shell
$ cat filem^?namr^?e
Does anybody have a clue what might be happening? How can I restore the normal behaviour?
Does anyone know why a system would not execute the script code within rc.local on bootup? I have a post configuration bash script that I want to run after the initial install of VMware ESX (Red Hat), and for some reason it doesn't seem to execute. I have the setup to log its start of execution and even its progress so that I can see how far it gets in case it fails at some point, but even when I look at that log, I am finding that didn't even started the execution of the script code. I already checked to see that script has execution permissions (755), what else should I be looking at?
Here is the first few lines of my code:
#!/bin/sh
echo >> /tmp/configLog ""
echo >> /tmp/configLog "Entering maintenance mode"
Hello everyone, I'm a total newb to *nix in all forms so assume I know nothing about it.
I've been trying to use a php function set called "ZipArchive". It says I need to recompile php with the --enable-zip option.
Now "recompile php" scares me. Does that re-install it!? Does it clear all previous settings so if I do this then any settings done prior will be wiped? Or is there a way to add on this one option?
Seems a bit much for a re-installation to add a model when on a windows server it is just add a line to the .ini file :\
Many thanks to anyone who can clear up this matter for me :)
I often use tab completion in Bash when completing directories, but I find that it hangs for an unacceptable amount of time if I accidentally include a question mark in the directory. I'd like to know why and how to prevent it if possible. Here's the scenario:
I start a command and use the ~ key to represent home:
ls ~?Desktop/co
Oops! I held down the Shift for a split-second too long. I had intended for ? to be /. But (oh no!) muscle memory has already kicked in. I've hit the Tab before I noticed the mistake. Now I'm stuck waiting for the shell to beep angrily at me. Usually a minute or two.
What happened? Why did the question mark cause it to hang and eventually beep? Any way to stop it from hanging?
So, I just installed the node.js package from nodejs.org and I was poking around to see what it installed. Over in /usr/local/bin I saw this owner 24561. I see it in a few other places too. What is this? What does it mean? Should it be root like everything else?
lrwxr-xr-x 1 root wheel 66 Jun 23 13:02 mate -> /Applications/TextMate.app/Contents/SharedSupport/Support/bin/mate
-rwxr-xr-x 1 24561 wheel 18865984 Jun 29 09:32 node
-rwxr-xr-x 1 24561 wheel 355 Jun 29 09:32 node-waf
lrwxr-xr-x 1 root wheel 38 Jul 3 12:15 npm -> ../lib/node_modules/npm/bin/npm-cli.js
What was curious is that I couldn't find any other information about this user by Googling. Using OS X Lion 10.7.4 with Xcode installed if that makes any difference.
Hi all,
I have solaris 10 sparc running and working very well
but i have problem with external SCSI tape drive DAT 72 problem
it seems to me the tape drive is manufactured by SUN microsystems
when i ran mt -f /dev/rmt/0 status
it reveals the following output
bash-3.00# mt -f /dev/rmt/0 status
/dev/rmt/0: No such file or directory
when i ran ls -l
it reveals the following output
ls -l /dev/rmt/0
lrwxrwxrwx 1 root root 43 Sep 20 2006 /dev/rmt/0 -> ../../devices/pci@8,600000/scsi@1,1/st@3,0:
it seems to me everything is okay
SCSI cable is connected properly to Tape device and to server as well
the tape has SCSI termination dongle as well and connected properly to Tape device as well
any ideas would be a great assist
Thanks in advance
I am configuring a Linux Server with ACL[Access Control Lists]. It is not allowing me to perform setfacl operation on one of the directoriy /xfiles. I am able to perform the setfacl on other directories as /tmp /op/applocal/.
I am getting the error as :
root@asifdl01devv # setfacl -m user:eqtrd:rw-,user:feedmgr:r--,user::---,group::r--,mask:rw-,other:--- /xfiles/change1/testfile
setfacl: /xfiles/change1/testfile: Operation not supported
I have defined my /etc/fstab as
/dev/ROOTVG/rootlv / ext3 defaults 1 1
/dev/ROOTVG/varlv /var ext3 defaults 1 2
/dev/ROOTVG/optlv /opt ext3 defaults 1 2
/dev/ROOTVG/crashlv /var/crash ext3 defaults 1 2
/dev/ROOTVG/tmplv /tmp ext3 defaults 1 2
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/ROOTVG/swaplv swap swap defaults 0 0
/dev/APPVG/home /home ext3 defaults 1 2
/dev/APPVG/archives /archives ext3 defaults 1 2
/dev/APPVG/test /test ext3 defaults 1 2
/dev/APPVG/oracle /opt/oracle ext3 defaults 1 2
/dev/APPVG/ifeeds /xfiles ext3 defaults 1 2
I have a solaris server where the vfstab is defined as
cat vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/vx/dsk/bootdg/swapvol - - swap - no -
swap - /tmp tmpfs - yes size=1024m
/dev/vx/dsk/bootdg/rootvol /dev/vx/rdsk/bootdg/rootvol / ufs 1 no logging
/dev/vx/dsk/bootdg/var /dev/vx/rdsk/bootdg/var /var ufs 1 no logging
/dev/vx/dsk/bootdg/home /dev/vx/rdsk/bootdg/home /home ufs 2 yes logging
/dev/vx/dsk/APP/test /dev/vx/rdsk/APP/test /test vxfs 3 yes -
/dev/vx/dsk/APP/archives /dev/vx/rdsk/APP/archives /archives vxfs 3 yes -
/dev/vx/dsk/APP/oracle /dev/vx/rdsk/APP/oracle /opt/oracle vxfs 3 yes -
/dev/vx/dsk/APP/xfiles /dev/vx/rdsk/APP/xfiles /xfiles vxfs 3 yes -
I am not able to find out the issue. Any help would be appreciated.
1) Here is the command to install special package (for example system/header)
#pkg install system/header
2) ALso we can install several packages
#pkg install system/header network/ssh package/rpm
3) Here is the command to show all available packages from special group
#pkg contents -o fmri -H -rt depend -a type=group solaris-desktop
How to install all packages from a special group in one command? (How to send output from the third command as an argument to second?)
I have a Perl script that I want to daemonize. Basically this perl script will read a directory every 30 seconds, read the files that it finds and then process the data. To keep it simple here consider the following Perl script (called synpipe_server, there is a symbolic link of this script in /usr/sbin/) :
#!/usr/bin/perl
use strict;
use warnings;
my $continue = 1;
$SIG{'TERM'} = sub { $continue = 0; print "Caught TERM signal\n"; };
$SIG{'INT'} = sub { $continue = 0; print "Caught INT signal\n"; };
my $i = 0;
while ($continue) {
#do stuff
print "Hello, I am running " . ++$i . "\n";
sleep 3;
}
So this script basically prints something every 3 seconds.
Then, as I want to daemonize this script, I've also put this bash script (also called synpipe_server) in /etc/init.d/ :
#!/bin/bash
# synpipe_server : This starts and stops synpipe_server
#
# chkconfig: 12345 12 88
# description: Monitors all production pipelines
# processname: synpipe_server
# pidfile: /var/run/synpipe_server.pid
# Source function library.
. /etc/rc.d/init.d/functions
pname="synpipe_server"
exe="/usr/sbin/synpipe_server"
pidfile="/var/run/${pname}.pid"
lockfile="/var/lock/subsys/${pname}"
[ -x $exe ] || exit 0
RETVAL=0
start() {
echo -n "Starting $pname : "
daemon ${exe}
RETVAL=$?
PID=$!
echo
[ $RETVAL -eq 0 ] && touch ${lockfile}
echo $PID > ${pidfile}
}
stop() {
echo -n "Shutting down $pname : "
killproc ${exe}
RETVAL=$?
echo
if [ $RETVAL -eq 0 ]; then
rm -f ${lockfile}
rm -f ${pidfile}
fi
}
restart() {
echo -n "Restarting $pname : "
stop
sleep 2
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status ${pname}
;;
restart)
restart
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
;; esac
exit 0
So, (if I have well understood the doc for daemon) the Perl script should run in the background and the output should be redirected to /dev/null if I execute :
service synpipe_server start
But here is what I get instead :
[root@master init.d]# service synpipe_server start
Starting synpipe_server : Hello, I am running 1
Hello, I am running 2
Hello, I am running 3
Hello, I am running 4
Caught INT signal
[ OK ]
[root@master init.d]#
So it starts the Perl script but runs it without detaching it from the current terminal session, and I can see the output printed in my console ... which is not really what I was expecting. Moreover, the PID file is empty (or with a line feed only, no pid returned by daemon).
Does anyone have any idea of what I am doing wrong ?
EDIT : maybe I should say that I am on a Red Hat machine.
Scientific Linux SL release 5.4 (Boron)
Would it do the job if instead of using the daemon function, I use something like :
nohup ${exe} >/dev/null 2>&1 &
in the init script ?
I need to config one SMTP server (sendmail) to send mail with 2 interfaces with different ip's depending server.
For example: In same machine with to ip: 1.1.1.1 and 2.2.2.2 i need to send email [email protected] by 1.1.1.1 and [email protected] by 2.2.2.2
I don't now if i can configure it on sendmail, or use iptables, some idea ?
Thx.
So I'm doing full backup of my VPS using the following command (as root, of course):
tar czvf 20120604.tar.gz /
Everything seems to be fine, all files seem to appear in the list. The size of archive is 6 Gb and gunzipped version is 11 Gb which includes /home, because I totally have 11 Gb of data on VPS.
But when I try actually to unpack archive, or open it using mc or WinRAR, there's no /home folder. And WinRAR tells 20120604.tar.gz - TAR+GZIP archive, unpacked size 894 841 346 bytes. It can't be WinRAR's bug, because when I type tar xzvf 20120604.tar.gz, /home folder isn't unpacked either.
Why is /home folder missing from my archive? And what can I do to include it there?
tar --version outputs the following: tar (GNU tar) 1.15.1
I've managed to get my Ubuntu (server 10.04 beta 2) box to accept logins from users with Active Directory credentials, now I'd like those users to access there permissible windows shares on a W2003 R2 server.
The Windows share ("\srv\Users\") has subdirectories named according to the domain account users and permissions are set accordingly. I would like to preserve these permissions, but don't know how to go about it.
Would I mount as an AD administrator or have each user mount with there own AD credentials?
How do determine between using mount.smbfs or mount.cifs?
This is the opposite of Prevent “^C” from being printed when aborting editing current prompt.
I'm using Bash. When I'm editing the commandline in Bash, and I hit Control-C to abort the commandline, the '^C' character does not display. I would like to see this character.
I tried commands like stty -ctlecho and stty ctlecho (which I borrowed from the other question), but this didn't work for me. This behavior seems to be true with my environment on Ubuntu, CentOS and MacOSX. This only happens within Apple's Terminal.App. If I SSH to a remote Linux or FreeBSD box, then ^C is printed. So, this is clearly just a local setting.
Update:
Here is the output of stty -a, as requested by @quack quixote :
$ stty -a
speed 9600 baud; 41 rows; 88 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
-extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel iutf8
-ignbrk brkint -inpck -ignpar -parmrk
oflags: opost onlcr -oxtabs -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
-dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
stop = ^S; susp = ^Z; time = 0; werase = ^W;
After typing stty sane, stty -a will output the following. The only difference is the parameter of -iutf8.
$ stty sane
$ stty -a
speed 9600 baud; 41 rows; 157 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
-extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -iutf8
-ignbrk brkint -inpck -ignpar -parmrk
oflags: opost onlcr -oxtabs -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
-dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
stop = ^S; susp = ^Z; time = 0; werase = ^W;
I have sshed into a linux box and I'm using dvtm and bash (although I have also tried this with Gnu screen and bash). I have two terminals, current /dev/pts/29 and /dev/pts/130. I want to redirect the input from one to the other.
From what I understand, in /dev/pts/130 I can type:
cat </dev/pts/29
And then when I type in /dev/pts/29 the characters I type should show up in /dev/pts/130. However what ends up happening is that every other character I type gets redirected. For example, if I type "hello" I get this:
/dev/pts/29 | /dev/pts/130
$ | $ cat </dev/pts/29
$ el | hlo
This is really frustrating as I need to do this in order to redirect the io of a process running in gdb (I've tried both run /dev/pts/# and set inferior-tty /dev/pts/# and both resulted in the aforementioned behavior). Am I doing something wrong, or is this a bug in bash/screen/dvtm?