Добавление удаление пользователей в linux

Вы можете использовать команды useradd илиusermod для добавления пользователя в группу. Команда useradd создает нового пользователя или обновляет информацию у существующего. Команда usermod модифицирует существуюего пользователя. Вся информация о пользователях и группах храниться в файлах /etc/passwd, /etc/shadow и /etc/group.

Пример использования useradd — Добавляем нового пользователя в вторичную группу

Используем команду useradd для добавления нового пользователя в существующую группу. Если группа не существует создайте её. Синтаксис:

useradd -G {group-name} username
Создадим пользователя vivek и добавим его в группу developers. Залогиньтесь как пользователь root и убедитесь что группа developers существует:

# grep developers /etc/group

Вывод:

developers:x:1124:
Если группы нет, используйте команду groupadd для создания новой группы developers:

# groupadd developers

Затем добавьте пользователя vivek в группу developers:

# useradd -G developers vivek

Установите пароль пользователю vivek:

# passwd vivek

Убедитесь что пользователь добавлен в группу developers:

# id vivek Output:

uid=1122(vivek) gid=1125(vivek) groups=1125(vivek),1124(developers)
Опция -G позволяет добавить пользователю группу. Группы можно перечислять через запятую. К примеру, добавим пользователя jerry в группы

admins, ftp, www, and developers, введя:

# useradd -G admins,ftp,www,developers jerry

Пример использования useradd — Добавляем нового пользователя в основную группу

Для добавления пользователя tony в группу developers используем следующую команду:

# useradd -g developers tony

# id tony

uid=1123(tony) gid=1124(developers) groups=1124(developers)

Опция -g позволяет добавить пользователя в основную группу. Группа должна существовать.

Пример использования usermod — Добавляем существующего пользователя в существующую группу

Добавляем существующего пользователя tony в вторичную группу ftp:

# usermod -a -G ftp tony

Изменяем существующему пользователю tony первучную группу на www:

# usermod -g www tony

Удаление через
userdel $user

Или полное удаление с чисткой всех конфигурационных файлов и директорий
userdel -r $user

Добавляем роуты в Centos

Если для Debian можно было, например, запихнуть дополнительные роуты при загрузке в /etc/rc.local или прямо в intefaces, и не париться, то в CentOS 7 лучше создать файлы, в которых описываются все маршруты для каждого интерфейса.

http://www.centos.org/docs/5/html/5.2/Deployment_Guide/s1-networkscripts-static-routes.html

Для моего eth0
vim /etc/sysconfig/network-scripts/route-eth0

ADDRESS0=192.168.0.0
NETMASK0=255.255.255.0
GATEWAY0=192.168.0.254
ADDRESS1=192.168.3.0
NETMASK1=255.255.255.0
GATEWAY1=192.168.0.242
ADDRESS2=192.168.0.4.0
NETMASK2=255.255.255.0
GATEWAY2=192.168.0.242
 
ИЛИ

default 192.168.0.254 dev eth0
192.168.3.0/24 via 192.168.0.242 dev eth0
192.168.4.0/24 via 192.168.0.242 dev eth0

 

ApacheBench=ab

aptitude install apache2-utils

Натравливать так:
ab -c 1 -n 10 http://site.ru/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking site.ru (be patient)…..done

Server Software: nginx/0.7.67
Server Hostname: site.ru
Server Port: 80

Document Path: /
Document Length: 56349 bytes

Concurrency Level: 1
Time taken for tests: 1.569 seconds
Complete requests: 10
Failed requests: 5
(Connect: 0, Receive: 0, Length: 5, Exceptions: 0)
Write errors: 0
Total transferred: 567473 bytes
HTML transferred: 563493 bytes
Requests per second: 6.37 [#/sec] (mean)
Time per request: 156.945 [ms] (mean)
Time per request: 156.945 [ms] (mean, across all concurrent requests)
Transfer rate: 353.10 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 1 1 0.1 1 1
Processing: 135 156 37.5 143 258
Waiting: 61 76 37.6 65 182
Total: 136 157 37.5 143 259

Percentage of the requests served within a certain time (ms)
50% 143
66% 144
75% 151
80% 176
90% 259
95% 259
98% 259
99% 259
100% 259 (longest request)

Или

The following line uses keepalive for 50,000 connections, at a concurrency of 50 and a timeout of 20 seconds. Be sure to end root domains with a slash.

ab -k -n 50000 -c 53 -t 20 http://daf-uts.ru/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking daf-uts.ru (be patient)
Finished 2909 requests


Server Software:        nginx/1.2.1
Server Hostname:        daf-uts.ru
Server Port:            80

Document Path:          /
Document Length:        15834 bytes

Concurrency Level:      53
Time taken for tests:   20.004 seconds
Complete requests:      2909
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      46645815 bytes
HTML transferred:       46061106 bytes
Requests per second:    145.42 [#/sec] (mean)
Time per request:       364.450 [ms] (mean)
Time per request:       6.876 [ms] (mean, across all concurrent requests)
Transfer rate:          2277.23 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   0.8      1      15
Processing:    21  361 381.7    252    2934
Waiting:       18  358 381.6    249    2932
Total:         22  362 381.7    253    2935

Percentage of the requests served within a certain time (ms)
  50%    253
  66%    301
  75%    335
  80%    394
  90%    519
  95%    614
  98%   1463
  99%   2808
 100%   2935 (longest request)

 

Zabbix установка на Centos 7

В начале производим подключение EPEL

Производим установку (все зависимости в виде httpd, php, mysql установятся совместно):
Код: [Выделить]
yum install zabbix22-server-mysql zabbix22-web-mysql

После установки включаем автоазгрузку для php и mysql:
Код: [Выделить]
chkconfig httpd on
chkconfig mariadb on

Конфигурируем MySQL как написано здесь

Создаем БД для Zabbix:
Код: [Выделить]
mysql -uroot
mysql> create database zabbix character set utf8;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ‘zabbix’;
mysql> exit

Импортируем шаблоны баз:
Код: [Выделить]
cd /usr/share/zabbix-mysql
mysql -u root -p zabbix < data.sql mysql -u root -p zabbix < images.sql mysql -u root -p zabbix < schema.sql Стартуем Zabbix иперезапускаем apache: Код: [Выделить] systemctl start zabbix-server.service systemctl restart httpd.service Измените настройки базы данных в zabbix_server.conf # vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=zabbix Изменение конфигурации PHP для веб-интерфейса Zabbix Файл конфигурации Apache для веб-интерфейса Zabbix размещается в /etc/httpd/conf.d/zabbix.conf. Некоторые настройки PHP уже выполнены. php_value max_execution_time 300 php_value memory_limit 128M php_value post_max_size 16M php_value upload_max_filesize 2M php_value max_input_time 300 # php_value date.timezone Europe/Moscow Переходим к последнему этапу конфигурирования в WEB интерфейсе: Код: [Выделить] http://Ваш_Сервер/zabbix/

Epel Centos репозитории + zabbix

How To Enable EPEL Repository in RHEL/CentOS 7/6/5?
First, you need to download the file using Wget and then install it using RPM on your system to enable the EPEL repository. Use below links based on your Linux OS versions. (Make sure you must be root user).
RHEL/CentOS 7 64 Bit
## RHEL/CentOS 7 64-Bit ##
# wget http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm
# rpm -ivh epel-release-7-0.2.noarch.rpm
RHEL/CentOS 6 32-64 Bit
## RHEL/CentOS 6 32-Bit ##
# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

## RHEL/CentOS 6 64-Bit ##
# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm
RHEL/CentOS 5 32-64 Bit
## RHEL/CentOS 5 32-Bit ##
# wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -ivh epel-release-5-4.noarch.rpm

## RHEL/CentOS 5 64-Bit ##
# wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
# rpm -ivh epel-release-5-4.noarch.rpm
RHEL/CentOS 4 32-64 Bit
## RHEL/CentOS 4 32-Bit ##
# wget http://download.fedoraproject.org/pub/epel/4/i386/epel-release-4-10.noarch.rpm
# rpm -ivh epel-release-4-10.noarch.rpm

## RHEL/CentOS 4 64-Bit ##
# wget http://download.fedoraproject.org/pub/epel/4/x86_64/epel-release-4-10.noarch.rpm
# rpm -ivh epel-release-4-10.noarch.rpm
How Do I Verify EPEL Repo?
You need to run the following command to verify that the EPEL repository is enabled. Once you ran the command you will see epel repository.
# yum repolist
Sample Output
Loaded plugins: downloadonly, fastestmirror, priorities
Loading mirror speeds from cached hostfile
* base: centos.aol.in
* epel: ftp.cuhk.edu.hk
* extras: centos.aol.in
* rpmforge: be.mirror.eurid.eu
* updates: centos.aol.in
Reducing CentOS-5 Testing to included packages only
Finished
1469 packages excluded due to repository priority protections
repo id repo name status
base CentOS-5 — Base 2,718+7
epel Extra Packages for Enterprise Linux 5 — i386 4,320+1,408
extras CentOS-5 — Extras 229+53
rpmforge Red Hat Enterprise 5 — RPMforge.net — dag 11,251
repolist: 19,075
How Do I Use EPEL Repo?
You need to use YUM command for searching and installing packages. For example we search for Zabbix package using epel repo, lets see it is available or not under epel.
# yum —enablerepo=epel info zabbix
Sample Output
Available Packages
Name : zabbix
Arch : i386
Version : 1.4.7
Release : 1.el5
Size : 1.7 M
Repo : epel
Summary : Open-source monitoring solution for your IT infrastructure
URL : http://www.zabbix.com/
License : GPL
Description: ZABBIX is software that monitors numerous parameters of a network.
Let’s install Zabbix package using epel repo option –enablerepo=epel switch.
# yum —enablerepo=epel install zabbix
Note: The epel configuration file is located under /etc/yum.repos.d/epel.repo.
This way you can install as many as high standard open source packages using EPEL repo.

Systemd Centos7

Read more: RHEL 7 / CentOS 7 : How to get started with Systemd @ All Linux User’s Blog http://www.tejasbarot.com/2014/07/22/rhel-7-centos-7-how-to-get-started-with-systemd/#ixzz3BJGYYfVu
Under Creative Commons License: Attribution Non-Commercial No Derivatives
Follow us: @imtejasbarot on Twitter | AllLinuxUsersBlog on Facebook

As the Systemd now replaces SysVinit, it is time to get familiar with it and learn new commands.
Systemd is quicker because it uses fewer scripts and tries to run more tasks in parallel (Systemd calls them units).
The Systemd configuration is stored in the /etc/systemd directory.

Boot process
Systemd primary task is to manage the boot process and provides informations about it.
To get the boot process duration, type:

# systemd-analyze
Startup finished in 422ms (kernel) + 2.722s (initrd) + 9.674s (userspace) = 12.820s
To get the time spent by each task during the boot process, type:

# systemd-analyze blame
7.029s network.service
2.241s plymouth-start.service
1.293s kdump.service
1.156s plymouth-quit-wait.service
1.048s firewalld.service
632ms postfix.service
621ms tuned.service
460ms iprupdate.service
446ms iprinit.service
344ms accounts-daemon.service

7ms systemd-update-utmp-runlevel.service
5ms systemd-random-seed.service
5ms sys-kernel-config.mount
Note: You will find additional information on this point in the Lennart Poettering’s blog.

Journal analysis
In addition, Systemd handles the system event log, a syslog daemon is not mandatory any more.
To get the content of the Systemd journal, type:

# journalctl
To get all the events related to the crond process in the journal, type:

# journalctl /sbin/crond
Note: You can replace /sbin/crond by `which crond`.

To get all the events since the last boot, type:

# journalctl -b
To get all the events that appeared today in the journal, type:

# journalctl —since=today
To get all the events with a syslog priority of err, type:

# journalctl -p err
To get the 10 last events and wait for any new one (like “tail -f /var/Log/messages”), type:

# journalctl -f
Note: You will find additional information on this point in the Lennart Poettering’s blog or Lennart Poettering’s video (44min: the first ten minutes are very interesting concerning security issues).

Control groups
Systemd organizes tasks in control groups. For example, all the processes started by an apache webserver will be in the same control group, CGI scripts included.

To get the full hierarchy of control groups, type:

# systemd-cgls
├─user.slice
│ └─user-1000.slice
│ └─session-1.scope
│ ├─2889 gdm-session-worker [pam/gdm-password]
│ ├─2899 /usr/bin/gnome-keyring-daemon —daemonize —login
│ ├─2901 gnome-session —session gnome-classic
. .
└─iprupdate.service
└─785 /sbin/iprupdate —daemon
To get the list of control group ordered by CPU, memory and disk I/O load, type:

# systemd-cgtop
Path Tasks %CPU Memory Input/s Output/s
/ 213 3.9 829.7M — —
/system.slice 1 — — — —
/system.slice/ModemManager.service 1 — — — —
To kill all the processes associated with an apache server (CGI scripts included), type:

# systemctl kill httpd
To put resource limits on a service (here 500 CPUShares), type:

# systemctl set-property httpd.service CPUShares=500
Note1: The change is written into the service unit file. Use the –runtime option to avoid this behavior.
Note2: By default, each service owns 1024 CPUShares. Nothing prevents you from giving a value smaller or bigger.

To get the current CPUShares service value, type:

# systemctl show -p CPUShares httpd.service
Sources: New control group interface, Systemd 205 announcement.

Service management
Systemd deals with all the aspects of the service management. The systemctl command replaces the chkconfig and the service commands. The old commands are now a link to the systemctl command.

To activate the NTP service at boot, type:

# systemctl enable ntpd
Note1: You should specify ntpd.service but by default the .service suffix will be added.
Note2: If you specify a path, the .mount suffix will be added.
Note3: If you mention a device, the .device suffix will be added.

To deactivate it, start it, stop it, restart it, reload it, type:

# systemctl disable ntpd
# systemctl start ntpd
# systemctl stop ntpd
# systemctl restart ntpd
# systemctl reload ntpd
To know if the NTP service is activated at boot, type:

# systemctl is-enabled ntpd
enabled
To know if the NTP service is running, type:

# systemctl is-active ntpd
inactive
To get the status of the NTP service, type:

# systemctl status ntpd
ntpd.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
If you change a service configuration, you will need to reload it:

# systemctl daemon-reload
To get the list of all the units (services, mount points, devices) with their status and description, type:

# systemctl
To get a more readable list, type:

# systemctl list-unit-files
To get the list of services that failed at boot, type:

# systemctl —failed
To get the status of a process (here httpd) on a remote server (here rhel7.example.com), type:

# systemctl -H root@rhel7.example.com status httpd.service
Run levels
Systemd also deals with run levels. As everything is represented by files in Systemd, target files replace run levels.

To move to single user mode, type:

# systemctl rescue
To move to the level 3 (equivalent to the previous level 3), type:

# systemctl isolate runlevel3.target
Or:

# systemctl isolate multi-user.target
To move to the graphical level (equivalent to the previous level 5), type:

# systemctl isolate graphical.target
To set the default run level to non-graphical mode, type:

# systemctl set-default multi-user.target
To set the default run level to graphical mode, type:

# systemctl set-default graphical.target
To get the current default run level, type:

# systemctl get-default
graphical.target
To stop a server, type:

# systemctl poweroff
Note: You can still use the poweroff command, a link to the systemctl command has been created (the same thing is true for the halt and reboot commands).

To reboot a server, suspend it or put it into hibernation, type:

# systemctl reboot
# systemctl suspend
# systemctl hibernate
Linux standardization
Systemd‘s authors have decided to help Linux standardization among distributions. Through Systemd, changes happen in the localization of some configuration files.

Miscellaneous
To get the server hostnames, type:

# hostnamectl
Static hostname: rhel7.example.com
Icon name: computer-laptop
Chassis: laptop
Machine ID: bcdc71f1943f4d859aa37e54a422938d
Boot ID: f84556924b4e4bbf9c4a82fef4ac26d0
Operating System: Red Hat Enterprise Linux Everything 7.0 (Maipo)
CPE OS Name: cpe:/o:redhat:enterprise_linux:7.0:beta:everything
Kernel: Linux 3.10.0-54.0.1.el7.x86_64
Architecture: x86_64
Note: There are three kinds of hostnames: static, pretty, and transient.
“The static host name is the traditional hostname, which can be chosen by the user, and is stored in the /etc/hostname file. The “transient” hostname is a dynamic host name maintained by the kernel. It is initialized to the static host name by default, whose value defaults to “localhost”. It can be changed by DHCP or mDNS at runtime. The pretty hostname is a free-form UTF8 host name for presentation to the user.” Source: RHEL 7 Networking Guide.

To assign the rhel7 hostname permanently to the server, type:

# hostnamectl set-hostname rhel7
Note: With this syntax all three hostnames (static, pretty, and transient) take the rhel7 value at the same time. However, it is possible to set the three hostnames separately by using the –pretty, –static, and –transient options.

To get the current locale, virtual console keymap and X11 layout, type:

# localectl
System Locale: LANG=en_US.UTF-8
VC Keymap: en_US
X11 Layout: en_US
To assign the en_GB.utf8 value to the locale, type:

# localectl set-locale LANG=en_GB.utf8
To assign the en_GB value to the virtual console keymap, type:

# localectl set-keymap en_GB
To assign the en_GB value to the X11 layout, type:

# localectl set-x11-keymap en_GB
To get the current date and time, type:

# timedatectl
Local time: Fri 2014-01-24 22:34:05 CET
Universal time: Fri 2014-01-24 21:34:05 UTC
RTC time: Fri 2014-01-24 21:34:05
Timezone: Europe/Madrid (CET, +0100)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: no
Last DST change: DST ended at
Sun 2013-10-27 02:59:59 CEST
Sun 2013-10-27 02:00:00 CET
Next DST change: DST begins (the clock jumps one hour forward) at
Sun 2014-03-30 01:59:59 CET
Sun 2014-03-30 03:00:00 CEST
To set the current date, type:

# timedatectl set-time YYYY-MM-DD
To set the current time, type:

# timedatectl set-time HH:MM:SS
To get the list of time zones, type:

# timedatectl list-timezones
To change the time zone to America/New_York, type:

# timedatectl set-timezone America/New_York
To get the users’ list, type:

# loginctl list-users
UID USER
42 gdm
1000 tom
0 root
To get the list of all current user sessions, type:

# loginctl list-sessions
SESSION UID USER SEAT
1 1000 tom seat0

1 sessions listed.
To get the properties of the user tom, type:

# loginctl show-user tom
UID=1000
GID=1000
Name=tom
Timestamp=Fri 2014-01-24 21:53:43 CET
TimestampMonotonic=160754102
RuntimePath=/run/user/1000
Slice=user-1000.slice
Display=1
State=active
Sessions=1
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0

CentOS 7 Lamp

http://www.cyberciti.biz/faq/howto-install-linux-apache-mariadb-php-lamp-stack-on-centos7-rhel7/

+ правила обязятельно для firewalld на включение httpd

Cubietruck + phpsane + m1005 mfp

Cubietruck

echo ‘deb http://ftp.ru.debian.org/debian wheezy-backports main’ >> /etc/apt/sources.list
echo ‘modprobe bcmdhd’ >> /etc/rc.local
apt-get update
apt-get install php5 apache2 cups sane netpbm gocr poppler-utils htop ifplugd iotop ntop zabbix-agent

Потом скачиваем сам phpSane
#wget http://garr.dl.sourceforge.net/project/phpsane/phpsane/0.7.1/phpSANE-0.7.1.zip

Создаем каталог для него
#mkdir /var/www/phpsane

перемещаем туда архив phpSane
#mv phpSANE-0.7.1.zip /var/www/phpsane/phpSANE-0.7.1.zip

и распаковываем его
#unzip phpSANE-0.7.1.zip

Далее сменим владельца данного каталога и его содержимого
#chowr -R www-data:www-data /var/www/phpsane

так же следует внести пользователя www-data в группу saned
#addgroup www-data saned

Теперь настроим Apache. Для этого в файле /etc/apache2/sites-available/default изменим директиву directoryindex
DirectoryIndex index.html index.php phpsane.php

И перезапустим apache
#service apache2 restart

Так же стоит обратить внимание на то, что для работы phpSANE нужны дополнительные пакеты. И их придется установить:
#apt-get install netpbm gocr poppler-utils

Теперь после захода на страницу http://ip-address/phpsane у нас должен открыться веб-интерфейс

Добавить Listen IP:631 интерфейсов
echo ‘Port 631’ >> /etc/cups/cupsd.conf
Добавить во все секции (Locale, admin … etc)
Allow all иначе на морде вылезет Forbringen

Дальше шарим принтера из веб морды и сканим по сети.

+

Завелось только при:
Драйвера HPAIO ставить нельзя! Не работают!
Только

 sane-find-scanner 

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.
  # Also you need support for SCSI Generic (sg) in your operating system.
  # If using Linux, try "modprobe sg".

found USB scanner (vendor=0x03f0, product=0x3b17) at libusb:001:002
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

scanimage -L
device `hpljm1005:libusb:001:002' is a Hewlett-Packard LaserJet M1005 multi-function peripheral

 

ОБЯЗАТЕЛЬНО ВНЕСТИ АПАЧ в группы saned scanner lp lpadmin

addgroup www-data saned
addgroup -a -G lpadmin

Все проверить по cat /etc/group

scanner:x:109:saned,www-data,root
lpadmin:x:111:root,www-data
saned:x:113:www-data,root
——————————————————————————————
Сходу завелась версия phpsane 0.7.2

Для версии 0.8.0 нужны подпилки в конфигах.
/var/www/incl/config.php
1.
Сделать руками
$temp_dir = «./tmp/»; // temporary directory for storing preview files
$save_dir = «./output/»; // destination directory for scanned files
$scanner_dir = «./scanners/»; // destination directory for storing and reading scanner configuration files

2. По дефолту поставить русский
$lang_id = 4;

3. Поставить просмотр по умолчанию равным $PREVIEW_HEIGHT_MM = 297; — ИНАЧЕ ОШИБКА

4. Убрать не нужные Форматы
//add_page_size(‘A0’, 841, 1189);
//add_page_size(‘A1’, 594, 841);
//add_page_size(‘A2’, 420, 594);
//add_page_size(‘A3’, 297, 420);

5. Прописать СВОИ пути к pdfunite и gocr
по дефолту
$GOCR = «/opt/bin/gocr»; //optional ocr binary
$PDFUNITE = «/usr/local/bin/pdfunite»; //optional PDF merge binary

Я тупо прописал симлинки, такого формата (установить gocr и poppler-utils)
ln -s /usr/bin/pdfunite /usr/local/bin/pdfunite

6. Сканер ругался на параметр scanimage — я его закомментировал.
//$usr_opt = » —jpeg-quality 0″;
$usr_opt = «»;

При сих настройках чудо завелось. Всем спасибо.
В обоих филиалах уже phpsane трудиться на благо ленивых манагеров.

+ Был косяк с НЕПОЛНЫМ сканированием листа A4. Не хватало 2 см до конца листа!
При этом через консоль scanimage > image.ppm сканировал ВЕСЬ лист.
В консоль сливал

 scanimage > test.ppm
scanimage: rounded value of br-x from 220 to 220
scanimage: rounded value of br-y from 330 to 330

 

Поэтому такие настройки я дал и превьюшке и полному скану в конфигах, заменив дефолтные A4.

Читать далее

xcp zabbix agent

сначала переводим в статус enabled=1 все нужные репозитории в /etc/yum.repo.d/

потом
wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
sudo rpm -Uvh epel-release-5*.rpm
ls -1 /etc/yum.repos.d/epel*

sudo rpm -Uvh http://repo.zabbix.com/zabbix/2.2/rhel/5/i386/zabbix-release-2.2-1.el5.noarch.rpm
(Можно посмотреть тут http://www.alsigned.ru/?p=2463)

yum install zabbix vim

vi /etc/zabbix/zabbix_agentd.conf

diff centos & deb config

[root@srv-vm2 ~]# diff /etc/zabbix/zabbix_agentd.conf /etc/zabbix/zabbix_agentd.conf_deb 
23c23
< LogFile=/var/log/zabbix/zabbix_agentd.log
---
> LogFile=/var/log/zabbix-agent/zabbix_agentd.log
34c34
< LogFileSize=0
---
> LogFileSize=10
85c85
< Server=127.0.0.1
---
> Server=192.168.x.x
110c110
< # StartAgents=3
---
> StartAgents=5
137c137
< Hostname=Zabbix server
---
> Hostname=srv-vm2
240c240
< #	Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
---
> #	Installing Zabbix will create include directory in /etc/zabbix, unless modified during the compile time.
246,249c246,248
< Include=/etc/zabbix/zabbix_agentd.d/
< 
< # Include=/usr/local/etc/zabbix_agentd.userparams.conf
< # Include=/usr/local/etc/zabbix_agentd.conf.d/
---
> # Include=/etc/zabbix/zabbix_agentd.userparams.conf
> # Include=/etc/zabbix/zabbix_agentd.conf.d/
> Include=/etc/zabbix/zabbix_agentd.conf.d/

 

Centos Ktuned

ktuned

http://markelov.blogspot.ru/2012_07_01_archive.html
http://serverfault.com/questions/518629/understanding-redhats-recommended-tuned-profiles/518709#518709
http://serverfault.com/questions/557715/centos-tuned-equivalent-for-debian