免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2476 | 回复: 1
打印 上一主题 下一主题

[其他] Quickly Set Up Ubuntu 8.04 loaded with Erlang [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-28 16:22 |只看该作者 |倒序浏览

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 basic configuration of
    Postfix
    (mail)

  • The use of
    Imagemagick
    to create dynamically a captcha for your application

  • The configuration of
    Bind9
    in order to play with the url CNAME

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

论坛徽章:
12
射手座
日期:2014-10-02 11:31:29程序设计版块每日发帖之星
日期:2016-05-28 06:20:00每日论坛发贴之星
日期:2016-05-27 06:20:00程序设计版块每日发帖之星
日期:2016-05-27 06:20:00程序设计版块每日发帖之星
日期:2016-05-25 06:20:00每日论坛发贴之星
日期:2016-05-24 06:20:00程序设计版块每日发帖之星
日期:2016-05-24 06:20:0015-16赛季CBA联赛之深圳
日期:2016-05-23 15:33:59程序设计版块每日发帖之星
日期:2016-05-20 06:20:00程序设计版块每日发帖之星
日期:2016-04-26 06:20:00神斗士
日期:2015-12-03 09:27:3215-16赛季CBA联赛之八一
日期:2016-12-29 09:56:05
2 [报告]
发表于 2016-04-23 15:11 |只看该作者
er是个好东西
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP