Archive
Volumen de alertas de Skype en Ubuntu
Si tiene el mismo problema que yo con el audio de Skype que no se escucha bajo Ubuntu, la respuesta está aquí:
http://ubuntuforums.org/showthread.php?p=12440872#post12440872
El problema es que Skype usa Pulse Audio por defecto y que este no se configura por el gestor de volumen normal de Ubuntu. En realidad, si pone su audio a lo máximo, escuchará que sí suena, pero muy muy *muy* bajo.
Para arreglar, basta con instalar un gestor de volumen de Pulse Audio y cambiar el volumen:
sudo apt-get install pavucontrol
pavucontrol
y ahí verá que la prima barra deslizable de volumen se llama “Sonidos del sistema”. Póngala a 100%. Ya está, ahora Skype suena normal (puede probarlo llendo en las opciones de Skype > Alertas > Reproducir el audio de “Llamada entrante”, por ejemplo).
Bueno, queda claro que no debería usar skype en un primer lugar porque no es software libre, pero si tiene que comunicarse con alguien lejos que no tiene un buen teléfono IP con su central para mejorar software libre… queda siendo una alternativa interesante.
Installing SoulFu on Ubuntu 12.04 64bit
If you ever want to install the amazing multiplayer SoulFu medieval-fantasy game from Aaron Bishop (up to 4 players with joysticks & keyboard on a single computer) on your Ubuntu 12.04 (Precise) 64bit, follow the howto below. The most problematic point is that it depends on libjpeg62 compiled in a 32bit version. To install this one (although you’re running on 64bit) you need to issue a specific “apt-get install libjpeg62:i386″ command (instead of the same version without :i386).
Follow the guide here:
http://www.playdeb.net/updates/Ubuntu/12.04#how_to_install
. Namely, issue the following commands:
wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -sudo echo "deb http://archive.getdeb.net/ubuntu precise-getdeb games" >> /etc/apt/sources.list.d/playdeb.list apt-get update apt-get install soulfu libjpeg62:i38
Then launch SoulFu to start playing:
soulfu
Creating a software RAID array on an already installed Ubuntu 11.04
Let’s say you got confused by a misleading fake-RAID feature on an HP Blade server and you decided to ignore that the Ubuntu installer was telling you it found 2 disks while it was supposed (if it was actual hardware RAID) to be detecting only one. And let’s say you are lucky to have 3 disks, and you only one to use two as the RAID array (and they do not contain your operating system, i.e. the / partition). You might wonder: “And now what? S**** you, HP!” (that last bit is if you left panic get you, of course). Let’s also say that you had an installation of a large production web application on /var/www, which is what you wanted to be on RAID, but that, by an incredibly lucky turn of events, it is just small enough to fit on what’s left of your first disk…
Well fear no more! There’s a solution and I tested it for you…
First take a safe copy of what is on that partition that you wanted to be in RAID, and put it on the disk that will not change. Also, unmount that partition. If it was /var/www, use:
$ sudo umount /var/www
If the system says it’s busy, shutdown Apache and make sure no user is currently in a terminal in /var/www… (use lsof |grep /var/www for example).
If you happen to read this Ubuntu RAID guide between the lines, you’ll catch it talks about “mdadm”, a software to manage multi-disk arrays. As you know, installing software on Ubuntu (or Debian) is dead-easy:
sudo apt-get install mdadm
Then let’s say you wonder how to use it… As you know, getting documentation in English on Linux is dead easy:
man mdadm
Then you’re up for a lot of reading, unless you don’t really care about the details and you want to try it quick. This is what you would then do, considering your two unused disks (or “devices” for the geeks) are /dev/sdb and /dev/sdc (you can get an idea from “ls /dev/sd*” or “df” or “fdisk /dev/anything-you-can-think-about” :
$ sudo mdadm –create /dev/md1 –level=1 –raid-devices=2 /dev/sdb /dev/sdc
…where /dev/md1 is the new multi-disks device you’ll create, –level is the RAID type you want to use (1 for simple mirroring), and –raid-devices is the number of disks you will have inside your multi-disks device.
You can then confirm that you don’t care about the partitions it may find on these. Then launch
$ sudo mdadm /dev/md1
To check if that virtual disk exists. It should give you something like:
/dev/md1: 465.76GiB raid1 2 devices, 0 spares. Use mdadm –detail for more detail.
Now you’ve got a device, but that doesn’t give you a partition…You’ll have to create one with “fdisk”:
$ sudo fdisk /dev/md1
fdisk> n
fdisk> p
fdisk> 1
fdisk> <enter> for default
fdisk> <enter> for default
fdisk> w
But the partition is not formatted. As you might know, formatting a partition (let’s say in EXT4 because you like modern stuff moderately) on Debian/Ubuntu is dead-easy:
$ sudo mkfs.ext4 /dev/md1
You now have an EXT4 partition mounted on a RAID1 mirroring device. Almost done: you want to mount the partition in your file system. Let’s say as /var/www (that directory must exist and it’d rather be empty):
$ sudo mount /dev/md1 /var/www
Now, you want this mounting to happen on its own when you reboot, right? To do that, you need to update your /etc/fstab. If you had already something mounted there before, chances are you will find its line is already in /etc/fstab . For example, if you had one of the disks alone mounted as /var/www, you’ll have this kind of line:
UUID=244b687f-f8d9-4a48-986a-8a1a8a8d33bd /var/www ext4 defaults 0 2
Right? Well, you’ll need to edit that line to change the device ID now… But how do you get that UUID? No problem, just launch:
$ ls -l /dev/disk/by-uuid
You’ll see your /dev/md1 listed there, along with its UUID. Just copy that UUID and replace the older one on the /var/www line of your /etc/fstab. Done. Now I recommend you reboot to check everything is mounting correctly, before you delete your safe backup file.
Well, that wasn’t too hard, was it? I actually believed I would have to reinstall the whole Ubuntu, but having a very slow connection for the update, I preferred not to. Seems like I won this round! Thanks to all the guys involved in these cool projects! You really made my day.
My personal best apt-get command to install a LAMP dev server on Ubuntu
This command is to be improved progressively…
sudo apt-get install apache2 libapache2-mod-php5 mysql-server mysql-client php5-mysql php5-xcache php5-gd php5-xdebug screen phpmyadmin php5-imagick mercurial git php-pear php5-dev
Howto install Chamilo with lighttpd on Ubuntu 10.04 Lucid Lynx
Let’s say you want to install Chamilo on your netbook for a demo… Because Apache uses a lot of memory (and so does MySQL), it is generally considered a good practice to try and use something a bit lighter for your web server
This procedure might also work, with a few minor alterations, for OLPC’s XO laptops. The operating system of these little marvels are RedHat based, so you will have to use yum instead of apt, but the rest remains relatively similar.
An important source of information for the first part of this article is Martin Drake’s blog article about how to install and configure lighttpd on Ubuntu 10.04.
So if you want details, go to Martin’s blog. I’m going to head straight to the point and make a résumé of the commands you need to launch…
-
sudo aptitude update
-
sudo aptitude install lighttpd php5-cgi mysql-server mysql-client php5-gd mercurial php5-mysql
-
cd /var/www
-
sudo mkdir chamilo
-
sudo chmod -r 0777 chamilo
The following command might take a very long time (usually above 10 minutes to download), so maybe you want to use CTRL+SHIFT+T to launch it in a separate terminal.
-
hg clone https://classic.chamilo.googlecode.com/hg/ chamilo
-
sudo /etc/init.d/lighttpd force-reload
-
lighttpd-enable-mod simple-vhost -
cd /etc/lighttpd/
-
sudo vim lighttpd.conf
copy paste this at the end:
$HTTP["host"] != "my.chamilo.mob" {
server.document-root = "/var/www/"
server.errorlog = "/var/log/lighttpd/error.log"
accesslog.filename = "/var/log/lighttpd/access.log",
server.error-handler-404 = "/index.php"
}
$HTTP["host"] == "my.chamilo.mob" {
server.document-root = "/var/www/chamilo/"
server.errorlog = "/var/log/lighttpd/my.chamilo.mob.error.log"
accesslog.filename = "/var/log/lighttpd/my.chamilo.mob.access.log",
server.error-handler-404 = "/index.php"
}
-
sudo /etc/init.d/lighttpd force-reload
-
sudo vim /etc/hosts
copy-paste this:
127.0.0.1 my.chamilo.mob
Load http://my.chamilo.mob in your web browser and follow the normal installation procedure of Chamilo.
That’s it, you’re running Chamilo on lighttpd now! Congrats.
Chamilo at Ubuntu Developers Summit, Brussels
I will be presenting Chamilo and our intention to make a Chamilo package for Ubuntu this year at the Ubuntu Developers Summit in Brussels, on Friday 14th of May (at the beginning of the afternoon). As a side gift, I will be meeting Jono Bacon (writer of “The Art of Community” and Mark Shuttleworth, the founder of Ubuntu).
You can check the details of the UDS at https://wiki.ubuntu.com/UDS-M
HOWTO Install Sun’s JAVA on Ubuntu Lucid Lynx (10.04)
After Ubuntu’s decision to default to OpenJDK for 10.04 (which is a good decision, IMHO), Sun’s (but is it still Sun, or Oracle?) JAVA somewhat “disappeared” from Ubuntu (multiverse).
That being said, some people may still need features only available in Sun’s JRE/JDK, which might not yet have been Freed.
Actually, Ubuntu is still shipping it, but in its “partner” section. To add that section to your Sources and install Sun’s JDK (as an example), just:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" sudo apt-get update sudo apt-get install sun-java6-jdk
You might need to accept the license (press “tab”, “enter”, “tab” on “Yes” then “enter”).
You might also just want to install sun-java6-jre or sun-java6-plugin if you just want the (Mozilla) web browser plugin.
As a side note, remember to remove OpenJDK if you do not need it, or be prepared to encounter hard to diagnose problems sometime.
sudo apt-get remove openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib
Ubuntu 11.10: same operation. Just replace “lucid” por “oneiric”
Installing Squid on ZFS
The recommended filesystem for Squid on OpenSolaris is ZFS:
http://wiki.squid-cache.org/BestOsForSquid
It is also recommended to disable the atime property on the filesystem holding the cache, and you may want to avoid using any type of RAID.
To achieve this on Nexenta (or OpenSolaris, whatever), first create the ZFS filesystem:
# zfs create -o atime=off -o mountpoint=/var/spool/squid3 syspool/squidcache
Then install Squid (here for version 3.x, as you might have noticed from the command). On Nexenta Core Platform 3 (NCP3):
# apt-get install squid3
To further improve the setup, use the aufs storage. To do this, just enable and update option cache_dir in /etc/squid3/squid.conf to read aufs instead of ufs (and further modify that line to best suit your real cache usage).
Install Oracle Express and PHP OCI8 on Ubuntu 9.10
Copiado del post de Daniel escrito en el marco de sus proyectos aqui : http://danielphp.wordpress.com/install-oracle-express-and-php-oci8-on-ubuntu-9-10/
(Requirements: PHP 5 and Apache 2 already installed)
Go to Oracle website, and download the following files: (You are gonna need to register an account with Oracle to be able to download the files, just do it, its free)
- oracle-xe-universal_10.2.0.1-1.0_i386.deb
- Oracle instant client basic 11.2.0.1, zip package
- Oracle instant client sdk 11.2.0.1, zip package
Install the first file with just double click. then go to console and run this command to configure it:
/etc/init.d/oracle-xe configure
you will see something like this:
Specify the HTTP port that will be used for Oracle Application Express [8080]: Specify a port that will be used for the database listener [1521]: /* Specify a password to be used for database accounts. Note that the same password will be used for SYS and SYSTEM. Oracle recommends the use of different passwords for each database account. This can be done after initial configuration: */ Confirm the password: (* make sure you remember this password *) Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]: y
At this point you can open Firefox,enter http://127.0.0.1:8080/apex, login as ’system’ with the ‘password’ you created during the install, and you should see the XE homepage.
Now put the other 2 files in /tmp. Then do the following:
cd /tmp/ unzip oracle-instantclient-basic-11.2.0.1.i386.zip mv instantclient_11_2 /opt/ unzip oracle-instantclient-devel-11.2.0.1.i386.zip mv instantclient_11_2/sdk /opt/instantclient_11_2/ export ORACLE_HOME=/opt/instantclient_11_2/ ln -s /opt/instantclient_11_2/libclntsh.so.11.1 /opt/instantclient_11_2//libclntsh.so ln -s /opt/instantclient_11_2/libocci.so.11.1 /opt/instantclient_11_2//libocci.so ln -s /opt/instantclient_11_2/ /opt/instantclient_11_2/lib
then install the packages php-dev and php-pear, and go to console and type the following:
pecl download OCI8 tar xzvf oci8-1.3.5.tgz cd ../oci8-1.3.5 phpize ./configure --with-oci8=instantclient,/opt/instantclient_11_2/ make sudo make install
At that point, the libraries have been built but are not used by PHP. In this extent, you must add it at the bottom of php.ini files “/etc/php5/apache2/php.ini” (and if you got CLI installed also add to this file “/etc/php5/cli/php.ini”):
extension = oci8.so
Edit your /etc/bash.bashrc file to include the lines:
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server PATH=$PATH:$ORACLE_HOME/bin export ORACLE_HOME export ORACLE_SID=XE export PATH
Now just do a logout and login (this will restart the env variables, if you are advanced user then just do it your way). restart apache.Finally try this php example:
$ora_conn = oci_connect('system',$your_password,'127.0.0.1/XE');
// error handling
if (!$ora_conn){
// do the following if it fails
$ora_conn_erno = oci_error();
echo ($ora_conn_erno['message']."\n");
oci_close($ora_conn);
} else {
// if it doesn't fail it will proceed with the rest of the script
echo "Connection Succesful\n";
oci_close($ora_conn);
}
If it shows “Connection Succesful” then you are done. Congratulations.
Additional Notes:
- this was tested with PHP 5.2.10 ,Apache/2.2.12 and Ubuntu 9.10 Karmic Koala
- check that the ORACLE_HOME path exist just in case you have problems.
- if the version of instantclient you download is different to 11.2, just change every reference to 11_2 for your new version.
