Skip to content

Instantly share code, notes, and snippets.

View manchot0's full-sized avatar

Timothe manchot0

  • France, Challans
View GitHub Profile
Lauch playbook :
ansible-playbook /etc/ansible/play/xxx.yml [--ask-become-pass] [--ask-vault-pass]
- hosts: PROD
remote_user: xxxxxxx
become: yes
become_method: sudo
tasks:
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-ansible-on-ubuntu-14-04
https://www.digitalocean.com/community/tutorials/how-to-create-ansible-playbooks-to-automate-system-configuration-on-ubuntu
https://www.digitalocean.com/community/tutorials/how-to-configure-apache-using-ansible-on-ubuntu-14-04
https://www.digitalocean.com/community/tutorials/configuration-management-101-writing-ansible-playbooks
https://www.digitalocean.com/community/tutorials/how-to-use-ansible-and-tinc-vpn-to-secure-your-server-infrastructure
https://www.digitalocean.com/community/tutorials/how-to-automate-installing-wordpress-on-ubuntu-14-04-using-ansible
@manchot0
manchot0 / gist:c391f8856f734a4cc6ac34cae637fbfc
Last active April 6, 2016 12:38
packer and preseed ubuntu
https://github.com/RobertCNelson/netinstall/blob/master/lib/wily-preseed.cfg
https://www.snip2code.com/Snippet/13001/packer-io-preseed-file-for-ubuntu-server
https://groups.google.com/forum/#!topic/packer-tool/SWhoARVwVnM
http://blog.endpoint.com/2014/03/provisioning-development-environment.html
http://dev.man-online.org/man1/qemu-system-x86_64/
https://stackoverflow.com/questions/31370750/how-do-i-find-out-the-boot-command-for-packer
@manchot0
manchot0 / gist:0c4b9a35eedcee3de04e
Created February 8, 2016 10:34
openvswitch vlan no bridge
# interface eno2
# vlan 100 et 251
sudo ovs-vsctl add-br vswitch eno2
sudo ovs-vsctl add-port vswitch eno2
sudo ovs-vsctl add-br vlan100 vswitch 100
sudo ovs-vsctl add-br vlan251 vswitch 251
sudo ovs-vsctl set port eno2 trunks=100,251
sudo ovs-vsctl show
@manchot0
manchot0 / java.cmd
Last active October 7, 2015 09:45
commande pour java
# version de java
java -showversion
# modifier la version de java ou listé les version installées
sudo update-alternatives --config java
# Install java8
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
copy BDD
si besoin : source /etc/profile
dans repertoire redmine : cd /opt/redmine/redmine
migration BDD : rake db:migrate RAILS_ENV=production
migration bdd plugins : bundle exec rake redmine:plugins:migrate RAILS_ENV=production
copy files (/var/lib/redmine/default/files)
MAJ config/database.yml configuration.yml settings.yml
restart apache : sudo service apache2 restart
remplacement caractere bdd :
Source : http://www.redmine.org/projects/redmine/wiki/RedmineInstall
Source : http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Ubuntu_step_by_step
Source : http://www.redmine.org/projects/redmine/wiki/Download
Source : https://www.phusionpassenger.com/library/config/apache/reference/#passengerruby
1 Dependance:
sudo apt-get install apache2 php5 mysql-server mysql-client phpmyadmin libmysqlclient-dev imagemagick libmagickwand-dev unzip git
after ruby installed :
Source : https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm
Source : https://rvm.io/rvm/install
1 Install RVM in Multi-User mode
sudo curl -sSL https://rvm.io/mpapis.asc | gpg --import -
sudo \curl -L https://get.rvm.io | bash -s stable
add the correct user(s) to the group rvm
logout and relogon
source /etc/profile
chown root:syslog /log
chmod 775 /log
@manchot0
manchot0 / gencert openssl
Last active April 26, 2017 10:48
openssl cert
générer la clé privée et le certificat racine de notre autorité de certification (CA)
openssl req -new -x509 -extensions v3_ca -keyout cert_ca.key -out cert_ca.crt -days 3650 -newkey rsa:4096
Maintenant que nous avons notre autorité, nous allons passer au certificat finalpour tout soutade.fr. Il faut commencer par créer une clé privée (2048 bits dans cet exemple) :
openssl genrsa -out cert2.fr.key 2048
La requête de signature (sans mot de passe)