<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Arquivos test - Remontti</title>
	<atom:link href="https://blog.remontti.com.br/tag/test/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.remontti.com.br/tag/test</link>
	<description>rudimar@remontti</description>
	<lastBuildDate>Wed, 19 May 2021 17:16:19 +0000</lastBuildDate>
	<language>pt-BR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.remontti.com.br/wp-content/uploads/2024/09/icone-rr-80x80.png</url>
	<title>Arquivos test - Remontti</title>
	<link>https://blog.remontti.com.br/tag/test</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Crie seu próprio &#8220;SpeedTest&#8221; utilizando o projeto librespeed</title>
		<link>https://blog.remontti.com.br/4286</link>
					<comments>https://blog.remontti.com.br/4286#comments</comments>
		
		<dc:creator><![CDATA[Rudimar Remontti]]></dc:creator>
		<pubDate>Wed, 08 Apr 2020 23:54:57 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutoriais]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[local test]]></category>
		<category><![CDATA[speedtest]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[testador]]></category>
		<category><![CDATA[teste local]]></category>
		<guid isPermaLink="false">https://blog.remontti.com.br/?p=4286</guid>

					<description><![CDATA[<p>Neste tutorial você irá aprender a criar seu próprio testador de velocidade independente. Precisaremos apenas um serviço web como Apache, PHP e MariaDB/MySQL. Para este teste usei o projeto librespeed qual fiz um fork&#46;&#46;&#46;</p>
<p>O post <a href="https://blog.remontti.com.br/4286">Crie seu próprio &#8220;SpeedTest&#8221; utilizando o projeto librespeed</a> apareceu primeiro em <a href="https://blog.remontti.com.br">Remontti</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Neste tutorial você irá aprender a criar seu próprio testador de velocidade independente. Precisaremos apenas um serviço web como Apache, PHP e MariaDB/MySQL. Para este teste usei o projeto <a href="https://github.com/librespeed/speedtest">librespeed</a> qual fiz um <a href="https://github.com/remontti/speedtest" rel="noopener noreferrer" target="_blank">fork</a> fazendo algumas modificações, principalmente no visual dele. </p>
<p><a href="https://blog.remontti.com.br/wp-content/uploads/2020/04/capa_speedtest_local.png" data-rel="lightbox-gallery-Ek9d0Jbn" data-rl_title="" data-rl_caption="" title=""><img fetchpriority="high" decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2020/04/capa_speedtest_local.png" alt="" width="716" height="340" class="aligncenter size-full wp-image-4297" srcset="https://blog.remontti.com.br/wp-content/uploads/2020/04/capa_speedtest_local.png 716w, https://blog.remontti.com.br/wp-content/uploads/2020/04/capa_speedtest_local-300x142.png 300w" sizes="(max-width: 716px) 100vw, 716px" /></a></p>
<p>Basicamente a instalação é criar o banco e a tabela, jogar os arquivos para dentro do seu servidor web e editar o arquivo que fará a conexão com o banco.</p>
<p>Mas como sempre vamos começar do zero, e já começo com o que temos de mais recente como &#8220;requisitos&#8221;:</p>
<p><a href="https://blog.remontti.com.br/2966" rel="noopener noreferrer" target="_blank">Debian 10 Stretch / Instalação Limpa</a><br />
<a href="https://blog.remontti.com.br/3006" rel="noopener noreferrer" target="_blank">Passo-a-passo como criar um servidor WEB Apache + PHP + MariaDB + phpMyAdmin no Debian 10 Buster “LAMP”</a><br />
phpMyAdmin :: (<strong>Opcional</strong>)</p>
<p>Requisitos instalados prosseguimos!</p>
<p>No exemplo vou configurar o apache para librespeed.remontti.com.br, logo é necessário configurar seu subdomínio “librespeed” (ou nome da sua escolha) em seu <a href="https://blog.remontti.com.br/3086" rel="noopener noreferrer" target="_blank">DNS Server</a>.</p>
<pre class="remontti-code-plain">Exemplo:
...
librespeed       A       250.250.250.5
                 AAAA    2001:db8:bebe:cafe::5
...</pre>
<p>Por segurança recomendo remover a assinatura do servidor, evitando os &#8220;espertinhos&#8221;</p>
<pre class="remontti-code"># sed -i &#039;s/ServerTokens OS/ServerTokens Prod/&#039; /etc/apache2/conf-available/security.conf
# sed -i &#039;s/ServerSignature On/ServerSignature Off/&#039; /etc/apache2/conf-available/security.conf</pre>
<p>Crie o arquivo de configuração do apache para o &#8220;librespeed.remontti.com.br&#8221;</p>
<pre class="remontti-code"># vim /etc/apache2/sites-available/librespeed.conf</pre>
<pre class="remontti-code">&lt;virtualhost *:80&gt;
        ServerName librespeed.remontti.com.br
        ServerAdmin noc@remontti.com.br
        DocumentRoot /var/www/librespeed 
        &lt;directory /var/www/librespeed/ &gt;
                Options FollowSymLinks
                AllowOverride All
        &lt;/directory&gt; 
        LogLevel warn 
        ErrorLog ${APACHE_LOG_DIR}/error_librespeed.log
        CustomLog ${APACHE_LOG_DIR}/access_librespeed.log combined
&lt;/virtualhost&gt;</pre>
<p>Vamos criar nosso diretório raiz (/var/www/librespeed):</p>
<pre class="remontti-code"># mkdir /var/www/librespeed/</pre>
<p>Ativamos o arquivo librespeed.conf e restartamos o apache2</p>
<pre class="remontti-code"># a2ensite librespeed
# systemctl restart apache2</pre>
<p>Recomendo que você crie um certificado válido para acessar seu endereço com HTTPS. Veja como acessando o tutorial: <a href="https://blog.remontti.com.br/3548" rel="noopener noreferrer" target="_blank">Criando certificado grátis com Let’s Encrypt para o Apache no Debian 10</a></p>
<p>Vamos acessar o banco de dados e criar nosso banco de dados e nosso usuário para acessa-lo. </p>
<pre class="remontti-code"># mariadb -p </pre>
<p>Altere o campo <strong>SUA_SENHA</strong></p>
<pre class="remontti-code">CREATE DATABASE librespeed;
GRANT ALL PRIVILEGES ON librespeed.* TO &#039;librespeed&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;SUA_SENHA&#039;;
FLUSH PRIVILEGES;
quit;</pre>
<p>Acesse novamente o banco de dados com o usuário <strong>librespeed</strong></p>
<pre class="remontti-code"># mariadb -p -u librespeed</pre>
<p>Criamos a tabela <strong>speedtest_users</strong> que irá registrar todos os testes.</p>
<pre class="remontti-code">USE librespeed;

CREATE TABLE `speedtest_users` (
  `id` int(11) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` text NOT NULL,
  `ispinfo` text,
  `extra` text,
  `ua` text NOT NULL,
  `lang` text NOT NULL,
  `dl` text,
  `ul` text,
  `ping` text,
  `jitter` text,
  `log` longtext
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

ALTER TABLE `speedtest_users`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `speedtest_users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;COMMIT;

show tables;</pre>
<p>Vamos baixar o <a href="https://github.com/remontti/speedtest/" rel="noopener noreferrer" target="_blank">projeto que modifiquei</a>. Vale lembrar que o projeto tem outras coisas interessantes como desenvolvimento para app para <a href="https://github.com/librespeed/speedtest-android" rel="noopener noreferrer" target="_blank">android</a>, testador para múltiplos hosts.</p>
<pre class="remontti-code"># apt install unzip wget
# cd /tmp
# wget https://github.com/remontti/speedtest/archive/master.zip
# unzip /tmp/master.zip
# mv /tmp/speedtest-master/versao_remontti/* /var/www/librespeed/</pre>
<p>Edite o arquivo <strong>telemetry_settings.php</strong> para definir a senha de acesso das estatísticas (stats.php) e a senha do usuário do banco de dados. </p>
<pre class="remontti-code"># vim /var/www/librespeed/results/telemetry_settings.php</pre>
<p>Altere:</p>
<pre class="remontti-code">[...]
$stats_password=&quot;PASSWORD&quot;; // Senha para acesso do stats.php
[...]
$MySql_password=&quot;SUA_SENHA&quot;; // Senha que você definiu para o banco de dados
[...]</pre>
<p>Agora basta você acessar seu: <strong>&#8220;librespeed.dominio.com.br&#8221;</strong><br />
<a href="https://blog.remontti.com.br/wp-content/uploads/2020/04/librespeed-1.png" data-rel="lightbox-gallery-Ek9d0Jbn" data-rl_title="" data-rl_caption="" title=""><img decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2020/04/librespeed-1.png" alt="" width="1182" height="588" class="alignnone size-full wp-image-4299" srcset="https://blog.remontti.com.br/wp-content/uploads/2020/04/librespeed-1.png 1182w, https://blog.remontti.com.br/wp-content/uploads/2020/04/librespeed-1-300x149.png 300w, https://blog.remontti.com.br/wp-content/uploads/2020/04/librespeed-1-1024x509.png 1024w, https://blog.remontti.com.br/wp-content/uploads/2020/04/librespeed-1-768x382.png 768w" sizes="(max-width: 1182px) 100vw, 1182px" /></a></p>
<p>Para acessar as estatísticas dos testes realizados acesse: <strong>librespeed.dominio.com.br/results/stats.php</strong><br />
Entre com a senha que setou em stats_password:<br />
<a href="https://blog.remontti.com.br/wp-content/uploads/2020/04/adm.png" data-rel="lightbox-gallery-Ek9d0Jbn" data-rl_title="" data-rl_caption="" title=""><img decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2020/04/adm.png" alt="" width="1182" height="246" class="alignnone size-full wp-image-4293" srcset="https://blog.remontti.com.br/wp-content/uploads/2020/04/adm.png 1182w, https://blog.remontti.com.br/wp-content/uploads/2020/04/adm-300x62.png 300w, https://blog.remontti.com.br/wp-content/uploads/2020/04/adm-1024x213.png 1024w, https://blog.remontti.com.br/wp-content/uploads/2020/04/adm-768x160.png 768w" sizes="(max-width: 1182px) 100vw, 1182px" /></a></p>
<p>Tenha acesso a todos os resultados feitos em seu servidor:<br />
<a href="https://blog.remontti.com.br/wp-content/uploads/2020/04/adm_results.png" data-rel="lightbox-gallery-Ek9d0Jbn" data-rl_title="" data-rl_caption="" title=""><img loading="lazy" decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2020/04/adm_results.png" alt="" width="1161" height="598" class="alignnone size-full wp-image-4295" srcset="https://blog.remontti.com.br/wp-content/uploads/2020/04/adm_results.png 1161w, https://blog.remontti.com.br/wp-content/uploads/2020/04/adm_results-300x155.png 300w, https://blog.remontti.com.br/wp-content/uploads/2020/04/adm_results-1024x527.png 1024w, https://blog.remontti.com.br/wp-content/uploads/2020/04/adm_results-768x396.png 768w" sizes="auto, (max-width: 1161px) 100vw, 1161px" /></a></p>
<p>Para colocar seu logo basta editar o arquivo <strong>index.html</strong> e remova o comentário na linha 315 `&lt;!&#8211; &#8211;&gt;` ajuste como achar melhor.</p>
<p>Gostou? Ficou feliz com seu novo testador? </p>
<p><strong>Se quiser fazer uma doação para o café ficarei muito feliz pelo seu reconhecimento!</strong><br />
<a href="https://blog.remontti.com.br/doar"><img decoding="async" src="https://blog.remontti.com.br/wp-content/uploads/2019/07/quero-doar-remontti.png" /></a></p>
<p>Se não puder doar pode deixar seu agradecimento nos comentário também ficarei feliz em saber que ajudei. Se tiver qualquer pergunta deixe-a também. Se preferir entrar em Contato <a href="https://blog.remontti.com.br/meucontato" rel="noopener noreferrer" target="_blank">clique aqui.</a></p>
<p>Abraço!</p>
<p>O post <a href="https://blog.remontti.com.br/4286">Crie seu próprio &#8220;SpeedTest&#8221; utilizando o projeto librespeed</a> apareceu primeiro em <a href="https://blog.remontti.com.br">Remontti</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.remontti.com.br/4286/feed</wfw:commentRss>
			<slash:comments>38</slash:comments>
		
		
			</item>
	</channel>
</rss>
