Direkt zum Hauptbereich

debian 6 vserver - a new installation due to centOS update problem - my steps

My centOS vserver broke down after a "yum update" and even the centOS community forum could not give an answer within 24h.
In my books that is poor for the almighty and stable centOS.

Bare in mind that I am just a normal user of linux, no professional and definitely no expert when it comes to server, but I can read, try and share my findings:

debian 6 installation steps via ssh

secure your server:

  1. adduser foobar for security purposes 
  2. change /etc/sshd/sshd_conf to PermitRootLogin no
  3. now you can login as foobar and change to root via su -
  4. visudo for sudo command permissions
  5. and put this at the bottom: foobar   ALL=(ALL) ALL

change hostname

  1. change hostname in /etc/hostname and in /etc/hosts
  2. reboot

login via rsa key rather than password

  1. locally do ssh-keygen
  2. ssh-copy-id -i foobar@hostname...
  3. ssh now works without passwords but with keys (for easy deployment)

install ruby and rails via rvm

  1. login as root
  2. always good to have: sudo apt-get install build-essential
  3. multiuser: \curl -L https://get.rvm.io | sudo bash -s stable --ruby --rails
  4. adduser foobar rvm
  5. I did a source /usr/local/rvm/scripts/rvm with all users
  6. and a logout/login and test with rvm -v revealed a working installatio

apache phusion passenger

  1. su -
  2. gem install passenger
  3. passenger-install-apache2-module
  4. the gem told me to do:
  5. apt-get install libcurl4-openssl-dev
  6. apt-get install apache2-threaded-dev
  7. and now another passenger-install-apache2-module worked
  8. put the first Load.... line into /etc/apache2/mods-available/passenger.load
  9. the second two lines in /etc/apache2/mods-available/passenger.conf
  10. run a2enmod passenger
  11. /etc/init.d/apache2 restart

set up a virtual host and test passenger

  1. create a rails app in /var/www with e.g. rails new mysite
  2. create a site as conf file in /etc/apache2/sites-available/mysite
  3. put virtual host data in it /etc/apache2/sites-available/mysite
  4. a2ensite mysite
  5. /etc/init.d/apache2 reload
  6. point your browser to it and look if passenger runs (errors asite, just passenger)

nodeJS (my passenger error with mysite test app)

  1. try sudo apt-get install node otherwise:
  2. sudo apt-get install python g++ make checkinstall
  3. wget http://nodejs.org/dist/node-latest.tar.gz
  4. tar -xzvf node-latest.tar.gz  && cd node-v*
  5. ./configure
  6. checkinstall #(remove the "v" in front of the version number in the dialog)
  7. sudo dpkg -i node_*
  8. change user and try node -v
  9. in my case also mysite test app worked then
  10.  

git

  1. apt-get install git

get postgresql

  1. go to postgresql wiki page for apt

 create new databases with utf8 enconding

  1. su -
  2. su postgres
  3. do these steps (source):
    UPDATE pg_database SET datistemplate=FALSE WHERE datname='template1';
    
    DROP DATABASE template1;
    
    CREATE DATABASE template1 WITH owner=postgres template=template0 encoding='UTF8';
    
    UPDATE pg_database SET datistemplate=TRUE WHERE datname='template1'; 
  4. create a new user with create database access: createuser -dP gitnedab
  5. give that user a database: createdb -O newusername databasename

For now I will stop this installation tutorial with the advise to do a restart of your server and see if all your settings and services work after that.

My last trial with centOS ended after a reboot did not work, but happend days later because I never bothered checking - never again!

Have fun!!!

Nico

PS: apt-get install phppgadmin
getting 403 error? got to /etc/apache2/conf.d/phppgadmin
and change to allow from all

Kommentare

Beliebte Posts aus diesem Blog

Pflanzsack aus Jute

Nachdem ich die Bücher vom Arche Noah Verein schon vorstellte, möchte ich hier eine Topfalternative zeigen, die obendrein noch dekorativ ist. Pflanzsäcke Oder "grow bags", wenn man etwas moderner daher komme möchte bzw. mehr Suchergenisse will. Dabei wollte ich wenig Geld ausgeben, und auch nicht ganz spartan bleiben und den Blumenerdesack dafür nutzen; und bestellte mir 50 kg Jutesäcke für ca. 1,20 EUR/Stück. Nimmt man den ganzen Sack, wird der Topf schon recht groß, auch wenn man etwas des Materials nach innen oder außen faltet. Also nahm ich mir die Freiheit und nähte aus einem großen vier kleine und verbrauchte den letzten Rest unserer Erde fürs Umtopfen der Habanero. Die machte nämlich nun Platz für die sibirische Hauschili und die restlichen von beiden Sorten mischte ich zusammen und stellte sie auf die Fensterbank. Der Vorteil dieser Art von Töpfen liegt auf der Hand: sie sind billig im Vergleich zum Volumen sie sind dekorativ - wirken rustikal biet...

rails + carrierwavve + plupload = multiple file upload

Right now I am very happy! I finished my work on creating a file upload method in rails for more than one file, altogether handled by rails sessions and as objects. First I had to learn a bit more about how rails works and I achieved that by reading a lot: books, screencasts and blogs. In this blog post I like to share what I accomplished, but without the hussle of putting code blocks in here, so watch out for bold formatted text as that is the code. My goal was to have one site with just the pure option of uploading files. All file handling would be done behind the scenes by myself logging onto my server. That said you are not going to see any fancy CRUD here. Lets start then! And dont forget to versioning your app BEFORE you try something new! [e.g. git] > rails g scaffold Photo title:string Now add carrierwave to you Gemfile and run > bundle install >rails g uploader Photo Alltogether you have model, controller, views and an uploader folder with the Ph...

LEGO Alternativen: Sluban und COBI

Ich habe vor kurzem wieder Feuer gefangen für LEGO. Und das kam durch die Dokumentation über die Errichtung des LEGO-Hauses in Billund. Also habe ich meine Steine gereinigt und die Kinder fangen gerade an, auch mal etwas zu bauen. Teilweise stammen meine Steine aus den 1970ern, 1980er und viel aus den 1990ern - alles passt noch wunderbar aufeinander. Viele Designs von LEGO gehen doch Wege, die ich selber nicht so toll finde. Ausserdem verstehe ich nicht, dass etliche Designs aufgegeben wurden. Letztere Sets findet man dann zu horrenden Preisen auf den einschlägigen Plattformen. Also sah ich mich um, denn das Patent für das Baustein-Prinzip ist abgelaufen und andere Firmen produzieren auch Stecksteine. Sluban ... ist Mist und wird von mir nie mehr gekauft. Die Firma stiehlt von LEGO, hat aber auch interessante Designs. Gerade bei militärischen Sachen findet der Fan einige gut aussehende Sets. Aber die Steine wirken nicht besonders toll, es gibt Macken, die Anleitung kön...