Chinaunix

标题: Quickly Set Up Ubuntu 8.04 loaded with Erlang [打印本页]

作者: pascal4123    时间: 2008-12-28 16:22
标题: Quickly Set Up Ubuntu 8.04 loaded with Erlang

How To Quickly Set Up Ubuntu 8.04 loaded with Erlang

        September 25, 2008 by Hughes (
Erlang
)
       
               
Let’s say you want to give a try to Erlang (Discover our post about
Why Erlang?
)
for your next web development project and you want to be up and running
as quickly as possible… you just landed smoothly in the right place.
This post is the starting point of a series of posts in which I’m
going to provide you with all the commands you’ll need to set up an
Ubuntu 8.04
server loaded with Erlang, Mochiweb proxied by Nginx.
In the same series, I’ll also cover:



The goal here is not to set up an hardened production server with
all the optimizations and security niceties in head (I definitively
want to avoid a ‘Why not Gentoo, or Slackware, or Debian, or FreeBSD,
…?’, I love them all).
No, it’s all about being able to quickly set up a test server and/or
your dev machine in order to dive directly in the development typhoon.
And, I must say, Ubuntu(*) is a king at this task.
(*) from a dev point of view, having your dev machine installed with
the same OS that your test server is running is definitively a big plus.
You’ve just rent a cheap box from your web host provider, done a
fresh Ubuntu 8.04 server installation and you are currently ssh logged
in as root … yes, yes, you have done all those things. (In the case you
are setting up your desktop machine you can go directly to point 3)
So let’s start!
Step 0 - Upgrade
We ensure with this step that our package sources and our installation is up to date.
root@bar:~$ apt-get update
root@bar:~$ apt-get clean
root@bar:~$ apt-get upgrade
Step 1 - Denyhosts
We install
Denyhosts
, a Python script used to prevent brute force hacking of our SSH server.
Also, we set RESET_ON_SUCCESS = yes in order to avoid being blocked because we reached the max attempt value.
root@bar:~$ apt-get install denyhosts
root@bar:~$ vi /etc/denyhosts.conf
/RESET_ON_SUCCESS [enter]
i
RESET_ON_SUCCESS = yes
[esc]
:wq
Step 2 - A new sudoer + reboot
We add a new user and grant him the ability to use the sudo command.
A first and unique reboot (we don’t need to do that … but I’m
used to reboot my system at least once in order to check that
everything is properly set up after a clean install).
root@bar:~$ adduser foo
root@bar:~$ apt-get install sudo
root@bar:~$ visudo
foo ALL=(ALL) ALL
root@bar:~$ reboot
We log in with the user we have just created:
ssh foo@bar
Step 3 - Some useful packages
Installation of the GNU C and C++ compiler, the ‘make’ utility, svn and Git.
foo@bar:~$ sudo apt-get install build-essential subversion git-core
Step 4 - Erlang
Building the last Erlang release from source.
foo@bar:~$ sudo apt-get build-dep erlang
foo@bar:~$ sudo apt-get install java-gcj-compat java-gcj-compat-dev
foo@bar:~$ wget http://www.erlang.org/download/otp_src_R12B-4.tar.gz
foo@bar:~$ tar zxvf otp_src_R12B-4.tar.gz
foo@bar:~$ cd otp_src_R12B-4
foo@bar:~/otp_src_R12B-4$ ./configure
foo@bar:~/otp_src_R12B-4$ make && sudo make install
foo@bar:~/otp_src_R12B-4$ erl
Eshell V5.6.4  (abort with ^G)
1>init:stop().
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/16651/showart_1755958.html
作者: patagonia2    时间: 2016-04-23 15:11
er是个好东西




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2