Last active
June 1, 2018 02:16
-
-
Save phackwer/d95f8d6e0e0bdde502c769bfbc210c21 to your computer and use it in GitHub Desktop.
CentOS 7.3 - User config
This file contains 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
PRIMEIRA COISA | |
https://copr.fedorainfracloud.org/coprs/duh/GNOME_3.22_for_RHEL_and_CentOS_7.x/ | |
############################################################################################################################# | |
# | |
# INSTALAÇÃO DO CENTOS 7.2 - CUSTOMIZAÇÃO BÁSICA | |
# | |
############################################################################################################################# | |
# Passos básicos - Configuração do Gnome (como root)R | |
############################################################################################################################# | |
p | |
# Tudo deve ser feito como root | |
sudo su | |
# Desabilitar updates automáticos | |
echo 'set WritePreparedUpdates=false' >> /etc/PackageKit/PackageKit.conf | |
# Habilita repositórios adicionais para softwares adicionais | |
yum install -y epel-release | |
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm | |
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm | |
# NVidia | |
All steps as root! | |
0 - Install requirements | |
yum -y update | |
yum install -y kernel-devel kernel-headers epel-release dkms gcc gcc-g++ | |
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm | |
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm | |
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org | |
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm | |
systemctl disable gdm | |
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/375.39/NVIDIA-Linux-x86_64-375.39.run | |
sh NVIDIA-Linux-x86_64-375.39.run --no-opengl-files # Select "no" when prompted for xconfig overwrite | |
yum install -y bumblebee | |
1 - Add root and your user account to group 'bumblebee'. | |
2 - Edit the file /usr/share/applications/nvidia-settings.desktop and change the Exec line to: | |
Exec=optirun nvidia-settings -c :8.0 | |
3 - Edit /etc/bumblebee/bumblebee.conf and set to: | |
[bumblebeed] | |
VirtualDisplay=:8 | |
KeepUnusedXServer=false | |
ServerGroup=bumblebee | |
TurnCardOffAtExit=false | |
NoEcoModeOverride=false | |
Driver=nvidia | |
XorgConfDir=/etc/bumblebee/xorg.conf.d | |
[optirun] | |
Bridge=auto | |
VGLTransport=proxy | |
PrimusLibraryPath=/usr/lib/primus:/usr/lib32/primus | |
AllowFallbackToIGC=false | |
[driver-nvidia] | |
KernelDriver=nvidia | |
PMMethod=bbswitch | |
LibraryPath=/usr/lib64/nvidia:/usr/lib64/vdpau:/usr/lib/nvidia:/usr/lib/vdpau | |
XorgModulePath=/usr/lib64/xorg/modules/extensions/nvidia,/usr/lib64/xorg/modules/drivers,/usr/lib64/xorg/modules | |
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia | |
[driver-nouveau] | |
KernelDriver=nouveau | |
PMMethod=auto | |
XorgConfFile=/etc/bumblebee/xorg.conf.nouveau | |
4 - Now: | |
systemctl enable gdm | |
reboot | |
# WPS Office | |
yum install alien | |
wget http://kdl.cc.ksosoft.com/wps-community/download/a21/wps-office-10.1.0.5672-1.a21.x86_64.rpm | |
wget http://kdl.cc.ksosoft.com/wps-community/download/fonts/wps-office-fonts-1.0-1.noarch.rpm | |
wget http://repo.uniaolivre.com/packages/trusty/main/wps-office-mui-pt-br_1.1.0-0kaiana1_all.deb | |
wget https://drive.google.com/file/d/0B7HGeEB4kyvMaU5SbkdRRjBYWHc/view?usp=sharing | |
alien -r -c -v wps-office-language-all_0.1_all.deb | |
alien -r -c -v wps-office-mui-pt-br_1.1.0-0kaiana1_all.deb | |
yum localinstall -y wps-office*\ | |
# Agora removemos o LibreOffice para não atualizar, usaremos o WPS no lugar | |
yum remove -y libreoffice* | |
# Atualizamos o sistema e instalamos elementos básicos necessários | |
# Se redhat, não execute o update | |
yum update -y | |
# se redhat, execute este comando | |
yum remove -y systemtap-runtime-2.8-10.el7.x86_64 | |
yum erase -y gnome-shell-extension-window-list | |
# Repositórios para Steam: | |
yum-config-manager --add-repo=http://negativo17.org/repos/epel-steam.repo | |
yum-config-manager --add-repo=http://negativo17.org/repos/epel-handbrake.repo | |
# Softwares úteis | |
yum install -y gnome-shell-browser-plugin gnome-shell-extension-user-theme terminator fish unrar htop mc gtk2-engines-* gtk3-engines* | |
# Importante para poder trabalhar com desenvolvimento | |
yum groupinstall -y "Development Tools" # vai ser muito utilizado daqui em diante | |
# Faça logout e login do X, abra o terminal e | |
sudo su | |
# Se estiver aberto, reinicie agora o Firefox para poder instalar os seguintes plugins do Gnome pelo próprio Firefox | |
# Após instalar as extensões, habilite ou configure-as utilizando a ferramenta Gnome Tweak Tool | |
# https://extensions.gnome.org/extension/19/user-themes/ | |
# https://extensions.gnome.org/extension/307/dash-to-dock/ | |
# https://extensions.gnome.org/extension/118/no-topleft-hot-corner/ | |
# https://extensions.gnome.org/extension/723/pixel-savero/ | |
# https://extensions.gnome.org/extension/15/alternatetab/ | |
# https://extensions.gnome.org/extension/967/hide-legacy-tray/ | |
# https://extensions.gnome.org/extension/442/drop-down-terminal/ | |
############################################################################################################################# | |
# Temas e fontes para instalar (Como usuário comum!) | |
############################################################################################################################# | |
# GTK e Shell Theme: https://github.com/nana-4/Flat-Plat/releases/download/3.14.20150419/Flat-Plat-3.14.20150419.tar.gz | |
wget https://github.com/nana-4/Flat-Plat/releases/download/3.14.20150419/Flat-Plat-3.14.20150419.tar.gz | |
tar -zxvf Flat-Plat-3.14.20150419.tar.gz | |
mkdir .themes | |
mv Flat-Plat .themes/ | |
rm -f Flat-Plat-3.14.20150419.tar.gz | |
# Paper Icon Theme: | |
git clone https://github.com/snwh/paper-icon-theme | |
cd paper-icon-theme | |
./autogen.sh | |
sudo make install | |
cd ../ | |
rm -rf paper-icon-theme | |
# Define o tema do GTK e do Shell para o Flat Plat, e o tema de ícones para o Paper. | |
gnome-tweak-tool | |
# Tudo deve ser feito como root | |
sudo su | |
# Fontes true type: | |
yum -y install curl cabextract xorg-x11-font-utils fontconfig | |
rpm -Uhv http://www.my-guides.net/en/images/stories/fedora12/msttcore-fonts-2.0-3.noarch.rpm | |
rpm -Uhv https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm | |
rpm -Uhv http://li.nux.ro/download/nux/dextop/el7/x86_64/webcore-fonts-3.0-1.noarch.rpm | |
# Otimização para SSD | |
echo '#!/bin/sh' >> /etc/cron.daily/trim | |
echo 'LOG=/var/log/trim.log' >> /etc/cron.daily/trim | |
echo 'echo "*** $(date -R) ***" >> $LOG' >> /etc/cron.daily/trim | |
echo 'fstrim -v / >> $LOG' >> /etc/cron.daily/trim | |
# No Gnome, execute gnome-session-properties | |
# Crie um novo registro para executar o comando abaixo que desabilita o | |
# touchpad por 1s enquando você estiver digitando. | |
syndaemon -i 1 -K -t -d | |
# Defina o Fish Shell como seu shell padrão | |
echo '/bin/fish' >> /etc/shells | |
chsh -s /bin/fish | |
exit | |
chsh -s /bin/fish # na primeira você estava como root, caso tenha seguido tudo se reiniciar | |
############################################################################################################################# | |
# SVN mais recente no CentOS | |
############################################################################################################################# | |
# Tudo deve ser feito como root | |
sudo su | |
# tee /etc/yum.repos.d/wandisco-svn.repo <<-'EOF' | |
[WandiscoSVN] | |
name=Wandisco SVN Repo | |
baseurl=http://opensource.wandisco.com/centos/$releasever/svn-1.9/RPMS/$basearch/ | |
enabled=1 | |
gpgcheck=0 | |
EOF | |
# yum remove subversion* | |
# yum clean all | |
# yum install subversion | |
# svn --version | |
############################################################################################################################# | |
# Suporte a NTFS e, se for dual boot, corrigindo Grub para mostrar Windows 10 | |
############################################################################################################################# | |
# Tudo deve ser feito como root | |
sudo su | |
# NTFS | |
yum --enablerepo epel install -y ntfs-3g ntfsprogs | |
# Corrige o boot | |
grub2-mkconfig > /dev/null # Se ver o windows listado, executar a linha abaixo. | |
grub2-mkconfig -o /boot/grub2/grub.cfg | |
############################################################################################################################# | |
# Oracle JRE e JDK (para rodar IntelliJ, Eclipse, etc), apenas se necessário, pois o OpenJDK já foi instalado | |
############################################################################################################################# | |
# Tudo deve ser feito como root | |
sudo su | |
cd ~ | |
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u60-b27/jre-8u60-linux-x64.rpm" | |
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u60-b27/jdk-8u60-linux-x64.rpm" | |
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jre-7u79-linux-x64.rpm" | |
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpm" | |
yum localinstall -y jre-8u60-linux-x64.rpm jdk-8u60-linux-x64.rpm jre-7u79-linux-x64.rpm jdk-7u79-linux-x64.rpm | |
rm jre-8u60-linux-x64.rpm jdk-8u60-linux-x64.rpm jre-7u79-linux-x64.rpm jdk-7u79-linux-x64.rpm | |
alternatives --config java | |
############################################################################################################################# | |
# Eclipse Neon - Dark | |
############################################################################################################################# | |
Baixe os estilos necessários aqui: https://github.com/phackwer/eclipse-gnome-dark | |
# Midnight Devil | |
- Instale o eclipse, desabilite os temas em aparência, aplique as preferências "Midnight_Devil.epf" e altere a linha de | |
comando para: | |
env SWT_GTK3=0 GTK2_RC_FILES=/opt/eclipse/midnight.gtkrc GTK_THEME=Adwaita:dark /opt/eclipse/cpp-neon/eclipse/eclipse | |
# Moonrise | |
Este procedimento precisa ser feito para cada Workspace que tiver. Não tenha apenas um para tudo para evitar problemas de | |
performance. Faça uma instalação do Neon por objetivo (estou com 4: PHP, JS, Android e JEE). | |
- sudo su | |
- cd | |
- git clone https://github.com/phackwer/eclipse-gnome-dark | |
- cd / | |
- tar -zxvf ~/eclipse-gnome-dark/eclipse-gnome-dark.tgz | |
- Instale o Eclipse Neon para o que quiser (PHP, JEE, etc) em /opt/eclipse/php-neon (por exemplo) | |
- Instale as máquinas de temas do GTK2 e 3 | |
$ sudo yum install -y 'gtk2-engines-*' 'gtk3-engines*' | |
- Abra o Gnome Tweak: | |
- Defina o thema GTK e Shell para FlatPlat, Icons e Cursor para Paper | |
- Ative o Global Dark Theme | |
- Abra o Eclipse: | |
- Selecione o workspace como ~/workspace/php (não misture o workspace de linguagens diferentes, ou terá terá todo tipo | |
de problema de plugins, e não instale tudo em um para não deixá-lo pesado). | |
de não ter permissão de escrita, e essa máquina for só sua, mude o owner da pasta para o seu usuário. | |
- Instale pelo Eclipse MarketPlace o Eclipse Color Theme para escolher um tema de cores que lhe agrade à vista (eu criei o meu, Midnight Devil) | |
- Instale pelo Eclipse MarketPlace o tema Moonrise (standalone) no Eclipse. Escolha ele como padrão. | |
- Redimensione a coluna da esquerda de forma tal que os botões subam para o lado do título da aba | |
- Arraste aquela barrinha inútil de operações de background no canto inferior direito da barra de status para o toolbar | |
- No Eclipse, escolha Window > Appearance > Hide toolbar | |
- Teste a instalação dos itens necessários abrindo um shell e indo até a pasta do eclipse que instalou (no caso, php) | |
$ cd ~/eclipse | |
$ export SWT_GTK3=0 | |
$ export GTK2_RC_FILES=/usr/share/darktable/darktable.gtkrc | |
$ export GTK_THEME=Adwaita:dark | |
$ ./eclipse | |
- Ao criar o atalho do Eclipse-PHP (ou a linguagem que instalou, lembre-se de qual versão baixou, e onde: | |
[Desktop Entry] | |
Name=Eclipse PHP | |
Exec=env SWT_GTK3=0 GTK2_RC_FILES=/usr/share/darktable/darktable.gtkrc GTK_THEME=Adwaita:dark /opt/eclipse/php-neon/eclipse/eclipse | |
Type=Application | |
Terminal=false | |
Categories=TextEditor;IDE;Development | |
Baixe estas preferências para as cores da fonte e importe-as no seu editor | |
https://raw.githubusercontent.com/guari/eclipse-ui-theme/master/com.github.eclipseuitheme.themes.plugin/bin/color-scheme/RainbowDrops.epf | |
############################################################################################################################# | |
# RabbitVCS | |
############################################################################################################################# | |
sudo su | |
yum install -y meld pysvn python-dulwich python-simplejson subversion 'pygtk*' \ | |
pygobject2 gnome-python2-gtkspell subversion-python git python-mtTkinter \ | |
nautilus-python nautilus-python-devel mercurial tkinter python2-configobj | |
gsettings set org.gnome.meld detect-encodings "['UTF-8', 'WINDOWS-1252', 'ISO-8859-15', 'UTF-16']" | |
wget ftp://195.220.108.108/linux/fedora-secondary/releases/24/Everything/ppc64le/os/Packages/r/rabbitvcs-core-0.16.1-0.4.20160108gite8214e6.fc24.noarch.rpm | |
wget ftp://195.220.108.108/linux/fedora-secondary/releases/24/Everything/ppc64le/os/Packages/r/rabbitvcs-cli-0.16.1-0.4.20160108gite8214e6.fc24.noarch.rpm | |
wget ftp://195.220.108.108/linux/fedora-secondary/releases/24/Everything/ppc64le/os/Packages/r/rabbitvcs-nautilus-0.16.1-0.4.20160108gite8214e6.fc24.noarch.rpm | |
wget ftp://195.220.108.108/linux/fedora-secondary/releases/24/Everything/ppc64le/os/Packages/p/python2-rabbitvcs-0.16.1-0.4.20160108gite8214e6.fc24.noarch.rpm | |
wget ftp://195.220.108.108/linux/fedora-secondary/releases/24/Everything/ppc64le/os/Packages/p/python-mtTkinter-0.4-10.fc24.noarch.rpm | |
wget ftp://195.220.108.108/linux/fedora-secondary/releases/24/Everything/ppc64le/os/Packages/p/python2-configobj-5.0.6-4.fc24.noarch.rpm | |
rpm -Uhv rabbitvcs-core-0.16.1-0.4.20160108gite8214e6.fc24.noarch.rpm | |
rpm -Uhv rabbitvcs-cli-0.16.1-0.4.20160108gite8214e6.fc24.noarch.rpm | |
rpm -Uhv python-mtTkinter-0.4-10.fc24.noarch.rpm | |
rpm -Uhv python2-configobj-5.0.6-4.fc24.noarch.rpm | |
rpm -Uhv python2-rabbitvcs-0.16.1-0.4.20160108gite8214e6.fc24.noarch.rpm | |
rpm -Uhv rabbitvcs-nautilus-0.16.1-0.4.20160108gite8214e6.fc24.noarch.rpm | |
############################################################################################################################# | |
# VirtualBox | |
############################################################################################################################# | |
# Tudo deve ser feito como root | |
sudo su | |
cd /etc/yum.repos.d | |
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo | |
yum install -y VirtualBox-5.1 | |
############################################################################################################################# | |
# Docker | |
############################################################################################################################# | |
# Instalação | |
$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF' | |
[dockerrepo] | |
name=Docker Repository | |
baseurl=https://yum.dockerproject.org/repo/main/centos/7/ | |
enabled=1 | |
gpgcheck=1 | |
gpgkey=https://yum.dockerproject.org/gpg | |
EOF | |
$ sudo yum -y install docker-engine | |
$ sudo service docker start | |
$ sudo docker run hello-world | |
# Configuração atrás de um proxy / firewall | |
$ cat <<EOF | sudo tee -a /etc/sysconfig/docker | |
http_proxy="http://myproxy.example.com:8080" | |
https_proxy="https://myproxy.example.com:8080" | |
no_proxy=<REGISTRY_IP> | |
EOF | |
$ sudo sed -i '/\[Service\]/a EnvironmentFile=/etc/sysconfig/docker' /usr/lib/systemd/system/docker.service | |
$ sudo systemctl daemon-reload | |
$ sudo service docker restart | |
# Instale no Chrome o Simple Docker UI | |
# https://chrome.google.com/webstore/detail/simple-docker-ui/jfaelnolkgonnjdlkfokjadedkacbnib | |
$ sudo docker pull jarkt/docker-remote-api | |
$ sudo docker run -p 2375:2375 -v /var/run/docker.sock:/var/run/docker.sock --name docker-remote-api jarkt/docker-remote-api & | |
$ sudo docker stop docker-remote-api | |
$ sudo vi /etc/rc.local | |
# adicione a linha | |
/bin/docker start docker-remote-api | |
# salve o arquivo e digite no terminal: | |
docker start docker-remote-api | |
# Administre sua instalação Docker através do Simple Docker UI | |
============================================================================================================================= | |
============================================================================================================================= | |
======== A partir daqui, você pode instalar localmente as aplicações, ou usar containers Docker para o ambiente Dev. ======== | |
============================================================================================================================= | |
============================================================================================================================= | |
############################################################################################################################# | |
# NodeJS | |
############################################################################################################################# | |
# Tudo deve ser feito como root | |
sudo su | |
curl -sL https://rpm.nodesource.com/setup_6.x | bash - | |
yum install -y nodejs | |
npm install -g bower gulp jshint jscs csslint js-beautify | |
############################################################################################################################# | |
# MySQL | |
############################################################################################################################# | |
# Tudo deve ser feito como root | |
sudo su | |
wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm | |
yum localinstall -y mysql57-community-release-el7-8.noarch.rpm | |
yum install -y mysql-community-server* | |
service mysqld start | |
chkconfig mysqld on | |
grep 'temporary password' /var/log/mysqld.log | |
mysql_secure_instalation | |
############################################################################################################################# | |
# PostgreSQL | |
############################################################################################################################# | |
# Tudo deve ser feito como root | |
sudo su | |
yum install -y postgresql-server | |
postgresql-setup initdb | |
echo "listen_addresses = '*'" >> /var/lib/pgsql/data/postgresql.conf | |
sed -i -e 's/host all all 127.0.0.1\/32 ident/host all all 127.0.0.1\/32 md5/g' /var/lib/pgsql/data/pg_hba.conf | |
sed -i -e 's/host all all ::1\/128 ident/host all all ::1\/128 md5/g' /var/lib/pgsql/data/pg_hba.conf | |
echo "host all all 0.0.0.0/0 md5" >> /var/lib/pgsql/data/pg_hba.conf | |
chkconfig postgresql on | |
service postgresql start | |
su postgres | |
psql | |
\password postgres | |
############################################################################################################################# | |
# PHP | |
############################################################################################################################# | |
# Tudo deve ser feito como root | |
sudo su | |
yum groupinstall -y "Development Tools" | |
# PHP 5.4 | |
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm | |
echo 'exclude=php-mysqlnd*,php-symfony*,php-doctrine*' >> /etc/yum.conf | |
yum install -y 'php*5.4*' php-pear php-xdebug libyaml-devel php-imap | |
# PHP 7 | |
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm | |
echo 'exclude=php70w-mysqlnd*,php-symfony*,php-doctrine*' >> /etc/yum.conf | |
yum install -y 'php*70w*' libyaml-devel | |
sudo sed -i -e 's/\;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php.ini | |
# PHP-FPM & NGINX | |
sudo sed -i -e 's/\;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php.ini | |
sudo sed -i -e 's/listen = 127.0.0.1:9000/listen = \/var\/run\/php-fpm\/php-fpm.sock/g' /etc/php-fpm.d/www.conf | |
sudo sed -i -e 's/;listen.owner = nobody/listen.owner = nginx/g' /etc/php-fpm.d/www.conf | |
sudo sed -i -e 's/;listen.group = nobody/listen.group = nginx/g' /etc/php-fpm.d/www.conf | |
sudo sed -i -e 's/user = apache/user = nginx/g' /etc/php-fpm.d/www.conf | |
sudo sed -i -e 's/group = apache/group = nginx/g' /etc/php-fpm.d/www.conf | |
sudo systemctl start php-fpm | |
sudo systemctl enable php-fpm | |
echo 'server { | |
listen 80; | |
server_name localhost; | |
root /usr/share/nginx/html; | |
index index.php index.html index.htm; | |
location / { | |
try_files $uri $uri/ =404; | |
} | |
# error_page 404 /404.html; | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root /usr/share/nginx/html; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
}' > /etc/nginx/conf.d/default.conf | |
sudo systemctl start nginx | |
sudo systemctl enable nginx | |
# Phalcony | |
pecl install yaml-2.0.0 | |
echo '' >> /etc/php.ini | |
echo 'date.timezone = America/Sao_Paulo' >> /etc/php.ini | |
echo 'always_populate_raw_post_data = -1' >> /etc/php.ini | |
echo 'xdebug.remote_enable=1' >> /etc/php.ini | |
echo 'xdebug.remote_handler=dbgp' >> /etc/php.ini | |
echo 'xdebug.remote_mode=req' >> /etc/php.ini | |
echo 'xdebug.remote_host=127.0.0.1' >> /etc/php.ini | |
echo 'xdebug.remote_port=9000' >> /etc/php.ini | |
echo 'extension=yaml.so' >> /etc/php.ini | |
wget https://getcomposer.org/installer | |
php installer | |
mv composer.phar /usr/bin/composer | |
sudo sed -i -e 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config | |
sudo systemctl disable firewalld # necessário para usar o Docker | |
sudo systemctl stop firewalld # necessário para usar o Docker | |
sudo sed -i -e 's/User apache/User phackwer/g' /etc/httpd/conf/httpd.conf | |
sudo sed -i -e 's/Group apache/Group phackwer/g' /etc/httpd/conf/httpd.conf | |
sudo chown -R `whoami`: /var/www/html | |
echo '<?php phpinfo();' >> /var/www/html/index.php | |
sudo chkconfig httpd on | |
sudo service httpd start | |
############################################################################################################################# | |
# Phalcon PHP | |
############################################################################################################################# | |
# Tudo deve ser feito como root | |
sudo su | |
wget https://github.com/phalcon/cphalcon/archive/phalcon-v2.0.13.tar.gz | |
tar -zxvf phalcon-v2.0.13.tar.gz | |
cd cphalcon-phalcon-v2.0.13/build | |
./install | |
echo 'extension=phalcon.so' >> /etc/php.d/phalcon.ini | |
############################################################################################################################# | |
# OCI8 para PHP | |
############################################################################################################################# | |
# Baixe o zip Instant Client Package - Basic e o Instant Client Package - SDK do site: | |
# http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html | |
# execute os comandos abaixo de acordo com a versão baixada (neste exemplo foi utilizado o 12_1): | |
cd ~/Downloads | |
# Tudo deve ser feito como root | |
sudo su | |
rpm -ivh oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm | |
rpm -ivh oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm | |
sudo pecl install oci8-2.0.10 | |
echo 'extension=oci8.so' >> /etc/php.ini | |
############################################################################################################################# | |
# Sonar | |
############################################################################################################################# | |
# Tudo deve ser feito como root | |
sudo su | |
wget -O /etc/yum.repos.d/sonar.repo http://downloads.sourceforge.net/project/sonar-pkg/rpm/sonar.repo | |
yum install -y sonar | |
# No MySQL | |
# Crie o banco com os comandos abaixos: | |
# CREATE DATABASE IF NOT EXISTS sonar CHARACTER SET utf8 COLLATE utf8_general_ci; | |
# grant all privileges on sonar.* to 'sonar'@'localhost' identified by 'sonar'; | |
# grant all privileges on sonar.* to 'sonar'@'%' identified by 'sonar'; | |
# flush privileges; | |
# No Postgres | |
# CREATE DATABASE sonar; | |
# create user sonar PASSWORD 'sonar'; | |
# grant all on database sonar to sonar; | |
# Mude a senha se necessário | |
# MySQL | |
sed -i -e 's/#sonar.jdbc.url=jdbc:mysql/sonar.jdbc.url=jdbc:mysql/g' /opt/sonar/conf/sonar.properties | |
# PostrgreSQL | |
sed -i -e 's/#sonar.jdbc.url=jdbc:postgresql:\/\/localhost\/sonar/sonar.jdbc.url=jdbc:postgresql:\/\/localhost\/sonar/g' /opt/sonar/conf/sonar.properties | |
# Mude a senha se necessário | |
sed -i -e 's/#sonar.jdbc.username=/sonar.jdbc.username=sonar/g' /opt/sonar/conf/sonar.properties | |
sed -i -e 's/#sonar.jdbc.password=/sonar.jdbc.password=sonar/g' /opt/sonar/conf/sonar.properties | |
cd /opt | |
wget http://repo1.maven.org/maven2/org/codehaus/sonar/runner/sonar-runner-dist/2.4/sonar-runner-dist-2.4.zip | |
unzip sonar-runner-dist-2.4.zip | |
ln -s sonar-runner-2.4 sonar-runner | |
ln -s /opt/sonar-runner/bin/sonar-runner /usr/local/bin/ | |
echo -e '#!/bin/bash\nexport SONAR_RUNNER_HOME=/opt/sonar-runner\n\ | |
export PATH=$PATH:$SONAR_RUNNER_HOME/bin' > /etc/profile.d/sonar-runner.sh | |
export SONAR_RUNNER_HOME=/opt/sonar-runner | |
export PATH=$PATH:$SONAR_RUNNER_HOME/bin | |
chkconfig sonar on | |
service sonar start | |
exit | |
############################################################################################################################# | |
# Jenkins | |
############################################################################################################################# | |
# Tudo deve ser feito como root | |
sudo su | |
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo | |
rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key | |
yum install -y jenkins | |
service jenkins start | |
chkconfig jenkins on | |
############################################################################################################################# | |
# Nexus | |
############################################################################################################################# | |
# Tudo deve ser feito como root | |
sudo su | |
# v 3.* - https://books.sonatype.com/nexus-book/3.0/reference/raw.html#_uploading_files_to_hosted_raw_repositories | |
cd /opt | |
wget http://download.sonatype.com/nexus/3/latest-unix.tar.gz | |
tar -zxvf latest-unix.tar.gz | |
ln -s nexus* nexus | |
useradd nexus | |
chown -R nexus:nexus nexus* | |
ln -s /opt/nexus/bin/nexus /etc/rc.d/init.d/ | |
ln -s /etc/init.d/nexus /etc/rc0.d/K00nexus | |
sed -i "s/run_as_user=''/run_as_user='nexus'/g" /opt/nexus/bin/nexus | |
chkconfig nexus on | |
service nexus start | |
# v.2.13 - https://support.sonatype.com/hc/en-us/articles/213465818-How-can-I-programatically-upload-an-artifact-into-Nexu- | |
cd /opt | |
wget http://www.sonatype.org/downloads/nexus-latest-bundle.tar.gz | |
tar -zxvf nexus-latest-bundle.tar.gz | |
ln -s nexus-2.13.0-01 nexus | |
useradd nexus | |
chown -R nexus:nexus nexus* | |
chown -R nexus:nexus sonatype-work | |
ln -s /opt/nexus/bin/nexus /etc/rc.d/init.d/ | |
ln -s /etc/init.d/nexus /etc/rc0.d/K00nexus | |
sed -i "s/NEXUS\_HOME\=\"..\"/NEXUS\_HOME\=\"\/opt\/nexus\"/g" /opt/nexus/bin/nexus | |
sed -i "s/\#RUN\_AS\_USER\=/RUN\_AS\_USER\=\"nexus\"/g" /opt/nexus/bin/nexus | |
chkconfig nexus on | |
service nexus start | |
============================================================================================================================= | |
============================================================================================================================= | |
========================================================== EXTRAS =========================================================== | |
============================================================================================================================= | |
============================================================================================================================= | |
############################################################################################################################# | |
# Windows Remote Desktop from Linux | |
############################################################################################################################# | |
sudo su | |
yum install xfreerdp | |
logout | |
# Options | |
# -g [screen resolution] | |
# -u [username] | |
# [destination hostname or IP address] | |
$ xfreerdp -g 800x600 -u youloginhere 10.0.0.100 | |
connected to 10.0.0.100:3389 | |
Password: # password of the user | |
############################################################################################################################# | |
# Steam - Instale antes do VLC e Skype | |
############################################################################################################################# | |
# Tudo deve ser feito como root | |
sudo su | |
yum-config-manager --add-repo=http://negativo17.org/repos/epel-steam.repo | |
yum-config-manager --add-repo=http://negativo17.org/repos/epel-handbrake.repo | |
rpm -Uhv ftp://195.220.108.108/linux/rpmfusion/free/fedora/updates/25/x86_64/l/libva-intel-driver-1.7.3-2.fc25.i686.rpm | |
yum -y install steam | |
############################################################################################################################# | |
# Radeon - Instale antes a Steam e só depois o VLC e Skype! | |
############################################################################################################################# | |
# Tudo deve ser feito como root | |
sudo su | |
# dependências | |
yum-config-manager --enable rhel-7-server-optional-rpms | |
yum install -y compat-libstdc++-33 | |
# Fazer o download do driver no site da AMD http://support.amd.com/pt-br/download/desktop?os=RHEL+x86+64 | |
yum localinstall -y fglrx64_p_i_c-15.302-1.x86_64_rhel6_64a.rpm | |
# carregamentos necessários antes de reiniciar a máquina | |
echo 'radeon' > /etc/modules-load.d/radeon.conf | |
rm /etc/modprobe.d/blacklist-fglrx.conf | |
# Reinicie | |
reboot | |
# Seu linux provavelmente não conseguirá subir a interface agora. Então faça login como root | |
# ou faça sudo su e execute a configuração automática do driver | |
aticonfig --initial -f | |
# Reinicie o GDM | |
service gdm restart | |
# Ou Reinicie a máquina | |
reboot | |
# Se não der certo, para remover a instalação, execute este comando | |
cd /usr/share/ati/ | |
./fglrx-uninstall.sh | |
rm /etc/modules-load.d/radeon.conf | |
############################################################################################################################# | |
# VLC (Instale Steam e driver de video antes) | |
############################################################################################################################# | |
# Tudo deve ser feito como root | |
sudo su | |
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-7.noarch.rpm | |
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm | |
yum install vlc | |
############################################################################################################################# | |
# Skype (Instale Steam e driver de video antes) | |
############################################################################################################################# | |
yum -y install epel-release && rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm | |
yum install skype | |
############################################################################################################################# | |
# Ícones de aplicações agrupadas no Gnome | |
############################################################################################################################# | |
# Executar: | |
xprop WM_CLASS | |
# Clicar na janela e vc terá uma saída como | |
WM_CLASS(STRING) = "Navigator", "Firefox" | |
# Adicionar o seguinte no arquivo do atalho em /usr/share/applications/(nome do arquivo).desktop | |
StartupWMClass=Firefox | |
############################################################################################################################# | |
# Converter .DEB para .RPM (requer o NUX) | |
############################################################################################################################# | |
sudo su | |
yum install alien | |
alien -r -c -v /path/to/deb/package/file/package.deb |
Thank your. For Centos 7.3 it work (vlc). (nik: alex). 12 april 2017 year.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.gnome-look.org/content/show.php/Sable-3.14?content=168627
http://www.deviantart.com/download/507996540/sable_3_14_31_03222015_by_killhellokitty-d8eg4n0.zip?token=4bb8b42653f606e68715ee9876ba39a3496ed17a&ts=1471153450