Redmine on Ubuntu Server

1. Installation and Configurations

(1) Install apache and mysql

(2) Install redmine

[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ su
$ apt-get install redmine redmine-mysql
$ sudo ruby /usr/share/redmine/script/server -e production &

[/codesyntax]

Now redmine is running on http://localhost:3000/

(3) Apache configurations

[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ sudo ln -s /usr/share/redmine/public/ /var/www/redmine
$ vim /etc/apache2/redmine.conf

[/codesyntax]

RailsEnv production
RailsBaseURI /redmine
PassengerDefaultUser www-data

[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ vim /etc/apache2/apache2.conf

[/codesyntax]

Include /etc/apache2/redmine.conf

[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ apache2ctl restart

[/codesyntax]

Now redmine is available on http://localhost/redmine

(4) Chinese support

[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ sudo dpkg-reconfigure redmine

[/codesyntax]

Choose default language : zh

(5) Within local area network

[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ iptables -A INPUT -p tcp --dport 3000 -j ACCPET
$ ifconfig

[/codesyntax]

Perhaps you get your ip as 192.168.0.129
Now redmine is available on http://192.168.0.129/redmine

(6) Login by default

admin / admin

(7) Options

For email notify :

[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ vi etc/default/email.yml

[/codesyntax]

production:

delivery_method: :sendmail

For style :

[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ vi /var/www/redmine/stylesheets/application.css

[/codesyntax]




2. Remine Development Workflow

(1) Issue statuses :
http://www.redmine.org/wiki/redmine/RedmineIssueTrackingSetup
New
In Progress
Resolved
Feedback
Closed
Rejected

redmine
redmine.vsd

Posted in Project Management | Tagged | Leave a comment

Compile Mysql Extension for PHP

1. PHP
Source : /home/kim/php-5.3.3
Path : /usr/local/php


2. Compile Mysql Extension
[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ cd /home/kim/php-5.3.3/ext/mysql/
$ /usr/local/php/bin/phpize
$ ./configure --with-php-config=/usr/local/php/bin/php-config
$ make
$ sudo make install

[/codesyntax]


3. Config
[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ cp /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/mysql.so /path/to/extension/
$ sudo vi /usr/local/php/lib/php.ini

[/codesyntax]

extension=mysql.so


4. Restart Apache

[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ sudo /usr/local/apache/bin/apachectl -k restart

[/codesyntax]

Posted in PHP, Ubuntu | Tagged , , | Leave a comment

PHP Compile and Install

1. Depend Libs

[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ sudo apt-get install gcc
$ sudo apt-get install autoconf
$ sudo apt-get install libxml2-dev
$ sudo apt-get install libmysqlclient-dev
$ sudo apt-get install libmcrypt-dev

[/codesyntax]


2. Compile and Install

[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ wget http://cn.php.net/get/php-5.3.3.tar.gz/from/this/mirror
$ tar -xzf mirror
$ cd php-5.3.3
$ ./configure –help
$ ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs
   --with-mysql=/usr/local/mysql --enable-mbstring --enable-mcrypt
   --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql
$ make
$ sudo make install

[/codesyntax]


3. Mysql Socket

[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ sudo cp php.ini-development /usr/local/php/lib/php.ini
$ sudo vi /usr/local/php/lib/php.ini

[/codesyntax]

mysql.default_socket = /var/run/mysqld/mysqld.sock

Posted in PHP, Ubuntu | Tagged , | Leave a comment

Install Apache on Ubuntu

1. Apache

[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ wget http://mirror.bjtu.edu.cn/apache/httpd/httpd-2.2.17.tar.gz
$ tar -xzf httpd-2.2.16.tar.gz
$ cd httpd-2.2.16
$ sudo ./configure --enable-dav --enable-dav-fs --enable-so --enable-ssl --enable-rewrite 
    --enable-dav-lock=shared --enable-maintainer-mode --prefix=/usr/local/apache2 --enable-mods-shared=all
$ make
$ sudo make install

[/codesyntax]


2. Apache Common Tools
[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ sudo apt-get install apache2.2-common

[/codesyntax]


3. Configurations for PHP
[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ sudo vi /usr/local/apache2/conf/httpd.conf

[/codesyntax]

AddType application/x-httpd-php .php
DirectoryIndex index.php index.htm index.html


4. Run
[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ sudo /usr/local/apache2/bin/apachectl -k start
$ firefox http://localhost/

[/codesyntax]

Posted in Apache, Ubuntu | Tagged , | Leave a comment

Install LAMP for Ubuntu Server

1. By tasksel


[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ sudo tasksel

[/codesyntax]


2. By apt-get


[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ sudo apt-get install apache2
$ sudo apt-get install php5
$ sudo apt-get install mysql-server mysql-client
$ sudo apt-get install phpmyadmin

[/codesyntax]
Install php5 including : php5-common php5-gd php5-mysql libapache2-mod-php


[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ sudo vi /usr/local/apache/conf/httpd.conf

[/codesyntax]


[codesyntax lang=”apache” lines=”no” container=”pre” tab_width=”4″]

Include /etc/phpmyadmin/apache.conf
<Directory "/usr/share/phpmyadmin">
    AllowOverride None,
    Order allow,deny
    Allow from all
</Driectory>

[/codesyntax]


[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ firefox http://localhost/phpmyadmin

[/codesyntax]


[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ vi /etc/apache2/apache2.conf

[/codesyntax]

Include /etc/phpmyadmin/apache.conf


[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]

$ sudo /etc/init.d/apache2 restart

[/codesyntax]

Posted in Ubuntu | Tagged , | Leave a comment