aspose file tools*
The moose likes Linux / UNIX and the fly likes Still need help(Update on command) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Reply locked New topic
Author

Still need help(Update on command)

James Akins
Greenhorn

Joined: Jun 06, 2013
Posts: 15
**Note: This is for Amazon Web Services **

So I am testing out my UNIX script that I wrote for an instance so it can already have the pre-configured packages and httpd service start. When I input the data in the desired field
"User Data:", it doesn't work. I've tried inputting my Unix code as either a text or a file and neither has worked for me.

This is essentially the script I am writing for the instance(below) and will be more complicated as I incorporate downloading war files from Maven and Jboss.

Admins/top users: Do you see the problem here? When I run these commands manually in Mindterm, it executes perfectly, but when I put it in the "User Data" field it doesn't execute anything. Please help me resolve this. Thanks in advance! Also, this is for the Amazon Linux AMI 2013.03.1 64-bit

Script:

sudo yum update

sudo su

sudo yum -y install httpd mysql mysql-server tomcat* java* apache* git

sudo chkconfig httpd on
/etc/init.d/httpd start

wget http://download.jboss.org/jbossas/7.0/jboss-as-7.0.2.Final/jboss-as-web-7.0.2.Final.tar.gz
tar xvfz jboss-as-web-7.0.2.Final.tar.gz
wget http://www.poolsaboveground.com/apache/maven/maven-2/2.2.1/binaries/apache-maven-2.2.1-bin.tar.gz
tar xvfz apache-maven-2.2.1-bin.tar.gz

sudo yum -y update

echo "script is finished"
echo
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

Let's keep this discussion in the original topic rather than spreading it over multiple topics.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Still need help(Update on command)
 
Similar Threads
How do you create a script in Unix
Make script to install war files on EC2 instance from Maven
Problem executing a command after startup(OSX 10.7)
Executing a script on a remote unix system with user other than root using java
Progress on script: Need help with file transfer from online resource to amazon ec2 instance