https://wiki.archlinux.org/api.php?action=feedcontributions&user=Mreggen&feedformat=atomArchWiki - User contributions [en]2024-03-29T11:26:44ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Redmine_setup&diff=94352Redmine setup2010-01-29T12:24:29Z<p>Mreggen: </p>
<hr />
<div>[[Category:Development (English)]][[Category:HOWTOs (English)]]<br />
== Introduction ==<br />
This article explains how to install Redmine, an open-source web-based project management and bug-tracking tool, on Arch Linux. For this article, MySQL(with C bindings provided by the 'mysql' gem) are used.<br />
<br />
== Preparation ==<br />
== Package and Gem version Overview ==<br />
The following packages are used at the time of this [re]writing:<br />
<pre><br />
ruby 1.8 <- the PKGBUILD should edited to include 'rails=2.3.5' in the Provides array(more below)<br />
rubygems 1.8<br />
mysql 5.1.42<br />
apache 2.2.14<br />
redmine-mysql-git-20100124<br />
<br />
(gems)<br />
rake 0.8.3<br />
rack 1.0.1<br />
rails 2.3.5<br />
mysql 2.8.1<br />
</pre><br />
<br />
== Ruby 1.8 Environment ==<br />
As Redmine doesn't support ruby 1.9, we need to use the older 1.8 from AUR instead. Remove the "ruby" package(if you have it installed), so that it doesn't conflict, and retrieve and build the packages w any way you're comfortable with.<br />
<pre><br />
pacman -R ruby<br />
yaourt -S ruby1.8<br />
yaourt -S rubygems1.8<br />
<br />
# ruby1.8 installs ruby-1.8 executable. link it to "ruby":<br />
cd /usr/bin<br />
ln -s /usr/bin/ruby-1.8 /usr/bin/ruby<br />
<br />
# (optional) link gem-1.8 to gem<br />
ln -s /usr/bin/gem-1.8 /usr/bin/gem<br />
<br />
# and retrieve the gems<br />
gem install rake -v=0.8.3<br />
gem install rack -v=1.0.1<br />
gem install rails -v=2.3.5<br />
</pre><br />
<br />
== Installing Databases ==<br />
Redmine can work with MySQL 4.1 or higher, PortageSQL 8 or SQLite 3.<br />
<br />
=== MySQL ===<br />
Install MySQL:<br />
pacman -S mysql<br />
For full installation and configuration tutorial see [[MySQL]].<br />
Install the MySQL gem:<br />
gem install mysql -v=2.8.1<br />
<br />
Start MySQL:<br />
sudo /etc/rc.d/mysqld start<br />
<br />
Create database and user for redmine to use:<br />
<pre><br />
mysql -u root -p<br />
create database redmine character set utf8;<br />
create user 'redmine'@'localhost' identified by 'YOUR_PASSWORD';<br />
grant all privileges on redmine.* to 'redmine'@'localhost';<br />
</pre><br />
=== SQLite3 ===<br />
Install SQLite<br />
pacman -S sqlite3<br />
<br />
SQLite is actually not a standalone application like most databases. Instead it is a C library that is linked to by the executable that is using it. Therefore, you need to point to the SQLite source to install the ruby gem.<br />
gem install sqlite3-ruby --with-sqlite3-include=/usr/include --with-sqlite3-lib=/usr/lib<br />
<br />
== Configure Redmine to Talk to your DB ==<br />
'''For MySQL'''<br />
<pre><br />
production:<br />
adapter: mysql<br />
database: redmine<br />
host: localhost<br />
username: redmine<br />
password: YOUR_PASSWORD<br />
encoding: utf8<br />
</pre><br />
'''For SQLite'''<br />
<pre><br />
production:<br />
adapter: sqlite3<br />
dbfile: db/redmine.db<br />
</pre><br />
If you used a different database name or username in section [[Redmine_setup#Database_Preparation]] make sure to change them here as well.<br />
== Create the Default Redmine DB Structure ==<br />
Run the following command inside redmine root directory:<br />
<pre><br />
rake db:migrate RAILS_ENV=production<br />
</pre><br />
<br />
This will create the database tables and the following admin account:<br />
<pre><br />
Username: admin<br />
Password: admin<br />
</pre><br />
<br />
Now we need to populate the database with default information. Run the following:<br />
<pre><br />
rake redmine:load_deafault_data RAILS_ENV=production<br />
</pre><br />
<br />
== Running Redmine ==<br />
=== Using WEBrick Server ===<br />
Run the WEBrick server:<br />
<pre><br />
scripts/server -e production<br />
</pre><br />
<br />
Now navigate to:<br />
<pre><br />
http://MY_HOSTNAME_OR_IP:3000/<br />
</pre><br />
<br />
If everything went fine, you should be able to see the main page of Redmine.<br />
You should login with default admin account and configure your new redmine. Don't forget to change admin's password.<br />
<br />
=== Using Apache Web Server(CGI) ===<br />
Install apache according to [[Apache]].<br />
<br />
Make sure that Redmine works fine with the WEBrick server.<br />
Copy redmine directory content to /srv/http/ (or any other directory you use for your server):<br />
<pre><br />
sudo mkdir /srv/http/redmine/<br />
sudo cp -r * /srv/http/redmine/<br />
</pre><br />
(The last command assumes you are inside /opt/redmine directory).<br />
<br />
'''Note:''' All other commands assume that you are inside the /srv/http/redmine/ folder (or any other folder you decided to use for your server).<br />
<br />
Copy ''dispatch.cgi.example'' file:<br />
<pre><br />
cp public/dispatch.cgi.example public/dispatch.cgi<br />
</pre><br />
<br />
Give ''dispatch.cgi'' execute permission:<br />
<pre><br />
chmod 775 public/dispatch.cgi<br />
</pre><br />
<br />
Uncomment the following line from ''config/environment.rb'':<br />
<pre><br />
ENV['RAILS_ENV'] ||= 'production'<br />
</pre><br />
<br />
Edit ''/etc/httpd/conf/httpd.conf'' by adding the following:<br />
<pre><br />
<VirtualHost *:80><br />
ServerName YOUR-DOMAIN<br />
ServerAdmin webmaster@<YOUR-DOMAIN>.com<br />
DocumentRoot /srv/http/redmine/public/<br />
ErrorLog logs/redmine_error_log<br />
<br />
<Directory "/srv/http/redmine/public/"><br />
Options Indexes ExecCGI FollowSymLinks<br />
Order allow,deny<br />
Allow from all<br />
AllowOverride all<br />
</Directory><br />
</VirtualHost><br />
</pre><br />
<br />
Give the ''http'' user and group the ability to read/write the following folders:<br />
<pre><br />
chown -R http.http files log tmp vendor<br />
</pre><br />
<br />
Restart apache:<br />
<pre><br />
sudo /etc/rc.d/httpd restart<br />
</pre><br />
<br />
Surf to your server and check if it works.<br />
Notice that most likely it will work slower then with WEBrick server, so if there is not special need to run redmine on apache I personally suggest to use WEBrick Server.<br />
<br />
=== Apache w/ Phusion Passenger ===<br />
The CGI method described earlier is a bit slower than WEBrick server, so here I am going to describe another method by installing apache module called Phusion Passenger (also known as mod rails) similar to python module you probably used when installed [[Trac]].<br />
The basic idea was borrowed from [http://blog.samsonis.me/2009/06/redmine-on-archlinux/ Samson's Weblog].<br />
<br />
==== Module Setup ====<br />
<pre><br />
# install passenger<br />
gem install passenger<br />
<br />
# install the apache2 module<br />
passenger-install-apache2-module<br />
</pre><br />
This will guide you through the module compilation and installation.<br />
'''Note the settings it will show you in the end. They are important.'''<br />
<br />
==== Apache Configuration ====<br />
<br />
<pre><br />
# using ''/srv/http'' as the server root dir, make a symbolic link to the redmine/public dir<br />
ln -s /path/to/redmine-0.8.5/public /srv/http/redmine<br />
</pre><br />
'''Important:''' Make sure you make a link to the '''public''' directory of redmine!<br />
<br />
Now edit '''/etc/httpd/conf/httpd.conf''''' and add the following (again, make sure you use the directories that ''passenger-install-apache2-module'' gave you):<br />
<pre><br />
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/ext/apache2/mod_passenger.so<br />
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5<br />
PassengerRuby /usr/lib/ruby<br />
</pre><br />
<br />
And add this:<br />
<pre><br />
<VirtualHost *:80><br />
# server DocumentRoot, address, and admin email<br />
<br />
RailsBaseURI /redmine #<- We add this, if you named your symbolic link differently write it here<br />
</VirtualHost><br />
</pre><br />
<br />
'''NOTE''': you need to restart Apache(if it was running) for the changes to take effect<br />
<br />
Verify that everything is setup correctly by going to http://MY-SERVER-IP-ADDRESS/redmine.<br />
<nowiki>Insert non-formatted text here</nowiki><br />
<br />
== Resources ==<br />
* [http://blog.samsonis.me/2009/06/redmine-on-archlinux/ Samson's Weblog describing installation of Redmine on Arch Linux]<br />
* [http://www.redmine.org/wiki/redmine/RedmineInstall Official Redmine Installation]<br />
* [http://www.redmine.org/wiki/1/HowTo_configure_Apache_to_run_Redmine Configuring Apache to run Redmine]<br />
* [http://www.redmine.org/boards/2/topics/2768 Installing Redmine with SQLite]</div>Mreggenhttps://wiki.archlinux.org/index.php?title=Bitlbee&diff=72485Bitlbee2009-07-21T12:02:17Z<p>Mreggen: /* Setup */ Typofix, bitblee -> bitlbee</p>
<hr />
<div>[[Category:Internet and Email (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Bitlbee}}<br />
{{i18n_entry|Türkçe|Bitlbee (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
= About =<br />
<br />
[http://www.bitlbee.org/main.php/news.r.html Bitlbee] is a "console-based IRC to IM chatting gateway, including ICQ/MSN/Jabber". Basically, it allows the user to interact with popular chat networks (ICQ, MSN, Jabber, AIM, YIM) within their IRC client.<br />
<br />
The users' buddies appear as normal IRC users in a channel and conversations use the private message facility of IRC.<br />
<br />
<br />
= Setup =<br />
<br />
First, download and install the package using pacman:<br />
<br />
# pacman -S bitlbee<br />
<br />
Bitlbee can now run as a daemon of its own! Open up /etc/bitlbee/bitlbee.conf to browse through the settings. Edit the "RunMode" line to "ForkDaemon", then run<br />
/etc/rc.d/bitlbee start<br />
to start the Bitlbee server. Of course, add bitlbee to your DAEMONS array in /etc/rc.conf to start the server on boot. Note that just starting the server does not log you in to any of your messenger accounts! You must join a channel and issue commands.<br />
<br />
You may also start bitlbee every time Arch Linux boots. To do so, just add the bitlbee entry in the file rc.conf as follows:<br />
<br />
DAEMONS=(... alsa cups '''bitlbee''' ...)<br />
<br />
(The three dots mean other daemons that run during bootup)<br />
<br />
= Configuration =<br />
You are now able to connect to this in an IRC client. To connect, just connect to localhost using your favorite IRC client.<br />
<br />
Hopefully this will connect and you should immediately join a channel called '&bitlbee'. When you join this channel it will tell to type 'Help' if you're new... type 'Help' ;)<br />
<br />
Read through the help offered by Bitlbee to get started. There are some great guides online too:<br />
<br />
http://quark.humbug.org.au/publications/internet/bitlbee.pdf<br />
<br />
http://princessleia.com/bitlbee.php<br />
<br />
= How to connect to Jabber using your Gmail account =<br />
In your control channel do the following:<br />
account add jabber username@gmail.com mypasswd<br />
<br />
After root responds with "Account successfully added" you can check your accounts with "account list".<br />
<br />
<@user> account list <br />
<@root> 0. JABBER, username@gmail.com (connected) <br />
<@root> End of account list<br />
<br />
Set the server value of your gmail account:<br />
account set <account id>/server talk.google.com<br />
<br />
After you have added the account, type "account on 0" and it should log in:<br />
<br />
<@user> account on 0 <br />
<@root> JABBER(username@gmail.com) - Logging in: Connecting <br />
<@root> JABBER(username@gmail.com) - Logging in: Connected <br />
<@root> JABBER(username@gmail.com) - Logging in: Requesting Authentication Method<br />
<@root> JABBER(username@gmail.com) - Logging in: Authenticating <br />
<@root> JABBER(username@gmail.com) - Logged in<br />
<br />
If you get errors like the following:<br />
<br />
<@user> account on 0 <br />
<@root> JABBER(username@gmail.com) - Logging in: Connecting<br />
<@root> JABBER(username@gmail.com) - Logging in: Connected<br />
<@root> JABBER(username@gmail.com) - Logging in: Requesting Authentication Method<br />
<@root> JABBER(username@gmail.com) - Logging in: Authenticating<br />
<@root> JABBER(username@gmail.com) - Login error: Error 403: Unknown error<br />
<@root> JABBER(username@gmail.com) - Signing off...<br />
<br />
Switching the domain from "gmail.com" to "googlemail.com" may help.<br />
This seems to be the case for some European countries, especially Germany where Google doesn't own the trademark for the name ''Gmail'' [http://www.theregister.co.uk/2007/01/31/google_looses_trademark_battle/].<br />
<br />
The easiest way to change your account settings is to simply delete the account you created and add it again.<br />
account del 0<br />
account add jabber username@googlemail.com mypasswd<br />
<br />
If you are still unable to connect, try switching the port to 5222. For some reason some people must connect on 5223 while others have to connect on 5222. There appears to be no way to know which one to use other than trial and error.<br />
<br />
= See Also =<br />
[[Screen Irssi Bitlbee]]</div>Mreggen