Git Product home page Git Product logo

lowendscript's People

Contributors

lowendbox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lowendscript's Issues

install tmux

Damn if I know but marrco thinks it's a good idea:

http://www.lowendtalk.com/questions/9060/new-lowendscript-for-php-sites

I guess your script is just for squeeze (php + nginx on dotdeb main repo) so i suggest you to install tmux for 2 reasons:

  1. it's the best terminal multiplexer (and remove screen with your script too)

  2. you can add the newer version via squeeze-backport so you have to add that repo too, and when (if ?) someone studies your script will learn about backports too!

Set DASH as default shell correctly

The correct way to set DASH as the default shell:

dpkg-reconfigure dash

(it does a few other things besides changing the /bin/sh target)

If the login shell is changed to DASH for the normal login user you will also save 1.5 - 1.6% of RAM on a 128 meg box:

chsh -s /bin/dash username

(as it will be open doing nothing while you su to root)

Logs in wrong place

Just noticed that a log directory is created alongside the domain directory.

Shouldn't we be using whatever directory nginx is already using for storing the logs? Is there a way to detect for that?

Plus it's in the /var/www/ directory. Not sure if we want to place those logs where Nginx can access. I would think that would be a security issue.

Domain setup has an issue

Tried doing the domain comment line:

bash setup-debian.sh domain cynix.us

And got the following:

Created cynix (OWQ1ZTdmYjc2O) with all permissions on cynix_us
setup-debian.sh: line 512: name: command not found
Reloading nginx configuration: nginx.
Created /var/www/cynix.us, /var/www/log/cynix.us, and /etc/nginx/sites-enabled/cynix.us.conf

The script creates an index.php within root with the following contents:

exec("CREATE TABLE IF NOT EXISTS ( varchar(100)) ENGINE=MyISAM"); $result = $db->query("SHOW TABLES"); while ($row = $result->fetch()) { var_dump($row); }

Wordpress setup does not check if db already exists

Error produced:

mysqladmin: CREATE DATABASE failed; error: 'Can't create database 'cynix_us'; database exists'
Reloading nginx configuration: nginx: [emerg] open() "/etc/nginx/fastcgi_php" failed (2: No such file or directory) in /etc/nginx/sites-enabled/cynix.us.conf:4
nginx: configuration file /etc/nginx/nginx.conf test failed
invoke-rc.d: initscript nginx, action "reload" failed.

some issues with the new version

I am referring to this version: https://github.com/Xeoncross/lowendscript but it seems one can't post issues there. Besides issues I also have some simple questions as:

Can you explain this in more detail? First, I added sample MVC framework (everything through index.php) and normal PHP (all php files allowed) configurations to nginx. These allow much cleaner site configs.

Also what exactly is the point of these two files: nginx installed for nginx
Created /etc/nginx/php.mvc.conf and /etc/nginx/php.conf files for PHP sites
To use them "include" them in your /etc/nginx/sites-enabled/[site] config

The nginx part has a fault somewhere: Reloading nginx configuration: [emerg]: open() "/etc/nginx/fastcgi_php" failed (2: No such file or directory) in /etc/nginx/sites-enabled/pacura.ru.conf:4

The point is that in your script you mention a fastcgi_php which I can't find anywhere... but then you do reference it in your nginx vhost files

What command is missing here? I checked your script, line 512 but do not understand what script s missing: root@euve23694:~# bash setup-debian.sh domain pacura.ru
Created pacura (NGY4MzA1N2UxO) with all permissions on pacura_ru
setup-debian.sh: line 512: name: command not found

Your script seems to install wordpress by extracting the latest.zip into the vhosts root but the zip file contains wordpress inside a wordpress folder so the further configuration breaks. Please change it so it unzips without the folder straight into the root: cp: cannot stat `/var/www/pacura.ru/wp-config-sample.php': No such file or directory
sed: can't read /var/www/pacura.ru/wp-config.php: No such file or directory

After trying to fix it partially and getting it to run, I can access the default vhost but none of my test-sites that should use wordpress since it offers me the .php files for download, so it seems nginx isn't processing them but offering them for download. what could be wrong? one test site is http://klub-kamikaze.com give it a try.

Changing ssh port

In the Xeoncross fork (https://github.com/Xeoncross/lowendscript/blob/master/setup-debian.sh),
where it is creating the /etc/xinetd.d/dropbear file, you can add these 2 lines to set a different port for ssh than 22:

port = $1
type = unlisted

along with an earlier check for a port passed as an argument:

    if [ -z "$1" ]
    then
        die "Usage: `basename $0` optimize <ssh-port-#>"
    fi

and pass that argument from the optimize function to the install_dropbear function:

optimize)
    install_dropbear $2

Another way to change the port apparently is to edit the /etc/default/dropbear file.

But I noticed the Keith2 port (https://github.com/Keith2/lowendscript/blob/master/setup-debian.sh )
uses the same method, too (setting port=value and also type=unlisted).

Expansion of the install_domain command

Having this is cool as I'm not a person who likes wordpress. Creating the database is good but let's go ahead and create a new mysql user as well to go along with the db. I know I use this as an extra security step so that if someone gets a hold of a mysqwl user/password combo, they only have access to a single database.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.