All posts tagged ArchLinux

ArchLinux, RVM, Ruby, Rails, Nginx, Passenger and You

没看错,就是ArchLinux,怎么,又回来了?其实我一直未曾离开…… i

好了不矫情了,let’s do business.

[Overview]
本文介绍如何在archlinux上快速搭建rails开发环境,其中有很多可能包括我个人的preferences,各位完全可以根据自行需要取舍。

[ArchLinux]
参照Arch自己的 Official Install Guide ii 安装,其实根本不用参照,整个安装wizard做的已经非常非常user friendly了,我觉得。

[RVM]
RVM 的安装依赖 git 和 curl:

$ sudo pacman -S git curl

装之:

$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

注意没有sudo,符合homebrew的philosophy,尽量不要root,何况我们还是作为development环境,rvm官网好像现在已经没有倾向性了,不过我印象中以前也是倾向于装在user的home目录。
Continue reading →

[Footnotes]
  1. 我有一个arch的liveusb,各种机子上一直保存着至少2+个arch的vm,虽然后来由于太占空间被转移到了移动硬盘,可就是一直舍不得删 []
  2. 最近老是official, official的… 你懂的 []

Redmine on Archlinux

[Overview]
This entry will describe a basic installation and configuration of redmine, a flexible and cross-platform project management web application, on an archlinux system.

For the official installation guide, please refer this wiki page.

[Preparation]
1. Download the latest stable release of redmine (0.8.4) from rubyforge:

$ wget http://rubyforge.org/frs/download.php/56909/redmine-0.8.4.tar.gz

2. Install ruby and ruby on rails
(Notes: rails is optional since the redmine official release we download above already include the appropriate rails version (2.1.2) in its vendor directory)

3. Make sure rubygems and rake meet the version requirement of redmine:

gem -v >= 1.3.1
rake --version >= 0.8.3

Continue reading →

Install Ruby on Rails on Archlinux

[Overview]
Here we will install ruby on rails framework on our Archlinux box. For more detail information, please refer this wiki page.

[Install ruby and rubygems]
First we need to install ruby and its package system rubygems:

$ sudo pacman -S ruby rubygems

[Install rails]
Next install rails via rubygems:

$ sudo gem install rails

gem will help us manage all the dependencies and download them automatically.

(Notes: if you execute the above command without being root (e.g. without sudo), gem will install rails in the home directory of the current user. Usually the directory is named after “.gem”, you probably need to manually add rails and rake bin directory to your PATH before you could use them, that may not be what you exactly want.)
Continue reading →

SafeBoot双系统引导

[Preface]
印象中,security总与convenience矛盾,虽然有时候inconvenience并不总是那么的显而易见。

[Background]
公司的电脑总是会冷不丁的给你surprise,真所谓“重启就会有奇迹”,某次系统reboot后,我惊奇的发现系统在介于BIOS和Boot Loader之间多了个步骤(user experience蛮好,至少有个进度条),然后就是我的linux dual boot不灵了,kernel都没有解压完就卡在那不动了,windows倒是继续能很happy的boot,一刹那顿时觉得好神奇……

系统真正起来后才发现windows多了个软件叫SafeBoot(被McAfee收购后,现在学名McAfee Endpoint Encryption

别的功能不清楚,一个最醒目的feature是disk encryption,经我测试貌似不是full disk的encryption,只是windows所在的那几个分区被加密了,开机的时候那个进度条应该是在解密(把MBR都改了,好强悍,更强悍的是改MBR连告都不告诉一下,算你狠),加了密然后boot时实时解密,所以windows还能很perfect的boot,linux所在的分区并未被加密,按理来说boot应该不会有问题,但是不知道为啥就是卡在那不动,想来必是boot时的实时解密多此一举了,导致没有加密的硬盘反而无法正确读取,真是you don’t know what you know……
Continue reading →

Bugzilla on ArchLinux

Need a web server and a database engine to run bugzilla, here I choose apache and mysql.

Install apache:

$ pacman -S apache

Refer this wiki page for detailed information about apache installation and configuration.

Install mysql:

$ pacman -S mysql

The above LAMP wiki page also mentions something about mysql installation and configuration, for standalone installation, please refer this wiki page.

Then install bugzilla using:

$ pacman -S bugzilla

It requires a bunch of perl modules to be installed too, but some required modules still need to be installed manually (a little weird, why not include all required perl modules into dependencies?)

Make a module check first:

$ cd /srv/http/bugzilla
$ ./checksetup.pl --check-modules

Continue reading →

ArchLinux 2009.02版本的改进

上篇文章中我说Arch发布新版本没啥意义,因为本身就是滚动更新,今天虚拟机里装了一下玩玩,发现安装过程中还是有不少明显改进的,这样看来新版本的发布还是非常有意义的(当然有意义了,否则整出来干嘛:-)……)

首先值得一提的改进应该就是时区时间设置的改进,2008.06版本只有在修改配置文件时让你修改,而且即便正确修改了,也还是会有问题

新版本里改进的那是相当彻底,一开始安装什么先都不干,一上来就问你是UTC还是localtime,然后就让你输入时区和时间,输完了以后,便会帮你自动修改/etc/rc.conf里的HARDWARECLOCK和TIMEZONE,并且copy一份zoneinfo到/etc/localtime,然后再是prepare hard drive,package什么的,这是非常要赞的,这样安装的好处就是你再也不会碰到我之前文章提到的问题了。
Continue reading →

ArchLinux 2009.02

Archlinux放出了新的iso,包括了从2008.06版本以来的usb img版本,
http://ftp.archlinux.org/iso/2009.02/

当然你可以说它没有意义,因为Arch本身就是滚动更新的,我一个

pacman -Syu

就是最新的了.

但其对于新装系统,重装,系统修复等还是有意义的.

PS:事后回头想想,新装,重装估计也没啥意义……,反正每次装完都要更新一把,新的旧的又有啥关系呢?先不重刻了,麻烦……

Archlinux下的时间时区设置

上篇日志中,我还在一直纳闷抑或欣喜为什么又是星期五的时候,Sunng同学的一个comment一举消除了我的疑问,不是星期五有问题,是我自己有问题,呵呵……

经过一番研究和学习,发现原来Archlinux下仅在/etc/rc.conf里把TIMEZONE设成”Asia/Shanghai”是不够的,还要在/etc/localtime做个软链接给具体的zoneinfo:

$ sudo ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

这个时候时区应该算是正确设置好了,把硬件时钟再同步回系统来,

$ sudo hwclock --hctosys

这个时候时间又不对了,因为之前我是人为滞后了8小时(当时是负负得正,时间倒正好是正确的,而且平时也不会去关心这个,估计Sunng不说我是不会发现的了:-)),但是现在时区对了,所以现在时间应该正好晚了8小时。
Continue reading →