User Tools

Site Tools


Site Tools

Linux installations


RPM

Yum

Download packages without installing it

yum install yum-plugin-downloadonly

Then

yum install --downloadonly --downloaddir=<directory> <package>

See : https://access.redhat.com/solutions/10154

RPM manipulation

View files inside an RPM file :

rpm -qlp myrpmfile.rpm

View files of an already installed RPM:

rpm -ql packagename

To list all packages installed on the systel

rpm -qa
rpm -qa glibc

To know which package(s) provided a specific file:

rpm -q --whatprovides /usr/lib/x86_64-redhat-linux5E/lib64/

Edit rpm

Sometime you will need to edit and rpm (for example, some guy who made the rpm inside your company made a mistake in versions and you cannot install the damn thing). Get rpmrebuild from here : http://rpmrebuild.sourceforge.net/

Install manually the rpmrebuild:

yum localinstall rpmrebuild-2.11-1.noarch.rpm

Then edit the rpm using :

rpmrebuild -e -p --notest-install myrpm.rpm

You will be able to edit spec (vim editor), then save changes to a new rpm. Enjoy !! More info here : http://magazine.redhat.com/2007/12/04/hacking-rpms-with-rpmrebuild/

Sign rpm

Install Redmine

Install XFCE

On Redhat/CentOS (from EPEL) :

yum -y groupinstall Xfce
yum -y install xorg-x11-fonts-Type1 xorg-x11-fonts-misc

To launch, use :

/sbin/telinit 5
or
startxfce4

On ubuntu server :

apt-get install xfce4 xfce4-terminal

And to launch it :

startx

Ubuntu 12.04.3 on Via C7 VX855

To install ubuntu 12.04.3 on a Via C7 VX855.

  • Download the x86 alternate cd iso. Do not use the mini iso (minimal image), it will freeze at repository check.
  • Use unetbootin and the iso to creat a bootable disk.
  • Boot on the USB key. (For my Wyse C90LE, I had to press P when starting. Del for the bios, with password Fireport)
  • When booting on the usb key, press F4 and choose a command line install.
  • Then choose install ubuntu.
  • Go through the process.
  • When system is installed, boot, login, and :
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install xfce4
sudo reboot

Then, at next login, login and launche XFCE :

startx

The system has already chosen the Chromium driver for the Via chipset.

Now, to activate sound, you have to install pulseaudio. Then, you can install xfce4-desktop if you want.

Install dokuwiki on ubuntu/debian

Install apache2, php and dokuwiki :

sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5
cd /var/www/html
sudo tar xvzf dokuwiki-stable.tgz
sudo chown -R www-data dokuwiki-2013-12-08
sudo mv dokuwiki-2013-12-08 dokuwiki

Now update apache :

cd /etc/apache2/sites-available/
sudo vim dokuwiki.conf

Add the following

Alias /wiki0         /var/www/html/dokuwiki
<Directory /var/www/html/dokuwiki/>
        Options +FollowSymLinks
        AllowOverride All
        order allow,deny
        allow from all
</Directory>

Then add it to apache using :

sudo a2ensite dokuwiki 
service apache2 reload

You can start editing your dokuwiki at : localhost/dokuwiki/install.php

SEO :

  • Remove PHP sessions id :

Add ini_set('url_rewriter.tags', ''); to /conf/local.php file.

  • Set index to 2 h (admin → config → spam : 24*24*2)
  • Rewrite URL, (admin → config) use internal dokuwiki mode, then enable slash usage instead of double dot, and to redirect all http: to htttp:wwww. add in .htaccess :
## force http:// vers http://www.
RewriteEngine On
RewriteCond %{HTTP_HOST}  ^spheniscus.brennik.fr [nocase]
RewriteRule ^(.*)         http://www.spheniscus.brennik.fr/$1 [last,redirect=301]
  • Set doku.php as default index file, in .htaccess, add : DirectoryIndex doku.php

Then add robot.txt file like :

Sitemap: http://www.spheniscus.brennik.fr/sitemap.xml
User-agent: *
Disallow: /doku.php/software
Disallow: /doku.php/software/development
Disallow: /doku.php/software/algo
...
Allow: /doku.php/software
Allow: /doku.php/software/development/$
Allow: /doku.php/software/algo/$
Allow: /doku.php/software/image_and_video/$
Allow: /doku.php/software/shell_scripts/$
...

And sitemap.xml file like :

<?xml version="1.0" encoding="UTF-8"?>
<urlset
      xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

<url>
  <loc>http://www.spheniscus.brennik.fr/doku.php</loc>
  <changefreq>monthly</changefreq>
  <priority>1.00</priority>
</url>
<url>
  <loc>http://www.spheniscus.brennik.fr/doku.php/start</loc>
  <changefreq>monthly</changefreq>
  <priority>1.00</priority>
</url>
<url>
  <loc>http://www.spheniscus.brennik.fr/doku.php/start/about</loc>
  <changefreq>monthly</changefreq>
  <priority>1.00</priority>
</url>
<url>
  <loc>http://www.spheniscus.brennik.fr/doku.php/start/external_links</loc>
  <changefreq>monthly</changefreq>
  <priority>1.00</priority>
</url>
...
  • To prevent indexing of revisions pages, add in (admin → config) Hide pages matching this regular expression from search, the sitemap and other automatic indexes the value “?rev=” (with the quotes).