在 FreeBSD 上安装 Redmine

安装 Redmine

  1. cd /usr/ports/www/redmine && make install clean

设置 rc.conf

  1. /usr/local/etc/rc.d/redmine rcvar | sed s/NO/YES/ >> /etc/rc.conf

创建 PostgreSQL 数据库角色“redmine”和数据库“redmine”

  1. psql -U pgsql postgres

psql (9.0.4, server 9.0.3)
Type “help” for help.
postgres=# CREATE ROLE redmine LOGIN PASSWORD ‘redmine’;
CREATE ROLE
postgres=# CREATE DATABASE redmine OWNER = redmine;
CREATE DATABASE

设置数据库连接信息

  1. vi /usr/local/www/redmine/config/database.yml
production:
  adapter: postgresql
  database: redmine
  host: localhost
  username: redmine
  password: "redmine"

初始化数据库

# cd /usr/local/www/redmine/
# rake generate_session_store
# rake db:migrate RAILS_ENV=”production”
# rake redmine:load_default_data RAILS_ENV=”production”
Select language: bg, bs, ca, cs, da, de, el, en, en-GB, es, eu, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] zh
====================================
Default configuration data loaded.
# chown -R www:www files log tmp public/plugin_assets
# chmod -R 755 files log tmp public/plugin_assets

启动 Redmine

# /usr/local/etc/rc.d/redmine start

设定 Apache HTTP Server 作为 Balancer(可选)

# vi /usr/local/etc/apache22/Includes/redmine.conf

<VirtualHost *:80>
	ServerName redmine.example.org
	DocumentRoot /usr/local/www/redmine/public

	<Directory /usr/local/www/redmine/public>
		Order allow,deny
		allow from all
	</Directory>

	<Proxy balancer://redmine>
		BalancerMember http://127.0.0.1:3000
	</Proxy>

	ProxyRequests Off
	ProxyPass /favicon.ico !
	ProxyPass /404.html !
	ProxyPass /500.html !
	ProxyPass /help !
	ProxyPass /images !
	ProxyPass /javascripts !
	ProxyPass /stylesheets !
	ProxyPass /themes !
	ProxyPass / balancer://redmine/
	ProxyPassReverse / balancer://redmine/
</VirtualHost>

重启动 Apache HTTP Server(可选)

  1. apachectl restart

参考

Advertisements

#apache-http-server, #freebsd, #load-balancing, #postgresql, #redmine

2个月前干旱,现在又洪涝了

5月份我回家的时候门前的小河干枯见底,如今才2个月过去,雨从12日下到今天,又被淹了。农作物等被淹死,如果不是房屋基地有加高措施,那么水也灌进屋子里了。

这是我记事以来第二次被淹。似乎是我还在上小学的时候被淹过一次,小河满了,田地间的小路也看不见了,建在较低的地方的房子灌进了水。走出家门,先得趟过一条被水淹了的路,记得是夏天,可以穿着凉鞋走过。水退后,可以在路上捡到鱼和龙虾。

#%e7%8e%af%e5%a2%83

买了才5个月的 MacBook Air 的键盘的 L 键就剥皮了,像个被啃剩了的苹果

买了才5个月的 MacBook Air 3,2 的键盘的 L 键剥皮了,但不影响使用,只是不美观了。剥皮的 L 像个被啃剩了的苹果:

MacBook Air 键盘 L 键剥皮了

#macbook-air