Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


LEB Setup script for Debian 6 VPS - Nginx, MySQL, IPtables, etc.. - Page 3
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

LEB Setup script for Debian 6 VPS - Nginx, MySQL, IPtables, etc..

13»

Comments

  • Interesting scripts. We need a repository on here for these.

    For the Ubuntu folks, I know I've been using Ubuntu since version 10. But have been less and less impressed with recent release and GUI changes + bulk.

    Find the distro install to fall apart with junk and require a clean start at least annually.

    So, like with my server installs, I am headed back to Debian.

    If you have issues with the old program version in Debian stable sources (like ancient Nginx) you need to start pulling updates from the Testing release instead. It isn't totally current, but much newer.

  • fresher_06fresher_06 Member
    edited October 2012

    If we run ./setup-debian.sh iptables 22 , the script shows an "error in line 53. that line is the "commit" ..
    So I have opened the file /etc/iptables.up.rules and comment out the "COMMIT" line as per @kossel .. and then manually run the command as below --

    iptables-restore < /etc/iptables.up.rules

    This also failed saying that it expects COMMIT on line 54 ...
    So after that i ran each and every command mentioned in the file /etc/iptables.up.rules manually . something like as below --

    iptables -A INPUT -i lo -j ACCEPT
    iptables -A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT
    iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
    iptables -A OUTPUT -j ACCEPT
    iptables -A INPUT -p tcp --dport 80 -j ACCEPT
    iptables -A INPUT -p tcp --dport 443 -j ACCEPT
    iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -m recent --set --name DEFAULT --rsource
    iptables: No chain/target/match by that name.

    But as u see . rest all the above command ran fine but it throws error on "iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -m recent --set --name DEFAULT --rsource" .. saying that "iptables: No chain/target/match by that name." .. so I believe if we debug this .. this will automatically solve all the issues and no need to comment out COMMIT line...
    From my initial research , its because of some Kernel modules are not loaded.. but not sure now to move ahead ..

  • Sorry to bother, but how can i Upgrade to the latest nginx ?
    It istalled : nginx/0.7.67
    I did all the steps in order, but dunno...

  • patrokovpatrokov Member
    edited October 2012

    @ekoice said: Sorry to bother, but how can i Upgrade to the latest nginx ?

    It istalled : nginx/0.7.67
    I did all the steps in order, but dunno...

    Looks like the LEB script doesn't use the dotdeb repositories. Short story, as root:
    add the following lines to /etc/apt/sources.list:
    deb http://packages.dotdeb.org squeeze all deb-src http://packages.dotdeb.org squeeze all

    Then run the following:
    wget http://www.dotdeb.org/dotdeb.gpg cat dotdeb.gpg | sudo apt-key add - apt-get update apt-get upgrade

    This will also update php and mysql.

  • Restarting PHP5 FastCGI Process Manager: php5-fpm failed!

    Was the script updated recently? It worked for me last month

  • I tried to include webmin for my box.

    But never been able to access it as , but the webmin are running,

    is this because the firewall are blocking that port ?

    or because of domain issue due to my box specify my vps name as hostname/domain.

  • @fresher_06 were you able to sort it out? I've been having a headache with this, and as reading openvz wiki (my vps is a openvz) http://wiki.openvz.org/Setting_up_an_iptables_firewall and this bug report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=682612 , it looks like the vps provider must be setting up iptables on the HN and therefore the containers can't put their own iptables rules.

  • @rained23 said: I tried to include webmin for my box.
    But never been able to access it as , but the webmin are running,
    is this because the firewall are blocking that port ?
    or because of domain issue due to my box specify my vps name as hostname/domain.

    check with "netstat -nlpt" is port 10000 used by webmin or not
    try to access with http://yourip:10000

  • @arieonline said: check with "netstat -nlpt" is port 10000 used by webmin or not

    try to access with http://yourip:10000

    its because the firewall are not accepting webmin port,
    I added it manually to the rules and it work now.

  • Would just like to add that i tried this on debian 6 a few hours ago, installation went fine but when adding the wordpress vhost i got "not found" like errors.

    Don't have the output on me right now, so can't paste

  • hello mates. does this script up to date? I want to use this on my new debian32 lowend vps. Is it possible? Thanks.

  • @bboran said: hello mates. does this script up to date? I want to use this on my new debian32 lowend vps. Is it possible? Thanks.

    Yes, of course.

  • @fresher_06 you are missing the recent module

    for OpenVZ you can use:

    cat /proc/net/ip_tables_matches

    to list loaded module in your container, if you missing recent module, ask your VPS provider to load it in your container. if somehow they can't, you can replace the firewall rules with this:

    -A INPUT -p tcp --dport 22 -m state --state NEW -m limit --limit 3/min --limit-burst 3 -j ACCEPT

    @Xeoncross -> a suggestion: in your firewall script, you can add checking for loaded iptables module first, before actually building the firewall script, many OpenVZ provider not loading recent module by default

  • (from your PC) Copy your ssh-key to the server

    ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]

    how can i make this process? where do i have to put my ssh-key on my computer? also how can i generate a one? Thanks

  • I'd appreciate a version where we could choose what sql software to use: sqlite, mysql, mariadb, percona, postgres

  • possible to add this for centos too?

  • @bboran how can i make this process? where do i have to put my ssh-key on my computer? also how can i generate a one? Thanks

    ssh key usualy stored in directory /home//.ssh

    to generate:

    ssh-keygen -t rsa

    It will create 2 files in /home//.ssh directory as follows:

    ~/.ssh/id_rsa : identification (private) key
    ~/.ssh/id_rsa.pub : public key
    
  • @yowmamasita: I'd appreciate a version where we could choose what sql software to use: sqlite, mysql, mariadb, percona, postgres

    +1 with this feature

  • @graca said: ssh key usualy stored in directory /home//.ssh

    to generate:

    ssh-keygen -t rsa

    It will create 2 files in /home//.ssh directory as follows:

    in which part i will do this? before ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected] part? and what will i do after creating them? damn why the developer didnt put a how to guide =(

  • @Chan I had the same issue with php5-fpm failing to start. Turns out it was a problem using Debian x64. Installing x86 fixed the problem for me.

    The info's probably a little late for you, but it might help someone else in the same situation.

  • @bboran in which part i will do this? before ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected] part? and what will i do after creating them? damn why the developer didnt put a how to guide =(

    sorry just read this today

    ssh-copy-id is the tool to copy your key to the server, so you have to generate the key firsts then exec the ssh-copy-id command

    if you do this correctly, usually you will be able to login without password to your server

  • add support mariadb

  • Sorry to bump this thread, but i'm getting a 502 bad gateway error on Nginx (Installed php-fpm + nginx)

    Anyone else also having this problem with this script?

  • Hows the court @joodle?

  • @ErawanArifNugroho said:
    Hows the court joodle?

    Why going offtopic?

    You can check how it went and my thread

  • I tought you already going there and have no problem with the law :)

    So, did your php-fpm runing?

  • ErawanArifNugroho said: So, did your php-fpm runing?

    It is, but for some reason the "/var/run/php5-fpm.sock" file does not exist..

  • Ah.. there's a time when it happen to me. How about make the file manually with an empty file and try to restart php-fpm?

  • @ErawanArifNugroho said:
    Ah.. there's a time when it happen to me. How about make the file manually with an empty file and try to restart php-fpm?

    Weird, the files does exist in the /var/run folder, cat shows this output

    cat: php5-fpm.sock: No such device or address
Sign In or Register to comment.