ubuntu以及主机相关和服务器环境搭建

安装RVM
参见我的另外一篇博客,很详细

安装VSFTPD见我的另外一篇文章
安装imageMagic见https://help.ubuntu.com/community/ImageMagick
安装MYSQL见我的另外一篇文章
将rails启动设置为后台随系统自动启动
因为如果是ssh界面启动,当ssh窗口关闭时,ssh启动的rails也会被关闭。因此要让它自动启动。方法:
启动: unicorn_rails -E production -D
这就是作为daemon启动,不过系统reboot并不会启动。reboot自动启动的话需要写脚本了。

grand clound
58.215.160.220

Ubuntu-11.10 64位原生版
http://58.64.180.5:5353/ u:138...
solusvm management
SSH user_name:root
ssh root@my_ip发现报错 PTY allocation request failed on channel 0
根据:http://ejkill.blog.163.com/blog/static/10774945200911135149719/
0.ssh user@host "/bin/bash -i"
1.rm -rf /dev/ptmx
2.mknod /dev/ptmx c 5 2
3.chmod 666 /dev/ptmx
4.umount /dev/pts
5.rm -rf /dev/pts
6.mkdir /dev/pts
7.mount /dev/pts
解决。
sudo apt-get install git-core git-gui git-doc
报错: Unable to locate package git-core,
$cat /etc/apt/sources.list发现未找到文件,这个指定了安装下载地址。
创建该文件,内容如下:
deb http://cn.archive.ubuntu.com/ubuntu/ natty multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ natty multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ natty-updates multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ natty-updates multiverse
。。。。

虽然能下载了,但是在apt-get的时候不能够自动下载依赖,这样还是无法使用。报错如下:
The following packages have unmet dependencies:
libcurl4-openssl-dev : Depends: libc6-dev but it is not going to be installed or
                                 libc-dev
                        Depends: libssl-dev but it is not going to be installed
                        Depends: zlib1g-dev but it is not going to be installed
                        Depends: libidn11-dev but it is not going to be installed
                        Depends: libkrb5-dev but it is not going to be installed or
                                 hurd but it is not installable
                        Depends: libldap2-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
其实是我自己搞错了版本。我把11.04版本的sources.list用到了11.10版本上,肯定要出问题的。所以我把去http://repogen.simplylinux.ch/生成了一个sources.list.可以了,生成11.10的结果为:
###### Ubuntu Main Repos
deb http://cn.archive.ubuntu.com/ubuntu/ oneiric main
deb-src http://cn.archive.ubuntu.com/ubuntu/ oneiric main

###### Ubuntu Update Repos
deb http://cn.archive.ubuntu.com/ubuntu/ oneiric-security main
deb http://cn.archive.ubuntu.com/ubuntu/ oneiric-updates main
deb-src http://cn.archive.ubuntu.com/ubuntu/ oneiric-security main
deb-src http://cn.archive.ubuntu.com/ubuntu/ oneiric-updates main
现在apt-get正常了。
其他相关
http://www.neteon.com.cn/index.php为iteye提供CDN服务。最低8500一年,太贵了。
HTTP://WWW.PHIDC.NET 香港主机,比淘宝上其他的BurstNET VPS主机要快一些。但是贵了3倍的价格。

猜你喜欢

转载自zhangjian1982.iteye.com/blog/1289385