-

   eugene20237

 - e-mail

 
(0)

LINUX: - !

, 11 2014 . 21:34 +
, Ubuntu 13.04 , , Arial, ! -! , . .

PHPStrom (IDEA), () phpstorm64.vmoptions phpstorm.vmoptions:

-Dswing.aatext=false
-Dawt.useSystemAAFontSettings=gasp

/opt/phpstorm/bin , .
, Java-based : http://nixmash.com/php/better-looking-intellij-idea-fonts-in-linux-mint/
: -Dsun.java2d.xrender=true

:  
(0)

LINUX: CUPS Samba

, 13 2014 . 03:34 +
Linux server - Windows client

IPP
, Windows Linux, IPP. , HTTP, , , .. , , Samba, . Windows IPP Windows 2000.
Windows, 'Add a New Printer' (' '). , URL. URL, : http://host_ip_address:631/printers/printer_name ( host_ip_address - IP- GNU/Linux, printer_name - ).
Windows . CUPS , Windows generic postscript- ( 'HP Color LaserJet 8500 PS' 'Xerox DocuTech 135 PS2'). - .

: https://wiki.archlinux.org/index.php/CUPS_printer_sharing_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)

Samba, .

:  
(0)

Linux: PID ps

, 09 2013 . 16:46 +
"org.stl.optimus.MainWorkThread". PID :
ps -aef | grep -v grep | grep 'org.stl.optimus.MainWorkThread' | awk '{print $2}'
PID - :
MYPID=`ps -aef | grep -v grep | grep 'org.stl.optimus.MainWorkThread' | awk '{print $2}'`

:  
(0)

Linux: UPS nut

, 30 2013 . 23:20 +
nut debian .
upsmon.conf .

LOW_BATTERY . , UPS ups.conf override.battery.charge.low. .

, , . override.ups.delay.shutdown.

ups.conf:
[ups]
driver = usbhid-ups
port = auto
desc = "BackUPS 525"
override.ups.delay.shutdown = 1
override.battery.charge.low = 75

, UPS:
# upsc ups@127.0.0.1

upsrw:
# upsrw -s battery.charge.low=75 -u root -p _ ups@127.0.0.1

SVEN Pro blazer_usb ups.conf. SVEN Pro . .
megatec (SVEN) .

:  
(0)

Linux: firefox Debian Squeeze

, 29 2013 . 17:48 +
: http://lucasmanual.com/blog/?p=94

/etc/apt/source.list:

# deb http://backports.debian.org/debian-backports squeeze-backports main
# deb http://mozilla.debian.net/ squeeze-backports iceweasel-release

NO_PUPLIC_KEY:
# apt-get update 2> /tmp/keymissing; for key in $(grep "NO_PUBKEY" /tmp/keymissing |sed "s/.*NO_PUBKEY //"); do echo -e "\nProcessing key: $key"; gpg --keyserver subkeys.pgp.net --recv $key && sudo gpg --export --armor $key | apt-key add -; done

:
# apt-get update

:
# apt-get install -t squeeze-backports iceweasel

.

:  
(0)

Linux: dd-

, 25 2013 . 22:48 +
, raid 1: sda_dd.img.gz raid .

:
# gzip -d sda_dd.img.gz
sda_dd.img.

. kpartx. debian . , loop-. . , raid . , "#" - , - .

# kpartx -a -v sda_dd.img
add map loop0p1 (253:0): 0 31367156 linear /dev/loop0 2048
# fdisk -l
Disk /dev/mapper/loop0p1: 16.1 GB, 16059983872 bytes
255 heads, 63 sectors/track, 1952 cylinders, total 31367156 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/loop0p1 doesn't contain a valid partition table
# mdadm -E /dev/mapper/loop0p1
/dev/mapper/loop0p1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 765e8e0f:2fea0fb1:2b982958:682bb83d
Name : u8:0
Creation Time : Wed Jan 23 21:05:09 2013
Raid Level : raid1
Raid Devices : 2

Avail Dev Size : 31350772 (14.95 GiB 16.05 GB)
Array Size : 15658880 (14.93 GiB 16.03 GB)
Used Dev Size : 31317760 (14.93 GiB 16.03 GB)
Data Offset : 16384 sectors
Super Offset : 8 sectors
State : clean
Device UUID : e163517f:9c20fa0d:0af0532f:0499ba00

Update Time : Fri Jan 25 20:21:33 2013
Checksum : 92c0e9f7 - correct
Events : 45


Device Role : Active device 0
Array State : AA ('A' == active, '.' == missing)

# mdadm --create --verbose /dev/md0 --assume-clean --level=raid1 --raid-devices=2 --spare-devices=0 /dev/mapper/loop0p1 missing
mdadm: /dev/mapper/loop0p1 appears to be part of a raid array:
level=raid1 devices=2 ctime=Wed Jan 23 21:05:09 2013
mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
--metadata=0.90
mdadm: size set to 15675264K
Continue creating array? yes
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.
# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 dm-0[0]
15675264 blocks super 1.2 [2/1] [U_]

unused devices:
# mdadm -D /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Fri Jan 25 22:27:42 2013
Raid Level : raid1
Array Size : 15675264 (14.95 GiB 16.05 GB)
Used Dev Size : 15675264 (14.95 GiB 16.05 GB)
Raid Devices : 2
Total Devices : 1
Persistence : Superblock is persistent

Update Time : Fri Jan 25 22:27:42 2013
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0

Name : r2:0 (local to host r2)
UUID : 9df83c9f:f0267ad5:b00aca3c:c239bf6f
Events : 0

Number Major Minor RaidDevice State
0 253 0 0 active sync /dev/dm-0
1 0 0 1 removed
# mkdir /mnt/md0
# mount /dev/md0 /mnt/md0


/mnt/md0 raid . , sda_dd.img raid 1 .

:  
(0)

Linux: dd

, 25 2013 . 19:51 +
, ssh :
# dd if=/dev/hda conv=sync,noerror bs=64K | gzip -c | ssh -c blowfish user@hostname "dd of=hda.img.gz bs=64k"
gzip.

: http://mydebianblog.blogspot.ru/2008/03/dd.html

:  
(0)

Linux: ssh

, 25 2013 . 18:52 +
, :
# echo '123456' | ssh root@192.168.1.85 -o password_stdin
- yes/no, , ssh- , .
- sshfs:
# echo '123456' | sshfs root@192.168.1.85:/ /mnt/myhost -o password_stdin

: http://leolik.blogspot.ru/2008/11/sshfs.html

:  
(0)

Linux:

, 25 2013 . 15:58 +
.

256 ,
# dd if=/dev/zero of=/var/lib/drbd/meta_disk bs=1M count=256

loop
# losetup /dev/loop0 /var/lib/drbd/meta_disk


# mke2fs -j /dev/loop0


# mount /dev/loop0 /mnt/loop0

: http://blog.zavolga.net/tech/virtual_block_device.html

:  
(0)

Linux: Oracle JDK 6-7 Ubuntu 12.04 Debian

, 24 2013 . 21:05 +
: http://habrahabr.ru/post/143113/
Oracle JDK 7 Ubuntu 12.04.
.

:
# add-apt-repository ppa:upubuntu-com/java

NO_PUPLIC_KEY:
# apt-get update 2> /tmp/keymissing; for key in $(grep "NO_PUBKEY" /tmp/keymissing |sed "s/.*NO_PUBKEY //"); do echo -e "\nProcessing key: $key"; gpg --keyserver subkeys.pgp.net --recv $key && sudo gpg --export --armor $key | apt-key add -; done

:
# apt-get update

JDK 7:
# apt-get install oracle-java7-installer

Sun JDK 7 Debian

:  
(0)

Linux: RAID

, 21 2013 . 15:07 +
Linux RAID:
http://habrahabr.ru/post/133059/
.

, dd if=/dev/zero bs=4096 of=/dev/sdX, grub raid. , mdadm zero-superblock /dev/sdX raid. alternate , Alt+F2.

:  
(3)

, 21 2012 . 05:11 +
. . , . , , . , .
2 : 1.) - ; 2.) . , . , . . . .
, . . , . . , - . .
: , , , , . , . - ! . 8-)

:  

 : 2 [1]