Post

Visualizzazione dei post con l'etichetta Linux

Eclipse underscore not visible

Immagine
Problem: Underscore is not Visibile on Ubuntu With: Eclise Luna SR2, Mars 2, Neon 1a on Ubuntu 16.04 LTS After few tests I understand this  is because my Ubuntu has text scaling factor set to 1.05 (from Unity Tweak Tool) Solution #1 text scaling factor set to 1.00, but for me is too small (you need to restart eclipse to see changes when you change Ubuntu text scaling factor) Solution #2 change only the default font in Eclipse with Liberation Mono (text scaling factor set to 1.05 as default) (for me the best solution at the moment, good font, good size, system text scaling factor set to 1.05 is good also for other applications like terminal)

Tomcat “java.lang.OutOfMemoryError: PermGen space” error

http://stackoverflow.com/questions/88235/how-to-deal-with-java-lang-outofmemoryerror-permgen-space-error http://frankkieviet.blogspot.ca/2006/10/classloader-leaks-dreaded-permgen-space.html On Ubuntu Precise Pangolin 12.04 you can edit catalina.sh @ /usr/share/tomcat6/bin CATALINA_OPTS="-Xms128m -Xmx256m -XX:MaxPermSize=128m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled"

Ubuntu VMWare Create new GUID eth0

sudo mv /etc/udev/rule.d/70-persistent-net.rules /etc/udev/rule.d/70-persistent-net.rules.bak sudo reboot   http://www.orzeszek.org/blog/2010/07/25/fix-missing-eth0-when-cloning-ubuntu-vmware-virtual-machines/ http://communities.vmware.com/message/1154002

Script Backup Linux MySQL su Rete

#!/bin/sh TIME=`date '+%d-%R'` ISODATE=`date '+%F'` # Create a Dump o MySQL in Home folder # Simple Dump mysqldump -umysqlusername -pmysqlpassword databasename -c > /home/miliarum/backup/databasename.sql # Dump with Daily File Name #mysqldump -uospite -preadonly atreeflow -c --skip-lock-tables > /home/miliarum/backup/databasename-$ISODATE.sql DESTINAZIONE_BACKUP=//192.168.0.211/miliarum DESTINAZIONE_MOUNT=/media/rete # Create Mount Folder if [ ! -d $DESTINAZIONE_MOUNT ] # be sure the directory /mnt exists then mkdir $DESTINAZIONE_MOUNT fi # Mount With Password #mount -t smbfs -o username=usermaxtor,password=passwordmaxtor //192.168.0.1/miliarum $DESTINAZIONE_MOUNT # Mount Without Password mount -t smbfs $DESTINAZIONE_BACKUP $DESTINAZIONE_MOUNT if [ "$?" = "0" ] ; then echo "Mount succesful" #tar zcvf /media/rete/atreeflow/files.tar.gz /home/atreeflow/files echo "Coping Files..." cp -R /home/miliarum/ $DESTINAZIONE_MOUNT...

Install Netbeans 6.7.1 and Java JDK on Ubuntu

http://www.cs.wcupa.edu/rkline/netbeans-ubu.html

Abilitare i Servizi in Debian/Ubuntu

update-rc.d -f sendmail remove update-rc.d apache2 defaults 20 80

Configure IP Address in Linux

1) EDIT /etc/network/interfaces a) DHCP auto eth0 iface eth0 inet dhcp b) STATIC iface eth1 inet static address 192.168.0.2 netmask 255.255.255.0 gateway 192.168.0.1 2) DNS /etc/resolv.conf search mydomain.com nameserver 192.168.0.1 nameserver 4.2.2.2 3) RESTART /etc/init.d/network restart ifdown eth0 ifup eth0

ruoli Ubuntu Server vs ruoli di Windows Server

Aggiungere/Rimuovere ruoli al server (come li chiamano in MS) è quasi più semplice che su Windows: sudo tasksel

Network eth0 problem when moving VMWare Virtual Machine

Thanks to this answer! http://www.infobright.org/Forums/viewthread/835/ inside the running vm: /etc/udev/rules.d/70-persistent-net.rules Manually delete the eth{n} lines inside

Hylafax: attached pdf 0 size

In my case /usr/bin/mimencode was not present, I've installed with: apt-get install metamail

Install Webmin on Debian and Ubuntu

Using the Webmin APT repository 1) Add repository to apt-get sudo su nano /etc/apt/sources.list #Webmin Repo deb http://download.webmin.com/download/repository sarge contrib 2) Add apt key cd /root wget http://www.webmin.com/jcameron-key.asc apt-key add jcameron-key.asc 3) Install software apt-get update apt-get install webmin

Configurare il Locale in Debian

The Easy Way Install debconf (i.e. run apt-get update then apt-get install debconf , as root) Run dpkg-reconfigure locales as root http://people.debian.org/~schultmc/locales.html

Debian Linux: Changing the timezone after installation

If the timezone is not set or is wrong, the superuser can run tzconfig to configure it after the operating system is installed (see man page tzconfig(8) ). If there are other users, it is a good idea to notify then that the system Timezone has changed. http://www.debian.org/doc/manuals/system-administrator/ch-sysadmin-time.html

Linux: Spostare i files con dimensioni maggiori di 0 bytes

find /home/files -type f -size +0 | xargs -i --verbose mv {} /home/filesbiggerthanzero/

Linux: Utilizzo di screen

screen è un comando che permette di aprire una shell come fosse un servizio. Utilissimo nelle sessioni SSH quando si vuole lasciare dei comandi attivi anche una volta scollegati. Per iniziare una nuova sessione usare il comando screen a questo punto siete entrati nella console che potrete tenere attiva utilizzando CTRL+A e poi D uscirete dalla console lasciando il comando in esecuzione. potete controllare le console attive con screen -ls Ora per ri-agganciarvi a una console lasciata aperta usate scree -r <nome della console> Maggiori dettagli li trovate qui: http://linux.byexamples.com/archives/86/multiple-workspace-on-single-terminal-with-screen/

Numero di Files nella cartella Linux

ls | wc -l

Aggiungere un utente a Linux da console

Lo script adduser risolve il problema, chiede username e password, crea la home dell'utente, e imposta i diritti corretti. Esempio: adduser nuovoutente

Apache2 Reverse Proxy per Tomcat

Editate i seguenti files - Linux: 000-default in /etc/apache2/sites-enabled - Windows: httpd.conf 1) Attivate i moduli LoadModule deflate_module modules/mod_deflate.so LoadModule deflate_module modules/mod_proxy.so LoadModule deflate_module modules/mod_proxy_http.so oppure in Debian/Ubuntu sudo a2enmod deflate sudo a2enmod proxy_http 2) Aggiungete alla fine dei files #Aggiunto da Mirco ProxyPreserveHost On ProxyRequests Off AddOutputFilterByType DEFLATE text/html text/plain text/xml ProxyPass http://localhost:8080/atreeflow ProxyPassReverse http://localhost:8080/atreeflow Order deny,allow Allow from all

MySQL grant user access

GRANT ALL ON databasename.* TO 'user'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION; GRANT ALL ON databasename.* TO 'user'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION; FLUSH PRIVILEGES;

Setting Up Tomcat 5 on Ubuntu 6.06

http://www.spaceprogram.com/knowledge/2006/05/installing-java-5-jdk-and-tomcat-on.html