Forum

Install script Hiawatha-PHP-FPM-MariaDB Debian x32/x64

ZEROF
15 April 2014, 18:38
Hi all,

I have few VPS (private and clients) with Hiawatha, PHP-FPM and MariaDB up and running. But when we get new clients or i need to update something i don't like to spend hours typing commands. This script was made one more time to save my time, hope that it will save yours too.

First i want to say thanks to Virtovo VPS provider and gift i got from them (super speed kvm 512mb VPS). Thanks to all testers and their time as well. I learned few new trick with bash and thanks for that goes from guys from freenode IRC #filmsbykris and my friend from BackBox Linux community.

I tested this script with Debian x32/x64 without issues. Script will find your system version and will install good packages for you. If you get to some problems keep me posted.

This script is "work in progress" and in base was made with Percona server installation, but Percona is not for 512mb VPS (from 1gb is ok) and i need to make variable for creation of my.cnf file, because last version 5.6 don't have that file you need to made it with https://tools.percona.com/sign-in. It's good solution but you need some extra skills to put all up and running.

What we have today:

External image via http://s22.postimg.org/gz7tkvadt/capture5.jpg


HOW TO

git clone https://gist.github.com/10743343.git settings;cd settings;mv hiawatha.sh /root;cd

chmod +x hiawatha.sh

./hiawatha.sh

Run all options from 1-8 and share your ideas with me. What I can add to script? Say me if all goes well on your servers.

Script demo: https://asciinema.org/a/8847 (i will try to keep up to date)

Have a nice play!


Hiawatha version: 9.4
Operating System: Debian 7 x32/x64
Hugo Leisink
15 April 2014, 20:53
Thanks ZEROF, well done!


And btw, yes, you can use bbcodes.
ZEROF
16 April 2014, 04:13
Thanks Hugo,

I'm working on vhost add/remove. This is first demo:

https://asciinema.org/a/8919
ZEROF
16 April 2014, 19:34
Hello,

Good news. Now with this script you can almost do everything . As people asked before we have new options, setting php-fpm and setting virtual host. "Small" extra, you can even remove vhosts. This script will help you, but I'm not sure if you will learn all about Hiawatha web server and power you can get.

This script version is 0.2. Tested by few people and working without issues. I look for better solution for few things but that will come in the future. For now you have all what you need to start hosting your site with Hiawatha. Many options can be set thanks to bash, but one day i will have some limits. I have few ideas but i need to learn how to code that parts and maybe i will need more time to add some extra futures.

Problem is not coding it's logic inside code. When you are done with one part you move to next, then you see that you need more variables . Then you need to re-code things to work together.

Now back to script. When you set your vhost your can check inside /etc/hiawatha/hiawatha.conf file your new vhost setting. In this time you can't re-edit Hiawatha settings via bash, but if all goes well that can be done as well.

External image via http://s15.postimg.org/86mte6g3v/capture7.jpg


This is how new vhost code will look:

External image via http://s17.postimg.org/vky250sr3/capture8.jpg


What we have here, standard vhost with php-fpm enabled (fast-cgi will do the job for HTML pages, don't worry). But if you have site with a lot of download links you need to set your own time for active connection.

TimeForCGI = 5

If this is you case you can replace 5 with 1800 (30min). As i don't want people to download things from my server, i don't need more then 5sec for normal connection. I will put this option to 10 sec after writing this topic, but you must keep this on your mind. It's not my fault if something goes wrong.

Next step ... i will add some cool stuff and new part for this script and that is what people asked as well. First option will be setting your SSH port, setting Hiawatha port, setting XSS and SQLi protection, setting anti DOS protection and things like that.

And in the end ...thanks to my friends from Back Box community and my new net dudes from IRC freenode channel #filmsbykris, cool people with coding knowledge.

Gits link: https://gist.github.com/ZEROF/10743343

Cheers !
ZEROF
24 April 2014, 00:15
Good news,

I finished coding for today. I wait for few testers and new version (v0.4) will be public. New version comes with phpMyAdmin options.

1. Install after setting Wordpress site
2. Install after setting vhost

Thank you for support !
ZEROF
26 April 2014, 22:15
Hi all,

Script was updated to v0.4 with Hiawatha 9.5 support and phpMyadmin installation. You can watch demo video and start using this tool in no time:

Hiawatha 9.5 installation script v0.4(+ php5-fpm,MariaDB)-part 1 [asciinema.org]
Hiawatha 9.5 installation script v0.4 (setting vhost and phpmyadmin)-part 2 [asciinema.org]
Hiawatha 9.5 installation script v0.4 (remove phpmyadmin and vhost,install wordpress,install phpmyadmin)-part 3 [asciinema.org]

External image via http://s2.postimg.org/c22ufd8zd/capture12.jpg


Script download: https://gist.github.com/ZEROF/10743343

Hope you'll enjoy it.

To do: "Remove wordpress installation" !
This topic has been closed.