# Hiawatha installation script (Hiawatha, PHP-FPM, MariaDB)



## ZEROF (Apr 22, 2014)

Hi all,

 

This is my first topic and i would like to say hello to all community members and administrators. This script started as weekend project and it was made to save my time. I worked few times with Hiawatha webmasters and every time for fresh server installation i did spend a lot of my time. Script was not public because my employers wanted to keep for them self. But ...when i finished working for them i made all project public.

 

What we have today (Picture is worth a thousand words):

 



 

Here you can see some demos about script in work:

 

https://asciinema.org/~ZEROF

 

Any help and ideas are welcome, donation as well. Vote for script, share it, made your own fork, comment.

 

Script download and usage:



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

 

If you don't want to install git wget will do the job:

 



```
wget https://gist.githubusercontent.com/ZEROF/10743343/raw/15a5eac7987dcc62e8ec2b945619ef397afb4457/hiawatha.sh
```

 

Hope that you will have fun and time for testing and setting your servers.

 

P.S. I posted almost same topic on other sites and forums, looking for support of course. Hope that you understand that.

 

Thank you !


----------



## Amitz (Apr 22, 2014)

Sounds cool. I have never heard of Hiawatha before and it seems as if it is worth a try!


----------



## peterw (Apr 22, 2014)

This is fantastic. Can someone compare Hiawatha with Cherokee, Nginx and Lighttpd? All projects say they are user friendly and lightweight.

Hiawatha, Ngix and lighttpd do have simple config files. Cherokee admin interface needs Python. What are the criterias to choose one of them?


----------



## ZEROF (Apr 22, 2014)

Hi peterw,

This blog topic can explain you more:

https://www.hiawatha-webserver.org/weblog/64

And this is part a like most (check "What other people say about Hiawatha"):

https://www.hiawatha-webserver.org/about

Thanks for asking.

Hi Amitz,

Hope that you will learn something new and have some fun.


----------



## Amitz (Apr 22, 2014)

I have just tried the scripts on a virgin Debian7 32bit Vultr instance. Everything works fine so far, but *.php files that I open in the browser throw 403 errors. php5-fpm is running, the path to the socket in /etc/hiawatha/hiawatha.conf is right too.

Therefore the wordpress installation does not work too. Any idea?


----------



## Amitz (Apr 22, 2014)

Found it myself:


ExecuteCGI = yes

was not set in etc/hiawatha/hiawatha.conf

Maybe you want to fix that to avoid irritations!


----------



## ZEROF (Apr 22, 2014)

Hi Amitz,

If you are using my script (v0.03) you will never use ExecuteCGI after running option 8. Your vhost file will look something like this:



#1
VirtualHost {
        Hostname = yoursite.com
        WebsiteRoot = /var/www/hiawatha/wordpress
        StartFile = index.php
        #AccessLogfile = /var/www/hiawatha/wordpress/access.log
        #ErrorLogfile = /var/www/hiawatha/wordpress/error.log
        TimeForCGI = 10
        UseFastCGI = PHP5
        UseToolKit = wordpress
}

Can you provide me you hiawatha.conf and /etc/php5/fpm/pool.d/www.conf (use pastebin.com).

Thanks !


----------



## Amitz (Apr 22, 2014)

I have, unfortunately, already deleted the Vultr instance so I cannot provide the requested files. But I will spin up a new one tomorrow to do so.


I have used the script in your link and used options 1-8 and then 10.


----------



## ZEROF (Apr 22, 2014)

Ok, i think that i will udated script to version 0.04, check on https://gist.github.com/ZEROF/10743343 before downloading hiawatha.sh. I have found 2 issues, one script issue (not real issue, just i have better settings idea) and one that come with mariadb secure installation, i will try to patch that before we can run secure installation, but i'm not sure that i have good solution for that in this time. Secure installation will work just fine, but i don't like to see that damm errormessage. I will add phpmyadmin installation as well. 

A lot to do ....


----------



## Amitz (Apr 22, 2014)

Okay, I could not wait and installed it again on a fresh VM. (still Version 0.03)

I ran options 1-8 consecutively, then I ran option 10.

Here is the hiawatha.conf:

http://pastebin.com/yvmG05NG

Here is www.conf:

http://pastebin.com/WDW57J6q


----------



## ZEROF (Apr 22, 2014)

Ok,

All looks fine, just ..

When you set your vhost for wordpres you need to type twice same path, in your case: /var/www/hiawatha. One time when you set vhost, and 2nd time when you set install directory. I use: 

vhost path: /var/www/hiawatha/wordpress

install path: /var/www/hiawatha/wordpress

Only issue is TimeForCGI = 5. That was set to 10sec before. Replace that, and then service php5-fpm restart normally will do the job. 

Because of thinking on small issues, i deleted my phpmyadmin install code by mistake pfff... Here we go again.


----------



## Amitz (Apr 22, 2014)

It may look fine, but still .php files return a 403 when called through a browser. I did just put a simple phpinfo.php in the root folder and all I get is that 403.


----------



## ZEROF (Apr 22, 2014)

Ok, i will check that again. But it's strange i reinstalled my box 20 times and other people as well. If you can provide ssh i would like to see what is going on, if not i will just put that as option. That is not problem but i need to think about.


----------



## Amitz (Apr 22, 2014)

Just got it to work, so please scratch that task for some hours... ;-)


I will re-install tomorrow to see whether it was just a single hit or a mistake on my side in the first place! Thank you very much for your efforts!


----------



## ZEROF (Apr 23, 2014)

Ok v0.3b is out:

1. Fixed mariadb secure install script (no solution provided on internet, i got it but myself,it's feel so good)

2. Made preparation for version v0.4 and few other correction


----------



## Amitz (Apr 23, 2014)

Just to confirm: It was me. I have no idea what I did wrong, but it was already quite late in my timezone and the day was hard. 

I installed it again today and everything worked fine. Thanks again!


----------



## ZEROF (Apr 23, 2014)

I need one tester for new version (v0.4). You will need to try phpmyadmin installation, it's almost automatic, don't worry .  I can make demo video if you want. I'm hapy with new code.

Phpmyadmin install options are: 

1. You will be ask if you want to install phpmyadmin after wordpress installation.

2. You can run installation after setting vhost.

This was good coding day, but now i need one or few people before I share v0.4.

Thank you !


----------



## Amitz (Apr 24, 2014)

What a pity! I would help out directly, but I am travelling with no access to my servers for some days. Hopefully someone else will lend a hand!


----------



## ZEROF (Apr 24, 2014)

Thanks Amitz,

I have 2 people already, i wait for 2 more and after i will put v0.4 online and i hope to make new demo tonight. I tested few times too, and all looks fine. Hiawatha was updated too, and i need to run few test today to see if all goes well. For now version v9.4 comes from my repository.

You can see small script demo (v0.4) that I made for other testers: https://asciinema.org/a/9092


----------



## ZEROF (Apr 24, 2014)

Hiawatha was updated in last 24h (v9.5) and because of that i waited to run more tests. I would like to say thanks for 4 people who helped me to fix 2 small issues and to make this tool even better. I made 3 small demo, for every part of tool. I call you to watch them all before messing with your server, all in 10 minutes.

 

Hiawatha 9.5 installation script v0.4(+ php5-fpm,MariaDB)-part 1

Hiawatha 9.5 installation script v0.4 (setting vhost and phpmyadmin)-part 2

Hiawatha 9.5 installation script v0.4 (remove phpmyadmin and vhost,install wordpress,install phpmyadmin)-part 3

 



 



 

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

 

Hope you'll enjoy it.

 

To do: "Remove wordpress installation" !


----------



## DigitalPure (May 26, 2014)

I just gave this a spin and got errors on step 5, 6 which basically stopped it from working.   See screens

step#5 - https://copy.com/UmGYNgePW4G9

step#6 - https://copy.com/yzzBTa96i9sy

Intresting idea with this script though.  The performance of Cherokee and Maria is amazing so Hiawatha being a little more streamlined would be crazy fast.


----------



## ZEROF (Jun 1, 2014)

First hi DigitalPure. This script was made for Debian seven not Ubuntu. Because of this you have this errors. You need to edit some part of script for your system, but it's better if you just run on Debian. Thanks!

Second i just updated script to version 0.5.

 

1. Hiawatha 9.6 (updated from 9.5)

 

2. MaraDNS 2.0.09 installation 

 

3. Fixing 2 package installation with Debian 7 minimal images (one provider messed up some settings I guess)

 

4. Now you can chose if you want to set InnoDB or not (idea from couple of users)

 



 

Source: https://gist.github.com/ZEROF/10743343


----------



## k0nsl (Jun 2, 2014)

I always loved Hiawatha and have been a strong supporter of this software, it definitively deserves more attention from the community. Right now I'm not using Hiawatha for anything, though.

Might find a use for it soon. But I do encourage others to have a look at Hiawatha as an alternative to any other HTTPd.


----------



## ZEROF (Jun 2, 2014)

I agree with you k0nsl and because of that i started this project to show to people that Hiawatha can do good job and it's top server solution if you are looking for security. And my work will not stop on this, more to come in the future.

In same time i will share that now, all new releases of Hiawatha will be tested by professional coders company before going public and that is big step, no one is doing this.


----------

