Saturday, June 16, 2012

Trac

Installing Trac:


Tested versions:

  • Fedora: 17 x86_64
  • PostgreSQL: 9.1.4 x86_64
  • Trac: 0.12.3 noarch
PostgreSQL install procedure: here

Official documentation:
http://trac.edgewall.org/wiki/TracInstall

A. Install Trac and PostgreSQL support


1. Minimal installation:

#---
yum -y install \
trac \
python-storm-postgresql
#---

2. Some interresting plugins:

#---
yum -y install \
trac-git-plugin \
trac-iniadmin-plugin \
trac-customfieldadmin-plugin \
trac-accountmanager-plugin \
trac-sumfields-plugin \
trac-ticketdelete-plugin \
trac-tocmacro-plugin
#---

B. Create PostgreSQL database:


Offical documentation:
http://trac.edgewall.org/wiki/DatabaseBackend#Postgresql

1. Create user [trac], pass [pass], and database [trac_db]

#---
createuser -U postgres -W -D -R -S trac
psql -U postgres -W -c "ALTER USER trac WITH PASSWORD 'pass';"
createdb -U postgres -W trac_db
psql -U postgres -W -c "GRANT ALL ON DATABASE trac_db TO trac;"
#---

2. Check connectivity:

#---
psql -U trac -d trac_db -h localhost -p 5432 -W -c "SELECT 1;"
#---

3. In case you need to remove the database:

#---
dropdb -U postgres -W trac_db
#---

4. In case you need to remove the user:

#---
dropuser -U postgres -W trac
#---

C. Standalone version:


1. Create directory:

#---
mkdir /var/local/trac
#---

2. Add user:

#---
useradd -m -d /var/local/trac -s /bin/bash -c "Trac stand-alone daemon user" trac
#---

3. Reset home dir owner:

#---
chown trac:trac /var/local/trac
#---

4. Check trac setup:


#---
su - trac
#---

#---
pwd
#---

Expected:
/var/local/trac

5. Create project dirs

#---
mkdir -p /var/local/trac/projects/tst
#---

6. Initialize Trac project environment:

#---
trac-admin /var/local/trac/projects/tst initenv
#---

When asked about the connection string give the following:
postgres://trac:pass@localhost:5432/trac_db

7. In case you fail, remove all and start it over:


#---
rm -rf /var/local/trac/projects/*
#---

Just in case: recreate the database (dropdb followed by createdb)

8. Check if it is ok:

#---
tracd --port 8000 /var/local/trac/projects/tst
#---

Open your browser and point it to:
http://localhost:8000/tst

D. Apache version:


Official documentation:
http://trac.edgewall.org/wiki/TracModWSGI

1. Install packagers:

#---
yum -y install \
httpd \
mod_wsgi
#---

2. Deploy http content (with CGIs):

#---
trac-admin /var/local/trac/projects/tst deploy /var/local/trac/projects/tst
#---

3. Set permissions:

#---
usermod -a -G apache trac
chown -R apache:apache /var/local/trac
chmod -R g+rw /var/local/trac
#---

4. Set SElinux context:

#---
chcon -R -v --type=httpd_sys_rw_content_t /var/local/
semanage fcontext -a -t httpd_sys_rw_content_t "/var/local/(/.*)?"
#---

5. Check permissions:

#---
ls -lZ /var/local/
#---

Expected:
drwxrwxrwx. apache apache system_u:object_r:httpd_sys_content_t:s0 trac

6. Allow apache to connect to database (SElinux):

#---
setsebool -P httpd_can_network_connect_db 1
#---

7. Create apache conf file:

#---
cat > /etc/httpd/conf.d/trac-tst.conf << __END__
WSGIScriptAlias /trac/tst /var/local/trac/projects/tst/cgi-bin/trac.wsgi


    WSGIApplicationGroup %{GLOBAL}
    Order deny,allow
    Allow from all

__END__
#---

8. Put apache to run:

#---
systemctl enable httpd.service
systemctl start httpd.service
#---

9. Check if it is running:

http://localhost/trac/tst

E. Important logs:

/var/log/httpd/error_log
/var/log/messages


F. If you need to create several projects here are some scripts that automate the process:


createprj.sh:
https://dl.dropbox.com/u/9583089/createprj.sh
createdb.sh:
https://dl.dropbox.com/u/9583089/createdb.sh
trac-tpl.conf:
https://dl.dropbox.com/u/9583089/trac-tpl.conf

Put these files into [/var/local/trac/] and execute (as root):

Usage:
./createprj.sh <project> <db username> <db pass> [<project name>]

E.g.:

#---
./createprj.sh test_prj trac pass "My automatically created Test Project"
#---


G. Authentication

This is left out-of-the scope and can be easily implemented following the instructions on the official documentation:
http://trac.edgewall.org/wiki/TracModWSGI#ConfiguringAuthentication
http://trac.edgewall.org/wiki/TracPermissions

To the automated process on section F, just edit the [trac-tpl.conf] file to include the setup for your preferred authentication method.

Related posts:

PostgreSQL

Installation and basic usage of PostgreSQL 9.X


Tested versions:


A. Install packages:


#---
yum -y install \
postgresql \
postgresql-server
#---


B. Initialize environment:

#---
su - postgres
#---

#---
pwd
#----

Expected:

/var/lib/pgsql

#---
/usr/bin/initdb /var/lib/pgsql
logout
#---


C. Put PostgreSQL service to run


1. Check if PostgreSQL is running:

#---
systemctl status postgresql.service
#---

1.1. If not, just enable it and start it:

#---
systemctl enable postgresql.service
systemctl start postgresql.service
#---


1.2. Check if it has listeners running:

#---
netstat -nl --inet --inet6 | grep 5432
#---

Expected:
tcp        0      0 127.0.0.1:5432              0.0.0.0:*                   LISTEN     
tcp        0      0 ::1:5432                    :::*                        LISTEN  

D. Check accessibility

#---
psql -U postgres -c "SELECT 1;"
#---

Expected:
 ?column?
----------
        1
(1 row)

E. Set postgres user password

#---
psql -U postgres -c "ALTER USER postgres WITH PASSWORD 'postgres';"
#---

F. Close 'trust' access

#---
su - postgres
#---

1. Edit [/var/lib/pgsql/data/pg_hba.conf]

Change all 'trust' entries by 'password'

Example:
local   all   postgres   trust

Should become:
local   all   postgres   password

2. Restart PostgreSQL

#---
systemctl restart postgresql.service
#---

3. Check access:


#---
psql -U postgres -c "SELECT 1;"
#---

Expected:
Password for user postgres:
 ?column?
----------
        1
(1 row)


G. Database and users 101:


1. Create user:


#---
createuser -U postgres -W -D -R -S test_user
psql -U postgres -W -c "ALTER USER test_user WITH PASSWORD 'test_pass';"
#---

2. Create database:

#---
createdb -U postgres -W -E UTF8 -O test_user test_db
psql -U postgres -W -c "GRANT ALL ON DATABASE test_db TO test_user;"
#---

3. Check access:

#---
psql -U test_user -d test_db -W -c "SELECT 1;"
#---

4. Remove database:

#---
dropdb -U test_user -W test_db
#---

5. Remove user:

#---
dropuser -U postgres -W test_user
#---

6. Check user removal:

#---
psql -U test_user -d test_db -W -c "SELECT 1;"
#---

Expected:
Password for user test_user:
psql: FATAL:  password authentication failed for user "test_user"

H. Important logs:


/var/lib/pgsql/data/pg_log/*
/var/log/messages

Sunday, June 03, 2012

My Fedora 17 road map

- If you have had problems with automatically mounting LUKS partition, see my post addressing the issue here

- Add repositories:
-- RPM Fusion (free)
#---
rpm -Uvhi http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
#---

-- RPM Fusion (non-free)
#---
rpm -Uvhi http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
#---

-- Adobe (Flash plugin, AdobeAIR and AcrobatReader) 32 bits:
#---
rpm -Uvhi http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
#---

-- Adobe Flash for 64bits:
#---
rpm -Uvhi http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
#---

-- Chromium (for Fedora here):
#---
wget http://repos.fedorapeople.org/repos/spot/chromium-stable/fedora-chromium-stable.repo -O /etc/yum.repos.d/fedora-chromium.repo
#---

-- Setting up a not-so-restricting SELinux: here


-- Remove things I do NOT like (do not remove xine if you prefer KDE):

--- Multimedia players that do not play divx/mp3 and stays as default for video and audio files:
#---
yum -y erase \
xine \
gxine* \
totem* \
brasero*
#---


-- Update your system:
#---
yum -y upgrade
#---

- Install additional software:

-- GTK IM modules (for c cedilla, for instance):
#---
yum -y install \
gtk2-immodules
#---

C Cedilla with Gnome

-- Chromium:
#---
yum -y install \
chromium
#---


-- PulseAudio volume control (must-have):
#---
yum -y install \
pavucontrol
#---

-- Multimedia:
#---
yum -y install \
pavucontrol \
mplayer \
mencoder \
live555 \
gecko-mediaplayer \
gnome-mplayer \
vlc \
grip \
flash-plugin \
k3b \
k3b-extras-freeworld
#---

Because Adobe Reader is usually very slow to download, I keep it separated and leave it to be last installed.
#---
yum -y install \
AdobeReader_enu
#---

-- Spell-checking
--- Additional languages: German (de), Spanish (es), and Portuguese from Brazil (br)
#---
yum -y install \
hunspell-de \
hunspell-es \
hunspell-pt
#---

-- Menu editing tool:
#---
yum -y install \
alacarte
#---


-- Audacious (XMMS is not that great anymore):
#---
yum -y install \
audacious \
audacious-plugin-fc \
audacious-plugins-amidi \
audacious-plugins-exotic \
audacious-plugins-freeworld-aac \
audacious-plugins-freeworld-ffaudio \
audacious-plugins-freeworld-mms \
audacious-plugins-freeworld-mp3 \
audacious-plugins-freeworld \
audacious-plugins-jack \
audacious-plugins-sid \
audacious-plugins \
audacious-plugin-xmp
#---

 

-- Pidgin, a very good IM client
#---
yum -y install \
pidgin \
pidgin-guifications \
pidgin-libnotify \
pidgin-otr \
pidgin-gfire \
pidgin-musictracker \
purple-plugin_pack-pidgin \
purple-facebookchat \
purple-microblog \
pidgin-sipe \
purple-msn-pecan
#---


--- If you use LaTeX you may find this plugin appealing:
#---
yum -y install \
pidgin-latex
#---


-- For kernel modules
#---
yum -y install \
dkms \
kernel-devel \
kernel-headers
#---


-- Misc

--- Backups with Back In Time:
#---
yum -y install \
backintime-common \
backintime-gnome
#---


--- Diagrams and images, usually old stuff that I'm used to
#---
yum -y install \
ImageMagick \
graphviz \
dia \
gv \
xfig \
gnuplot \
inkscape
#---


--- Video editing
#---
yum -y install \
pitivi
#---

--- Screen capture
#---
yum -y install \
gnome-screenshot
#---

--- LXDE calculator + editor (gedit)
#---
yum -y install \
galculator \
gedit
#---

--- Editors and related
#---
yum -y install \
gvim \
ctags \
dictd \
diction
#---


--- My beloved spreadsheet program
#---
yum -y install \
gnumeric
#---


--- Compression related programs
#---
yum -y install \
unrar \
p7zip
#---


--- Administration related programs
#---
yum -y install \
telnet \
lsof \
nmap \
nc \
traceroute \
mc \gnome-screenshot.x86_64
AcetoneISO2 \
rdesktop
#---


--- Very nice "must-have" admin programs:
#---
yum -y install \
gnome-password-generator
#---


--- For WLAN Cracking
#---
yum -y install \
aircrack-ng \
airsnort
#---

-- Development

--- Debug related programs
#---
yum -y install \
gdb \
gcc \
strace \
ltrace
#---


--- For GIT support:
#---
yum -y install \
git-all
#---


--- For Java development:
#---
yum -y install \
maven
#---

-- Update your system:
#---
yum -y upgrade
#---


- Install and setup third-part programs
-- VirtualBox/VMware Player
-- Skype
-- Real Player (check for the RPM version)
-- Sun Java
-- Eclipse
-- NetBeans

- Setup printers
- Backup [/etc] and [/boot/grub]
#---
tar -czf bkp-system.`/bin/date +"%Y%m%d-%H%M"`.tgz /etc /boot/grub
#---


- Some issues:
-- Skype may need some extra configuration (see link for 64bits) and some SELinux relaxation (see link for SELinux).


#---
yum -y install \
libXScrnSaver.i686 \
libX11.i686 \
libv4l.i686 \
alsa-plugins-pulseaudio.i686 \
qt-x11.i686 \
qt.i686 \
alsa-lib.i686 \
libXv.i686
#---

-- VirtualBox:
#---
yum -y install \
libpng-compat
#---




Related posts:
- Installing Skype in 64bits (external link)
- Mounting former LUKS partition
- SELinux
- Road map for Fedora 16
- Making USB to work with VirtualBox (external link)
- Adding security to SSH
- Backups with Back In Time

- C Cedilla with Gnome

Saturday, May 12, 2012

Apache Continuum

This is aimed at installing and configuring Apache Continuum. The reason is that I already have some (awful and disgusting) experience with CruisControl. I ended up writing an Eclipse integration plug-in and a LOT of Ant scripting and I'm not very keen of repeating this experience. I also have had some experience with Hudson/Jenkins which was not that great (even though a LOT better than CruiseControl). Therefore I'm willing to take Continuum for a ride and see how it goes. Since I didn't documented the previous experiences I'm doing it for Continuum.

This documentation was tested with version 1.3.8(GA) available at http://continuum.apache.org/download.html and based on the official documentation available at http://continuum.apache.org/docs/1.3.8/

 

1. Get Apache Continuum (it is not distributed in RPM).

 

1.1. Get version 1.3.8 GA in bin.tar.gz from http://continuum.apache.org/download.html

#---
wget http://www.apache.org/dyn/closer.cgi/continuum/binaries/apache-continuum-1.3.8-bin.tar.gz
tar -vxzf apache-continuum-1.3.8-bin.tar.gz -C /opt/
#---


2. Get Java environment right:

 

2.1. Check your environment variables:

#---

env | grep JAVA_HOME
#---

 

2.2. Install Java (openjdk will do):

#---

yum -y install \
java-1.6.0-openjdk
#---


2.3. Check your Java version:

#---

java -version
#---


OpenJDK:
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.1) (fedora-65.1.11.1.fc16-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)


Sun:
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

 

2.4. Set JAVA_HOME variable correctly:

 

2.4.1. For OpenJDK:

#--- 

cat >> /etc/environment <<__END__

JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64
__END__
#---

 

2.4.2. For Sun's Java:

#---
cat >> /etc/environment <<__END__
JAVA_HOME=/usr/java/default/
__END__
#---


NOTE: It will take effect on the next login

3. Run Continuum for the first time to check it out:

#---

/opt/apache-continuum-1.3.8/bin/continuum start
#---


3.1. Track startup through its log file: /opt/apache-continuum-1.3.8/logs/continuum.log

#---

tail -f /opt/apache-continuum-1.3.8/logs/continuum.log
#---


NOTE: It should yield an exception complaining about security configurations:

org.apache.commons.configuration.ConfigurationException: Cannot locate configuration source ./conf/security.properties


3.2. It goes up nonetheless and you can open it: 3.3. Go through the admin setup and try to create a remote project.

http://localhost:8080/continuum/

My setup is the default (I didn't changed it)


4. Try it with a remote project. I chose the Continuum project (~15MB):

 

4.1. Go to Continuum and add two Maven 2 project: 

http://localhost:8080/continuum/

Add Project -> Maven 2.0.x Project

Parent (must be the first to be added):
http://svn.apache.org/repos/asf/continuum/parent/trunk/pom.xml
Continuum:
http://svn.apache.org/repos/asf/continuum/trunk/pom.xml


5. For local repositories you need to enable the file protocol. Check the procedures on the FAQ page:



URLs and instructions from:
http://continuum.apache.org/development/building.html

http://continuum.apache.org/faqs.html

Particularly at:
http://continuum.apache.org/faqs.html#can-i-use-file-protocol-in-add-project-view

Saturday, February 25, 2012

[UPDATE] Sonar with PostgreSQL

This documentation is based on:
http://docs.codehaus.org/display/SONAR/Install+Sonar

It was tested with Sonar 2.13.1

A. Getting Sonar and testing it

1. Get Sonar from:
http://www.sonarsource.org/downloads/

2. Unzip it to the
#---
unzip -x <sonar zip file> -d /opt/
#---


2.1. Example:
#---
unzip -x sonar-2.13.1.zip -d /opt/
#---


3. Start Sonar as standalone
#---
/opt/sonar-<version>/bin/linux-<arch>/sonar.sh start
#---


3.1. Example:
#---
/opt/sonar-2.13.1/bin/linux-x86-64/sonar.sh start
#---


4. Follow the logs to check that everything is ok:
#---
tail -f /opt/sonar-<version>/logs/sonar.log
#---


4.1. Example:
#---
tail -f /opt/sonar-2.13.1/logs/sonar.log
#---


NOTE: You are waiting for a line similar to:
INFO   | jvm 1    | 2012/02/25 17:16:31 | 2012-02-25 17:16:31.818:INFO::Started SelectChannelConnector@0.0.0.0:9000

5. Check that Sonar is actually accepting connections:
#---
netstat -nl --inet --inet6 | grep 9000
#---


NOTE: It should return something like:
tcp        0      0 :::9000                     :::*                        LISTEN

5.1. Open your browser to double check:
http://localhost:9000/

Login credentials:
username: admin
password: admin


B. Configuring Sonar to work with PostgreSQL

1. Check if PostgreSQL is running:
#---
systemctl status postgresql.service
#---


1.1. If not, just enable it and start it:
#---
systemctl enable postgresql.service
systemctl start postgresql.service
#---


1.2. Check if it has listeners running:
#---
netstat -nl --inet --inet6 | grep 5432
#---


NOTE: You are expecting something like this:
tcp        0      0 127.0.0.1:5432              0.0.0.0:*                   LISTEN      
tcp        0      0 ::1:5432                    :::*                        LISTEN   

[UPDATED]
2. Setup PostgreSQL
#---
createuser -U postgres -W -D -R -S sonar
psql -U postgres -W -c "ALTER USER sonar WITH PASSWORD 'sonar';"
createdb -U postgres -W -E UTF8 -O sonar sonar
psql -U postgres -W -c "GRANT ALL ON DATABASE sonar TO sonar;"
#---

[UPDATED]

2.1. Check connection:
#---
psql -U sonar -d sonar -W -c "SELECT 1;"
#---


3. Configure Sonar:

3.1. Edit the file /opt/sonar-<version>/conf/sonar.properties

After editing it must looks like the following (after issuing the below command):
#---
cat conf/sonar.properties | grep -v "^#" | grep -v "^[[:space:]]*$"
#---


sonar.jdbc.username:                       sonar
sonar.jdbc.password:                       sonar # if you gave another password this property must reflect it
sonar.jdbc.url:                            jdbc:postgresql://localhost/sonar
sonar.jdbc.driverClassName:                org.postgresql.Driver
sonar.jdbc.validationQuery:                select 1
sonar.jdbc.schema:                         public
sonar.jdbc.maxActive:                      20
sonar.jdbc.maxIdle:                        5
sonar.jdbc.minIdle:                        2
sonar.jdbc.maxWait:                        5000
sonar.jdbc.minEvictableIdleTimeMillis:     600000
sonar.jdbc.timeBetweenEvictionRunsMillis:  30000
sonar.notifications.delay=60

4. Check if Sonar is ok by restarting it:
#---
/opt/sonar-<version>/bin/linux-<arch>/sonar.sh restart
#---


4.1. Example:
#---
/opt/sonar-2.13.1/bin/linux-x86-64/sonar.sh restart
#---


4.2. Keep track of the log (see step 4 of section A)

5. Check if Sonar correctly accessed the database in PostgreSQL:
#---
psql -U sonar -d sonar -W -c "\\dt"
#---


NOTE: It currently has 47 tables and it yields it on the above command with the following line:
(47 rows)

C. Test your Sonar with any project you want (below what you need for Maven projects).

1. With Maven projects you will need the following pom.xml section:
<project>
 <!-- your pom initial setup -->
 <properties>
  <!-- your other properties -->
  <sonar.jdbc.url>jdbc:postgresql://localhost/sonar</sonar.jdbc.url>
  <sonar.jdbc.username>sonar</sonar.jdbc.username>
  <sonar.jdbc.password>sonar</sonar.jdbc.password>
  <sonar.jdbc.driver>org.postgresql.Driver</sonar.jdbc.driver>
 </properties>
 <!-- your pom remaining setup -->
</project>

2. Execute the Sonar target on your project:
#---
cd <maven project>
mvn clean sonar:sonar
#---

Saturday, November 26, 2011

My Fedora 16 road map

- If you have had problems with automatically mounting LUKS partition, see my post addressing the issue here

- Add repositories:
-- RPM Fusion (free)
#---
rpm -Uvhi http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
#---


-- RPM Fusion (non-free)
#---
rpm -Uvhi http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
#---



#---
rpm -Uvhi http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm
rpm -Uvhi http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-rawhide.noarch.rpm
#---



-- Adobe (Flash plugin, AdobeAIR and AcrobatReader) 32 bits:
#---
rpm -Uvhi http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
#---


-- Adobe Flash for 64bits:
#---
rpm -Uvhi http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
#---


-- Chromium (for Fedora here):
#---
wget http://repos.fedorapeople.org/repos/spot/chromium-stable/fedora-chromium-stable.repo -O /etc/yum.repos.d/fedora-chromium.repo
#---


-- Setting up a not-so-restricting SELinux: here


-- Remove things I do NOT like (do not remove xine if you prefer KDE):

--- Multimedia players that do not play divx/mp3 and stays as default for video and audio files:
#---
yum -y erase \
xine \
gxine* \
totem* \
brasero*
#---


--- This is REALLY annoying, it prevents mplayerplug-in from working properly:
#---
yum -y erase \
mozplugger
#---


-- Update your system:
#---
yum -y upgrade
#---


- Install additional software:

-- Chromium:
#---
yum -y install \
chromium
#---


-- Multimedia:
#---
yum -y install \
mplayer \
mencoder \
live555 \
gecko-mediaplayer \
gnome-mplayer \
vlc \
grip \
flash-plugin \
k3b \
k3b-extras-freeworld
#---


Because Adobe Reader is usually very slow to download, I keep it separated and leave it to be last installed.
#---
yum -y install \
AdobeReader_enu
#---


-- Spell-checking
--- Additional languages: German (de), Spanish (es), and Portuguese from Brazil (br)
#---
yum -y install \
hunspell-de \
hunspell-es \
hunspell-pt
#---


-- Audacious (XMMS is not that great anymore):
#---
yum -y install \
audacious \

audacious-plugin-fc \
audacious-plugins-amidi \
audacious-plugins-exotic \
audacious-plugins-freeworld-aac \
audacious-plugins-freeworld-ffaudio \
audacious-plugins-freeworld-mms \
audacious-plugins-freeworld-mp3 \
audacious-plugins-freeworld \
audacious-plugins-jack \
audacious-plugins-sid \
audacious-plugins \
audacious-plugin-xmp
#---

-- Pidgin, a very good IM client
#---
yum -y install \
pidgin \
pidgin-guifications \
pidgin-libnotify \
pidgin-otr \
pidgin-gfire \
pidgin-musictracker \
purple-plugin_pack-pidgin \
purple-facebookchat \
purple-microblog \
pidgin-sipe \
purple-msn-pecan
#---


--- If you use LaTeX you may find this plugin appealing:
#---
yum -y install \
pidgin-latex
#---


-- For kernel modules
#---
yum -y install \
kernel-PAE-devel \
kernel-headers
#---


--- For 64bit or old processors (non-PAE)
#---
yum -y install \
dkms \
kernel-devel \
kernel-headers
#---


-- Nautilus plug-ins
#---
yum -y install \
nautilus-open-terminal \
nautilus-search-tool \
nautilus-extensions
#---


-- Misc

--- Backups with Back In Time:
#---
yum -y install \
backintime-common \
backintime-gnome
#---


--- Diagrams and images, usually old stuff that I'm used to
#---
yum -y install \
ImageMagick \
graphviz \
dia \
gv \
xfig \
gnuplot \
inkscape
#---


--- Editors and related
#---
yum -y install \
gvim \
ctags \
dictd \
diction
#---


--- My beloved spreadsheet program
#---
yum -y install \
gnumeric
#---


--- Compression related programs
#---
yum -y install \
unrar \
p7zip
#---


--- Administration related programs
#---
yum -y install \
telnet \
lsof \
nmap \
nc \
traceroute \
mc \
AcetoneISO2 \
rdesktop
#---


--- Very nice "must-have" admin programs:
#---
yum -y install \
keepassx \
system-config-display \
gnome-password-generator
#---


--- For WLAN Cracking
#---
yum -y install \
aircrack-ng \
airsnort
#---


--- NVIDA
#---
yum -y install \
akmod-nvidia \
kmod-nvidia-PAE \
xorg-x11-drv-nvidia
#---


-- Note about the driver:
It messes the font resolution up (IMHO). So to keep the same aspect between the normal driver and the NVIDIA driver you need to edit the file: [/etc/X11/xorg.conf] and add the following line in the section Device:

Option "DPI" "90 x 90"

My section device looks like this:

Section "Device"
Identifier "Videocard0"
#Driver "nouveau"
Driver "nvidia"
Option "AddARGBGLXVisuals" "True"
Option "DPI" "90 x 90"
EndSection


-- Development
--- Some helper programs
#---
yum -y install \
ant
#---


--- My beloved debugging program
#---
yum -y install \
ddd
#---


--- Debug related programs
#---
yum -y install \
gdb \
gcc \
strace \
ltrace
#---


--- For SVN support:
#---
yum -y install \
rapidsvn
#---


--- For GIT support:
#---
yum -y install \
git-all
#---


-- Update your system:#---
yum -y upgrade
#---


- Install and setup third-part programs
-- VirtualBox/VMware Player
-- Skype
-- Real Player (check for the RPM version)
-- Sun Java
-- Eclipse
-- NetBeans

- Setup printers
- Backup [/etc] and [/boot/grub]
#---
tar -czf bkp-system.`/bin/date +"%Y%m%d-%H%M"`.tgz /etc /boot/grub
#---


- Some issues:
-- Acrobat Reader install its Firefox/Mozilla plug-in, which has a memory leak. I recommend to remove it. To do so:
-- Skype may need some extra configuration (see link for 64bits) and some SELinux relaxation (see link for SELinux).

#---
rm -f /usr/lib/mozilla/plugins/nppdf.so
#---


Related posts:
- Installing Skype in 64bits (external link)
- Mounting former LUKS partition
- SELinux
- Road map for Fedora 15
- Making USB to work with VirtualBox (external link)
- Adding security to SSH
- Backups with Back In Time

Thursday, November 10, 2011

My Fedora 15 road map

- If you have had problems with automatically mounting LUKS partition, see my post addressing the issue here

- Add repositories:
-- RPM Fusion (free)
#---
rpm -Uvhi http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
#---


-- RPM Fusion (non-free)
#---
rpm -Uvhi http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
#---



#---
rpm -Uvhi http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm
rpm -Uvhi http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-rawhide.noarch.rpm
#---



-- Adobe (Flash plugin, AdobeAIR and AcrobatReader) 32 bits:
#---
rpm -Uvhi http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
#---


-- Adobe Flash for 64bits:
#---
rpm -Uvhi http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
#---


-- Chromium (for Fedora here):
#---
wget http://repos.fedorapeople.org/repos/spot/chromium-stable/fedora-chromium-stable.repo -O /etc/yum.repos.d/fedora-chromium.repo
#---


-- Setting up a not-so-restricting SELinux: here


-- Remove things I do NOT like (do not remove xine if you prefer KDE):

--- Multimedia players that do not play divx/mp3 and stays as default for video and audio files:
#---
yum -y erase \
xine \
gxine* \
totem* \
brasero*
#---


--- This is REALLY annoying, it prevents mplayerplug-in from working properly:
#---
yum -y erase \
mozplugger
#---


-- Update your system:
#---
yum -y upgrade
#---


- Install additional software:

-- Chromium:
#---
yum -y install \
chromium
#---


-- Multimedia:
#---
yum -y install \
alsa-tools \
alsamixergui \
mplayer \
mencoder \
live555 \
gecko-mediaplayer \
gnome-mplayer \
vlc \
grip \
flash-plugin \
adobeair \
k3b \
k3b-extras-freeworld
#---


Because Adobe Reader is usually very slow to download, I keep it separated and leave it to be last installed.
#---
yum -y install \
AdobeReader_enu
#---


-- Spell-checking
--- Additional languages: German (de), Spanish (es), and Portuguese from Brazil (br)
#---
yum -y install \
hunspell-de \
hunspell-es \
hunspell-pt
#---


-- Audacious (XMMS is not that great anymore):
#---
yum -y install \
audacious \

audacious-plugin-fc \
audacious-plugins-amidi \
audacious-plugins-exotic \
audacious-plugins-freeworld-aac \rpmfusion-free-updates
audacious-plugins-freeworld-ffaudio \
audacious-plugins-freeworld-mms. \
audacious-plugins-freeworld-mp3 \
audacious-plugins-freeworld \
audacious-plugins-jack \
audacious-plugins-sid \
audacious-plugins \
audacious-plugin-xmp

#---

-- Pidgin, a very good IM client
#---
yum -y install \
pidgin \
pidgin-guifications \
pidgin-libnotify \
pidgin-otr \
pidgin-gfire \
pidgin-musictracker \
purple-plugin_pack-pidgin \
purple-plugin_pack-pidgin-xmms \
purple-facebookchat \
purple-microblog \

pidgin-sipe \
purple-msn-pecan
#---


--- If you use LaTeX you may find this plugin appealing:
#---
yum -y install \
pidgin-latex
#---


-- For kernel modules
#---
yum -y install \
kernel-PAE-devel \
kernel-headers
#---


--- For 64bit or old processors (non-PAE)
#---
yum -y install \
dkms \
kernel-devel \
kernel-headers
#---


-- Nautilus plug-ins
#---
yum -y install \
nautilus-open-terminal \
nautilus-search-tool \
nautilus-flac-converter \
nautilus-extensions
#---


-- Misc

--- Backups with Back In Time:
#---
yum -y install \
backintime-common \
backintime-gnome
#---


--- Diagrams and images, usually old stuff that I'm used to
#---
yum -y install \
ImageMagick \
graphviz \
dia \
gv \
xfig \
gnuplot \
inkscape
#---


--- Editors and related
#---
yum -y install \
gvim \
ctags \
dictd \
diction
#---


--- My beloved spreadsheet program
#---
yum -y install \
gnumeric
#---


--- Compression related programs
#---
yum -y install \
unrar \
p7zip
#---


--- Administration related programs
#---
yum -y install \
telnet \
lsof \
nmap \
nc \
traceroute \
mc \
tsclient \
AcetoneISO2 \
rdesktop
#---


--- Very nice "must-have" admin programs:
#---
yum -y install \
keepassx \
system-config-display \
gnome-password-generator
#---


--- For WLAN Cracking
#---
yum -y install \
aircrack-ng \
airsnort
#---


--- NVIDA
#---
yum -y install \
akmod-nvidia \
kmod-nvidia-PAE \
xorg-x11-drv-nvidia
#---


-- Note about the driver:
It messes the font resolution up (IMHO). So to keep the same aspect between the normal driver and the NVIDIA driver you need to edit the file: [/etc/X11/xorg.conf] and add the following line in the section Device:

Option "DPI" "90 x 90"

My section device looks like this:

Section "Device"
Identifier "Videocard0"
#Driver "nouveau"
Driver "nvidia"
Option "AddARGBGLXVisuals" "True"
Option "DPI" "90 x 90"
EndSection


-- Development
--- Some helper programs
#---
yum -y install \
ant
#---


--- My beloved debugging program
#---
yum -y install \
ddd
#---


--- Debug related programs
#---
yum -y install \
gdb \
gcc \
strace \
ltrace
#---


--- For SVN support:
#---
yum -y install \
rapidsvn
#---


--- For GIT support:
#---
yum -y install \
git-all
#---


-- Update your system:#---
yum -y upgrade
#---


- Install and setup third-part programs
-- VirtualBox/VMware Player
-- Skype
-- Real Player (check for the RPM version)
-- Sun Java
-- Eclipse
-- NetBeans

- Setup printers
- Backup [/etc] and [/boot/grub]
#---
tar -czf bkp-system.`/bin/date +"%Y%m%d-%H%M"`.tgz /etc /boot/grub
#---


- Some issues:
-- Acrobat Reader install its Firefox/Mozilla plug-in, which has a memory leak. I recommend to remove it. To do so:
-- Skype may need some extra configuration (see link for 64bits) and some SELinux relaxation (see link for SELinux).

#---
rm -f /usr/lib/mozilla/plugins/nppdf.so
#---


Related posts:
- Installing Skype in 64bits (external link)
- Mounting former LUKS partition
- SELinux
- Road map for Fedora 13
- Making USB to work with VirtualBox (external link)
- Adding security to SSH
- Backups with Back In Time

Monday, May 30, 2011

Back to Fedora14

Ok, I'm now back to Fedora 14, as I write I'm updating my freshly installed Fedora 14. The last drop was: "yum -y upgrade" and then NetworkManager wont start any more. Sorry, there is not the slightest chance that I can work without Internet. So, good buy Fedora 15 and welcome back Fedora 14.

Maybe is time to try out Ubuntu once again.

That is it for today.

Saturday, May 28, 2011

A word about Fedora 15: DO NOT UPGRADE

Ok, I'm using Fedora 15 now for about 3 days and I just got around to make nouveau accept my side-kick monitor and make it work more or less seamlessly.

Before you even think about upgrading to Fedora 15 please read this critique first (if had read it before installing I wouldn't): http://ranjith.zfs.in/g/.

So, which are my current issues with it (mainly Gnome 3 and video drivers)?

- No right-click on Gnome 3 (this is correct, right-click is disabled or ignored).
- Nouveau does not support GLX (read, no 3D acceleration) my video card properly: nVidia Corporation G72M [Quadro NVS 110M/GeForce Go 7300] (rev a1)
- nVidia proprietary driver does NOT work with external monitor and does NOT work at all with regular monitor (it is like you can move the mouse cursor and click around but no visual feedback). I tried the akmod version (270.41.06-1.fc15) and the nVidia version (270.41.19), none worked.
- Currently there is no updated issue of the RPMFusion repository for Fedora 15 (you need to install the rawhide version).

This means that my next issue of the Fedora road map will wait until I can manage to work those issues around (I'm seriously thinking about a downgrade to Fedora 14). This really brings not so fond RedHat 8.0 memories (for those of you long enough on the road to remember that nightmare).

Anyway, the current road map works almost ok (except that you need to install the rawhide version of RPMFusion):

#---
rpm -Uvhi http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm
rpm -Uvhi http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-rawhide.noarch.rpm
#---

Sunday, March 20, 2011

Git server on CentOS 5.5

This post is adapted from: http://www.davegardner.me.uk/blog/2010/01/29/setting-up-git-on-centos-5-server/

A. Yum Repositories:

You will need EPEL repository:

http://fedoraproject.org/wiki/EPEL


#---
rpm -Uivh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
#---


B. Getting git installed:

1. Install Git and XinetD daemon:
#---
yum -y install \
git \
git-daemon
#---


All your repositories are under [/var/lib/git].

To change that just follow these instructions (I rather not change it):

1.1. Changing Git root dir
#---
MY_GIT_ROOT_DIR=>where will all git projects be<
mkdir -p ${MY_GIT_ROOT_DIR}
chmod 755 ${MY_GIT_ROOT_DIR}
chown root:root ${MY_GIT_ROOT_DIR}
#---

1.2. Adjust the daemon xinetd setup to use the new directory: /etc/xinetd.d/git
...
server_args = --base-path=>where will all git projects be< ...
...


2. Put XinetD to run:

#---
service xinetd restart
chkconfig --level 345 xinetd on
#---


3. Creating a project:

After that you just need to follow the instructions given on the link below:

http://thelucid.com/2008/12/02/git-setting-up-a-remote-repository-and-doing-an-initial-push/

Saturday, December 04, 2010

Bugtracking using Trac

This documentation is aimed at version 0.12

http://trac.edgewall.org

This documentation heavily based on the official documentation, so if you are unsure about something address it:
http://trac.edgewall.org/wiki/TracInstall

A. Prerequisites:

1. Database

I will use a MySQL database, but you could also use PostgreSQL or a local DB file (through Sqlite). So first you install the Server, if do not have one, and create the database according to the documentation, that I reproduce here.
#---
yum -y install \
mysql-server \
mysql \
MySQL-python
#---

I need "root" access for the following steps. (If have some "root" related problems please address to my corresponding post.)
http://gka-linux.blogspot.com/2010/03/mysql-root-password-reset.html

1.2. Start the server (if necessary):
#---
service mysqld restart
chkconfig --level 345 mysqld on
#---

1.3. Get "root" MySQL shell:
#---
## skip this part if you already have a working MySQL server
## mysql_secure_installation
mysql -u root -p
#---

1.4. Create the database (on the shell):
CREATE DATABASE trac DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
USE trac;
GRANT ALL ON trac.* TO tracuser@localhost IDENTIFIED BY '<plain text root password for trac>';

NOTE: Your connection string will be (remember it): mysql://tracuser:<plain text root password for trac>@localhost/trac

2. Version Control System:

For this example Subversion (SVN) which I already documented here:
http://gka-linux.blogspot.com/2009/07/subversion-and-apache-with-pam.html
Or Git: 
http://gka-linux.blogspot.com/2011/03/git-server-on-centos-55.html

3. Apache

I assume that you already have an Apache server and want to put Trac along with other pages you may have.

3.1. Additional packages:
#---
yum -y install \
mod_fcgid \
mod_python \
mod_wsgi
#---

B. The Trac:

OBS.: For CentOS boxes, you need RPMForge repository (or else you are bound to the version 0.10):

#---
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
#---

1. Installing things:

1.1. Fedora:
#---
yum -y install \
trac \
trac-git-plugin \
trac-mercurial-plugin \
trac-iniadmin-plugin \
trac-accountmanager-plugin \
trac-customfieldadmin-plugin \
trac-peerreview-plugin \
trac-privateticketsplugin \
trac-ticketdelete-plugin \
trac-spamfilter-plugin
#---

1.2. CentOS:
#---
yum -y install \
trac \
trac-git-plugin \
trac-mercurial-plugin \
trac-iniadmin-plugin \
trac-peerreview-plugin \
trac-ticketdelete-plugin \
trac-spamfilter-plugin
#---

1.2.1 MySQL-python:

Because CentOS comes with MySql-python 1.2.1 (and this version does NOT work with Trac) you need to upgrade this manually:

#---
wget http://dev.centos.org/centos/5/testing/x86_64/RPMS/MySQL-python-1.2.2-3.el5s2.x86_64.rpm
rpm -Uvh MySQL-python-1.2.2-3.el5s2.x86_64.rpm
#---


2. Start the setup process:
#---
PRJ_NAME="<project name>"
PRJ_DIR=`echo $PRJ_NAME | tr [A-Z] [a-z] | sed -e "s/[^[:alnum:]]/\./g"`
DB_CONN="mysql://tracuser:<plain text root password for trac>@localhost/trac"
#DB_CONN="sqlite:db/trac.db"
REPOS_TYPE="git" # could be one of: "git", "mercurie" or "svn"
REPOS_DIR="/var/lib/git/${PRJ_NAME}.git"
TRAC_DIR="/var/local/trac"
TRAC_PRJS_DIR="${TRAC_DIR}/projects"
TRAC_PRJ_DIR="${TRAC_PRJS_DIR}/${PRJ_DIR}"
mkdir -p ${TRAC_PRJ_DIR}
trac-admin ${TRAC_PRJ_DIR} initenv "${PRJ_NAME}" "${DB_CONN}" "${REPOS_TYPE}" "${REPOS_DIR}"
#---

NOTE: If something goes wrong and you want to do it again just remove the directory (but be aware that the Trac content will be lost):
#---
rm -rf ${TRAC_DIR}
#---

2.1. CentOS:
Currently there is an open issue with GitPlugin and Trac working together on CentOS:
http://trac-hacks.org/ticket/3757
http://trac-hacks.org/ticket/8102

2.2. Git Repository setup:
#---
cat >> ${TRAC_PRJ_DIR}/conf/trac.ini << __END__
[git]
cached_repository = false
git_bin = /usr/bin/git
persistent_cache = false
shortrev_len = 7

[components]
tracext.git.* = enabled
__END__
#---



3. Setting up the Apache server:

I prefer this more complicated option because the odds are that you do not need yet another server running. Another assumption is that you will have several projects that also need separated tracking "spaces". For instance, you may start using technology "X" and latter on decide to migrate everything to technology "Y", so you probably do not want to mix bugs from "X" with "Y". This is, of course, obvious if you have software factory.

3.1. Create Web content (per project):

#---
TMP_DIR=`mktemp -d`
rm -rf ${TMP_DIR}
trac-admin ${TRAC_PRJ_DIR} deploy ${TMP_DIR}
mv ${TMP_DIR}/* ${TRAC_PRJ_DIR}
rm -rf ${TMP_DIR}
#---

3.2. Global configuration file (/etc/httpd/conf.d/trac.conf):
#---
cat > /etc/httpd/conf.d/trac.conf << __END__
#Global environment for Trac's CGI
<LocationMatch /cgi-bin/trac\.f?cgi>
SetEnv TRAC_ENV_PARENT_DIR "${TRAC_PRJS_DIR}"
</LocationMatch>
#Special environment for Trac's FastCGI CGI
<IfModule mod_fastcgi.c>
<LocationMatch /cgi-bin/trac\.fcgi>
FCGIDDefaultInitEnv TRAC_ENV_PARENT_DIR ${TRAC_PRJS_DIR}
</LocationMatch>
</IfModule>
#Python environment
<IfModule mod_python.c>
<LocationMatch "/trac/[^/]+/cgi-bin/trac.cgi>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir ${TRAC_PRJS_DIR}
</LocationMatch>
</IfModule>
##
# Authentication @ ${TRAC_DIR}/trac.htpasswd
# To add a new user:
# htpasswd ${TRAC_DIR}/trac.htpasswd <username>
#
##
<LocationMatch "/trac/[^/]+/login">
AuthType Basic
AuthName "Trac"
AuthUserFile ${TRAC_DIR}/trac.htpasswd
Require valid-user
</LocationMatch>
__END__
#---

3.3. Project specific configuration file (/etc/httpd/conf.d/trac-"<project name>".conf):
#---
cat > /etc/httpd/conf.d/trac-${PRJ_DIR}.conf << __END__
### Regular CGI
#ScriptAlias /trac/${PRJ_DIR} ${TRAC_PRJ_DIR}/cgi-bin/trac.cgi
### Fast CGI (default)
ScriptAlias /trac/${PRJ_DIR} ${TRAC_PRJ_DIR}/cgi-bin/trac.fcgi
__END__
#---

3.4. Authentication (via password file):

3.4.1. Creating the file AND admin user (JUST this ONE time):
#---
htpasswd -c ${TRAC_DIR}/trac.htpasswd admin
#---

3.4.2. Creating a regular user (notice the lack of '-c' parameter):
#---
htpasswd ${TRAC_DIR}/trac.htpasswd <username>
#---

3.4.3. Or use a generic safe single line:
#---
PASSFILE="${TRAC_DIR}/trac.htpasswd"
htpasswd `([[ -f ${PASSFILE} ]] && echo "" || echo "-c")` ${PASSFILE} admin
#---

#---
htpasswd `([[ -f ${PASSFILE} ]] && echo "" || echo "-c")` ${PASSFILE} <username>
#---

3.4.4. Check it out:
#---
cat ${PASSFILE}
#---

3.5. Security and SElinux:

3.5.1. SElinux and Trac:
#---
echo /usr/bin/chcon -R -v -t httpd_t \'${TRAC_DIR}\' | bash
#---

3.5.2. SElinux and Repository:
#---
echo /usr/bin/chcon -R -v -t httpd_t \'${REPOS_DIR}\' | bash
#---

4. Access and test:

#---
service httpd restart
firefox "http://localhost/trac/${PRJ_DIR}"
#---

C. Important files and directories:

1. Content:
/var/local/trac

2. Setup:
/var/local/trac/projects/<your project>/conf/trac.ini

3. Apache config:
3.1. General setup:
/etc/httpd/conf.d/trac.conf
3.2. Your project:
/etc/httpd/conf.d/trac-<your project>.conf

4. Logging:
/var/local/trac/projects/<your project>/log/

Wednesday, November 03, 2010

My Fedora 14 road map

- If you have had problems with automatically mounting LUKS partition, see my post addressing the issue here

- Add repositories:
-- RPM Fusion (free)
#---
rpm -Uvhi http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
#---


-- RPM Fusion (non-free)
#---
rpm -Uvhi http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
#---


NOTE: There are currently some outage by the official repository, so try a mirror:
#---
rpm -Uvhi http://ftp.tu-chemnitz.de/pub/linux/rpmfusion/free/fedora/updates/14/i386/rpmfusion-free-release-14-0.4.noarch.rpm
rpm -Uvhi http://ftp.tu-chemnitz.de/pub/linux/rpmfusion/nonfree/fedora/updates/14/i386/rpmfusion-nonfree-release-14-0.4.noarch.rpm
#---


-- Adobe (Flash plugin, AdobeAIR and AcrobatReader)
#---
rpm -Uvhi http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
#---


-- Adobe Flash for 64bits:
1. go to http://labs.adobe.com/downloads/flashplayer10.html
2. download the latest version for linux (a tar.gz file)
2.1. for me it was: http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_1_rc6_linux_052510.tar.gz
3. install it:
#---
tar -vxzf <file.tar.gz> -C /usr/lib64/mozilla/plugins/
#---

4. restart browser
5. check if it is working: about:plugins

-- JPackage:

#---
wget http://www.jpackage.org/jpackage17.repo -O /etc/yum.repos.d/jpackage.repo
#---


-- Chromium:

#---
wget http://repos.fedorapeople.org/repos/spot/chromium/fedora-chromium.repo -O /etc/yum.repos.d/fedora-chromium.repo
#---


--- Edit the /etc/yum.repos.d/jpackage.repo file:

If you want to work with J2EE, JBoss, and such change it to the following:
[jpackage-generic]
name=JPackage (free), generic
mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=5.0
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=1


-- Setting up a not-so-restricting SELinux: here

[update: remove before installing, thanks to a reader comment]
-- Remove things I do NOT like (do not remove xine if you prefer KDE):

--- Multimedia players that do not play divx/mp3 and stays as default for video and audio files:
#---
yum -y erase \
xine \
gxine* \
totem* \
brasero*
#---


--- This is REALLY annoying, it prevents mplayerplug-in from working properly:
#---
yum -y erase \
mozplugger
#---


-- Update your system:
#---
yum -y upgrade
#---


- Install additional software:

-- Chromium:
#---
yum -y install \
chromium
#---


-- Multimedia:
#---
yum -y install \
alsa-tools \
alsamixergui \
mplayer \
mencoder \
live555 \
gecko-mediaplayer \
gnome-mplayer \
vlc \
grip \
flash-plugin \
adobeair \
k3b \
k3b-extras-nonfree
#---


Because Adobe Reader is usually very slow to download, I keep it separated and leave it to be last installed.
#---
yum -y install \
AdobeReader_enu
#---


-- Spell-checking
--- Additional languages: German (de), Spanish (es), and Portuguese from Brazil (br)
#---
yum -y install \
hunspell-de \
hunspell-es \
hunspell-pt
#---


-- Email with sylpheed-claws
#---
yum -y install \
claws-mail \
claws-mail-plugins
#---


--- Turn SpamAssassin on (if you use it to filter your emails):
#---
chkconfig --level 345 spamassassin on
#---


-- XMMS with its most precious plug-ins
#---
yum -y install \
xmms \
xmms-libs \
xmms-skins.noarch \
xmms-mp3 \
xmms-faad2 \
xmms-flac \
xmms-arts \
xmms-esd \
xmms-musepack \
xmms-acme \
xmms2 \
xmms2-avcodec \
xmms2-faad \
xmms2-freeworld \
xmms2-mp4 \
xmms2-nonfree
#---


-- Pidgin, a very good IM client
#---
yum -y install \
pidgin \
pidgin-guifications \
pidgin-libnotify \
pidgin-otr \
pidgin-gfire \
pidgin-musictracker \
purple-plugin_pack-pidgin \
purple-plugin_pack-pidgin-xmms \
purple-facebookchat \
purple-microblog \
purple-msn-pecan
#---


--- If you use LaTeX you may find this plugin appealing:
#---
yum -y install \
pidgin-latex
#---


-- For kernel modules
#---
yum -y install \
kernel-PAE-devel \
kernel-headers
#---


--- For 64bit or old processors (non-PAE)
#---
yum -y install \
dkms \
kernel-devel \
kernel-headers
#---


-- Nautilus plug-ins
#---
yum -y install \
nautilus-open-terminal \
nautilus-search-tool \
nautilus-flac-converter \
nautilus-extensions
#---


-- Misc

--- Backups with Back In Time:
#---
yum -y install \
backintime-common \
backintime-gnome
#---


--- Diagrams and images, usually old stuff that I'm used to
#---
yum -y install \
ImageMagick \
graphviz \
dia \
gv \
xfig \
gnuplot \
inkscape
#---


--- Editors and related
#---
yum -y install \
gvim \
ctags \
dictd \
diction
#---


--- My beloved spreadsheet program
#---
yum -y install \
gnumeric
#---


--- Compression related programs
#---
yum -y install \
unrar \
p7zip
#---


--- Administration related programs
#---
yum -y install \
telnet \
lsof \
nmap \
nc \
traceroute \
mc \
tsclient \
AcetoneISO2 \
rdesktop
#---


--- Very nice "must-have" admin programs:
#---
yum -y install \
keepassx \
system-config-display \
gnome-password-generator
#---


--- For WLAN Cracking
#---
yum -y install \
aircrack-ng \
airsnort
#---


--- NVIDA
#---
yum -y install \
akmod-nvidia \
kmod-nvidia-PAE \
xorg-x11-drv-nvidia
#---


-- Note about the driver:
It messes the font resolution up (IMHO). So to keep the same aspect between the normal driver and the NVIDIA driver you need to edit the file: [/etc/X11/xorg.conf] and add the following line in the section Device:

Option "DPI" "90 x 90"

My section device looks like this:

Section "Device"
Identifier "Videocard0"
#Driver "nouveau"
Driver "nvidia"
Option "AddARGBGLXVisuals" "True"
Option "DPI" "90 x 90"
EndSection


-- Development
--- Some helper programs
#---
yum -y install \
ant
#---


--- My beloved debugging program
#---
yum -y install \
ddd
#---


--- Debug related programs
#---
yum -y install \
gdb \
gcc \
strace \
ltrace
#---


--- Java support:
#---
yum -y install \
gcc-java \
java-1.6.0-openjdk \
java-1.6.0-openjdk-plugin \
java-1.6.0-openjdk-javadoc \
java-1.6.0-openjdk-src \
java-1.5.0-gcj \
java-1.5.0-gcj-devel \
java-1.5.0-gcj-javadoc \
java-1.5.0-gcj-src
#---


--- JBoss support:
#---
yum -y install \
jbossas
#---


--- NetBeans:
#---
yum -y install \
netbeans
#---


--- Eclipse for Java:
#---
yum -y install \
eclipse-platform \
eclipse-ecj \
eclipse-jdt \
eclipse-cvs-client \
#---


--- For SVN support:
#---
yum -y install \
rapidsvn
#---


--- For GIT support:
#---
yum -y install \
git-all
#---


#---
yum -y install \
eclipse-subclipse \
eclipse-subclipse-book
#---


--- For C++ development:
#---
yum -y install \
eclipse-cdt
#---


--- Mylyn plugin:
#---
yum -y install \
eclipse-mylyn \
eclipse-mylyn-ide \
eclipse-mylyn-java \
eclipse-mylyn-bugzilla \
eclipse-mylyn-trac
#---


A note on the docs, you will find them in:

/usr/share/javadoc/java-1.5.0-gcj/
/usr/share/javadoc/java-1.6.0-openjdk/


-- Update your system:
#---
yum -y upgrade
#---


- Install and setup third-part programs
-- VirtualBox/VMware
-- Skype
-- Real Player (check for the RPM version)
-- Sun Java
-- Eclipse
-- NetBeans

- For a better experience when installing third-part software from Danger Mouse:
#---
rpm -Uvh http://dnmouse.org/autoten-4.6-4.fc13.noarch.rpm
#---


- Setup printers
- Backup [/etc] and [/boot/grub]
#---
tar -czf bkp-system.`/bin/date +"%Y%m%d-%H%M"`.tgz /etc /boot/grub
#---


- Some issues:
-- Acrobat Reader install its Firefox/Mozilla plug-in, which has a memory leak. I recommend to remove it. To do so:
-- Skype may need some extra configuration (see link for 64bits) and some SELinux relaxation (see link for SELinux).

#---
rm -f /usr/lib/mozilla/plugins/nppdf.so
#---


Related posts:
- Installing Skype in 64bits (external link)
- Mounting former LUKS partition
- SELinux
- Road map for Fedora 13
- Making USB to work with VirtualBox (external link)
- Adding security to SSH
- Backups with Back In Time

Monday, August 23, 2010

[update] Skype and MS VX-1000 WebCam

Ok here is the deal, since my last kernel update (2.6.33.6-147.2.4.fc13.x86_64) my webcam (a crappy Microsoft Corp. LifeCam VX-1000, USBID: 045e:00f7) stops working. No video and no microphone.

You have some options:

1. Back to the previous kernel (not a good idea)
2. Buy another camera (this one is really crappy, but an option for either)
3. Buy an extra microphone (I'm not kin of that either)
4. Do the hard work (what I'm going to show here)

[UPDATE] Still necessary for the kernel 2.6.33.8-149.fc13.x86_64
A.The Video

First of all to get the video running you need the following library (which you probably already have):
#---
yum -y install \
libv4l
#---


The creates a Skype start-up script:
#---
cat > ~/bin/skype-vl41compat.sh < __END__
export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so
/usr/bin/skype
__END__
#---

NOTE if you have a x86_64 it is the SAME script (the lib64 version does NOT work)

Changes the shortcut for Skype to: $HOME/bin/skype-vl41compat.sh. Now just check it out on Skype by testing the camera.

As an alternative you can follow the instructions here: http://dougsland.livejournal.com/107373.html (Very nicely done with screenshots and all).

[UPDATE] for kernel 2.6.33.8-149.fc13.x86_64 you do NOT need to recompile the audio driver
B. The Audio (Microphone)

Here is the tricky part, you need to compile the patched driver.
Get the latest driver from http://linuxtv.org/hg/~hgoede/gspca/ and compile it:

#---
wget http://linuxtv.org/hg/~hgoede/gspca/archive/tip.tar.gz
tar -vxzf tip.tar.gz -C /tmp
cd /tmp/`tar -vtzf tip.tar.gz | grep INSTALL | sed -e 's/.*\(gspca-.*\)INSTALL/\1/'`
make
make install
#---

Restart your box (it has updated the kernel modules) and have fun.

NOTE If the mic does not work you may need to restart the module:
#---
rmmod gspca_sonixj
modprobe gspca_sonixj
#---


References:
http://osdir.com/ml/ubuntu-http://www.blogger.com/img/blank.gifusers/2009-06/msg00531.html
http://dougsland.livejournal.com/107373.html