NerdBorns
Posts: 8
Joined: Wed Feb 10, 2016 4:28 am
Location: Maharashtra, India.

Pi 2 as Web Server

Wed Feb 10, 2016 5:17 am

I'm working on a project.. In which i have to build a server. So, firstly.. several things are in my mind.. :?:
(Still I'm not owning a Pi.. Planning to buy a Raspberry Pi 2 model B.. :) )

1. Can i use any RED HAT OS for Pi 2?
2. If not, suggest me a flavor. (Consider the OS for web server and should be able to install database packages)
3. Web server should be able to handle minor/tiny amount of data transactions. ( Just few values from Oracle database to php pages.)
4. Desired size of MicroSD card for OS+Storage.

I am new to Linux as well as to Raspberry Pi. Please help. Thanks. :D

elatllat
Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

Re: Pi 2 as Web Server

Wed Feb 10, 2016 8:07 am

1. You can not use RED HAT, the closest thing was http://pidora.ca but that's dated so it's recommended you use Raspbian Jessie Lite which is close to Debian (and ubuntu/mint/etc). Other options
2. Oracle is not likely to have a build for the pi but postgresql and mysql are better anyway.
3. You can get really small OS images that will run on 1GB but you might as well get 32 or 64 as they are often not much more, though really a 4GB should be plenty.
SBC with 32GB RAM: https://hardkernel.com

FAQ : https://raspberrypi.stackexchange.com

Unanswered: https://www.raspberrypi.org/forums/search.php?search_id=unanswered

User avatar
rpdom
Posts: 17172
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Pi 2 as Web Server

Wed Feb 10, 2016 8:34 am

NerdBorns wrote:I'm working on a project.. In which i have to build a server. So, firstly.. several things are in my mind.. :?:
(Still I'm not owning a Pi.. Planning to buy a Raspberry Pi 2 model B.. :) )

1. Can i use any RED HAT OS for Pi 2?
I'm not sure if there is one available now. Originally the main OS was going to be a RH one, but plans had to be changed and Debian was initially chosen, then it switched to Raspbian which is a version of Debian built specifically for the Pi.
2. If not, suggest me a flavor. (Consider the OS for web server and should be able to install database packages)
Raspbian. It is the only officially supported OS. You will find much more support for the Raspbian OS than any other on the Pi. It works exactly the same way as Debian.
3. Web server should be able to handle minor/tiny amount of data transactions. ( Just few values from Oracle database to php pages.)
Which database? If there is support in the standard Debian build for the DB you need to access, then it will be in Raspbian as well. (Make sure anything you try to install says that it runs on Raspbian on the Pi, otherwise you may end up trying to install Linux PC code which won't work).

Both the Apache and NginX webservers will run on the PI.
4. Desired size of MicroSD card for OS+Storage.
8GB minimum. Better to start with 16GB. Speed isn't critical, but the decent branded faster ones can be better. Don't buy one that seems very cheap as there are a lot of fakes out there that report a larger capacity than they have.

User avatar
gunkan
Posts: 30
Joined: Thu Dec 17, 2015 7:17 am

Re: Pi 2 as Web Server

Wed Feb 10, 2016 8:53 am

I am working on the same web server proyect and making different tests. API REST server over Apache/MySQL/PHP/Lumen/Swiggle.

- Raspbian Jessie Lite rightnow is the way to go. There is a working Centos 7 for ARM and i think will be the future.
- Ubuntu Mate is another option, but i prefer to wait for Centos (best for servers). Just got some bugs on it and dropped Ubuntu Mate.

- I started with a 8GB kingtons cheap card : slooooowww. Then Samsung 64GB, amazing speed, and finally Sandisk 16GB Ultra. the reason for small size card is the speed in the backup. You better have backup on your PI system because i got some data corruptions. The bigger the card, more time/size problems with backups. That's why i went 16GB. Over USB3.0 get a MicroSD card that allow you to write at 15Mb/s.

Security and speed:

If you are concerned about speed, dont worry. Just http:80 with LightHttp or Nginx (the fastest for static content) and MySQL with InnoDB. If you are planning API REST, search Python+Django speed tests.

But, the raspberry get slower when you try to secure it. By default you don't have the security of AppArmor or SELinux. AppArmor must be compiled in kernel but i prefer SELinux (Centos, Fedora, RadHat).

After using https:443 the system got somekind of heavy, but in XXI is the way to go. Man in the middle attacks are bread and butter nowadays.

I read on forums problems with Raspberry PI generating the same private key but i didn't get the same.

Raspberry PI 2 is not the perfect Web Server for some reasons, but i can't find a better server with such smaller power comsuption.

NerdBorns
Posts: 8
Joined: Wed Feb 10, 2016 4:28 am
Location: Maharashtra, India.

Re: Pi 2 as Web Server

Sun Aug 07, 2016 6:54 am

elatllat wrote:1. You can not use RED HAT, the closest thing was http://pidora.ca but that's dated so it's recommended you use Raspbian Jessie Lite which is close to Debian (and ubuntu/mint/etc). Other options
2. Oracle is not likely to have a build for the pi but postgresql and mysql are better anyway.
3. You can get really small OS images that will run on 1GB but you might as well get 32 or 64 as they are often not much more, though really a 4GB should be plenty.
Thanks a lot for reply. :)
Now i can see how stupid question i asked. LOL. :lol:

NerdBorns
Posts: 8
Joined: Wed Feb 10, 2016 4:28 am
Location: Maharashtra, India.

Re: Pi 2 as Web Server

Sun Aug 07, 2016 7:02 am

rpdom wrote:
NerdBorns wrote:I'm working on a project.. In which i have to build a server. So, firstly.. several things are in my mind.. :?:
(Still I'm not owning a Pi.. Planning to buy a Raspberry Pi 2 model B.. :) )

1. Can i use any RED HAT OS for Pi 2?
I'm not sure if there is one available now. Originally the main OS was going to be a RH one, but plans had to be changed and Debian was initially chosen, then it switched to Raspbian which is a version of Debian built specifically for the Pi.
2. If not, suggest me a flavor. (Consider the OS for web server and should be able to install database packages)
Raspbian. It is the only officially supported OS. You will find much more support for the Raspbian OS than any other on the Pi. It works exactly the same way as Debian.
3. Web server should be able to handle minor/tiny amount of data transactions. ( Just few values from Oracle database to php pages.)
Which database? If there is support in the standard Debian build for the DB you need to access, then it will be in Raspbian as well. (Make sure anything you try to install says that it runs on Raspbian on the Pi, otherwise you may end up trying to install Linux PC code which won't work).

Both the Apache and NginX webservers will run on the PI.
4. Desired size of MicroSD card for OS+Storage.
8GB minimum. Better to start with 16GB. Speed isn't critical, but the decent branded faster ones can be better. Don't buy one that seems very cheap as there are a lot of fakes out there that report a larger capacity than they have.
That was detailed guidance. Thanks buddy. :)
I bought RPi 3. Installed Raspbian Jessie on a 16GB microSD.
That worked well, Until a new problem showed up..
I'll make a post on that. Thanks again.!!!

NerdBorns
Posts: 8
Joined: Wed Feb 10, 2016 4:28 am
Location: Maharashtra, India.

Re: Pi 2 as Web Server

Sun Aug 07, 2016 7:17 am

gunkan wrote:I am working on the same web server proyect and making different tests. API REST server over Apache/MySQL/PHP/Lumen/Swiggle.

- Raspbian Jessie Lite rightnow is the way to go. There is a working Centos 7 for ARM and i think will be the future.
- Ubuntu Mate is another option, but i prefer to wait for Centos (best for servers). Just got some bugs on it and dropped Ubuntu Mate.

- I started with a 8GB kingtons cheap card : slooooowww. Then Samsung 64GB, amazing speed, and finally Sandisk 16GB Ultra. the reason for small size card is the speed in the backup. You better have backup on your PI system because i got some data corruptions. The bigger the card, more time/size problems with backups. That's why i went 16GB. Over USB3.0 get a MicroSD card that allow you to write at 15Mb/s.

Security and speed:

If you are concerned about speed, dont worry. Just http:80 with LightHttp or Nginx (the fastest for static content) and MySQL with InnoDB. If you are planning API REST, search Python+Django speed tests.

But, the raspberry get slower when you try to secure it. By default you don't have the security of AppArmor or SELinux. AppArmor must be compiled in kernel but i prefer SELinux (Centos, Fedora, RadHat).

After using https:443 the system got somekind of heavy, but in XXI is the way to go. Man in the middle attacks are bread and butter nowadays.

I read on forums problems with Raspberry PI generating the same private key but i didn't get the same.

Raspberry PI 2 is not the perfect Web Server for some reasons, but i can't find a better server with such smaller power comsuption.
Yeah, thats the reason for choosing RPi.. It consumes lesser power. Well, I have RPi 3, Raspbian Jessie installed on 16GB microSD.
Now settled with this. I know i cant run RedHat on that. and I'm not even trying to making it secure using SELinux. :)
All I'm doing is for my self interest. :)
Now I am making a private cloud with help of ownCloud ==> https://owncloud.org/. On the way of it. And I recently thought of making a TorrentBox. Haha. :lol:
But recently met with another problem. soon posting for it. See ya.

Return to “Networking and servers”