root's crontab and mysqldump

2009-02-23 Thread Joseph Simmons
I'm running  a FreeBSD 7.0-RELEASE system and am trying to run a mysqldump
as root. I've written a very simple script that does the dump, it works fine
when I run it manually, but when I include it in the root's crontab (crontab
-e) or in the system's crontab (/etc/crontab), I see that the script is ran
in the log but it doesn't do anything. I'm able to run other cron jobs as
root without any problem. This script is only suppose to create a file
containing the dumped database.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: root's crontab and mysqldump

2009-02-23 Thread Joseph Simmons
I added the full path and the result didn't change. I can still see it
running in the log but the script doesn't appear to be doing anything.

I have the following variables set in the root's crontab

SHELL=/usr/local/bin/bash
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/root

The file I'd like to execuate has the following permissions

rwxr-x---

it's own by root, the contents of the file are below

#!/usr/local/bin/bash
date_time=$(/bin/date +%Y-%m-%d-%H-%M-%S)

/usr/local/bin/mysqldump -u backup_user -pPassWord DataBase
/backup/db/DataBase-$date_time



On Mon, Feb 23, 2009 at 12:06 PM, Christopher Umina ch...@easymac.orgwrote:

 be sure to use the absolute path to the command you're using.

 (/usr/local/bin/mysqldump if i remember correctly)

 crontab runs with a lesser path than your shell


 On Feb 23, 2009, at 12:37 PM, Joseph Simmons wrote:

  I'm running  a FreeBSD 7.0-RELEASE system and am trying to run a mysqldump
 as root. I've written a very simple script that does the dump, it works
 fine
 when I run it manually, but when I include it in the root's crontab
 (crontab
 -e) or in the system's crontab (/etc/crontab), I see that the script is
 ran
 in the log but it doesn't do anything. I'm able to run other cron jobs as
 root without any problem. This script is only suppose to create a file
 containing the dumped database.
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: root's crontab and mysqldump

2009-02-23 Thread Joseph Simmons
Adding /usr/local/bin gives the same result.

On Mon, Feb 23, 2009 at 1:00 PM, Steven Kreuzer skreu...@exit2shell.comwrote:


 On Feb 23, 2009, at 1:26 PM, Joseph Simmons wrote:

  I added the full path and the result didn't change. I can still see it
 running in the log but the script doesn't appear to be doing anything.

 I have the following variables set in the root's crontab

 SHELL=/usr/local/bin/bash
 PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin


 Add /usr/local/bin to PATH because that is where the mysqldump binary is.
 Also, you don't need /etc in your path, pretty much ever because that
 directory should never have executable programs in it.

 --
 Steven Kreuzer
 http://www.exit2shell.com/~skreuzer


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


starting Tomcat6

2008-12-23 Thread Joseph Simmons
uname -a gives:
7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008
r...@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

I installed Apache Tomcat from the ports collection
(/usr/ports/www/tomcat6) without error. From the documentation that
I've seen, starting tomcat is done with the following command

/usr/local/etc/rc.d/tomcat6 start

But when I do this (as root or otherwise), the tomcat process doesn't
seem to start. Should there be some other way of starting the process?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: starting Tomcat6

2008-12-23 Thread Joseph Simmons
It is now :), but that should only effect things when the computer
starts up. I'm still not able to start tomcat from it's rc.d script.

On Tue, Dec 23, 2008 at 1:03 PM, Matthew Seaman
m.sea...@infracaninophile.co.uk wrote:
 Joseph Simmons wrote:

 uname -a gives:
 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008
 r...@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

 I installed Apache Tomcat from the ports collection
 (/usr/ports/www/tomcat6) without error. From the documentation that
 I've seen, starting tomcat is done with the following command

 /usr/local/etc/rc.d/tomcat6 start

 But when I do this (as root or otherwise), the tomcat process doesn't
 seem to start. Should there be some other way of starting the process?

 Did you put:

  tomcat6_enable=YES

 into /etc/rc.conf ?

Cheers,

Matthew

 --
 Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: starting Tomcat6

2008-12-23 Thread Joseph Simmons
I have tomcat6_enable=YES in rc.conf and I don't see any tomcat
process when I ps aux. When I try to start the script, nothing is
returned either, I'd expect there to be some success or failure
message as there is when starting apache22.

On Tue, Dec 23, 2008 at 1:23 PM, matt donovan kitchet...@gmail.com wrote:


 On Tue, Dec 23, 2008 at 2:15 PM, Joseph Simmons josephdsimm...@gmail.com
 wrote:

 It is now :), but that should only effect things when the computer
 starts up. I'm still not able to start tomcat from it's rc.d script.

 On Tue, Dec 23, 2008 at 1:03 PM, Matthew Seaman
 m.sea...@infracaninophile.co.uk wrote:
  Joseph Simmons wrote:
 
  uname -a gives:
  7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008
  r...@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
 
  I installed Apache Tomcat from the ports collection
  (/usr/ports/www/tomcat6) without error. From the documentation that
  I've seen, starting tomcat is done with the following command
 
  /usr/local/etc/rc.d/tomcat6 start
 
  But when I do this (as root or otherwise), the tomcat process doesn't
  seem to start. Should there be some other way of starting the process?
 
  Did you put:
 
   tomcat6_enable=YES
 
  into /etc/rc.conf ?
 
 Cheers,
 
 Matthew
 
  --
  Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
  PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
  Kent, CT11 9PW
 
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 freebsd-questions-unsubscr...@freebsd.org

 no you must have tomcat_enable=yes  in your rc.conf to even run the script
 unless you forcestart it. so ps aux does not show tomcat as running?


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: starting Tomcat6

2008-12-23 Thread Joseph Simmons
Yes, I tried starting it again and got the same result as before which
is nothing at all happened.
Apache HTTP server works fine, it starts with the computer in fact.
I'm not sure if Apache's configuration would effect Tomcat, if so, the
following is in rc.conf

apache22_enable=YES
apache22_profiles=
apache22limits_enable=NO
apache22_flags=
apache22limits_args=-e -C daemon
apache22_http_accept_enable=NO


On Tue, Dec 23, 2008 at 1:46 PM, Glen Barber glen.j.bar...@gmail.com wrote:
 On Tue, Dec 23, 2008 at 2:33 PM, Joseph Simmons
 josephdsimm...@gmail.com wrote:
 I have tomcat6_enable=YES in rc.conf and I don't see any tomcat
 process when I ps aux. When I try to start the script, nothing is
 returned either, I'd expect there to be some success or failure
 message as there is when starting apache22.


 After entering the rcvar to rc.conf, did you *start* tomcat again?
 Doesn't tomcat also require apache22_enable=YES in rc.conf?

 --
 Glen Barber

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: starting Tomcat6

2008-12-23 Thread Joseph Simmons
Ok I get what's below

[r...@cougar /usr/local/etc/rc.d]# ./tomcat6 rcvar
# tomcat60
tomcat60_enable=NO

I haven't restarted this computer since I've installed tomcat, could
that be a problem?

On Tue, Dec 23, 2008 at 1:53 PM, Glen Barber glen.j.bar...@gmail.com wrote:
 On Tue, Dec 23, 2008 at 2:52 PM, Joseph Simmons
 josephdsimm...@gmail.com wrote:
 Yes, I tried starting it again and got the same result as before which
 is nothing at all happened.
 Apache HTTP server works fine, it starts with the computer in fact.
 I'm not sure if Apache's configuration would effect Tomcat, if so, the
 following is in rc.conf

 apache22_enable=YES
 apache22_profiles=
 apache22limits_enable=NO
 apache22_flags=
 apache22limits_args=-e -C daemon
 apache22_http_accept_enable=NO


 Try this:


 /usr/local/etc/rc.d/tomcat rcvar


 --
 Glen Barber

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: starting Tomcat6

2008-12-23 Thread Joseph Simmons
Changing tomcat6_enable to tomcat60_enable worked I'm able to connect
on port 8180, thanks for the help.

On Tue, Dec 23, 2008 at 1:57 PM, Matthew Seaman
m.sea...@infracaninophile.co.uk wrote:
 Joseph Simmons wrote:

 I have tomcat6_enable=YES in rc.conf and I don't see any tomcat
 process when I ps aux. When I try to start the script, nothing is
 returned either, I'd expect there to be some success or failure
 message as there is when starting apache22.

 The process you'ld start is called 'java' according to ps(1) -- tomcat
 runs inside that.

 You certainly should get some output from the startup script.  Seeing
 nothing
 at all is a classic symptom of not having the right settings in rc.conf

 Try using sockstat(1) to see if you have anything likely with a network
 listener on ports 8180 8005 or 8009.  Note that tomcat doesn't bind to
 port 80 (or 443 for SSL enabled versions) unless you modify server.xml
 If there's a port 8180 listener, then http://localhost:8180/ should get
 you the default tomcat home page.

 If not then you should be able to find some logs in
 /usr/local/apache-tomcat6.0/logs  which may offer clues.

Cheers,

Matthew

 --
 Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: PHP5 install error on FreeBSD 7.0

2008-04-13 Thread Joseph Simmons
Updating the port tree worked with no problems. Thanks

On Sat, Apr 12, 2008 at 3:07 PM, Mel
[EMAIL PROTECTED] wrote:
 On Saturday 12 April 2008 21:29:18 Joseph Simmons wrote:
   cougar# pwd
   /usr/ports/www/apache22/work/httpd-2.2.6
   cougar# make -n install-htdocs
   echo Installing HTML documents ;
   /usr/ports/www/apache22/work/httpd-2.2.6/build/mkdir.sh
   /usr/local/www/apache22/data ;  test -d
   /usr/ports/www/apache22/work/httpd-2.2.6/docs/docroot  (cd
   /usr/ports/www/apache22/work/httpd-2.2.6/docs/docroot  cp -rp
   index.html )   ( [ ! -f /usr/local/www/apache22/data/index.html ] 
   cp -p /index.html /usr/local/www/apache22/data/index.html)

  Apparently they fixed that in 2.2.8, because my version ends in ||true which
  makes any failure not fatal.
  Part of the problem is that htdocsdir is not set, so cp -p /index.html fails,
  even though config.log shows the value, it's not translated to the Makefile.

  Hmm, the quick fix would be to run:
  cd /usr/ports/www/apache22/work/httpd-2.2.6  make -k install

  The longer but probably better fix is to update your ports tree, using csup 
 or
  portsnap. In that case the handbook is your friend:
  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html

  One reason it is the better fix, is that 2.2.8 fixes a few security issues:
  http://www.apache.org/dist/httpd/CHANGES_2.2.8

  --


 Mel

  Problem with today's modular software: they start with the modules
 and never get to the software part.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: PHP5 install error on FreeBSD 7.0

2008-04-12 Thread Joseph Simmons
I installed apache from the port collection so wherever the default
location is httpd.conf is in /usr/local/etc/apache22, the log
files are in /var/log and at least some of the files that are used for
loading modules are in /usr/local/libexec/apache22. I'm not sure where
the other stuff is.
I've not heard of PREFIX.

On Sat, Apr 12, 2008 at 12:00 PM, Mel
[EMAIL PROTECTED] wrote:


  Where is your apache installed? Did you by any chance alter the PREFIX?
  --
  Mel

  Problem with today's modular software: they start with the modules
 and never get to the software part.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: PHP5 install error on FreeBSD 7.0

2008-04-12 Thread Joseph Simmons
/usr/local/include/apache22 does not exist.
Apache seems to work fine, though, when I install apache from
/usr/ports/www/apache22, at the end, I get some errors:
Installing configuration files
Installing HTML documents
*** Error code 1

Stop in /usr/ports/www/apache22/work/httpd-2.2.6.
*** Error code 1

Stop in /usr/ports/www/apache22/work/httpd-2.2.6.
*** Error code 1

Stop in /usr/ports/www/apache22.
*** Error code 1

Stop in /usr/ports/www/apache22.



I don't know where to look to find more information about the errors.
Is there a place I can get the header files from, would you know why
they are missing?

On Sat, Apr 12, 2008 at 1:46 PM, Mel
[EMAIL PROTECTED] wrote:
 On Saturday 12 April 2008 19:59:12 Joseph Simmons wrote:
   I installed apache from the port collection so wherever the default
   location is httpd.conf is in /usr/local/etc/apache22, the log
   files are in /var/log and at least some of the files that are used for
   loading modules are in /usr/local/libexec/apache22. I'm not sure where
   the other stuff is.
   I've not heard of PREFIX.

  Well, the headers are missing. Does the directory:
  /usr/local/include/apache22
  exist?

  If it doesn't, something went wrong with the apache install or files got
  deleted afterwards somehow.

  --


 Mel

  Problem with today's modular software: they start with the modules
 and never get to the software part.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: PHP5 install error on FreeBSD 7.0

2008-04-12 Thread Joseph Simmons
cougar# pwd
/usr/ports/www/apache22/work/httpd-2.2.6
cougar# make -n install-htdocs
echo Installing HTML documents ;
/usr/ports/www/apache22/work/httpd-2.2.6/build/mkdir.sh
/usr/local/www/apache22/data ;  test -d
/usr/ports/www/apache22/work/httpd-2.2.6/docs/docroot  (cd
/usr/ports/www/apache22/work/httpd-2.2.6/docs/docroot  cp -rp
index.html )   ( [ ! -f /usr/local/www/apache22/data/index.html ] 
cp -p /index.html /usr/local/www/apache22/data/index.html)


On Sat, Apr 12, 2008 at 2:22 PM, Mel
[EMAIL PROTECTED] wrote:
 On Saturday 12 April 2008 20:59:48 Joseph Simmons wrote:
   /usr/local/include/apache22 does not exist.
   Apache seems to work fine, though, when I install apache from
   /usr/ports/www/apache22, at the end, I get some errors:
   Installing configuration files
   Installing HTML documents
   *** Error code 1
  
   Stop in /usr/ports/www/apache22/work/httpd-2.2.6.
   *** Error code 1
  
   Stop in /usr/ports/www/apache22/work/httpd-2.2.6.
   *** Error code 1
  
   Stop in /usr/ports/www/apache22.
   *** Error code 1
  
   Stop in /usr/ports/www/apache22.
  
  
  
   I don't know where to look to find more information about the errors.

  That happens in the install from apache itself.

  Could you do the following:
  cd /usr/ports/www/apache22/work/httpd-2.2.6
  make -n install-htdocs

  And show the output here.


   Is there a place I can get the header files from, would you know why
   they are missing?

  They're missing because the install failed before they got installed.

  --


 Mel

  Problem with today's modular software: they start with the modules
 and never get to the software part.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


PHP5 install error on FreeBSD 7.0

2008-04-11 Thread Joseph Simmons
I can't seem to install PHP 4 or 5 from the port collection or PHP5
from PHP's website. I'm new to FreeBSD so I'm not sure I'm overlooking
something rather simple or if I'm missing some other program or
something like that
I have Apache 2.2.6 installed and running, I've tried to install PHP
several times, below is what the terminal gives me when I try to
install PHP5 from the port collection.
Thanks


cougar# pwd
/usr/ports/lang/php5
cougar# make install
===  Building for php5-5.2.5
Makefile, line 588: warning: duplicate script for target
main/internal_functions.lo ignored
/bin/sh /usr/ports/lang/php5/work/php-5.2.5/libtool
--preserve-dup-deps --mode=compile cc  -DHAVE_MYSQL_H
-I/usr/local/include/apache22   -I/usr/local/include/apr-1
-I/usr/local/include/apr-1 -I/usr/local/include
-I/usr/local/include/mysql -Isapi/apache2handler/
-I/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/
-DPHP_ATOM_INC -I/usr/ports/lang/php5/work/php-5.2.5/include
-I/usr/ports/lang/php5/work/php-5.2.5/main
-I/usr/ports/lang/php5/work/php-5.2.5 -I/usr/local/include/libxml2
-I/usr/local/include
-I/usr/ports/lang/php5/work/php-5.2.5/ext/date/lib
-I/usr/ports/lang/php5/work/php-5.2.5/TSRM
-I/usr/ports/lang/php5/work/php-5.2.5/Zend-pipe -g -O0 -Wall
-prefer-non-pic -c
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/mod_php5.c -o
sapi/apache2handler/mod_php5.lo
 cc -DHAVE_MYSQL_H -I/usr/local/include/apache22
-I/usr/local/include/apr-1 -I/usr/local/include/apr-1
-I/usr/local/include -I/usr/local/include/mysql -Isapi/apache2handler/
-I/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/
-DPHP_ATOM_INC -I/usr/ports/lang/php5/work/php-5.2.5/include
-I/usr/ports/lang/php5/work/php-5.2.5/main
-I/usr/ports/lang/php5/work/php-5.2.5 -I/usr/local/include/libxml2
-I/usr/local/include
-I/usr/ports/lang/php5/work/php-5.2.5/ext/date/lib
-I/usr/ports/lang/php5/work/php-5.2.5/TSRM
-I/usr/ports/lang/php5/work/php-5.2.5/Zend -pipe -g -O0 -Wall -c
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/mod_php5.c -o
sapi/apache2handler/.libs/mod_php5.o
In file included from
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/mod_php5.c:26:
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/php_apache.h:24:19:
error: httpd.h: No such file or directory
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/php_apache.h:25:25:
error: http_config.h: No such file or directory
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/php_apache.h:26:23:
error: http_core.h: No such file or directory
In file included from
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/mod_php5.c:26:
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/php_apache.h:29:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'AP_MODULE_DECLARE_DATA'
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/php_apache.h:37:
error: expected specifier-qualifier-list before 'request_rec'
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/php_apache.h:51:
error: expected ')' before '*' token
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/php_apache.h:52:
error: expected ')' before '*' token
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/php_apache.h:55:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'php_dir_cmds'
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/php_apache.h:56:
error: expected ')' before '*' token
/usr/ports/lang/php5/work/php-5.2.5/sapi/apache2handler/mod_php5.c:28:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'module'
*** Error code 1

Stop in /usr/ports/lang/php5/work/php-5.2.5.
*** Error code 1

Stop in /usr/ports/lang/php5.
*** Error code 1

Stop in /usr/ports/lang/php5.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]