Difference between pages "Install/pt-br/Stage3" and "Web-server-stack"

< Install(Difference between pages)
m (Tocadotux moved page Install/Stage3/es to Install/pt-br/Stage3/: Change of directory)
 
m (Benchmarking: MOAR)
 
Line 1: Line 1:
=== Instalndo o Stage 3 tarball ===
 
  
Depois de criar os filesystems, o próximo passo é baixar o Stage 3 tarball inicial. O Stage 3 é um sistema pré-compiled utilizado como um ponto inicial para instalar o Funtoo Linux. Carregue um dos seguintes URLs em outra janela do navegador:
+
== Pre-install considerations ==
 +
=== ssl ===
 +
Ssl [http://en.wikipedia.org/wiki/Wildcard_certificate wild card certificates] can use the same certificate to cover several subdomain names. As in https://wiki.funtoo.org https://www.funtoo.org https://forums.funtoo.org can all use the same certificate.  https://funtoo.org would not be covered under the wildcard, so [[User:Threesixes|Threesixes]] ([[User talk:Threesixes|talk]]) suggests using http://domain.tld as a http navigation splash page directory. All that is required to setup a ca signed ssl certificate is an email on the server.  https://www.startssl.com offers free ssl ca certificates, though there are several other certificate [http://en.wikipedia.org/wiki/Certificate_authority#Providers providers].  Many web apps require you set your URL & will have problems if your URL is set to http://, rather than https://
  
{{MirrorList}}
+
=== sockets vs tcp stack ===
 +
Sockets have less overhead but can not be shared across jails, or to other machines.  Tcp stack has more overhead but is far more flexible.
  
Agora, vamos navegar pelos diretórios nos mirrors para encontrar o build apropriado do Funtoo Linux para você.
+
=== Email Servers ===
 +
* {{Package|mail-mta/postfix}} <-- suggested
 +
* {{Package|mail-mta/ssmtp}}
 +
* {{Package|mail-mta/exim}}
 +
* {{Package|mail-mta/sendmail}}
 +
* {{Package|mail-mta/nullmailer}}
  
==== Qual Build? ====
+
=== FTP Servers ===
 +
It is common practice to use FTP servers to host files for downloading.
  
'''Se não estiver certo, escolha <code>funtoo-current</code>.'''
+
* {{Package|net-ftp/vsftpd}} <-- suggested
 +
* {{Package|net-ftp/proftpd}}
 +
* {{Package|net-ftp/pure-ftpd}}
 +
* {{Package|net-ftp/qshare}}
  
Funtoo Linux possui vários 'builds' diferentes, ou variantes. Here is a list of the various builds that are available, and what their distinctive features are:
+
== Webserver ==
 +
Web servers come in several varieties. The most common stack is known as LAMP which stands for linux apache mysql php.  [[User:Threesixes|Threesixes]] ([[User talk:Threesixes|talk]]) suggests setting up the web server stack by selecting the database first, then scripting language second, and web server 3rd.
  
{{TableStart}}
+
=== Databases ===
<tr><th class="info">Build</th><th class="info">Description</th></tr>
+
* {{Package|dev-db/mysql}}
<tr><td><code>funtoo-current</code></td><td>The most commonly-selected build of Funtoo Linux. Receives rapid updates and preferred by desktop users.</td></tr>
+
<tr><td><code>funtoo-current-hardened</code></td><td>Same package set as <code>funtoo-current</code>, but with a hardened, exploit-resistant toolchain.</td></tr>
+
<tr><td><code>funtoo-stable</code></td><td>Emphasizes less-frequent package updates and trusted, reliable versions of packages over the latest versions.</td></tr>
+
{{TableEnd}}
+
  
If you want to read more about this, have a look at [[Funtoo_Linux#What_are_the_differences_between_.27stable.27.2C_.27current.27_and_.27experimental.27_.3F|Differences between stable, current and experimental]].
+
mariadb is a drop in replacement for mysql
 +
* {{Package|dev-db/mariadb}} <-- suggested
  
==== What Architecture?  ====
+
percona is a drop in replacement for mysql
 +
* {{Package|dev-db/percona-server}}
  
'''If you're not sure, pick <code>x86-64bit</code>, or possibly <code>pure64</code> for server systems.'''
+
* {{Package|dev-db/postgresql-server}}
 +
* {{Package|dev-db/sqlite}}
  
For PC-compatible systems, the following choices are available:
+
=== Languages ===
 +
* {{Package|dev-lang/php}} <-- suggested
 +
* {{Package|dev-lang/perl}}
 +
* {{Package|dev-lang/python}}
  
{{TableStart}}
+
=== Web Servers ===
<tr><th class="info">Architecture</th><th class="info">Description</th></tr>
+
* {{Package|www-servers/apache}}
<tr><td><code>x86-64bit</code></td><td>For modern 64-bit processors. Uses new 64-bit instructions and address space. Maintains 32-bit compatibility with multilib.</td></tr>
+
* {{Package|www-servers/cherokee}}
<tr><td><code>pure64</code></td><td>For modern 64-bit processors but with no support for 32-bit compatibility.</td></tr>
+
* {{Package|www-servers/nginx}} <-- suggested
<tr><td><code>x86-32bit</code></td><td>For older 32-bit systems such as Athlon XP, Pentium 4, or earlier Atom.</td></tr>
+
* {{Package|www-servers/tengine}}
{{TableEnd}}
+
* {{Package|www-servers/lighttpd}}
  
==== Your SubArch ====
 
  
Inside <code>/funtoo-current/x86-64bit/</code> on one of our mirrors, you'll see a bunch of directories for various ''subarches'' of Funtoo Linux. Subarches are builds of Funtoo Linux that are designed to run on a particular type of CPU, to offer the best possible performance. They also take advantage of the instruction sets available for each CPU.  
+
=== SSL Termination, Reverse Proxies, & load balancing ===
 +
Reverse proxies are useful, some cache static data, and shuck out cached pages rather than hitting the web server. Some pass requests to backend nodes high availability clustering your website, some web servers have this functionality built in.
  
If you are using an AMD-based CPU, download a stage3 from <code>generic_64</code>, <code>amd64-k8</code>, <code>amd64-k10</code>, <code>amd64-bulldozer</code>, <code>amd64-piledriver</code>, <code>amd64-steamroller</code> or <code>amd64-jaguar</code>.  See [[Subarches#64-bit AMD Processors|our list of 64-bit AMD subarches]] for help figuring out which one is best for you.
+
* {{Package|www-servers/nginx}}
 +
* {{package|net-misc/stunnel}}
 +
* {{package|www-servers/pound}} <-- suggested for ssl termination & load balancing
 +
* {{Package|www-servers/varnish}} <-- suggested for caching to reduce power consumption & reduce the need of constantly rebuilding pages
 +
* {{Package|net-proxy/squid}}
  
If you are using an Intel-based CPU, download a stage3 from <code>generic_64</code>, <code>atom_64</code>, <code>core2_64</code> or <code>corei7</code>. Note that <code>corei7</code> is ideal for any modern Intel processor, including Core i3 and Core i5, and many Xeons.  [[Subarches#64-bit Intel Processors|our list of 64-bit Intel subarches]] for help figuring out which one is best for you.
+
== Post install ==
 +
There are several considerations to take into account with a web server install, such as setting up an email server, setting up a firewall, firewalling web applications, and dynamically firewalling attackers.
  
If you are using a 32-bit CPU, download a stage3 from <code>generic_32</code>, <code>i686</code>, <code>core2_32</code>, <code>atom_32</code> or <code>athlon-xp</code>.
+
=== Firewalls ===
 +
* {{Package|net-firewall/nftables}}
 +
* {{Package|net-firewall/iptables}} <-- suggested
 +
* {{Package|net-firewall/firewalld}}
 +
* {{Package|net-firewall/ufw}}
  
==== Setting the Date ====
+
=== Dynamic Firewalling ===
 +
* {{Package|app-admin/sshguard}} <-- suggested
 +
* {{Package|net-analyzer/fail2ban}}
  
{{fancyimportant|If your system's date and time are too far off (typically by months or years,) then it may prevent Portage from properly downloading source tarballs. This is because some of our sources are downloaded via HTTPS, which use SSL certificates and are marked with an activation and expiration date. However, if you system time is relatively close to correct, you can probably skip this step for now.}}
+
=== Webapp Firewalls ===
  
Now is a good time to verify the date and time are correctly set to UTC. Use the <code>date</code> command to verify the date and time:
+
Apache has an option for webapplication firewalling. as far as [[User:Threesixes|Threesixes]] ([[User talk:Threesixes|talk]]) can tell this passes login errors & excessive site fuzzing to logs for fail2ban/sshguard to deal with.
 +
https://github.com/nbs-system/naxsi is a web app firewall for nginx.
  
<console>
+
=== Benchmarking ===
# ##i##date
+
It's a good idea to benchmark your system, server, & websites.  There are several tools to assist you in doing this.
Fri Jul 15 19:47:18 UTC 2011
+
</console>
+
  
If the date and/or time need to be corrected, do so using <code>date MMDDhhmmYYYY</code>, keeping in mind <code>hhmm</code> are in 24-hour format. The example below changes the date and time to "July 16th, 2011 @ 8:00PM" UTC:
+
* http://toolbar.netcraft.com/site_report?url=undefined#last_reboot
 
+
* http://gtmetrix.com/
<console>
+
* http://www.showslow.com/
# ##i##date 071620002011
+
* http://yslow.org/
Fri Jul 16 20:00:00 UTC 2011
+
* http://getfirebug.com/
</console>
+
* {{Package|app-admin/apache-tools}}
 
+
* {{Package|app-benchmarks/sysbench}}
Uma vez que você tenha definido o sistema de horário (system clock), é uma boa ideia copiar o horário para o sistema de horas do seu hardware (hardware clock), assim ele persiste nos reboots:
+
* {{Package|app-benchmarks/phoronix-test-suite}}
 
+
* {{Package|app-benchmarks/iozone}}
<console>
+
* {{Package|app-benchmarks/piozone}}
# ##i##hwclock --systohc
+
* {{Package|app-benchmarks/siege}}
</console>
+
* {{Package|app-benchmarks/ramspeed}}
 
+
* {{Package|app-benchmarks/jmeter}}
==== Baixe o Stage3 ====
+
Uma vez que você está no root filesystem do seu Funtoo Linux, utilize <code>wget</code> para baixar o Stage 3 tarball que você escolheu utilizar como base para o seu novo sistema Funtoo Linux. Ele deve se salvo no direorio <code>/mnt/funtoo</code> como a seguir:
+
 
+
<console># ##i##cd /mnt/funtoo
+
# ##i##wget http://build.funtoo.org/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz
+
</console>
+
 
+
Note que sistemas 64-bit pode rodar stages 32-bit ou 64-bit, mas o sistema 32-bit podem somente rodar stages de 32-bit. Certifique-se de selecionar um Stage 3 que é apropriado para o seu CPU (processador). Se não estiver certo, é uma aposta segura escolher o stage <code>generic_64</code> ou <code>generic_32</code>. Consulte a página de [[Download]] para mais informações.
+
 
+
Uma vez o stage for baixado, extraia os conteúdos com o seguinte comand, substituindo o nome nome real pelo seu stage 3 tarball:
+
<console>
+
# ##i##tar xpf stage3-latest.tar.xz
+
</console>
+
 
+
{{important|é muito importante utilizar <code>tar's</code> "<code>'''p'''</code>" option when extracting the Stage 3 tarball - it tells <code>tar</code> to ''preserve'' any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.}}
+

Revision as of 13:55, January 18, 2015

Pre-install considerations

ssl

Ssl wild card certificates can use the same certificate to cover several subdomain names. As in https://wiki.funtoo.org https://www.funtoo.org https://forums.funtoo.org can all use the same certificate. https://funtoo.org would not be covered under the wildcard, so Threesixes (talk) suggests using http://domain.tld as a http navigation splash page directory. All that is required to setup a ca signed ssl certificate is an email on the server. https://www.startssl.com offers free ssl ca certificates, though there are several other certificate providers. Many web apps require you set your URL & will have problems if your URL is set to http://, rather than https://

sockets vs tcp stack

Sockets have less overhead but can not be shared across jails, or to other machines. Tcp stack has more overhead but is far more flexible.

Email Servers

FTP Servers

It is common practice to use FTP servers to host files for downloading.

Webserver

Web servers come in several varieties. The most common stack is known as LAMP which stands for linux apache mysql php. Threesixes (talk) suggests setting up the web server stack by selecting the database first, then scripting language second, and web server 3rd.

Databases

mariadb is a drop in replacement for mysql

percona is a drop in replacement for mysql

  • dev-db/percona-server (package not on wiki - please add)

Languages

Web Servers


SSL Termination, Reverse Proxies, & load balancing

Reverse proxies are useful, some cache static data, and shuck out cached pages rather than hitting the web server. Some pass requests to backend nodes high availability clustering your website, some web servers have this functionality built in.

  • Nginx
  • net-misc/stunnel (package not on wiki - please add)
  • www-servers/pound (package not on wiki - please add) <-- suggested for ssl termination & load balancing
  • Varnish <-- suggested for caching to reduce power consumption & reduce the need of constantly rebuilding pages
  • Squid

Post install

There are several considerations to take into account with a web server install, such as setting up an email server, setting up a firewall, firewalling web applications, and dynamically firewalling attackers.

Firewalls

Dynamic Firewalling

Webapp Firewalls

Apache has an option for webapplication firewalling. as far as Threesixes (talk) can tell this passes login errors & excessive site fuzzing to logs for fail2ban/sshguard to deal with. https://github.com/nbs-system/naxsi is a web app firewall for nginx.

Benchmarking

It's a good idea to benchmark your system, server, & websites. There are several tools to assist you in doing this.