Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon May 14, 2012 11:59 am 
Offline
Junior Member

Joined: Sun May 13, 2012 10:02 am
Posts: 20
Hi,

Quick question, my server is debian and I am trying to have nginx installed on deploy. My stackscript is as follows:


Code:
#!/bin/bash

#install it.
apt-get install -y aptitude
aptitude install -y nginx-full
/etc/init.d/nginx start


When I used to install Nginx, it would show me a "working page" on root. This is my IP: http://176.58.103.78/

As you can see I dont get this working page, so I can only assume it hasnt installed. Am I doing something wrong here?

James


Top
   
 Post subject:
PostPosted: Mon May 14, 2012 3:54 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Does the stack script produce any errors when it runs (check via LISH)? Shouldn't you be doing an apt-get update or aptitude update before installing anything? nginx should already be started after installing it.


Top
   
 Post subject:
PostPosted: Mon May 14, 2012 4:29 pm 
Offline
Senior Member
User avatar

Joined: Sun Aug 10, 2008 11:26 am
Posts: 104
Location: ~$
Actually, the nginx* packages don't start the server after installing, for whatever reason.

Agreed, you probably need an `aptitude update` before the install.


Top
   
 Post subject:
PostPosted: Mon May 14, 2012 4:35 pm 
Offline
Junior Member

Joined: Sun May 13, 2012 10:02 am
Posts: 20
I corrected my script so it reads as follows:

Code:
#!/bin/bash

echo "" >> /etc/apt/sources.list
echo "#dotdeb" >> /etc/apt/sources.list
echo "deb http://nginx.org/packages/debian/ squeeze nginx" >> /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/debian/ squeeze nginx" >> /etc/apt/sources.list

apt-get update

apt-get install nginx

/etc/init.d/nginx start


It works. When im in Linode console it says "nginx" couldnt be authenticated so I have to accept it ( y ). Is there a way to have this install without me having to accept it via console?


Top
   
 Post subject:
PostPosted: Mon May 14, 2012 4:39 pm 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
Spadez wrote:
It works. When im in Linode console it says "nginx" couldnt be authenticated so I have to accept it ( y ). Is there a way to have this install without me having to accept it via console?


Add the -y that you had in the first post


Top
   
 Post subject:
PostPosted: Mon May 14, 2012 5:02 pm 
Offline
Junior Member

Joined: Sun May 13, 2012 10:02 am
Posts: 20
I cant catch a break here!

This works:

Code:
#!/bin/bash

echo "" >> /etc/apt/sources.list
echo "#dotdeb" >> /etc/apt/sources.list
echo "deb http://nginx.org/packages/debian/ squeeze nginx" >> /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/debian/ squeeze nginx" >> /etc/apt/sources.list

apt-get update

apt-get install nginx

/etc/init.d/nginx start


This does not:

Code:
#!/bin/bash

echo "" >> /etc/apt/sources.list
echo "#dotdeb" >> /etc/apt/sources.list
echo "deb http://nginx.org/packages/debian/ squeeze nginx" >> /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/debian/ squeeze nginx" >> /etc/apt/sources.list

apt-get update

apt-get install -y nginx

/etc/init.d/nginx start


All I did was add -y. When I watch in console with -y, it runs throught the code and then appears to stop and then it just says:

Quote:
Debian GNU/Linux...etc

What gives!?


Top
   
 Post subject:
PostPosted: Mon May 14, 2012 5:32 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Did you look at the man page for apt-get?

http://manpages.ubuntu.com/manpages/luc ... get.8.html

You can't put an option between the command and the package name...


Top
   
 Post subject:
PostPosted: Mon May 14, 2012 5:48 pm 
Offline
Junior Member

Joined: Sun May 13, 2012 10:02 am
Posts: 20
From what I can see (im new to this) it should be like this:

Code:
#!/bin/bash

echo "" >> /etc/apt/sources.list
echo "#dotdeb" >> /etc/apt/sources.list
echo "deb http://nginx.org/packages/debian/ squeeze nginx" >> /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/debian/ squeeze nginx" >> /etc/apt/sources.list
echo "deb http://ftp.debian.org/debian/ squeeze non-free" >> /etc/apt/sources.list

apt-get update

apt-get -y install nginx
/etc/init.d/nginx start


Again though, this doesnt work. It works fine without -y....


Top
   
 Post subject:
PostPosted: Mon May 14, 2012 6:59 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Adding the nginx package key will get rid of the error about nginx not being authenticated

Code:
wget -O - http://nginx.org/keys/nginx_signing.key | apt-key add -
put that before you run apt-get update

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Mon May 14, 2012 7:05 pm 
Offline
Junior Member

Joined: Sun May 13, 2012 10:02 am
Posts: 20
For what ever reason the -y code doesnt work (bug?), but thanks to obs for this code, which does work:

Code:
#!/bin/bash 

echo "" >> /etc/apt/sources.list
echo "#dotdeb" >> /etc/apt/sources.list
echo "deb http://nginx.org/packages/debian/ squeeze nginx" >> /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/debian/ squeeze nginx" >> /etc/apt/sources.list
echo "deb http://ftp.debian.org/debian/ squeeze non-free" >> /etc/apt/sources.list
wget -O - http://nginx.org/keys/nginx_signing.key | apt-key add -
apt-get update

apt-get install nginx
/etc/init.d/nginx start


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group