Mudanças entre as edições de "Setup Inicial"
Ir para navegação
Ir para pesquisar
(Criou página com 'Sistema Operacional: Ubuntu Server 22.04.1 LTS<br> Memória: 2Gb<br> Disco: 200Gb<br> CPU: 2vCPU<br>') |
|||
(10 revisões intermediárias pelo mesmo usuário não estão sendo mostradas) | |||
Linha 1: | Linha 1: | ||
+ | == Requisitos SO == | ||
Sistema Operacional: Ubuntu Server 22.04.1 LTS<br> | Sistema Operacional: Ubuntu Server 22.04.1 LTS<br> | ||
Linha 4: | Linha 5: | ||
Disco: 200Gb<br> | Disco: 200Gb<br> | ||
CPU: 2vCPU<br> | CPU: 2vCPU<br> | ||
+ | |||
+ | == Orientações Instalação == | ||
+ | Idioma: Português<br> | ||
+ | Tipo Instalação: Ubuntu Server<br> | ||
+ | IP: Fixo e Público<br> | ||
+ | Proxy: Deixar em branco<br> | ||
+ | Nome: GIGAFULL SOLUCOES TECNOLOGICAS<br> | ||
+ | Nome do Servidor: gigafull-admin<br> | ||
+ | Nome do utilizador: gigafull<br> | ||
+ | Senha: 123mudar<br> | ||
+ | Install OpenSSH Server: Sim <br> | ||
+ | |||
+ | == Orientações Após Instalação == | ||
+ | '''Atualizar''' | ||
+ | apt-get update | ||
+ | apt-get upgrade | ||
+ | |||
+ | '''Instalar pacotes básicos''' | ||
+ | apt-get install net-tools -y | ||
+ | apt-get install apache2 -y | ||
+ | apt-get install nmap -y | ||
+ | apt-get install php libapache2-mod-php php-mysql -y | ||
+ | apt-get install php-curl -y | ||
+ | apt install python3-pip -y | ||
+ | apt install unzip -y | ||
+ | systemctl start apache2 | ||
+ | systemctl enable apache2 | ||
+ | apt-get install mysql-server -y | ||
+ | systemctl start mysql.service | ||
+ | systemctl enable mysql.service | ||
+ | |||
+ | '''Permitir remote root login''' | ||
+ | vim /etc/ssh/sshd_config | ||
+ | #Na linha PermitRootLogin alterar | ||
+ | De: PermitRootLogin no | ||
+ | Para PermitRootLogin yes | ||
+ | systemctl restart sshd | ||
+ | |||
+ | == Configurações Banco de Dados == | ||
+ | '''Alterar usuário root''' | ||
+ | mysql | ||
+ | ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'senha'; | ||
+ | exit; | ||
+ | mysql_secure_installation | ||
+ | VALIDATE PASSWORD COMPONENT = n | ||
+ | Change the password for root = n | ||
+ | Remove anonymous users? = y | ||
+ | Disallow root login remotely? = n | ||
+ | Remove test database and access to it? = y | ||
+ | Reload privilege tables now? = y | ||
+ | |||
+ | '''Criando database''' | ||
+ | mysql -u root -p | ||
+ | create database dbsistem character set utf8 collate utf8_bin; | ||
+ | create user 'dbsistem'@'%' identified by 'senha'; | ||
+ | grant all privileges on *.* to 'dbsistem'@'%'; | ||
+ | FLUSH PRIVILEGES; | ||
+ | quit; | ||
+ | |||
+ | '''Liberação acesso remoto ao banco de dados''' | ||
+ | vi /etc/mysql/mysql.conf.d/mysqld.cnf | ||
+ | Alterar o campo bind-address 127.0.0.1 para 0.0.0.0 | ||
+ | systemctl restart mysql | ||
+ | |||
+ | '''Liberação root''' | ||
+ | Acessar o mysql via Workbench | ||
+ | Ir em Users and Privileges | ||
+ | Alterar Limit Hosts Matching para % | ||
+ | |||
+ | '''Configuração virtualhost''' | ||
+ | cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/000-default.conf.bkp | ||
+ | cd /etc/apache2/sites-available/ | ||
+ | vim 000-default.conf | ||
+ | #Alterar linha DocumentRoot | ||
+ | De: DocumentRoot "/var/www/html" | ||
+ | Para: DocumentRoot "/var/www" | ||
+ | #Na última linha incluir | ||
+ | IncludeOptional ../../../var/www/VirtualHost/*.conf | ||
+ | mkdir /var/www/VirtualHost/ | ||
+ | cd /var/www/VirtualHost/ | ||
+ | vim gigafulladmin.conf | ||
+ | <VirtualHost *:80> | ||
+ | ServerName ABC.gigafull.com.br | ||
+ | DocumentRoot "/var/www/ABC.gigafull.com.br" | ||
+ | <Directory "/var/www/ABC.gigafull.com.br"> | ||
+ | Require all granted | ||
+ | </Directory> | ||
+ | </VirtualHost> | ||
+ | mkdir /var/www/ABC.gigafull.com.br | ||
+ | systemctl restart apache2 | ||
+ | |||
+ | '''Download e instalação do sistema''' | ||
+ | cd /var/www/ABC.gigafull.com.br/ | ||
+ | wget https://github.com/TiagoGabrielGit/admin-gigafull/archive/refs/heads/master.zip | ||
+ | unzip master.zip | ||
+ | cp -r admin-gigafull-master/* /var/www/ABC.gigafull.com.br/ | ||
+ | systemctl restart apache2 | ||
+ | |||
+ | '''Importação do banco de dados''' | ||
+ | mysql -u dbsistem -p dbsistem < /var/www/ABC.gigafull.com.br/dbsistem.sql | ||
+ | |||
+ | |||
+ | '''Excluir arquivos''' | ||
+ | cd /var/www/ABC.gigafull.com.br/ | ||
+ | rm -r master.zip admin-gigafull-master/ | ||
+ | |||
+ | '''Configuração conexão com banco de dados''' | ||
+ | vim /var/www/ABC.gigafull.com.br/conexoes/conexao.php | ||
+ | vim /var/www/ABC.gigafull.com.br/conexoes/conexao_pdo.php | ||
+ | Ajustar a variável $usuario, setando o usuário como dbsistem | ||
+ | Ajustar a variável $senha, setando a senha do usuário dbsistem |
Edição atual tal como às 12h45min de 9 de junho de 2023
Índice
Requisitos SO
Sistema Operacional: Ubuntu Server 22.04.1 LTS
Memória: 2Gb
Disco: 200Gb
CPU: 2vCPU
Orientações Instalação
Idioma: Português
Tipo Instalação: Ubuntu Server
IP: Fixo e Público
Proxy: Deixar em branco
Nome: GIGAFULL SOLUCOES TECNOLOGICAS
Nome do Servidor: gigafull-admin
Nome do utilizador: gigafull
Senha: 123mudar
Install OpenSSH Server: Sim
Orientações Após Instalação
Atualizar apt-get update apt-get upgrade
Instalar pacotes básicos apt-get install net-tools -y apt-get install apache2 -y apt-get install nmap -y apt-get install php libapache2-mod-php php-mysql -y apt-get install php-curl -y apt install python3-pip -y apt install unzip -y systemctl start apache2 systemctl enable apache2 apt-get install mysql-server -y systemctl start mysql.service systemctl enable mysql.service
Permitir remote root login vim /etc/ssh/sshd_config #Na linha PermitRootLogin alterar De: PermitRootLogin no Para PermitRootLogin yes systemctl restart sshd
Configurações Banco de Dados
Alterar usuário root mysql ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'senha'; exit; mysql_secure_installation VALIDATE PASSWORD COMPONENT = n Change the password for root = n Remove anonymous users? = y Disallow root login remotely? = n Remove test database and access to it? = y Reload privilege tables now? = y
Criando database mysql -u root -p create database dbsistem character set utf8 collate utf8_bin; create user 'dbsistem'@'%' identified by 'senha'; grant all privileges on *.* to 'dbsistem'@'%'; FLUSH PRIVILEGES; quit;
Liberação acesso remoto ao banco de dados vi /etc/mysql/mysql.conf.d/mysqld.cnf Alterar o campo bind-address 127.0.0.1 para 0.0.0.0 systemctl restart mysql
Liberação root Acessar o mysql via Workbench Ir em Users and Privileges Alterar Limit Hosts Matching para %
Configuração virtualhost cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/000-default.conf.bkp cd /etc/apache2/sites-available/ vim 000-default.conf #Alterar linha DocumentRoot De: DocumentRoot "/var/www/html" Para: DocumentRoot "/var/www" #Na última linha incluir IncludeOptional ../../../var/www/VirtualHost/*.conf mkdir /var/www/VirtualHost/ cd /var/www/VirtualHost/ vim gigafulladmin.conf <VirtualHost *:80> ServerName ABC.gigafull.com.br DocumentRoot "/var/www/ABC.gigafull.com.br" <Directory "/var/www/ABC.gigafull.com.br"> Require all granted </Directory> </VirtualHost> mkdir /var/www/ABC.gigafull.com.br systemctl restart apache2
Download e instalação do sistema cd /var/www/ABC.gigafull.com.br/ wget https://github.com/TiagoGabrielGit/admin-gigafull/archive/refs/heads/master.zip unzip master.zip cp -r admin-gigafull-master/* /var/www/ABC.gigafull.com.br/ systemctl restart apache2
Importação do banco de dados mysql -u dbsistem -p dbsistem < /var/www/ABC.gigafull.com.br/dbsistem.sql
Excluir arquivos cd /var/www/ABC.gigafull.com.br/ rm -r master.zip admin-gigafull-master/
Configuração conexão com banco de dados vim /var/www/ABC.gigafull.com.br/conexoes/conexao.php vim /var/www/ABC.gigafull.com.br/conexoes/conexao_pdo.php Ajustar a variável $usuario, setando o usuário como dbsistem Ajustar a variável $senha, setando a senha do usuário dbsistem