Created
May 19, 2014 17:41
-
-
Save asccigcc/8cc538c3086c0dba349f to your computer and use it in GitHub Desktop.
Script instalación para gob.mx
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
comandos que se ejecutaron para instalar el servidor de linux: | |
Convertir en chef | |
sudo apt-get update | |
timezone=America/Mexico_City | |
sudo apt-get install ntp -y | |
sudo echo $timezone | sudo tee /etc/timezone | |
export LC_ALL=C | |
sudo dpkg-reconfigure --frontend noninteractive tzdata | |
sudo apt-get install git git-core mongodb htop libcurl4-openssl-dev imagemagick libmagics++-dev libmagickwand-dev nodejs -y | |
sudo mkdir /srv/www | |
sudo chgrp ubuntu /srv/www | |
sudo chmod 775 /srv/www | |
\curl -sSL https://get.rvm.io | bash | |
source /home/ubuntu/.rvm/scripts/rvm | |
rvm requirements | |
rvm install 1.9.3 | |
git clone https://github.com/Gobmx/alpha_gobmx.git | |
bundle install | |
1. https://github.com/jedisct1/libsodium | |
2. Download https://download.libsodium.org/libsodium/releases/libsodium-0.4.5.tar.gz | |
3. untar downloaded file | |
4. Run ./configure inside the folder extracted. | |
5. make && make check | |
6. sudo make install | |
7. Run ldconfig | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7 | |
sudo apt-get install apt-transport-https ca-certificates | |
sudo vim /etc/apt/sources.list.d/passenger.list | |
## add this | |
##### !!!! Only add ONE of these lines, not all of them !!!! ##### | |
# Ubuntu 13.10 | |
deb https://oss-binaries.phusionpassenger.com/apt/passenger saucy main | |
# Ubuntu 12.04 | |
deb https://oss-binaries.phusionpassenger.com/apt/passenger precise main | |
# Ubuntu 10.04 | |
deb https://oss-binaries.phusionpassenger.com/apt/passenger lucid main | |
# Debian 7 | |
deb https://oss-binaries.phusionpassenger.com/apt/passenger wheezy main | |
# Debian 6 | |
deb https://oss-binaries.phusionpassenger.com/apt/passenger squeeze main | |
sudo chown root: /etc/apt/sources.list.d/passenger.list | |
sudo chmod 600 /etc/apt/sources.list.d/passenger.list | |
sudo apt-get update | |
sudo apt-get install nginx-extras passenger -y | |
sudo service nginx restart | |
gem install passenger | |
sudo vim /etc/nginx/nginx.conf | |
add in the file nginx.conf | |
passenger_root /home/ubuntu/.rvm/gems/ruby-1.9.3-p545@alpha/gems/passenger-4.0.37; | |
/home/ubuntu/.rvm/gems/ruby-1.9.3-p545@cloudstore/gems/passenger-4.0.40 | |
passenger_ruby /home/ubuntu/.rvm/wrappers/ruby-1.9.3-p545@alpha/ruby; | |
/home/ubuntu/.rvm/wrappers/ruby-1.9.3-p545@cloudstore/ruby; | |
passenger-config --root | |
cd /home/ubuntu/.rvm/gems/ruby-1.9.3-p545@gob_mx_tramites/gems/passenger-4.0.38 | |
rake nginx | |
sudo vim /etc/nginx/sites-enabled/default | |
agregar | |
server { | |
listen 80; | |
server_name localhost; | |
root /srv/www/alpha_gobmx/public; | |
passenger_enabled on; | |
rails_spawn_method smart; | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root html; | |
} | |
} | |
sudo service nginx restart | |
# install elasticsearch | |
sudo apt-get update | |
sudo apt-get install openjdk-7-jre-headless -y | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb | |
sudo dpkg -i elasticsearch-1.0.1.deb | |
sudo update-rc.d elasticsearch defaults 95 10 | |
sudo mkdir /usr/share/elasticsearch | |
sudo /etc/init.d/elasticsearch start | |
curl -XGET 'localhost:9200/_analyze?analyzer=standard' -d 'this is a test' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Para ubuntu 14.04
Ubuntu 14.04
deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main