Страница 1 из 2

ISPConfig - ставим хостинг [RHEL6]

Добавлено: 01 сен 2011, 13:29
Raven
Бороздя интернеты в поисках наиболее подходящей админки для хостинга я перерыл боольшую кучу этих самых админок и вдоволь натестился... DirectAdmin, PleskPanel, H-Sphere, ISPManager - чего только не насмотрелся, все фичастые, да мордами красные, но есть у них один существенный минус - цена в ~2000 евриков. Естественно каким бы крутым провом не был Мегалайн, никто мне покупать ни одну из них не собирался, ибо 2 года назад была уже куплена DirectAdmin, хотя и лицензия на обновы была уже давно просрочена, да и последняя версия предназначена для RHEL/CentOS 5.5, а для меня принципиально было использование RHEL6. Как-то случайно ткнув по ссылке попал я на чудный сайтеГ - http://www.ispconfig.org, продукт которого оказался лицензированым моей любимой лицензией BSD!!! Чтож, потестим)))

Будем исходить из того, что CentOS/RHEL/OracleLinux 6-й версии у нас уже установлен, сеть настроена.

Код: Выделить всё

[root@server ~]# ifconfig
 eth0      Link encap:Ethernet  HWaddr 00:0C:29:3E:29:60
           inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
           inet6 addr: fe80::20c:29ff:fe3e:2960/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:192 errors:0 dropped:0 overruns:0 frame:0
           TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:18154 (17.7 KiB)  TX bytes:17645 (17.2 KiB)

 lo        Link encap:Local Loopback
           inet addr:127.0.0.1  Mask:255.0.0.0
           inet6 addr: ::1/128 Scope:Host
           UP LOOPBACK RUNNING  MTU:16436  Metric:1
           RX packets:30 errors:0 dropped:0 overruns:0 frame:0
           TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:2172 (2.1 KiB)  TX bytes:2172 (2.1 KiB)

 [root@server ~]#
Обязательно добавьте запись наподобие этой

Код: Выделить всё

192.168.0.100   server.test.kg     server
в /etc/hosts

Отключаем selinux

Код: Выделить всё

[root@server ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@server ~]# reboot
и вырубим пока фаервол

Код: Выделить всё

[root@server ~]# chkconfig iptables off
[root@server ~]# service iptables stop
[root@server ~]# iptables -L
 Chain INPUT (policy ACCEPT)
 target     prot opt source               destination

 Chain FORWARD (policy ACCEPT)
 target     prot opt source               destination

 Chain OUTPUT (policy ACCEPT)
 target     prot opt source               destination
 [root@server ~]#
Добавляем репозитории для yum

Код: Выделить всё

 [root@server ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
[root@server ~]# rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
[root@server ~]# rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
[root@server ~]# rpm --import https://fedoraproject.org/static/0608B895.txt
[root@server ~]# rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm
Опять же здесь я пропустил базовые репозитории, которые тоже необходимо добавить, но каждому нравится свое, мне например больше по душе репозиторий Oracle (ибо пакеты посвежее), а кому-то больше привлекателен репоз CentOS. Также у меня добавлен репозиторий Atomic (!!! может конфликтовать с epel !!!).

Ставим плагин для yum позволяющий выставлять приоритеты репозиториям

Код: Выделить всё

[root@server ~]# yum install yum-priorities
И собственно выставляем priority=10 на epel

Код: Выделить всё

[root@server ~]# nano /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
priority=10
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Обновляем систему:

Код: Выделить всё

[root@server ~]# yum update
Теперь нужно установить все необходимое для сборки их исходников:

Код: Выделить всё

[root@server ~]# yum groupinstall 'Development Tools'
Далее нам необходима поддержка квотирования диска. Можно конечно обойтись и без нее, но в таком случае мы не сможем ограничивать пользователей в дисковом пространстве, а неограниченное дисковое пространство у пользователя - не есть хорошо. Ставим квоты.

Код: Выделить всё

[root@server ~]# yum install quota
И правим /etc/fstab добавляя к опциям монтирования раздела следующие опции - usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0

Код: Выделить всё

#
# /etc/fstab
# Created by anaconda on Mon Jul 11 16:29:27 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_server1-lv_root /                       ext4    defaults        1 1
UUID=6a119ddb-46eb-4054-a17c-8968ea87369f /boot                   ext4    defaults        1 2
/dev/mapper/vg_server1-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
UUID=86d01758-1c06-48a1-9beb-1ffff51d9a1c /home   gfs2   _netdev,rw,locktable=hosting:data,lockproto=lock_dlm,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0   0 0

Вот эта строка:
UUID=86d01758-1c06-48a1-9beb-1ffff51d9a1c /home gfs2 _netdev,rw,locktable=hosting:data,lockproto=lock_dlm,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 0 0
Пусть вас не пугает многабукаф в опциях - это просто раздел на внешнем сетевом хранилище цепляемый по iSCSI, отформатированный в gfs2 и примонтированный с соответствующими опциями. )))
Чтобы раздел "подхватил" изменения его надо перемонтировать

Код: Выделить всё

[root@server ~]# mount -o remount /home
и включить квоты:

Код: Выделить всё

[root@server ~]# quotacheck -avugm
[root@server ~]# quotaon -avug
Ставим LAMP

Код: Выделить всё

[root@server ~]# yum install ntp httpd mod_ssl mysql-server php php-mysql php-mbstring phpmyadmin
Ставим почтарь
удаляем Dovecot если вдруг он установился по дефолту (RHEL это любит делать)

Код: Выделить всё

[root@server ~]# yum remove dovecot dovecot-mysql
и установим все необходимое для сборки Courier

Код: Выделить всё

[root@server ~]# yum install rpm-build gcc mysql-devel openssl-devel cyrus-sasl-devel pkgconfig zlib-devel pcre-devel openldap-devel postgresql-devel expect libtool-ltdl-devel openldap-servers libtool gdbm-devel pam-devel gamin-devel libidn-devel
Поскольку собирать Courier из исходников мы будем сразу в RPM (а сборка оных от root не приветствуется) нам понадобится непривилегированый пользователь. Создадим его:

Код: Выделить всё

[root@server ~]# useradd -m -s /bin/bash raven
[root@server ~]# passwd raven
Далее надо настроить sudo (я конечно очень не люблю этот изврат, но что поделать - надо так)

Код: Выделить всё

[root@server ~]# visudo
добавляем строчку в конец конфига

Код: Выделить всё

%raven  ALL=(ALL)       NOPASSWD: ALL
и сохраняемся.

Из-под созданого нами позьзователя выполняем все необходимое для сборки rpm (создаем структуру папок и т.п.):

Код: Выделить всё

[root@server ~]# su raven
[raven@server ~]$ mkdir $HOME/rpm
[raven@server ~]$ mkdir $HOME/rpm/SOURCES
[raven@server ~]$ mkdir $HOME/rpm/SPECS
[raven@server ~]$ mkdir $HOME/rpm/BUILD
[raven@server ~]$ mkdir $HOME/rpm/BUILDROOT
[raven@server ~]$ mkdir $HOME/rpm/SRPMS
[raven@server ~]$ mkdir $HOME/rpm/RPMS
[raven@server ~]$ mkdir $HOME/rpm/RPMS/i386
[raven@server ~]$ mkdir $HOME/rpm/RPMS/x86_64
[raven@server ~]$ echo "%_topdir $HOME/rpm" >> $HOME/.rpmmacros
[raven@server ~]$ mkdir $HOME/downloads
[raven@server ~]$ cd $HOME/downloads
Скачиваем исходники Courier с официального сайта проекта.

Код: Выделить всё

[raven@server ~]$ wget https://sourceforge.net/projects/courier/files/authlib/0.63.0/courier-authlib-0.63.0.tar.bz2/download
[raven@server ~]$ wget https://sourceforge.net/projects/courier/files/imap/4.9.3/courier-imap-4.9.3.tar.bz2/download
[raven@server ~]$ wget https://sourceforge.net/projects/courier/files/maildrop/2.5.4/maildrop-2.5.4.tar.bz2/download
Собираем пакеты и устанавливаем их:

Код: Выделить всё

[raven@server ~]$ sudo rpmbuild -ta courier-authlib-0.63.0.tar.bz2
[raven@server ~]$ sudo ls -l /root/rpmbuild/RPMS/x86_64
-rw-r--r-- 1 root root 124296 Aug 11 17:27 courier-authlib-0.63.0-1.el6.x86_64.rpm
 -rw-r--r-- 1 root root 259620 Aug 11 17:27 courier-authlib-debuginfo-0.63.0-1.el6.x86_64.rpm
 -rw-r--r-- 1 root root  35044 Aug 11 17:27 courier-authlib-devel-0.63.0-1.el6.x86_64.rpm
 -rw-r--r-- 1 root root  17416 Aug 11 17:27 courier-authlib-ldap-0.63.0-1.el6.x86_64.rpm
 -rw-r--r-- 1 root root  13944 Aug 11 17:27 courier-authlib-mysql-0.63.0-1.el6.x86_64.rpm
 -rw-r--r-- 1 root root  13112 Aug 11 17:27 courier-authlib-pgsql-0.63.0-1.el6.x86_64.rpm
 -rw-r--r-- 1 root root   8316 Aug 11 17:27 courier-authlib-pipe-0.63.0-1.el6.x86_64.rpm
 -rw-r--r-- 1 root root  34168 Aug 11 17:27 courier-authlib-userdb-0.63.0-1.el6.x86_64.rpm

Код: Выделить всё

[raven@server ~]$ sudo rpm -ivh /root/rpmbuild/RPMS/x86_64/courier-authlib-0.63.0-1.el6.x86_64.rpm /root/rpmbuild/RPMS/x86_64/courier-authlib-mysql-0.63.0-1.el6.x86_64.rpm /root/rpmbuild/RPMS/x86_64/courier-authlib-devel-0.63.0-1.el6.x86_64.rpm

Код: Выделить всё

[raven@server ~]$ sudo mkdir -p /var/cache/ccache/tmp
[raven@server ~]$ sudo chmod o+rwx /var/cache/ccache/
[raven@server ~]$ sudo chmod 777 /var/cache/ccache/tmp
[raven@server ~]$ rpmbuild -ta courier-imap-4.9.3.tar.bz2 # без sudo!
[raven@server ~]$ cd $HOME/rpm/RPMS/x86_64
[raven@server ~]$ ls -l
-rw-r--r-- 1 raven raven 333540 Aug 11 17:38 courier-imap-4.9.3-1.x86_64.rpm
-rw-r--r-- 1 raven raven 776112 Aug 11 17:38 courier-imap-debuginfo-4.9.3-1.x86_64.rpm
[raven@server ~]$ sudo rpm -ivh courier-imap-4.9.3-1.x86_64.rpm
[raven@server ~]$ cd $HOME/downloads
[raven@server ~]$ sudo rpmbuild -ta maildrop-2.5.4.tar.bz2
[raven@server ~]$ sudo ls -l /root/rpmbuild/RPMS/x86_64
 -rw-r--r-- 1 root root 124296 Aug 11 17:27 courier-authlib-0.63.0-1.el6.x86_64.rpm
 -rw-r--r-- 1 root root 259620 Aug 11 17:27 courier-authlib-debuginfo-0.63.0-1.el6.x86_64.rpm
 -rw-r--r-- 1 root root  35044 Aug 11 17:27 courier-authlib-devel-0.63.0-1.el6.x86_64.rpm
 -rw-r--r-- 1 root root  17416 Aug 11 17:27 courier-authlib-ldap-0.63.0-1.el6.x86_64.rpm
 -rw-r--r-- 1 root root  13944 Aug 11 17:27 courier-authlib-mysql-0.63.0-1.el6.x86_64.rpm
 -rw-r--r-- 1 root root  13112 Aug 11 17:27 courier-authlib-pgsql-0.63.0-1.el6.x86_64.rpm
 -rw-r--r-- 1 root root   8316 Aug 11 17:27 courier-authlib-pipe-0.63.0-1.el6.x86_64.rpm
 -rw-r--r-- 1 root root  34168 Aug 11 17:27 courier-authlib-userdb-0.63.0-1.el6.x86_64.rpm
 -rw-r--r-- 1 root root 281328 Aug 11 17:47 maildrop-2.5.4-1.x86_64.rpm
 -rw-r--r-- 1 root root 717476 Aug 11 17:47 maildrop-debuginfo-2.5.4-1.x86_64.rpm
 -rw-r--r-- 1 root root 101156 Aug 11 17:47 maildrop-devel-2.5.4-1.x86_64.rpm
 -rw-r--r-- 1 root root  63744 Aug 11 17:47 maildrop-man-2.5.4-1.x86_64.rpm
[raven@server ~]$ sudo rpm -ivh /root/rpmbuild/RPMS/x86_64/maildrop-2.5.4-1.x86_64.rpm
[raven@server ~]$ exit
Итак, пакетики установили, теперь запускаем Courier

Код: Выделить всё

[root@server ~]# service courier-imap start
Ставим postfix

Код: Выделить всё

[root@server ~]# yum install postfix
Запускаем сервер MySQL

Код: Выделить всё

[root@server ~]# chkconfig --levels 235 mysqld on
[root@server ~]# service mysqld start
На всякий случай если в системе имеется сендмыл - его надо выключить и выкинуть из загрузки, а postfix соответственно добавить:

Код: Выделить всё

[root@server ~]# chkconfig --levels 235 sendmail off
[root@server ~]# chkconfig --levels 235 postfix on
[root@server ~]# service sendmail stop
[root@server ~]# service postfix start
Также нам понадобится GetMail

Код: Выделить всё

[root@server ~]# cd /tmp
[root@server ~]# wget http://pyropus.ca/software/getmail/old-versions/getmail-4.20.3.tar.gz
[root@server ~]# tar xvfz getmail-4.20.3.tar.gz
[root@server ~]# cd getmail-4.20.3
[root@server ~]# python setup.py build
[root@server ~]# python setup.py install
Настраиваем MySQL и phpMyAdmin
Я настраивал муську используя mysql_secure_installation, хотя другие варианты настройки не возбраняются.

Код: Выделить всё

[root@server tmp]# mysql_secure_installation
 NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
       SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!


 In order to log into MySQL to secure it, we'll need the current
 password for the root user.  If you've just installed MySQL, and
 you haven't set the root password yet, the password will be blank,
 so you should just press enter here.

 Enter current password for root (enter for none):
 OK, successfully used password, moving on...

 Setting the root password ensures that nobody can log into the MySQL
 root user without the proper authorisation.

 Set root password? [Y/n] <-- ENTER
New password: <-- ваш_пароль
Re-enter new password: <-- ваш_пароль
Password updated successfully!
 Reloading privilege tables..
  ... Success!


 By default, a MySQL installation has an anonymous user, allowing anyone
 to log into MySQL without having to have a user account created for
 them.  This is intended only for testing, and to make the installation
 go a bit smoother.  You should remove them before moving into a
 production environment.

 Remove anonymous users? [Y/n] <-- ENTER
 ... Success!

 Normally, root should only be allowed to connect from 'localhost'.  This
 ensures that someone cannot guess at the root password from the network.

 Disallow root login remotely? [Y/n] <-- ENTER
 ... Success!

 By default, MySQL comes with a database named 'test' that anyone can
 access.  This is also intended only for testing, and should be removed
 before moving into a production environment.

 Remove test database and access to it? [Y/n] <-- ENTER
 - Dropping test database...
  ... Success!
  - Removing privileges on test database...
  ... Success!

 Reloading the privilege tables will ensure that all changes made so far
 will take effect immediately.

 Reload privilege tables now? [Y/n] <-- ENTER
 ... Success!

 Cleaning up...

 All done!  If you've completed all of the above steps, your MySQL
 installation should now be secure.

 Thanks for using MySQL!

 [root@server tmp]#
В конфиге Apache для phpMyAdmin (файл /etc/httpd/conf.d/phpmyadmin.conf) коментируем строки ограничивающие доступ

Код: Выделить всё

#
#  Web application to manage MySQL
#

#<Directory "/usr/share/phpmyadmin">
#  Order Deny,Allow
#  Deny from all
#  Allow from 127.0.0.1
#</Directory>

Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin
В конфиге самого phpMyAdmin меняем тип авторизации с cookies на http

Код: Выделить всё

[root@server tmp]# nano /usr/share/phpmyadmin/config.inc.php
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]
Запускаем Apache

Код: Выделить всё

[root@server tmp]# chkconfig --levels 235 httpd on
[root@server tmp]# service httpd start
Теперь можно логиниться в phpMyAdmin по адресу http://192.168.0.100/phpmyadmin/ используя логин root и пароль установленый в процессе mysql_secure_installation

Ставим Amavisd-new, SpamAssassin и ClamAV

Код: Выделить всё

[root@server tmp]# yum install amavisd-new spamassassin clamav clamd unzip bzip2 unrar perl-DBD-mysql
* Во время установки данных пакетов рекомендуется отключить все репозитории кроме epel, centos-base, centos-update и centos-extras

И запускаем все это хозяйство

Код: Выделить всё

[root@server tmp]# sa-update
[root@server tmp]# chkconfig --levels 235 amavisd on
[root@server tmp]# chkconfig --levels 235 clamd on
[root@server tmp]# /usr/bin/freshclam
[root@server tmp]# service amavisd start
[root@server tmp]# service clamd start
Установка модулей mod_php, mod_fcgi/PHP5, и suPHP для Apache2

Код: Выделить всё

[root@server tmp]# yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel mod_fcgid php-cli httpd-devel
Правим /etc/php.ini, где нужно раскоментировать строку cgi.fix_pathinfo=1 и изменить параметры реагирования на ошибки

Код: Выделить всё

[root@server tmp]# vi /etc/php.ini
[...]
;error_reporting = E_ALL & ~E_DEPRECATED
error_reporting = E_ALL & ~E_NOTICE
[...]
; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting
; this to 1 will cause PHP CGI to fix its paths to conform to the spec.  A setting
; of zero causes PHP to behave as before.  Default is 1.  You should fix your scripts
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
; http://www.php.net/manual/en/ini.core.php#ini.cgi.fix-pathinfo
cgi.fix_pathinfo=1
[...]
Ставим suPHP

Код: Выделить всё

[root@server tmp]# wget http://suphp.org/download/suphp-0.7.1.tar.gz
[root@server tmp]# tar xvfz suphp-0.7.1.tar.gz
[root@server suphp-0.7.1]# cd suphp-0.7.1/
[root@server suphp-0.7.1]# ./configure --prefix=/usr --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-apxs=/usr/sbin/apxs --with-apache-user=apache --with-setid-mode=owner --with-php=/usr/bin/php-cgi --with-logfile=/var/log/httpd/suphp_log --enable-SUPHP_USE_USERGROUP=yes
[root@server suphp-0.7.1]# make -j16 (у меня 16 ядер, у вас этот параметр может отличаться, будьте с ним осторожнее!)
[root@server suphp-0.7.1]# make install
[root@server suphp-0.7.1]# cd /tmp
Создаем файл конфигурации для подгрузки модуля в апач

Код: Выделить всё

[root@server tmp]# vi /etc/httpd/conf.d/suphp.conf
LoadModule suphp_module modules/mod_suphp.so
и файл конфигурации самого модуля

Код: Выделить всё

[root@server tmp]# vi /etc/suphp.conf
[global]
;Path to logfile
logfile=/var/log/httpd/suphp.log
;Loglevel
loglevel=info
;User Apache is running as
webserver_user=apache
;Path all scripts have to be in
docroot=/
;Path to chroot() to before executing script
;chroot=/mychroot
; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true
;Send minor error messages to browser
errors_to_browser=false
;PATH environment variable
env_path=/bin:/usr/bin
;Umask to set, specify in octal notation
umask=0077
; Minimum UID
min_uid=100
; Minimum GID
min_gid=100

[handlers]
;Handler for php-scripts
x-httpd-suphp="php:/usr/bin/php-cgi"
;Handler for CGI-scripts
x-suphp-cgi="execute:!self"
И перезапускаем Апач

Код: Выделить всё

[root@server tmp]# service httpd restart
Ruby
Хоть мы и используем FastCGI который сам по себе неплохо контачит с Ruby, но поскольку мы не используем веб-сервер Lighttpd придется настроить все это дело через модуль mod_ruby для апача.
Устанавливаем все необходимое:

Код: Выделить всё

[root@server tmp]# yum install httpd-devel ruby ruby-devel
Качаем сырцы и собираем модуль

Код: Выделить всё

[root@server tmp]# wget http://modruby.net/archive/mod_ruby-1.3.0.tar.gz
[root@server tmp]# tar zxvf mod_ruby-1.3.0.tar.gz
[root@server tmp]# cd mod_ruby-1.3.0/
[root@server mod_ruby-1.3.0]# ./configure.rb --with-apr-includes=/usr/include/apr-1
[root@server mod_ruby-1.3.0]# make -j16
[root@server mod_ruby-1.3.0]# make install
[root@server suphp-0.7.1]# cd /tmp
Создаем конфиг апачу

Код: Выделить всё

[root@server tmp]# vi /etc/httpd/conf.d/ruby.conf
LoadModule ruby_module modules/mod_ruby.so
RubyAddPath /1.8
Опять перезапускаем Апач

Код: Выделить всё

[root@server tmp]# service httpd restart
WebDAV
Необходимые модули уже должны быть подключены в apache. Проверить можно командой:

Код: Выделить всё

[root@server tmp]# cat /etc/httpd/conf/httpd.conf
[...]
LoadModule auth_digest_module modules/mod_auth_digest.so
[...]
LoadModule dav_module modules/mod_dav.so
[...]
LoadModule dav_fs_module modules/mod_dav_fs.so
[...]
В противном случае добавляем их путем правки httpd.conf и перезапускаем Apache

PureFTPd

Устанавливаем PureFTPd

Код: Выделить всё

[root@server tmp]# yum install pure-ftpd
Добавляем в автозапуск и стартуем сервис

Код: Выделить всё

[root@server tmp]# chkconfig --levels 235 pure-ftpd on
[root@server tmp]# service pure-ftpd start
Теперь сконфигурируем PureFTPd с поддержкой TLS, для чего нам потребуется OpenSSL

Код: Выделить всё

[root@server tmp]# yum install openssl
Правим /etc/pure-ftpd/pure-ftpd.conf

Код: Выделить всё

[...]
# This option can accept three values :
# 0 : disable SSL/TLS encryption layer (default).
# 1 : accept both traditional and encrypted sessions.
# 2 : refuse connections that don't use SSL/TLS security mechanisms,
#     including anonymous sessions.
# Do _not_ uncomment this blindly. Be sure that :
# 1) Your server has been compiled with SSL/TLS support (--with-tls),
# 2) A valid certificate is in place,
# 3) Only compatible clients will log in.

TLS                      1
[...]
Создадим папку для сертификатов

Код: Выделить всё

[root@server tmp]# mkdir -p /etc/ssl/private/
Сгенерируем сертификат

Код: Выделить всё

[root@server tmp]# openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
Generating a 2048 bit RSA private key
..............................+++
...................................................................................................+++
writing new private key to '/etc/ssl/private/pure-ftpd.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:KG
State or Province Name (full name) []:Bishkek
Locality Name (eg, city) [Default City]:Bishkek
Organization Name (eg, company) [Default Company Ltd]:Megaline
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:server.test.kg
Email Address []:admin@server.test.kg
И сменим на него права:

Код: Выделить всё

[root@server tmp]# chmod 600 /etc/ssl/private/pure-ftpd.pem
Ну и соответственно рестарт сервера

Код: Выделить всё

[root@server tmp]# service pureftpd restart
BIND
Ставим собсно BIND:

Код: Выделить всё

[root@server tmp]# yum install bind bind-utils
Правим /etc/sysconfig/named в котором нужно закоментить строчку ROOTDIR=/var/named/chroot

Код: Выделить всё

# BIND named process options
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
# Currently, you can use the following options:
#
# ROOTDIR="/var/named/chroot"  --  will run named in a chroot environment.
#                            you must set up the chroot environment
#                            (install the bind-chroot package) before
#                            doing this.
#       NOTE:
#         Those directories are automatically mounted to chroot if they are
#         empty in the ROOTDIR directory. It will simplify maintenance of your
#         chroot environment.
#          - /var/named
#          - /etc/pki/dnssec-keys
#          - /etc/named
#          - /usr/lib64/bind or /usr/lib/bind (architecture dependent)
#
#         Those files are mounted as well if target file doesn't exist in
#         chroot.
#          - /etc/named.conf
#          - /etc/rndc.conf
#          - /etc/rndc.key
#          - /etc/named.rfc1912.zones
#          - /etc/named.dnssec.keys
#          - /etc/named.iscdlv.key
#
#       Don't forget to add "$AddUnixListenSocket /var/named/chroot/dev/log"
#       line to your /etc/rsyslog.conf file. Otherwise your logging becomes
#       broken when rsyslogd daemon is restarted (due update, for example).
#
# OPTIONS="whatever"     --  These additional options will be passed to named
#                            at startup. Don't add -t here, use ROOTDIR instead.
#
# KEYTAB_FILE="/dir/file"    --  Specify named service keytab file (for GSS-TSIG)
#ROOTDIR=/var/named/chroot
Сохраним backup исходного named.conf и напишем свой

Код: Выделить всё

[root@server tmp]# cp /etc/named.conf /etc/named.conf_bak
[root@server tmp]# cat /dev/null > /etc/named.conf
[root@server tmp]# vi /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
        listen-on port 53 { any; };
        listen-on-v6 port 53 { any; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { any; };
        recursion yes;
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
zone "." IN {
        type hint;
        file "named.ca";
};
include "/etc/named.conf.local";
Создаем файл /etc/named.conf.local, куда будет вести запись ISPConfig

Код: Выделить всё

[root@server tmp]# touch /etc/named.conf.local
Создаем условия для автозапуска и стартуем BIND

Код: Выделить всё

[root@server tmp]# chkconfig --levels 235 named on
[root@server tmp]# service named start
Ставим Vlogger, Webalizer, и AWStats

Webalizer и AWStats можно установить из репозиториев:

Код: Выделить всё

[root@server tmp]# yum install webalizer awstats perl-DateTime-Format-HTTP perl-DateTime-Format-Builder
Vlogger ставим из тарболла:

Код: Выделить всё

[root@server tmp]# wget http://n0rp.chemlab.org/vlogger/vlogger-1.3.tar.gz
[root@server tmp]# tar xvfz vlogger-1.3.tar.gz
[root@server tmp]# mv vlogger-1.3/vlogger /usr/sbin/
[root@server tmp]# rm -rf vlogger*
Ставим Jailkit
Jailkit необходим для того чтобы запереть юзеров в их домашней директории, если вы не предусматриваете ssh-доступ к вашему серверу то можете пропустить этот шаг.
Внимание: Jailkit необходимо устанавливать ТОЛЬКО до ISPConfig и ни в коем случае не устанавливать после! Иначе вы рискуете получить огромную дыру в вашей системе!

Код: Выделить всё

[root@server tmp]# wget http://olivier.sessink.nl/jailkit/jailkit-2.14.tar.gz
[root@server tmp]# tar xvfz jailkit-2.14.tar.gz
[root@server tmp]# cd jailkit-2.14
[root@server jailkit-2.14]# ./configure
[root@server jailkit-2.14]# make
[root@server jailkit-2.14]# make install
[root@server jailkit-2.14]# cd ..
[root@server tmp]# rm -rf jailkit-2.14*
Ставим fail2ban
Необязательный, но рекомендуемый пункт:

Код: Выделить всё

[root@server tmp]# yum install fail2ban
[root@server tmp]# chkconfig --levels 235 fail2ban on
[root@server tmp]# service fail2ban start
Ставим rkhunter

Код: Выделить всё

[root@server tmp]# yum install rkhunter
SquirrelMail
Нам понадобится веб-морда для почтаря. Ставим белку)))

Код: Выделить всё

[root@server tmp]# yum install squirrelmail
и перезапускаем Apache:

Код: Выделить всё

[root@server tmp]# service httpd restart
Запустим скрипт конфигуратора и зададим первоначальные настройки:

Код: Выделить всё

[root@server tmp]# /usr/share/squirrelmail/config/conf.pl
We must tell SquirrelMail that we are using Courier-IMAP/-POP3:

SquirrelMail Configuration : Read: config.php (1.4.0)
 ---------------------------------------------------------
 Main Menu --
 1.  Organization Preferences
 2.  Server Settings
 3.  Folder Defaults
 4.  General Options
 5.  Themes
 6.  Address Books
 7.  Message of the Day (MOTD)
 8.  Plugins
 9.  Database
 10. Languages

 D.  Set pre-defined settings for specific IMAP servers

 C   Turn color off
 S   Save data
 Q   Quit

 Command >> <-- D


SquirrelMail Configuration : Read: config.php
 ---------------------------------------------------------
 While we have been building SquirrelMail, we have discovered some
 preferences that work better with some servers that don't work so
 well with others.  If you select your IMAP server, this option will
 set some pre-defined settings for that server.

 Please note that you will still need to go through and make sure
 everything is correct.  This does not change everything.  There are
 only a few settings that this will change.

 Please select your IMAP server:
     bincimap    = Binc IMAP server
     courier     = Courier IMAP server
     cyrus       = Cyrus IMAP server
     dovecot     = Dovecot Secure IMAP server
     exchange    = Microsoft Exchange IMAP server
     hmailserver = hMailServer
     macosx      = Mac OS X Mailserver
     mercury32   = Mercury/32
     uw          = University of Washington's IMAP server
     gmail       = IMAP access to Google mail (Gmail) accounts

     quit        = Do not change anything
 Command >> <-- courier

               imap_server_type = courier
          default_folder_prefix = INBOX.
                   trash_folder = Trash
                    sent_folder = Sent
                   draft_folder = Drafts
             show_prefix_option = false
           default_sub_of_inbox = false
 show_contain_subfolders_option = false
             optional_delimiter = .
                  delete_folder = true

 Press any key to continue... <-- press ENTER


SquirrelMail Configuration : Read: config.php (1.4.0)
 ---------------------------------------------------------
 Main Menu --
 1.  Organization Preferences
 2.  Server Settings
 3.  Folder Defaults
 4.  General Options
 5.  Themes
 6.  Address Books
 7.  Message of the Day (MOTD)
 8.  Plugins
 9.  Database
 10. Languages

 D.  Set pre-defined settings for specific IMAP servers

 C   Turn color off
 S   Save data
 Q   Quit

 Command >> <--S


SquirrelMail Configuration : Read: config.php (1.4.0)
 ---------------------------------------------------------
 Main Menu --
 1.  Organization Preferences
 2.  Server Settings
 3.  Folder Defaults
 4.  General Options
 5.  Themes
 6.  Address Books
 7.  Message of the Day (MOTD)
 8.  Plugins
 9.  Database
 10. Languages

 D.  Set pre-defined settings for specific IMAP servers

 C   Turn color off
 S   Save data
 Q   Quit

 Command >> <--Q
Теперь необходимо внести поправки в файл /etc/squirrelmail/config_local.php в частности закоментировать переменную $default_folder_prefix variable - в противном случае вам будет попадаться сообщение: Query: CREATE "Sent" Reason Given: Invalid mailbox name.

Код: Выделить всё

<?php
/**
 * Local config overrides.
 *
 * You can override the config.php settings here.
 * Don't do it unless you know what you're doing.
 * Use standard PHP syntax, see config.php for examples.
 *
 * @copyright &copy; 2002-2006 The SquirrelMail Project Team
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 * @version $Id: config_local.php,v 1.2 2006/07/11 03:33:47 wtogami Exp $
 * @package squirrelmail
 * @subpackage config
 */
//$default_folder_prefix                = '';
?>
Теперь по адресу http://192.168.0.100/webmail будет доступен интерфейс почтового клиента.

Ну и самое основное - ставим ISPConfig 3

Код: Выделить всё

[root@server tmp]# wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
[root@server tmp]# tar xfz ISPConfig-3-stable.tar.gz
[root@server tmp]# cd ispconfig3_install/install/
[root@server1 install]# php -q install.php


 --------------------------------------------------------------------------------
  _____ ___________   _____              __ _         ____
 |_   _/  ___| ___ \ /  __ \            / _(_)       /__  \
   | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _    _/ /
   | |  `--. \  __/  | |    / _ \| '_ \|  _| |/ _` |  |_ |
  _| |_/\__/ / |     | \__/\ (_) | | | | | | | (_| | ___\ \
  \___/\____/\_|      \____/\___/|_| |_|_| |_|\__, | \____/
                                               __/ |
                                              |___/
 --------------------------------------------------------------------------------


 >> Initial configuration

 Operating System: Redhat or compatible, unknown version.

     Following will be a few questions for primary configuration so be careful.
     Default values are in [brackets] and can be accepted with <ENTER>.
     Tap in "quit" (without the quotes) to stop the installer.


 Select language (en,de) [en]: <-- ENTER

Installation mode (standard,expert) [standard]: <-- ENTER

Full qualified hostname (FQDN) of the server, eg server1.domain.tld  [server1.example.com]: <-- ENTER

MySQL server hostname [localhost]: <-- ENTER

MySQL root username [root]: <-- ENTER

MySQL root password []: <-- ваш_пасс_от_мускуля

MySQL database to create [dbispconfig]: <-- ENTER

MySQL charset [utf8]: <-- ENTER

Generating a 2048 bit RSA private key
 ...................................+++
 .................................................+++
 writing new private key to 'smtpd.key'
 -----
 You are about to be asked to enter information that will be incorporated
 into your certificate request.
 What you are about to enter is what is called a Distinguished Name or a DN.
 There are quite a few fields but you can leave some blank
 For some fields there will be a default value,
 If you enter '.', the field will be left blank.
 -----
 Country Name (2 letter code) [XX]: <-- ENTER
State or Province Name (full name) []: <-- ENTER
Locality Name (eg, city) [Default City]: <-- ENTER
Organization Name (eg, company) [Default Company Ltd]: <-- ENTER
Organizational Unit Name (eg, section) []: <-- ENTER
Common Name (eg, your name or your server's hostname) []: <-- ENTER
Email Address []: <-- ENTER
Configuring Jailkit
 Configuring SASL
 Configuring PAM
 Configuring Courier
 Configuring Spamassassin
 Configuring Amavisd
 Configuring Getmail
 Configuring Pureftpd
 Configuring BIND
 Configuring Apache
 Configuring Vlogger
 Configuring Apps vhost
 Configuring Firewall
 Installing ISPConfig
 ISPConfig Port [8080]: <-- ENTER

Configuring DBServer
 Installing ISPConfig crontab
 no crontab for root
 no crontab for getmail
 Restarting services ...
 Stopping mysqld:                                           [  OK  ]
 Starting mysqld:                                           [  OK  ]
 Shutting down postfix:                                     [  OK  ]
 Starting postfix:                                          [  OK  ]
 Stopping saslauthd:                                        [FAILED]
 Starting saslauthd:                                        [  OK  ]
 Shutting down amavisd: Daemon [16439] terminated by SIGTERM
                                                            [  OK  ]
 amavisd stopped
 Starting amavisd:                                          [  OK  ]

 Stopping clamd.amavisd:                                    [  OK  ]
 Starting clamd.amavisd:                                    [  OK  ]
 Stopping Courier authentication services: authdaemond
 Starting Courier authentication services: authdaemond
 Stopping Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
 Starting Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
 Stopping Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
 Starting Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
 Stopping Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
 Starting Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
 Stopping Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
 Starting Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
 Stopping httpd:                                            [  OK  ]
 [Tue Aug 02 21:19:40 2011] [warn] NameVirtualHost *:80 has no VirtualHosts
 Starting httpd:                                            [  OK  ]
 Stopping pure-ftpd:                                        [  OK  ]
 Starting pure-ftpd:                                        [  OK  ]
 Installation completed.
 [root@server install]#
Теперь наша панелька доступна по адресу http://192.168.0.100:8080/

Изображение

Re: ISPConfig - ставим хостинг [RHEL6]

Добавлено: 01 сен 2011, 15:30
Raven
Добавляем поддержку ASP

Код: Выделить всё

[root@server ~]# perl -MCPAN -e shell
Устанавливаем модули:

Код: Выделить всё

cpan[1]> install CPAN
cpan[1]> install Bundle::Apache::ASP
cpan[1]> install MLDBM
cpan[1]> install MLDBM::Sync
cpan[1]> install Digest::MD5    
cpan[1]> install Apache::ASP
cpan[1]> install Bundle::Apache::ASP::Extra
Создадим конфиг apache /etc/httpd/conf.d/asp.conf

Код: Выделить всё

PerlModule  Apache::ASP
 <Files ~ (\.asp)>    
   SetHandler  perl-script
   PerlHandler Apache::ASP
   PerlSetVar  Global .
   PerlSetVar  StateDir /tmp/asp
 </Files>
В корне любого виртуалхоста создаем файл test.asp следующего содержания:

Код: Выделить всё

<html>  <body>  <%='<b>ASP</b>.net working - OK' %></body>  </html>
Перезапускаем апач и заходим на http://виртуалхост/test.asp Если в ответ апач нам выдаст фразу ASP.net working - OK - значит все у нас получилось, все мы сделали правильно)))

Re: ISPConfig - ставим хостинг [RHEL6]

Добавлено: 26 окт 2013, 01:52
edka1976
Все сделал по вашей статье.
Зайти не удается, вываливается вот с такой ошибкой. Что я сделал не так?

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Reason: You're speaking plain HTTP to an SSL-enabled server port.<br />
Instead use the HTTPS scheme to access this URL, please.<br />
<blockquote>Hint: <a href="https://server.example.com:8080/"><b>ht ... kquote></p>
</body></html>

Re: ISPConfig - ставим хостинг [RHEL6]

Добавлено: 27 окт 2013, 11:15
Raven
Сервер ожидает соединения с портом 8080 по ssl, а полученые данные таковыми не являются. смотрите настройки виртуалхоста для порта 8080. Можно даж сюда их скинуть)))

Re: ISPConfig - ставим хостинг [RHEL6]

Добавлено: 15 дек 2013, 01:36
Vadim
Здравствуйте! Установил Ispconfig по этой статье, не запускается. И перестает работать phpmyadmin.
Предполагаю, что проблема в suexec, но могу ошибаться. Вот логи:
опреационная система CentOS 6.4.

вот что пишет в логах:
errorlog_log httpd
[Sat Dec 14 23:28:16 2013] [info] mod_fcgid: server myserver.ru:/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter(1516) started
[Sat Dec 14 23:28:16 2013] [warn] [client 91.202.255.206] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sat Dec 14 23:28:16 2013] [error] [client 91.202.255.206] Premature end of script headers: index.php
[Sat Dec 14 23:28:22 2013] [debug] fcgid_pm_main.c(357): mod_fcgid: gracefully terminated 1 processes
[Sat Dec 14 23:28:28 2013] [info] mod_fcgid: process /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter(1516) exit(communication error), terminated by calling exit(), return code: 0

лог suexec
2013-12-14 23:28:16]: uid: (5003/ispconfig) gid: (5004/ispconfig) cmd: .php-fcgi-starter

@:suexec -V
-D AP_DOC_ROOT="/var/www"
-D AP_GID_MIN=100
-D AP_HTTPD_USER="apache"
-D AP_LOG_EXEC="/var/log/httpd/suexec.log"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
-D AP_UID_MIN=500
-D AP_USERDIR_SUFFIX="public_html"

Как считаете в чем может быть проблема? Что посмотреть?

Re: ISPConfig - ставим хостинг [RHEL6]

Добавлено: 15 дек 2013, 15:25
Raven
мод fcgid правильно сконфигурирован? директория и т.д.?

Re: ISPConfig - ставим хостинг [RHEL6]

Добавлено: 17 дек 2013, 02:13
Vadim
вот вырезка из файла /etc/httpd/conf/sites-available/ispconfig.vhost - его создает Ispconfig после установки

Код: Выделить всё

<IfModule mod_fcgid.c>
    DocumentRoot /var/www/ispconfig/
    SuexecUserGroup ispconfig ispconfig
    <Directory /var/www/ispconfig/>
      Options -Indexes FollowSymLinks MultiViews +ExecCGI
      AllowOverride AuthConfig Indexes Limit Options FileInfo
      AddHandler fcgid-script .php
      FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
      Order allow,deny
      Allow from all
    </Directory>
    IPCCommTimeout  7200
	MaxRequestLen 15728640
  </IfModule>
вот содержимое файла fcgid.conf
[apache]
# This is the Apache server configuration file for providing FastCGI support
# through mod_fcgid
#
# Documentation is available at
# http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html

LoadModule fcgid_module modules/mod_fcgid.so

# Use FastCGI to process .fcg .fcgi & .fpl scripts
AddHandler fcgid-script fcg fcgi fpl

# Sane place to put sockets and shared memory file
FcgidIPCDir /var/run/mod_fcgid
FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm
[/apache]
каталоги, что прописаны существуют, fcgid_shm создается.

в php.ini
строчка есть

Код: Выделить всё

cgi.fix_pathinfo=1
ну и сам /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter

Код: Выделить всё

#!/bin/sh
PHPRC=/etc/
export PHPRC
export PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_CHILDREN=8 <=== здесь по умолчанию стоит 1  изменил на 8 по рекомендациям что находил в сети в моем случии не помогает
exec /usr/bin/php-cgi -d magic_quotes_gpc=off   -d session.save_path=/usr/local/ispconfig/server/temp
---
/usr/bin/php-cgi - существует /usr/local/ispconfig/server/temp - существует
может, что еще добавить либо упускаю?

Re: ISPConfig - ставим хостинг [RHEL6]

Добавлено: 17 дек 2013, 09:34
Raven
1. Надо больше логов. и из error_log и из suexec_log
2. При выкладывании кода или логов нужно юзать теги. Специально для этого существуют [code] и [code]

Re: ISPConfig - ставим хостинг [RHEL6]

Добавлено: 18 дек 2013, 01:38
Vadim
содержимое error_log запуск httpd обращение по адресу на порт 80 после обращение на порт 8080 на котором установлена ISPConfig

Код: Выделить всё

Tue Dec 17 23:04:16 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Dec 17 23:04:16 2013] [info] Init: Seeding PRNG with 256 bytes of entropy
[Tue Dec 17 23:04:16 2013] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Tue Dec 17 23:04:17 2013] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Tue Dec 17 23:04:17 2013] [info] Init: Initializing (virtual) servers for SSL
[Tue Dec 17 23:04:17 2013] [info] mod_ssl/2.2.15 compiled against Server: Apache/2.2.15, Library: OpenSSL/1.0.0-fips
[Tue Dec 17 23:04:17 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 17 23:04:17 2013] [notice] Digest: done
[Tue Dec 17 23:04:17 2013] [debug] util_ldap.c(2089): LDAP merging Shared Cache conf: shm=0x1aedc88 rmm=0x1aedcb8 for VHOST: testalta2.ru
[Tue Dec 17 23:04:17 2013] [debug] util_ldap.c(2089): LDAP merging Shared Cache conf: shm=0x1aedc88 rmm=0x1aedcb8 for VHOST: testalta2.ru
[Tue Dec 17 23:04:17 2013] [debug] util_ldap.c(2089): LDAP merging Shared Cache conf: shm=0x1aedc88 rmm=0x1aedcb8 for VHOST: testalta2.ru
[Tue Dec 17 23:04:17 2013] [info] APR LDAP: Built with OpenLDAP LDAP SDK
[Tue Dec 17 23:04:17 2013] [info] LDAP: SSL support available
[Tue Dec 17 23:04:17 2013] [info] mod_fcgid: Process manager 4339 started
[Tue Dec 17 23:04:17 2013] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Tue Dec 17 23:04:17 2013] [notice] mod_python: using mutex_directory /tmp 
[Tue Dec 17 23:04:17 2013] [info] Init: Seeding PRNG with 256 bytes of entropy
[Tue Dec 17 23:04:17 2013] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Tue Dec 17 23:04:17 2013] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Tue Dec 17 23:04:17 2013] [debug] ssl_scache_shmcb.c(253): shmcb_init allocated 512000 bytes of shared memory
[Tue Dec 17 23:04:17 2013] [debug] ssl_scache_shmcb.c(272): for 511952 bytes (512000 including header), recommending 32 subcaches, 133 indexes each
[Tue Dec 17 23:04:17 2013] [debug] ssl_scache_shmcb.c(306): shmcb_init_memory choices follow
[Tue Dec 17 23:04:17 2013] [debug] ssl_scache_shmcb.c(308): subcache_num = 32
[Tue Dec 17 23:04:17 2013] [debug] ssl_scache_shmcb.c(310): subcache_size = 15996
[Tue Dec 17 23:04:17 2013] [debug] ssl_scache_shmcb.c(312): subcache_data_offset = 2144
[Tue Dec 17 23:04:17 2013] [debug] ssl_scache_shmcb.c(314): subcache_data_size = 13852
[Tue Dec 17 23:04:17 2013] [debug] ssl_scache_shmcb.c(316): index_num = 133
[Tue Dec 17 23:04:17 2013] [info] Shared memory session cache initialised
[Tue Dec 17 23:04:17 2013] [info] Init: Initializing (virtual) servers for SSL
[Tue Dec 17 23:04:17 2013] [info] mod_ssl/2.2.15 compiled against Server: Apache/2.2.15, Library: OpenSSL/1.0.0-fips
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1833): proxy: grabbed scoreboard slot 0 in child 4340 for worker proxy:reverse
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1949): proxy: initialized single connection worker 0 in child 4340 for (*)
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1833): proxy: grabbed scoreboard slot 0 in child 4341 for worker proxy:reverse
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1852): proxy: worker proxy:reverse already initialized
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1949): proxy: initialized single connection worker 0 in child 4341 for (*)
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1833): proxy: grabbed scoreboard slot 0 in child 4343 for worker proxy:reverse
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1852): proxy: worker proxy:reverse already initialized
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1949): proxy: initialized single connection worker 0 in child 4343 for (*)
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1833): proxy: grabbed scoreboard slot 0 in child 4342 for worker proxy:reverse
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1852): proxy: worker proxy:reverse already initialized
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1949): proxy: initialized single connection worker 0 in child 4342 for (*)
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1833): proxy: grabbed scoreboard slot 0 in child 4344 for worker proxy:reverse
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1852): proxy: worker proxy:reverse already initialized
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1949): proxy: initialized single connection worker 0 in child 4344 for (*)
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1833): proxy: grabbed scoreboard slot 0 in child 4345 for worker proxy:reverse
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1852): proxy: worker proxy:reverse already initialized
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1949): proxy: initialized single connection worker 0 in child 4345 for (*)
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1833): proxy: grabbed scoreboard slot 0 in child 4346 for worker proxy:reverse
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1852): proxy: worker proxy:reverse already initialized
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1949): proxy: initialized single connection worker 0 in child 4346 for (*)
[Tue Dec 17 23:04:17 2013] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fcgid/2.3.9 PHP/5.3.3 mod_python/3.3.1 Python/2.6.6 mod_ruby/1.3.0 Ruby/1.8.7(2011-06-30) mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
[Tue Dec 17 23:04:17 2013] [info] Server built: Aug 13 2013 17:27:11
[Tue Dec 17 23:04:17 2013] [debug] prefork.c(1018): AcceptMutex: sysvsem (default: sysvsem)
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1833): proxy: grabbed scoreboard slot 0 in child 4347 for worker proxy:reverse
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1852): proxy: worker proxy:reverse already initialized
[Tue Dec 17 23:04:17 2013] [debug] proxy_util.c(1949): proxy: initialized single connection worker 0 in child 4347 for (*)
[Tue Dec 17 23:04:37 2013] [error] [client 91.202.254.22] Directory index forbidden by Options directive: /var/www/html/
[Tue Dec 17 23:04:37 2013] [error] [client 91.202.254.22] File does not exist: /var/www/html/favicon.ico
[Tue Dec 17 23:04:45 2013] [info] mod_fcgid: server testalta2.ru:/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter(4350) started
[Tue Dec 17 23:04:45 2013] [warn] [client 91.202.254.22] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Tue Dec 17 23:04:45 2013] [error] [client 91.202.254.22] Premature end of script headers: index.php
[Tue Dec 17 23:04:48 2013] [debug] fcgid_pm_main.c(357): mod_fcgid: gracefully terminated 1 processes
[Tue Dec 17 23:04:54 2013] [info] mod_fcgid: process /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter(4350) exit(communication error), terminated by calling exit(), return code: 0
suexec.log
при каждом обращении на порт 8080 появляется одна строчка

Код: Выделить всё

[2013-12-17 23:04:45]: uid: (5003/ispconfig) gid: (5004/ispconfig) cmd: .php-fcgi-starter
syslog
при каждом обращении на 8080 появляеться:

Код: Выделить всё

]Dec 17 23:04:45 myname kernel: php-cgi[4352]: segfault at c ip 0822df8f sp bfcc6bc0 error 4 in php-cgi[8048000+2f0000
Я пытаюсь все это настроить на vps все делаю в последовательности, что описано ставлю с ноля. Но щас появился домысел. Ставлю я все на платворму I686 ядро 2.6.32-358.6.2.el6.i686
А у вас статья описывает работу на платформе x86_64. Вариант попробовать переустановить все на платформу x86_64 если сейчас ничего не выйдет.

Re: ISPConfig - ставим хостинг [RHEL6]

Добавлено: 18 дек 2013, 08:59
Raven
Vadim писал(а):А у вас статья описывает работу на платформе x86_64.
Кто сказал?!
Raven писал(а):[root@server ~]# rpm -Uvh http://download.fedora.redhat.com/pub/e ... noarch.rpm
Это тогда как?

Ошибка сегментирования... Эт значит что процесс не может правильно разместиться в сегменте памяти. А если просто запустить /usr/bin/php-cgi и /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter SIGSEGV будет? С каких репозиториев установлены пакеты httpd, mod_fcgid и php*?

Можно взглянуть на табличку, которую выдаст команда:

Код: Выделить всё

# yum erase httpd mod_fcgid php
только на вопрос о серьёзности намерений не нужно отвечать Y иначе удалит все к чертовой матери :-D