Categorias

Aqui aparecem os posts das categorias selecionadas.

Categoria:Ubuntu

Resetar senha perdida do root MySQL no Ubuntu

Olá,

Para alterar, siga os passos:

1 – Abra o console do SSH

2 –

service apache2 stop

3 –

service mysql restart

4 –

mysqld_safe --skip-grant-tables

5 –

mysql --user=root mysql

6 –

update user set Password=PASSWORD('neovasenha') where user='root';

7 –

flush privileges;

8 –

exit;

Como criar Certificado SSL no Apache para Ubuntu

Olá,

vamos seguindo os passos:

1 – Instalar o apache:

apt-get install apache2

2 – Ativar SSL:

a2enmod ssl

3 – Reiniciar Apache:

service apache2 restart

4 – Criar uma pasta para os arquivos:

mkdir /etc/apache2/ssl

5 – Criar um certificado auto assinado:

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt

6 – Este comando irá exibir uma lista de campos que precisam ser preenchidos como abaixo:

You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:"BR" - País com 2 letras sem aspas
State or Province Name (full name) [Some-State]:"Sao Paulo" - O Estado sem aspas
Locality Name (eg, city) []:"SP" - O Estado com 2 letras
Organization Name (eg, company) [Internet Widgits Pty Ltd]:"Empresa de Fulano LTDA" - Nome da empresa sem aspas
Organizational Unit Name (eg, section) []:"Varejo de peças automotivas" - Descrição que vai aparecer sem aspas
Common Name (e.g. server FQDN or YOUR name) []:"fulano.com.br" - Domínio sem aspas
Email Address []:"admin@fulano.com.br" - Email sem aspas

7 – Abrir o arquivo de configuração:

vim /etc/apache2/sites-available/default

8 – Altere a porta do host virtual para 443 (porta SSL padrão):


9 – Adicione essa linha logo abaixo do email:

ServerName fulano.com.br:443

10 – Adicione essas linhas no final da configuração do host:

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key

11 – Salvar o arquivo, digite:

:wq

12 – Ativar o host virtual:

a2ensite default

13 – reinicie o apache:

service apache2 restart

14 – (opicional) Se puder reinicie o servidor:

reboot

Apache Segmentation fault on configtest

Olá,

1 – O erro:

# /etc/init.d/apache2 start
 * Starting web server apache2
 * The apache2 configtest failed.
Output of config test was:
/usr/sbin/apache2ctl: line 138: 23872 Segmentation fault      $HTTPD ${APACHE_ARGUMENTS} -t
Action 'configtest' failed.
The Apache error log may have more information.

2 – Cheque os modulos de php instalados:

ls -1 /etc/apache2/mods-enabled/*php*

3 – Desabilite o que não irá utilizar, exemplo:

a2dismod php5

4 – Reiniciar o apache:

service apache2 restart

Instalando VSFTP

Olá,

1 – Instalar:

apt-get install vsftpd

2 – Configurar:

vim /etc/vsftpd.conf

3 – Criar pasta para o utilizador:

mkdir /home/user

4 – Criando ele no servidor:

useradd user

5 – Criando a senha para ele:

passwd user

6 – Reiniciar o servidor:

service vsftpd restart

 

Um arquivo já configurado com até o modo passivo ativo, ele está em txt vsftpd-conf.

Indexes travado em “processando” no Magento

Olá,

1 – No terminal do ubuntu digite:

php suapastamagento/html/shell/indexer.php -reindex catalog_product_attribute
php suapastamagento/html/shell/indexer.php -reindex catalogsearch_fulltext
php suapastamagento/html/shell/indexer.php -reindex catalog_category_flat
php suapastamagento/html/shell/indexer.php -reindex cataloginventory_stock
php suapastamagento/html/shell/indexer.php -reindex catalog_category_product
php suapastamagento/html/shell/indexer.php -reindex catalog_product_price
php suapastamagento/html/shell/indexer.php -reindex tag_summary
php suapastamagento/html/shell/indexer.php -reindex catalog_url

 

CUIDADO

Ao fazer isso todos os url_rewrite serão apagados e iniciados, qualquer um que tenha criado manualmente será apagado.