Archive

Posts Tagged ‘install’

Install Symfony 2 on Ubuntu 11.10 64 bits

July 20, 2012 2 comments

Let’s install Symfony 2.01.16 on Ubuntu 11.10 64 bits.

  • Download Symfony Standard Edition from http://symfony.com/download
  • Extract the contents to the web root (/var/www/)
  • Check the system configuration:

$ cd /var/www/Symfony

$ php app/check.php

********************************
* *
* Symfony requirements check *
* *
********************************

php.ini used by PHP: /etc/php5/cli/php.ini

** WARNING **
* The PHP CLI can use a different php.ini file
* than the one used with your web server.
* If this is the case, please ALSO launch this
* utility from your web server.
** WARNING **

** Mandatory requirements **

OK Checking that PHP version is at least 5.3.2 (5.3.6-13ubuntu3.8 installed)
[[ ERROR ]] Checking that the "date.timezone" setting is set: FAILED
 *** Set the "date.timezone" setting in php.ini (like Europe/Paris) ***
You must fix this problem before resuming the check.


$ php app/check.php
********************************
* *
* Symfony requirements check *
* *
********************************

php.ini used by PHP: /etc/php5/cli/php.ini

** WARNING **
* The PHP CLI can use a different php.ini file
* than the one used with your web server.
* If this is the case, please ALSO launch this
* utility from your web server.
** WARNING **

** Mandatory requirements **

OK Checking that PHP version is at least 5.3.2 (5.3.6-13ubuntu3.8 installed)
 OK Checking that the "date.timezone" setting is set
 OK Checking that app/cache/ directory is writable
 OK Checking that the app/logs/ directory is writable
 OK Checking that the json_encode() is available
[[ ERROR ]] Checking that the SQLite3 or PDO_<a class="zem_slink" title="SQLite" href="http://sqlite.org" rel="homepage" target="_blank">SQLite</a> extension is available: FAILED
 *** Install and enable the SQLite3 or PDO_SQLite extension. ***
You must fix this problem before resuming the check.

  • All you need is to install and enable the SQLite extension for Apache:

$ sudo apt-get install php5-sqlite

$ sudo /etc/init.d/apache2 restart

  • Recheck again, now I’m getting some warnings:

$ php app/check.php
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/sqlite.so' - /usr/lib/php5/20090626/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
********************************
* *
* Symfony requirements check *
* *
********************************

php.ini used by PHP: /etc/php5/cli/php.ini

** WARNING **
* The PHP CLI can use a different php.ini file
* than the one used with your web server.
* If this is the case, please ALSO launch this
* utility from your web server.
** WARNING **

** Mandatory requirements **

OK Checking that PHP version is at least 5.3.2 (5.3.6-13ubuntu3.8 installed)
 OK Checking that the "date.timezone" setting is set
 OK Checking that app/cache/ directory is writable
 OK Checking that the app/logs/ directory is writable
 OK Checking that the json_encode() is available
 OK Checking that the SQLite3 or PDO_SQLite extension is available
 OK Checking that the session_start() is available
 OK Checking that the ctype_alpha() is available
 OK Checking that the token_get_all() is available
 OK Checking that the APC version is at least 3.0.17

** Optional checks **

OK Checking that the PHP-XML module is installed
 OK Checking that the token_get_all() function is available
 OK Checking that the mb_strlen() function is available
 OK Checking that the iconv() function is available
 OK Checking that the utf8_decode() is available
 OK Checking that the posix_isatty() is available
[[WARNING]] Checking that the intl extension is available: FAILED
 *** Install and enable the intl extension (used for validators) ***
[[WARNING]] Checking that a PHP accelerator is installed: FAILED
 *** Install a PHP accelerator like APC (highly recommended) ***
[[WARNING]] Checking that php.ini has short_open_tag set to off: FAILED
 *** Set short_open_tag to off in php.ini ***
 OK Checking that php.ini has magic_quotes_gpc set to off
 OK Checking that php.ini has register_globals set to off
 OK Checking that php.ini has session.auto_start set to off

** Optional checks (Doctrine) **

OK Checking that PDO is installed
 OK Checking that PDO has some drivers installed: mysql, sqlite

Let’s see the warnings one by one:

  • [PHP Warning] – Unable to load dynamic library ‘/usr/lib/php5/20090626/sqlite.so’: sqlite.so library relates to SQLite 2, which support was dropped via bug https://bugs.launchpad.net/ubuntu/+source/sqlite/+bug/747325. First ensure you have sqlite3.so in /usr/lib/php5/20090626 folder and then remove (or move) the sqlite.ini in /etc/php5/conf.d (ensure that you have also sqlite3.ini in the same folder):

$ cd /usr/lib/php5/20090626

$ ll sqlite*

-rw-r--r-- 1 root root 48480 2012-06-13 20:18 sqlite3.so

$ cd /etc/php5/conf.d

$ sudo mv sqlite.ini sqlite.ini_rm_20120720

  • [WARNING] Checking that the intl extension is available: install intl extension for php:

$ sudo apt-get install php5-intl

  • [WARNING] Checking that a PHP accelerator is installed: FAILED: Install a PHP Accelerator (you need pecl, so if you don’t have it installed, install php-pear package):

$ sudo pecl install APC

If you get this error:


/usr/include/php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directory
compilation terminated.
make: *** [apc.lo] Error 1
ERROR: `make' failed

Install this package and reinstall APC [updated 2012/08/17: install this package if you don’t find libpcre: libpcre3-dev]:


$ sudo apt-get install libpcre

$ sudo pecl install APC

Once installed, you have to add this line to /etc/php5/cli/php.ini (at the end of the file):


extension=apc.so

  • [WARNING] Checking that php.ini has short_open_tag set to off: just edit /etc/php5/cli/php.ini and modify this line:

short_open_tag = Off

  • Now let’s see this warning: The PHP CLI can use a different php.ini file than the one used with your web server. If this is the case, please ALSO launch this utility from your web server. So, open your broser and launch the check:

http://localhost/Symfony/web/config.php [recommended]

or

http://localhost/Symfony/app/check

  • I’ve had to modify the /etc/php5/apache2/php.ini file to add the correct timezone, add the extension=apc.so at the end of the file and modify open_short_tag to Off. Restart apache and recheck until you see no errors.

Once everything it’s fine, click on “Bypass configuration and go to the Welcome page”.

Categories: apache, linux, php, symfony, ubuntu Tags: , ,

How to install TrueType Fonts on Ubuntu

March 13, 2012 2 comments

To install a TrueType Font on Ubuntu is as easy as this:

  1. Download the TTF
  2. Double click in the downloaded TTF to open the font viewer window.
  3. Click “Install Font” in the lower right-hand corner to install the font.
  4. Enjoy the font

If you don’t see the TTF in your application (for instance, LibreOffice), ensure to close all the windows of that application, and then, in a terminal, type this:


$ sudo fc-cache

Categories: linux, tutorial, ubuntu Tags: , ,

Install Windows 7 on VirtualBox – Status: error 0xc0000225

November 14, 2011 80 comments

When I try to install Windows 7 on Virtual Box 4.1, I get this error:


Windows failed to start. A recent hardware or software change might be the cause. To fix this problem:

[...]

Status: 0xc0000225

Info: An unexpected error ahs occurred.

VirtualBox - Windows 7 error

Status: 0x0000225

To fix it, stop the virtual machine, go to Settings -> System and check “Enable IO APIC”

Install redmine with MySQL in Ubuntu 11.04

September 5, 2011 19 comments

Damaged hard disk, new hard disk, new re-installation of my software!

Based on my previous post (https://myotragusbalearicus.wordpress.com/2011/03/22/install-redmine-with-mysql-in-ubuntu-10-10/), I reinstalled redmine on Ubuntu 11.04. I also tried to follow http://www.x2on.de/2011/04/23/tutorial-redmine-with-git-and-gitosis-on-ubuntu-11-04/ without installing Git, but have had a lot of problems.

First, install the required packages (Ruby on Rails), apache modules, and then install redmine:

$ sudo apt-get install ruby rubygems subversion ruby-pkg-tools ruby1.8-dev build-essential apache2-prefork-dev libapache-dbi-perl libapache2-mod-perl2 libdigest-sha1-perl libcurl4-openssl-dev ruby  ruby1.9.1-dev libgemplugin-ruby libgemplugin-ruby1.8 libruby-extras libruby1.8-extras rake libmysqlclient15-dev
$ sudo apt-get install libapache2-mod-passenger
$ sudo apt-get install redmine redmine-mysql

If you like Gantt-charts:

$ sudo apt-get install librmagick-ruby1.8

Create the database for redmine:

$ mysql -u root -p
CREATE DATABASE redmine CHARACTER SET utf8;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'redmine_password';
GRANT ALL privileges ON redmine.* TO 'redmine'@'localhost';

Configure the database settings:

$ cd /usr/share/redmine
$ sudo cp templates/database.yml.template config/database.yml
$ sudo vi config/database.yml

Sample config file using the default MySQL port (3306):

production:
  adapter: mysql
  database: redmine
  host: localhost
  username: redmine
  password: redmine_password
  encoding: utf8

Install Rubygem, because Ubuntu 11.04 has an older version:

$ cd /tmp
$ wget http://production.cf.rubygems.org/rubygems/rubygems-1.7.2.tgz
$ tar xvfz rubygems-1.7.2.tgz
$ cd rubygems-1.7.2
$ sudo mv /usr/bin/gem /usr/bin/gem-ubuntu
$ sudo ruby setup.rb
RubyGems 1.7.2 installed

=== 1.7.2 / 2011-04-05

* 1 Bug Fix:
  * Warn on loading bad spec array values (ntlm-http gem has nil in its cert
    chain)

------------------------------------------------------------------------------

RubyGems installed the following executables:
	/usr/bin/gem1.8
$ sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

Now install Rails and rack

$ sudo gem install rails -v=2.3.11
$ sudo gem install rack -v=1.1.0
$ sudo gem install mysql
$ sudo gem install -v=0.4.2 i18n

Configure redmine:

$ cd /var/www
$ sudo ln -s /usr/share/redmine/public /var/www/redmine
$ sudo chown -R www-data:www-data redmine
$ sudo rake generate_session_store

If you get this error…

rake aborted!
no rakefile found

…just go to the redmine folder and run again… to get this new error:

$ cd /usr/share/redmine
$ sudo rake generate_session_store
NOTE: SourceIndex.new(hash) is deprecated; From /usr/share/redmine/config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100:in `new'.
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
rake aborted!
uninitialized constant ActiveSupport::Dependencies::Mutex

As stated in Redmine forums http://www.redmine.org/boards/1/topics/22314, i added this line at the beggining of /usr/share/redmine/config/boot.rb:

require 'thread'

And now…

$ sudo rake generate_session_store
NOTE: SourceIndex.new(hash) is deprecated; From /usr/share/redmine/config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100:in `new'.
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
WARNING: 'task :t, arg, :needs => [deps]' is deprecated.  Please use 'task :t, [args] => [deps]' instead.
    at /usr/share/redmine/lib/tasks/email.rake:170

But this is only a warning, so you can safeliy ignore it.

Let’s go with the next step:

$ sudo RAILS_ENV=production rake db:migrate
NOTE: SourceIndex.new(hash) is deprecated; From /usr/share/redmine/config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100:in `new'.
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
WARNING: 'task :t, arg, :needs => [deps]' is deprecated.  Please use 'task :t, [args] => [deps]' instead.
    at /usr/share/redmine/lib/tasks/email.rake:170
<strong>rake aborted!</strong>
undefined local variable or method `version_requirements' for #<Rails::GemDependency:0x7f9ea62268b0>

Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

That seems to be due to incompatible version of rubygems:

$ gem list

*** LOCAL GEMS ***

actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
i18n (0.4.2)
mysql (2.8.1)
rack (1.1.2, 1.1.0)
rails (2.3.11)
rake (0.9.2)

$ rails -v
Rails 2.3.11

$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]

Install rubygems update 1.4.2 (and uninstall any other rubygems version you already have):

$ sudo gem install rubygems-update -v='1.4.2'
$ sudo update_rubygems

To get another error…

$ sudo RAILS_ENV=production rake db:migrate
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
WARNING: 'task :t, arg, :needs => [deps]' is deprecated.  Please use 'task :t, [args] => [deps]' instead.
    at /usr/share/redmine/lib/tasks/email.rake:170
rake aborted!
No such file or directory - /etc/redmine/default/database.yml

This is more simple!

$ cd /etc/redmine/default
$ sudo ln -s /usr/share/redmine/config/database.yml

And now you finally can configure it:

$ cd /usr/share/redmine
$ sudo RAILS_ENV=production rake db:migrate
$ sudo RAILS_ENV=production rake redmine:load_default_data

And you can test redmine at

http://localhost/redmine

Wow, a little more complicated than in 10.10, at least for me!

Updated 05/april/2012

As commented @ilian, if you have this error:


Please install RDoc 2.4.2+ to generate documentation.

Install it:


gem install rdoc -v=2.4.2

Categories: MySQL, redmine, ubuntu Tags: , , , ,

Install Apache on Ubuntu

August 31, 2011 1 comment

First of all, install the required packages

sudo apt-get install apache2

Installing Apache on Ubuntu is that simple. You can test it works in your browser:

http://localhost:80

But if you want more sophisticated things, you’ll have to deal with the apache modules.

Categories: apache, ubuntu Tags: , ,

Install redmine with MySQL in ubuntu 10.10

March 22, 2011 3 comments

Again with Redmine ;-D

As you can read in my older post about installing redmine with PostgreSQL (https://myotragusbalearicus.wordpress.com/2010/11/17/install-redmine-with-postgresql-in-ubuntu-10-10/), now at home I’ll give it a try with MySQL, as I’m developing a web page with PHP/MySql.

The steps are basically the same, followed the indications of this link:

http://www.redmine.org/wiki/redmine/HowTo_Install_Redmine_in_Ubuntu

I only have had to install and enable the passenger mod for Apache:


$ sudo apt-get install libapache2-mod-passenger

Then, I can access to localhost/redmine, and don’t forget the admin/admin user/password!

Install redmine with postgreSQL in ubuntu 10.10

November 17, 2010 1 comment

I’m looking for a issue tracking system and finally I’ve dicided redmine to give a try. I’ve been testing a little bit (a couple of days) with Jira, Trac and Mantis. I’ve finally decided Redmine because:

– Jira is a good option, a lot of people recommends it, but it’s propietary (altought it’s free for open source projects), but the standalone version lacks a lot of addons that are only available on the hosted (payment) version. In my case I can go on with the standalone version,  but I decided to give a try an open source product.

– Trac seems to be a good choice, but I’ve read some posts saying that it’s developement is slooower.

– Mantis, another interesting choice, but I found the navigation very confusing.

– Redmine: my actual decission. It’s an evolution of Trac, with a good and integrated admin module. I’ll post about my impressions when I’ve been tested it more.

To install it,first you have to install mySQL or postgreSQL. I’ve decided to install postgreSQL 9 (the latest version). You need the PPA in order to install it on Ubuntu 10.10:
https://launchpad.net/~pitti/+archive/postgresql

$ sudo apt-get install postgresql-9.0 pgadmin3

Then, to install redmine I’ve followed this link:

http://www.redmine.org/wiki/redmine/HowTo_Install_Redmine_in_Ubuntu

But when I configure apache I can only see the directory listing of /redmine. Thus, I installed these packages (I don’t think I need all of them, but this worked for me):

sudo apt-get install ruby rubygems subversion ruby-pkg-tools ruby1.8-dev build-essential

sudo apt-get install libapache2-mod-passenger

Then I tried to configure redmine using passenger and voilà, I can access redmine!