Install Nginx using StackScript - Not working?
Quick question, my server is debian and I am trying to have nginx installed on deploy. My stackscript is as follows:
#!/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:
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
9 Replies
Agreed, you probably need an aptitude update
before the install.
#!/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?
@Spadez:
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
This works:
#!/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:
#!/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:
> Debian GNU/Linux…etc
What gives!?
You can't put an option between the command and the package name…
#!/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….
wget -O - http://nginx.org/keys/nginx_signing.key | apt-key add -
put that before you run apt-get update
#!/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