Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Sunday, February 26, 2012

Restarts apache on Ubuntu

> sudo /etc/init.d/apache2 restart
or
> sudo service apache2 restart
or
> sudo apachectl restart

Tuesday, February 14, 2012

Permanent hostname change on Debian based systems

From MDLog:/sysadmin:
Debian based systems use the file /etc/hostname to read the hostname of the system at boot time and set it up using the init script /etc/init.d/hostname.sh
/etc/hostname:
server
So on a Debian based system we can edit the file /etc/hostname and change the name of the system and then run:
/etc/init.d/hostname.sh start
to make the change active. The hostname saved in this file (/etc/hostname) will be preserved on system reboot.

Monday, January 23, 2012

Update VirtualBox to 4.1.8

  • Download VirtualBox-4.1.8-75467-Win.exe
  • Download VBoxGuestAdditions_4.1.8.iso
  • Unmount the VBoxGuestAdditions.iso under "Parameters | Storage | IDE Controller"
  • Do the update of VirtualBox
  • Restart VirtualBox
  • Copy the new VBoxGuestAdditions ISO into c:\program files\oracle\virtualbox
  • Mount the new VBoxGuestAdditions ISO under "IDE Controller"
  • Start the new VM
  • Re-install VBoxLinuxAdditions like previously done:
  • sudo mount /dev/cdrom /media/cdrom
    cd /media/cdrom
    sudo ./VBoxLinuxAdditions.run
    sudo reboot
  • Unmount the VBoxGuestAdditions ISO
In case of problems with VirtualBox Guest Additions:
http://www.if-not-true-then-false.com/2010/install-virtualbox-guest-additions-on-fedora-centos-red-hat-rhel/

Thursday, January 19, 2012

GWT debugging on Windows in a VirtualBox Linux VM

This post shows how to use a browser on a host (Windows 7) with Eclipse running a GWT project on the VirtualBox guest (Ubuntu server).

Below, my Ubuntu guest has been named "fart".

Monday, January 16, 2012

Installing ant 1.8.2 onto ubuntu 11.10

Download ant and copy it under /usr/lib:
cd /usr/lib
sudo tar xvfz /media/host/apache-ant-1.8.2-bin.tar.gz
sudo ln -s apache-ant-1.8.2 apache-ant
sudo update-alternatives --install /usr/bin/ant ant /usr/lib/apache-ant/bin/ant 1

Install JDK 7 onto Ubuntu 11.10

Download the latest Oracle JDK 7 from here.
sudo mkdir -p /usr/lib/jvm/
cd /usr/lib/jvm/
tar xvfz /media/host/jdk-7u2-linux-x64.tar.gz
ln -s jdk1.7.0_02 jdk
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install update-java
sudo update-java
and select /usr/lib/jvm/jdk

Tuesday, December 6, 2011

Upgrade from 11.04 to 11.10: Waiting for network config at boot

"I get my bootloader and the Ubuntu splash screen. It appears to be working, then it displays "Waiting for network configuration...". That message stays up for less than a minute and then it is replaced by "Waiting up to 60 more seconds for network configuration...". That message is up for less than a minute and the screen goes black."


Basically in 11.10 /var/run and /var/lock were moved to /run, and there needs to be symbolic links created to point the old to the new, eg:

cd /var
sudo rm -rf run lock
sudo ln -s /run run
sudo ln -s /run/lock lock
(reboot)

Thursday, November 10, 2011

syslog setup for SPA3102

Create a new file named "/etc/rsyslog.d/30-spa3102.conf":

$ModLoad imudp
$UDPServerRun 514

:HOSTNAME,isequal,"192.168.1.252" /var/log/spa3102.log


Note: 192.168.1.252 is the IP of the SPA3102

Restart the rsyslog daemon:
> sudo service rsyslod restart

In the System tab, set the syslog server and the debug level:
NB: 192.168.1.105 is the address of my Ubuntu server VirtualBox .

Note: 192.168.1.105 is the IP of my ubuntu host that runs rsyslogd.

In the PSTN Line tab, set SIP Debug Option to "full":

In the Line 1 tab, set SIP Debug Option to "full":

Thursday, September 22, 2011

Add an Apache2 virtual host in Ubuntu

Add the following file into /etc/apache2/sites-available
fart:
<VirtualHost *:80>
    ServerAdmin jerome.gallinari@gmail.com
    ServerName fart.ulticom.com

    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>


Activate the vhost: this creates a symlink from sites-enabled to sites-available
sudo a2ensite fart
Activate the new configuration
sudo /etc/init.d/apache2 reload

Make a correspondance between the new vhost and the local host
/etc/hosts:
127.0.0.1 localhost fart

Wednesday, June 22, 2011

Change to a british keyboard

> setxkbmap -layout gb

Monday, May 2, 2011

See which are the packages you have installed

dpkg -l |grep -e "^ii.*"

Wednesday, April 6, 2011

Install .deb on ubuntu

sudo dpkg -i package.deb

Tuesday, April 5, 2011

Setup networking on ubuntu

Problem: no eth0 in ifconfig, only l0
> sudo ifconfig eth0 up
eth0: ERROR while getting interface flags: No such device

Then
> sudo ifconfig eth1 up
Change eth0 into eth1 in /etc/network/interfaces
Restart networking:
> sudo /etc/init.d/networking restart

How to manage packages in ubuntu?

Install:
> sudo apt-get install libzip-dev
Uninstall:
> sudo apt-get remove libzip-dev
Search a package name:
> apt-cache search libzip
Check if a package is installed:
> dpkg -l | grep libzip