- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Ubuntu: env variables and scripting issues"
Collapse
-
Cheers for the advice.
Set up the root env, set up restart in /etc/init.d/tomcat reboted without login and tomcat is running. Robert is your Mothers Brother.
Next weeks task is getting mySQL running in a clustered environment for the EC2.
Time for a beer, cheers.
-
Originally posted by lilelvis2000 View PostThey are completely different.
as a test do
>env
and then
>sudo env
you'll see the difference.
You'll need to either keep the script as it is...which IMHO isn't really a hack. Although I had thought that the current java was really done by a symbolic link...but anyway, or put the env variable into the .profile of the root user.
Leave a comment:
-
Originally posted by NickFitz View Post
I think I am used to running tomcat off solaris servers that have not been rebooted for 5 years.
Leave a comment:
-
They are completely different.
as a test do
>env
and then
>sudo env
you'll see the difference.
You'll need to either keep the script as it is...which IMHO isn't really a hack. Although I had thought that the current java was really done by a symbolic link...but anyway, or put the env variable into the .profile of the root user.
Leave a comment:
-
Why you running Tomcat as root? If you need port 80 then run Apache in front.
Leave a comment:
-
I think you are right. I set the JAVA_HOME as myself but have to sudo the tomcat to get it to run.
Strangely it will not let me sudo the export though.
I think if I let the auto startup run it then I can remove the hack I suppose.
It is my first experience of running a lynux server after years of solaris, thought they would be the same but it is the small changes that confuse me.
Cheers
Leave a comment:
-
The only thing I can think is that tomcat script is switching to another user and thus using that account's environment instead of yours...but I could be very wrong.
Leave a comment:
-
Originally posted by lilelvis2000 View PostI haven't read this...but maybe this can help ? http://blog.datajelly.com/company/bl...on-ubuntu.html
In the end I just hacked in the export at the top of the startup script which is not perfect but gets it working for now. Do not understand why it just drops the env variables as they are set before calling the script.
Another entry in the hack list.
Leave a comment:
-
I haven't read this...but maybe this can help ? http://blog.datajelly.com/company/bl...on-ubuntu.html
Leave a comment:
-
Ubuntu: env variables and scripting issues
Is there anything different about the way ubuntu deals with env variables in sctipts? I am trying to get tomcat installed and running which is something I have done a thousand times on Solaris.
It relies on JAVA_HOME being set so...
Code:JAVA_HOME=/opt/java/jdk1.6.0_14 export JAVA_HOME echo $JAVA_HOME /opt/java/jdk1.6.0_14
Code:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program
Code:# Make sure prerequisite environment variables are set if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then # Bugzilla 37284 (reviewed). if $darwin; then if [ -d "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home" ]; then export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home" fi else JAVA_PATH=`which java 2>/dev/null` if [ "x$JAVA_PATH" != "x" ]; then JAVA_PATH=`dirname $JAVA_PATH 2>/dev/null` JRE_HOME=`dirname $JAVA_PATH 2>/dev/null` fi if [ "x$JRE_HOME" = "x" ]; then # XXX: Should we try other locations? if [ -x /usr/bin/java ]; then JRE_HOME=/usr fi fi fi if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then echo "1Neither the JAVA_HOME nor the JRE_HOME environment variable is defined" echo "At least one of these environment variable is needed to run this program" exit 1 fi fi
Tags: None
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Streamline Your Retirement with iSIPP: A Solution for Contractor Pensions Sep 1 09:13
- Making the most of pension lump sums: overview for contractors Sep 1 08:36
- Umbrella company tribunal cases are opening up; are your wages subject to unlawful deductions, too? Aug 31 08:38
- Contractors, relabelling 'labour' as 'services' to appear 'fully contracted out' won't dupe IR35 inspectors Aug 31 08:30
- How often does HMRC check tax returns? Aug 30 08:27
- Work-life balance as an IT contractor: 5 top tips from a tech recruiter Aug 30 08:20
- Autumn Statement 2023 tipped to prioritise mental health, in a boost for UK workplaces Aug 29 08:33
- Final reminder for contractors to respond to the umbrella consultation (closing today) Aug 29 08:09
- Top 5 most in demand cyber security contract roles Aug 25 08:38
- Changes to the right to request flexible working are incoming, but how will contractors be affected? Aug 24 08:25
Leave a comment: