Last active
February 23, 2020 19:46
-
-
Save fernandopetry/28d12db6eb3781e5ee4567dd1383a389 to your computer and use it in GitHub Desktop.
Linux Mint 19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# instalando pacotes iniciais | |
sudo apt update && sudo apt dist-upgrade && sudo timedatectl set-timezone America/Sao_Paulo && sudo apt install apache2 && sudo a2enmod rewrite && sudo systemctl restart apache2 && sudo apt install redis snapd composer git | |
# adicionando repositorio ONDREJ | |
sudo add-apt-repository ppa:ondrej/php && sudo apt update && sudo apt dist-upgrade | |
# instalando o flameshot | |
https://github.com/lupoDharkael/flameshot#installation | |
# snaps | |
sudo snap install phpstorm --classic && sudo snap install postman && sudo snap install atom --classic && sudo snap install cacher && sudo snap install slack --classic && sudo snap install skype --classic && sudo snap install vlc && sudo snap install google-cloud-sdk --classic && sudo snap install opera | |
# thema papirus | |
https://github.com/PapirusDevelopmentTeam/papirus-icon-theme | |
sudo apt install php7.0 php7.0-phalcon php7.0-xml php7.0-redis php7.0-json php7.0-mysql php7.0-gd php7.0-curl npm php7.0-xdebug php7.0-soap | |
$ locate xdebug.so | |
$ sudo phpenmod xdebug | |
# Instalando o redis php via pecl | |
pecl install redis-4.3.0 | |
# Configurando o git | |
git config --global user.name "Your Name" | |
git config --global user.email "[email protected]" | |
# ativando o modrewrite | |
sudo xed /etc/apache2/apache2.conf | |
# instalando pacote para gerenciar nome de usuario que acessa o apache | |
sudo systemctl restart apache2 && sudo apt install libapache2-mpm-itk && sudo a2enmod mpm_itk && sudo systemctl restart apache2 | |
# resolvendo erro de header | |
cd /etc/apache2/mods-available && sudo a2enmod headers && sudo systemctl restart apache2 | |
########################### XDEBUG | |
[Xdebug] | |
zend_extension="/usr/lib/php/20170718/xdebug.so" | |
xdebug.remote_enable = 1 | |
xdebug.remote_autostart = 1 | |
xdebug.remote_port = 9000 | |
xdebug.idekey = PHPSTORM | |
xdebug.max_nesting_level = 512 | |
xdebug.file_link_format = phpstorm://open?%f:%l | |
;xdebug.profiler_enable = 1; | |
xdebug.profiler_enable_trigger = 1; | |
xdebug.profiler_output_dir = "/media/dados/web/xdebug_profiler" | |
# Habilitando a reescrita de urls | |
sudo a2enmod rewrite | |
sudo gedit /etc/apache2/apache2.conf | |
## // Alterando de : ( AllowOverride None ) Para: | |
AllowOverride All | |
# Alterar o ServerName para localhost | |
sudo gedit /etc/apache2/sites-enabled/000-default.conf | |
ServerName localhost | |
# Alterar o hostname ( 127.0.0.1 localhost ) | |
sudo gedit /etc/hostname | |
# Criar o arquivo | |
echo "ServerName localhost" | sudo tee /etc/apache2/conf-available/fqdn.conf | |
sudo a2enconf fqdn | |
sudo service apache2 reload | |
# Alterando o usuario de acesso, o www-data para usuario_que_quiser, | |
sudo gedit /etc/apache2/envvars | |
# Alterar: | |
export APACHE_RUN_USER=www-data | |
export APACHE_RUN_GROUP=www-data | |
# | |
# Para: | |
#export APACHE_RUN_USER=www-data | |
export APACHE_RUN_USER=cody | |
#export APACHE_RUN_GROUP=www-data | |
export APACHE_RUN_GROUP=cody | |
# instalando o mysql | |
sudo apt-get install mysql-server | |
# reset a senha root | |
https://linuxconfig.org/how-to-reset-root-mysql-password-on-ubuntu-18-04-bionic-beaver-linux | |
# Acesso negado para o usuario root | |
Caso o acesso ao usuario root esteja com acesso negado, rodar estes comandos | |
$ sudo mysql -u root -p | |
$ ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new-password'; | |
$ sudo service mysql stop | |
$ sudo service mysql start | |
##============================================== | |
# Outras ferramentas | |
npm install -g bower | |
# Ativando o php 7.0 e desativando o 7.2 | |
sudo a2dismod php7.3 && sudo a2enmod php7.0 && sudo service apache2 restart && sudo update-alternatives --set php /usr/bin/php7.0 | |
# composer | |
sudo apt-get install composer curl php-cli php-mbstring git unzip | |
#Xdebug | |
https://gist.github.com/fernandopetry/a1ff21e5beb941f12ad79ee75e37398e | |
#SSL | |
https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-ubuntu-16-04 | |
# Personalizando o terminal | |
\h = host | |
\u = usuario | |
\w = pasta atual | |
xed ~.bashrc | |
export PS1="\[\033[36m\]\u@\h:\[\033[m\]\[\033[33;1m\]\w\[\033[m\] \[\033[0;32m\]\$(git branch 2>/dev/null | grep '^*' | colrm 1 2) \n\[\033[36m\]└─ \$ ▶ \[\033[m\]" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment