Для нормальной работы сайта необходимо разрешить JavaScript, включая скрипты с доменов googlesyndication.com и doubleclick.net для отображения системы поиска по сайту и прочих сервисов Google.

Настройка VPS под CentOS 5 на базе OpenVZ. Быстрый старт.

logo

Настройка VPS под CentOS 5 на базе OpenVZ. Быстрый старт. На днях занимались настройкой виртуального сервера (VPS) под CentOS 5 на базе OpenVZ. В данной статье опишем быстрый старт по установке и настройке VPS/VDS под CentOS 5 на базе OpenVZ. Установка и обновление Apache, PHP 5.3, MySQL, phpMyAdmin, ISPConfig.

Виртуализация серверов (VPS) становится всё более популярной, растут проекты, а вместе с ними растут и требования к системным ресурсам которые жестко лимитированы на обычных виртуальных хостингах.

VPS с минимальными параметрами ОС Linux, RAM 192 Мб, HDD 3 Гб, мГц 500 (от одного ядра процессора класса Xeon E5430) можно купить от 29 грн. в месяц, но можно найти и бесплатный, например сдесь Free Cloud VPS или сдесь http://vds64.com/freevds

Итак мы заполучили VPS под CentOS 5 на базе OpenVZ:

remotehelp (94.249.240.244)
Status: Online
Hostname: remotehelp
IP Address: 94.249.240.244
Operating System: CentOS 5 32bit
Disk Space: 10 GB
Memory: 128 MB
Virtualization Type: OpenVZ
VSwap: 640 MB

OpenVZ — реализация технологии виртуализации на уровне операционной системы, которая базируется на ядре Linux. OpenVZ позволяет на одном физическом сервере запускать множество изолированных копий операционной системы, называемых «виртуальные частные серверы» (Virtual Private Servers, VPS) или «виртуальные среды» (Virtual Environments, VE).


Первое что мы должны сделать, так это сменить все пароли установленные по умолчанию на свои. Обычно после создания VPS пароль к SSHтот же, что и от контрольной веб панели но, его можно сменить на вкладке "Root Password" той же контрольной веб панели управления сервером VPS.

Теперь, когда сменили все пароли, подключаемся к нашему VPS через SSH консоль и начинаем пичкать его требуемым нам ПО, а для начала проверим список пакетов уже установленных в системе по умолчанию:

[root@remotehelp ~]# yum list installed
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.de.leaseweb.net
* extras: mirror.de.leaseweb.net
* updates: mirror.de.leaseweb.net
extras | 2.1 kB 00:00
extras/primary_db | 171 kB 00:00
updates | 1.9 kB 00:00
updates/primary_db | 503 kB 00:00
vz-base | 951 B 00:00
vz-base/primary | 1.7 kB 00:00
vz-base 5/5
vz-updates | 951 B 00:00
vz-updates/primary | 1.0 kB 00:00
vz-updates 3/3
Installed Packages
MAKEDEV.i386 3.23-1.2 installed
SysVinit.i386 2.86-17.el5 installed
apr.i386 1.2.7-11.el5_6.5 installed
apr-util.i386 1.2.7-11.el5_5.2 installed
aspell.i386 12:0.60.3-7.1 installed
aspell-en.i386 50:6.0-2.1 installed
audit-libs.i386 1.7.18-2.el5 installed
audit-libs-python.i386 1.7.18-2.el5 installed
authconfig.i386 5.3.21-7.el5 installed
basesystem.noarch 8.0-5.1.1.el5.centos installed
bash.i386 3.2-32.el5 installed
bind.i386 30:9.3.6-16.P1.el5_7.1 installed
bind-libs.i386 30:9.3.6-16.P1.el5_7.1 installed
bind-utils.i386 30:9.3.6-16.P1.el5_7.1 installed
binutils.i386 2.17.50.0.6-14.el5 installed
bzip2.i386 1.0.3-6.el5_5 installed
bzip2-libs.i386 1.0.3-6.el5_5 installed
caching-nameserver.i386 30:9.3.6-16.P1.el5_7.1 installed
centos-release.i386 10:5-7.el5.centos installed
centos-release-notes.i386 5.7-0 installed
chkconfig.i386 1.3.30.2-2.el5 installed
coreutils.i386 5.97-34.el5 installed
cpio.i386 2.6-23.el5_4.1 installed
cracklib.i386 2.8.9-3.3 installed
cracklib-dicts.i386 2.8.9-3.3 installed
crontabs.noarch 1.10-8 installed
cups-libs.i386 1:1.3.7-26.el5_6.1 installed
curl.i386 7.15.5-9.el5_7.4 installed
cyrus-sasl.i386 2.1.22-5.el5_4.3 installed
cyrus-sasl-lib.i386 2.1.22-5.el5_4.3 installed
db4.i386 4.3.29-10.el5_5.2 installed
dbus.i386 1.1.2-16.el5_7 installed
dbus-libs.i386 1.1.2-16.el5_7 installed
device-mapper.i386 1.02.63-4.el5 installed
device-mapper-event.i386 1.02.63-4.el5 installed
device-mapper-multipath.i386 0.4.7-46.el5_7.2 installed
dhclient.i386 12:3.0.5-29.el5_7.1 installed
dhcpv6-client.i386 1.0.10-20.el5 installed
diffutils.i386 2.8.1-15.2.3.el5 installed
dmidecode.i386 1:2.11-1.el5 installed
dmraid.i386 1.0.0.rc13-65.el5 installed
dmraid-events.i386 1.0.0.rc13-65.el5 installed
e2fsprogs.i386 1.39-33.el5 installed
e2fsprogs-libs.i386 1.39-33.el5 installed
ed.i386 0.2-39.el5_2 installed
elfutils.i386 0.137-3.el5 installed
elfutils-libelf.i386 0.137-3.el5 installed
elfutils-libs.i386 0.137-3.el5 installed
ethtool.i386 6-4.el5 installed
expat.i386 1.95.8-8.3.el5_5.3 installed
fetchmail.i386 6.3.6-1.1.el5_3.1 installed
file.i386 4.17-15.el5_3.1 installed
filesystem.i386 2.4.0-3.el5.centos installed
findutils.i386 1:4.2.27-6.el5 installed
finger.i386 0.17-33 installed
finger-server.i386 0.17-33 installed
fipscheck.i386 1.2.0-1.el5 installed
fipscheck-lib.i386 1.2.0-1.el5 installed
ftp.i386 0.17-35.el5 installed
gawk.i386 3.1.5-14.el5 installed
gdbm.i386 1.8.0-26.2.1.el5_6.1 installed
glib2.i386 2.12.3-4.el5_3.1 installed
glibc.i686 2.5-65.el5_7.3 installed
glibc-common.i386 2.5-65.el5_7.3 installed
gnupg.i386 1.4.5-14.el5_5.1 installed
gnutls.i386 1.4.1-3.el5_4.8 installed
gpm.i386 1.20.1-74.1 installed
grep.i386 2.5.1-55.el5 installed
groff.i386 1.18.1.1-11.1 installed
gzip.i386 1.3.5-13.el5.centos installed
hesiod.i386 3.1.0-8 installed
hmaccalc.i386 0.9.6-3.el5 installed
httpd.i386 2.2.3-53.el5.centos.3 installed
info.i386 4.8-14.el5 installed
initscripts.i386 8.45.38-2.el5.centos installed
iproute.i386 2.6.18-11.el5 installed
iptables.i386 1.3.5-5.3.el5_4.1 installed
iputils.i386 20020927-46.el5 installed
iscsi-initiator-utils.i386 6.2.0.872-10.el5 installed
jwhois.i386 3.2.3-12.el5 installed
keyutils-libs.i386 1.2-1.el5 installed
kpartx.i386 0.4.7-46.el5_7.2 installed
krb5-libs.i386 1.6.1-63.el5_7 installed
less.i386 436-7.el5 installed
libacl.i386 2.2.39-6.el5 installed
libattr.i386 2.4.32-1.1 installed
libcap.i386 1.10-26 installed
libgcc.i386 4.1.2-51.el5 installed
libgcrypt.i386 1.4.4-5.el5 installed
libgpg-error.i386 1.4-2 installed
libidn.i386 0.6.5-1.1 installed
libjpeg.i386 6b-37 installed
libpng.i386 2:1.2.10-7.1.el5_7.5 installed
libselinux.i386 1.33.4-5.7.el5 installed
libselinux-python.i386 1.33.4-5.7.el5 installed
libselinux-utils.i386 1.33.4-5.7.el5 installed
libsemanage.i386 1.9.1-4.4.el5 installed
libsepol.i386 1.15.2-3.el5 installed
libsmbclient.i386 3.0.33-3.29.el5_7.4 installed
libstdc++.i386 4.1.2-51.el5 installed
libsysfs.i386 2.1.0-1.el5 installed
libtermcap.i386 2.0.8-46.1 installed
libtiff.i386 3.8.2-7.el5_6.7 installed
libusb.i386 0.1.12-5.1 installed
libuser.i386 0.54.7-2.1.el5_5.2 installed
libutempter.i386 1.1.4-4.el5 installed
libxml2.i386 2.6.26-2.1.12.el5_7.2 installed
lm_sensors.i386 2.10.7-9.el5 installed
logrotate.i386 3.7.4-12 installed
lsof.i386 4.78-3 installed
lvm2.i386 2.02.84-6.el5_7.2 installed
lynx.i386 2.8.5-28.1.el5_2.1 installed
m2crypto.i386 0.16-8.el5 installed
m4.i386 1.4.5-3.el5.1 installed
mailcap.noarch 2.1.23-1.fc6 installed
mailx.i386 8.1.1-44.2.2 installed
make.i386 1:3.81-3.el5 installed
man.i386 1.6d-2.el5 installed
man-pages.noarch 2.39-17.el5 installed
mcstrans.i386 0.2.11-3.el5 installed
mingetty.i386 1.07-5.2.2 installed
mkinitrd.i386 5.1.19.6-71.el5_7.1 installed
mktemp.i386 3:1.5-23.2.2 installed
mlocate.i386 0.15-1.el5.2 installed
module-init-tools.i386 3.3-0.pre3.1.60.el5_5.1 installed
nash.i386 5.1.19.6-71.el5_7.1 installed
ncompress.i386 4.2.4-47 installed
ncurses.i386 5.5-24.20060715 installed
net-snmp.i386 1:5.3.2.2-14.el5_7.1 installed
net-snmp-libs.i386 1:5.3.2.2-14.el5_7.1 installed
net-snmp-utils.i386 1:5.3.2.2-14.el5_7.1 installed
net-tools.i386 1.60-81.el5 installed
newt.i386 0.52.2-15.el5 installed
nscd.i386 2.5-65.el5_7.3 installed
nspr.i386 4.8.8-1.el5_7 installed
nss.i386 3.12.10-7.el5_7 installed
ntsysv.i386 1.3.30.2-2.el5 installed
openldap.i386 2.3.43-12.el5_7.10 installed
openssh.i386 4.3p2-72.el5_7.5 installed
openssh-clients.i386 4.3p2-72.el5_7.5 installed
openssh-server.i386 4.3p2-72.el5_7.5 installed
openssl.i686 0.9.8e-20.el5_7.1.0.1.centos installed
pam.i386 0.99.6.2-6.el5_5.2 installed
passwd.i386 0.73-2 installed
pcre.i386 6.6-6.el5_6.1 installed
perl.i386 4:5.8.8-32.el5_7.6 installed
perl-Convert-ASN1.noarch 0.20-1.1 installed
policycoreutils.i386 1.33.12-14.8.el5 installed
popt.i386 1.10.2.3-22.el5_7.2 installed
portmap.i386 4.0-65.2.2.1 installed
postgresql-libs.i386 8.1.23-1.el5_7.3 installed
procmail.i386 3.22-17.1.el5.centos installed
procps.i386 3.2.7-17.el5 installed
psmisc.i386 22.2-7.el5_6.2 installed
python.i386 2.4.3-44.el5_7.1 installed
python-elementtree.i386 1.2.6-5 installed
python-iniparse.noarch 0.2.3-4.el5 installed
python-libs.i386 2.4.3-44.el5_7.1 installed
python-sqlite.i386 1.1.7-1.2.1 installed
python-urlgrabber.noarch 3.1.0-6.el5 installed
quota.i386 1:3.13-5.el5 installed
readline.i386 5.1-3.el5 installed
rootfiles.noarch 8.1-1.1.1 installed
rpm.i386 4.4.2.3-22.el5_7.2 installed
rpm-libs.i386 4.4.2.3-22.el5_7.2 installed
rpm-python.i386 4.4.2.3-22.el5_7.2 installed
rsync.i386 3.0.6-4.el5_7.1 installed
samba.i386 3.0.33-3.29.el5_7.4 installed
samba-client.i386 3.0.33-3.29.el5_7.4 installed
samba-common.i386 3.0.33-3.29.el5_7.4 installed
samba-swat.i386 3.0.33-3.29.el5_7.4 installed
screen.i386 4.0.3-4.el5 installed
sed.i386 4.1.5-8.el5 installed
sendmail.i386 8.13.8-8.1.el5_7 installed
sendmail-cf.i386 8.13.8-8.1.el5_7 installed
sendmail-doc.i386 8.13.8-8.1.el5_7 installed
setup.noarch 2.5.58-7.el5 installed
setuptool.i386 1.19.2-1.el5.centos installed
sgpio.i386 1.2.0_10-2.el5 installed
shadow-utils.i386 2:4.0.17-18.el5_6.1 installed
sharutils.i386 4.6.1-2 installed
slang.i386 2.0.6-4.el5 installed
sqlite.i386 3.3.6-5 installed
stunnel.i386 4.15-2.el5.1 installed
sudo.i386 1.7.2p1-10.el5 installed
sysklogd.i386 1.4.1-46.el5 installed
talk.i386 0.17-31.el5 installed
talk-server.i386 0.17-31.el5 installed
tar.i386 2:1.15.1-30.el5 installed
tcp_wrappers.i386 7.6-40.7.el5 installed
tcpdump.i386 14:3.9.4-15.el5 installed
tcsh.i386 6.14-17.el5_5.2 installed
telnet.i386 1:0.17-39.el5 installed
termcap.noarch 1:5.5-1.20060701.1 installed
time.i386 1.7-27.2.2 installed
tmpwatch.i386 2.9.7-1.1.el5.5 installed
traceroute.i386 3:2.0.1-6.el5 installed
tzdata.i386 2011l-4.el5 installed
udev.i386 095-14.27.el5_7.1 installed
unzip.i386 5.52-3.el5 installed
usermode.i386 1.88-3.el5.2 installed
util-linux.i386 2.13-0.56.el5 installed
vim-common.i386 2:7.0.109-7.el5 installed
vim-enhanced.i386 2:7.0.109-7.el5 installed
vim-minimal.i386 2:7.0.109-7.el5 installed
vixie-cron.i386 4:4.1-77.el5_4.1 installed
vzdev.noarch 1.0-7.swsoft installed
vzdummy-apache.noarch 1.0-1.swsoft installed
vzdummy-glibc.noarch 1.0-1.swsoft installed
vzdummy-jre-el5.noarch 1.0-1.swsoft installed
vzdummy-kernel-el5.noarch 2.0-1.ce.swsoft installed
wget.i386 1.11.4-2.el5_4.1 installed
which.i386 2.16-7 installed
xinetd.i386 2:2.3.14-13.el5 installed
yum.noarch 3.2.22-37.el5.centos installed
yum-fastestmirror.noarch 1.1.16-16.el5.centos installed
yum-metadata-parser.i386 1.1.2-3.el5.centos installed
zlib.i386 1.2.3-4.el5 installed
[root@remotehelp ~]#

Веб сервер "httpd.i386 - 2.2.3-53.el5.centos.3" уже установлен, домашний/публичный веб каталог расположен в /var/www/html но, как видим, для полного счастья нам не хватает MySQL сервера, PHP и phpMyAdmin.

Список всех доступных для установки пакетов получаем в файл и забираем его по SFTP для дальнейшего анализа:

[root@remotehelp ~]# yum list > available_pack.txt

Потому как Apache (httpd) уже установлен и запущен по умолчанию, то сразу проверим обновления для уже установленного веб сервера Apache (httpd) для устранения возможных дыр, а всю систему обновим уже под занавес:

[root@remotehelp ~]# yum update httpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.de.leaseweb.net
* extras: mirror.de.leaseweb.net
* updates: mirror.de.leaseweb.net
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package httpd.i386 0:2.2.3-65.el5.centos set to be updated
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
httpd i386 2.2.3-65.el5.centos updates 1.2 M
 
Transaction Summary
================================================================================
Install 0 Package(s)
Upgrade 1 Package(s)
 
Total download size: 1.2 M
Is this ok [y/N]: y
Downloading Packages:
httpd-2.2.3-65.el5.centos.i386.rpm | 1.2 MB 00:01
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897
updates/gpgkey | 1.5 kB 00:00
Importing GPG key 0xE8562897 "CentOS-5 Key (CentOS 5 Official Signing Key) 
<centos-5-key@centos.org>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : httpd 1/2
Cleanup : httpd 2/2
 
Updated:
httpd.i386 0:2.2.3-65.el5.centos
 
Complete!
[root@remotehelp ~]#
 
и добавим его в автозапуск:
[root@remotehelp ~]# chkconfig --list httpd
[root@remotehelp ~]# chkconfig --add httpd
[root@remotehelp ~]# chkconfig --level 345 httpd on

Ставим MySQL сервер баз данных под CentOS 5:

[root@remotehelp ~]# yum install mysql-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.de.leaseweb.net
* extras: mirror.de.leaseweb.net
* updates: mirror.de.leaseweb.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-server.i386 0:5.0.95-1.el5_7.1 set to be updated
--> Processing Dependency: mysql = 5.0.95-1.el5_7.1 for package: mysql-server
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server
--> Processing Dependency: perl(DBI) for package: mysql-server
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15) for package:
mysql-server
--> Processing Dependency: perl-DBI for package: mysql-server
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15) for package
: mysql-server
--> Processing Dependency: libmysqlclient.so.15 for package: mysql-server
--> Processing Dependency: libmysqlclient_r.so.15 for package: mysql-server
--> Running transaction check
---> Package mysql.i386 0:5.0.95-1.el5_7.1 set to be updated
---> Package perl-DBD-MySQL.i386 0:3.0007-2.el5 set to be updated
---> Package perl-DBI.i386 0:1.52-2.el5 set to be updated
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
mysql-server i386 5.0.95-1.el5_7.1 updates 9.8 M
Installing for dependencies:
mysql i386 5.0.95-1.el5_7.1 updates 4.9 M
perl-DBD-MySQL i386 3.0007-2.el5 base 148 k
perl-DBI i386 1.52-2.el5 base 600 k
 
Transaction Summary
================================================================================
Install 4 Package(s)
Upgrade 0 Package(s)
 
Total download size: 15 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): perl-DBD-MySQL-3.0007-2.el5.i386.rpm | 148 kB 00:00
(2/4): perl-DBI-1.52-2.el5.i386.rpm | 600 kB 00:00
(3/4): mysql-5.0.95-1.el5_7.1.i386.rpm | 4.9 MB 00:05
(4/4): mysql-server-5.0.95-1.el5_7.1.i386.rpm | 9.8 MB 00:09
--------------------------------------------------------------------------------
Total 937 kB/s | 15 MB 00:16
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : perl-DBI 1/4
Installing : mysql 2/4
Installing : perl-DBD-MySQL 3/4
Installing : mysql-server 4/4
 
Installed:
mysql-server.i386 0:5.0.95-1.el5_7.1
 
Dependency Installed:
mysql.i386 0:5.0.95-1.el5_7.1 perl-DBD-MySQL.i386 0:3.0007-2.el5
perl-DBI.i386 0:1.52-2.el5
 
Complete!
[root@remotehelp ~]#

Запускаем MySQL сервер под CentOS 5:

[root@remotehelp ~]# service mysqld start
Initializing MySQL database: Installing MySQL system tables...
OK
Filling help tables...
OK
 
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
 
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h remotehelp password 'new-password'
 
Alternatively you can run:
/usr/bin/mysql_secure_installation
 
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
 
See the manual for more instructions.
 
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
 
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
 
Please report any problems with the /usr/bin/mysqlbug script!
 
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
[ OK ]
Starting MySQL: [ OK ]
[root@remotehelp ~]#

Следуя рекомендациям устанавливаем пароль MySQL сервера для root, где 'new-password' наш желаемый пароль:

[root@remotehelp ~]# /usr/bin/mysqladmin -u root password 'new-password'
[root@remotehelp ~]# /usr/bin/mysqladmin -u root -h remotehelp password 'new-password'

Проверяем и включаем на автозапуск MySQL сервера под CentOS 5:

[root@remotehelp ~]# chkconfig --list mysqld
[root@remotehelp ~]# chkconfig --level 345 mysqld on

Установка PHP 5.3 под CentOS 5

Если установлен PHP 5.1, удаляем его: yum erase php php-bcmath php-cli php-common php-dba php-devel php-gd php-imap php-ldap php-mbstring php-mcrypt php-mhash php-mssql php-mysql php-ncurses php-odbc php-pdo php-pear.noarch php-pecl-Fileinfo php-pecl-memcache php-pgsql php-readline php-snmp php-soap php-xml php-xmlrpc

Устанавливаем базовый пакет PHP 5.3 под CentOS 5:

[root@remotehelp ~]# yum install php53
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.de.leaseweb.net
* extras: mirror.de.leaseweb.net
* updates: mirror.de.leaseweb.net
base | 1.1 kB 00:00
extras | 2.1 kB 00:00
updates | 1.9 kB 00:00
vz-base | 951 B 00:00
vz-updates | 951 B 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php53.i386 0:5.3.3-13.el5_8 set to be updated
--> Processing Dependency: php53-common = 5.3.3-13.el5_8 for package: php53
--> Processing Dependency: php53-cli = 5.3.3-13.el5_8 for package: php53
--> Processing Dependency: libgmp.so.3 for package: php53
--> Running transaction check
---> Package gmp.i386 0:4.1.4-10.el5 set to be updated
---> Package php53-cli.i386 0:5.3.3-13.el5_8 set to be updated
---> Package php53-common.i386 0:5.3.3-13.el5_8 set to be updated
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
php53 i386 5.3.3-13.el5_8 updates 1.3 M
Installing for dependencies:
gmp i386 4.1.4-10.el5 base 664 k
php53-cli i386 5.3.3-13.el5_8 updates 2.5 M
php53-common i386 5.3.3-13.el5_8 updates 605 k
 
Transaction Summary
================================================================================
Install 4 Package(s)
Upgrade 0 Package(s)
 
Total download size: 5.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): php53-common-5.3.3-13.el5_8.i386.rpm | 605 kB 00:00
(2/4): gmp-4.1.4-10.el5.i386.rpm | 664 kB 00:00
(3/4): php53-5.3.3-13.el5_8.i386.rpm | 1.3 MB 00:01
(4/4): php53-cli-5.3.3-13.el5_8.i386.rpm | 2.5 MB 00:02
--------------------------------------------------------------------------------
Total 1.0 MB/s | 5.0 MB 00:05
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : gmp 1/4
Installing : php53-common 2/4
Installing : php53-cli 3/4
Installing : php53 4/4
 
Installed:
php53.i386 0:5.3.3-13.el5_8
 
Dependency Installed:
gmp.i386 0:4.1.4-10.el5 php53-cli.i386 0:5.3.3-13.el5_8
php53-common.i386 0:5.3.3-13.el5_8
 
Complete!
[root@remotehelp ~]#

Устанавливаем все расширения для PHP 5.3 под CentOS 5:

[root@remotehelp ~]# yum install php53-devel php53-gd php53-mbstring php53-mysql \
    php53-pdo php53-soap php53-xml php53-xmlrpc php53-bcmath
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.de.leaseweb.net
* extras: mirror.de.leaseweb.net
* updates: mirror.de.leaseweb.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php53-bcmath.i386 0:5.3.3-13.el5_8 set to be updated
---> Package php53-gd.i386 0:5.3.3-13.el5_8 set to be updated
--> Processing Dependency: libXpm.so.4 for package: php53-gd
--> Processing Dependency: libfreetype.so.6 for package: php53-gd
--> Processing Dependency: libX11.so.6 for package: php53-gd
---> Package php53-mbstring.i386 0:5.3.3-13.el5_8 set to be updated
---> Package php53-mysql.i386 0:5.3.3-13.el5_8 set to be updated
---> Package php53-pdo.i386 0:5.3.3-13.el5_8 set to be updated
---> Package php53-soap.i386 0:5.3.3-13.el5_8 set to be updated
---> Package php53-xml.i386 0:5.3.3-13.el5_8 set to be updated
--> Processing Dependency: libexslt.so.0 for package: php53-xml
--> Processing Dependency: libxslt.so.1 for package: php53-xml
---> Package php53-xmlrpc.i386 0:5.3.3-13.el5_8 set to be updated
--> Running transaction check
---> Package freetype.i386 0:2.2.1-31.el5_8.1 set to be updated
---> Package libX11.i386 0:1.0.3-11.el5_7.1 set to be updated
--> Processing Dependency: xorg-x11-filesystem >= 0.99.2-3 for package: libX11
--> Processing Dependency: libXau.so.6 for package: libX11
--> Processing Dependency: libXdmcp.so.6 for package: libX11
---> Package libXpm.i386 0:3.5.5-3 set to be updated
---> Package libxslt.i386 0:1.1.17-2.el5_2.2 set to be updated
--> Running transaction check
---> Package libXau.i386 0:1.0.1-3.1 set to be updated
---> Package libXdmcp.i386 0:1.0.1-2.1 set to be updated
---> Package xorg-x11-filesystem.noarch 0:7.1-2.fc6 set to be updated
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
php53-bcmath i386 5.3.3-13.el5_8 updates 43 k
php53-gd i386 5.3.3-13.el5_8 updates 109 k
php53-mbstring i386 5.3.3-13.el5_8 updates 1.2 M
php53-mysql i386 5.3.3-13.el5_8 updates 88 k
php53-pdo i386 5.3.3-13.el5_8 updates 67 k
php53-soap i386 5.3.3-13.el5_8 updates 147 k
php53-xml i386 5.3.3-13.el5_8 updates 113 k
php53-xmlrpc i386 5.3.3-13.el5_8 updates 53 k
Installing for dependencies:
freetype i386 2.2.1-31.el5_8.1 updates 312 k
libX11 i386 1.0.3-11.el5_7.1 base 797 k
libXau i386 1.0.1-3.1 base 18 k
libXdmcp i386 1.0.1-2.1 base 19 k
libXpm i386 3.5.5-3 base 45 k
libxslt i386 1.1.17-2.el5_2.2 base 485 k
xorg-x11-filesystem noarch 7.1-2.fc6 base 5.4 k
 
Transaction Summary
================================================================================
Install 15 Package(s)
Upgrade 0 Package(s)
 
Total download size: 3.4 M
Is this ok [y/N]: y
Downloading Packages:
(1/15): xorg-x11-filesystem-7.1-2.fc6.noarch.rpm | 5.4 kB 00:00
(2/15): libXau-1.0.1-3.1.i386.rpm | 18 kB 00:00
(3/15): libXdmcp-1.0.1-2.1.i386.rpm | 19 kB 00:00
(4/15): php53-bcmath-5.3.3-13.el5_8.i386.rpm | 43 kB 00:00
(5/15): libXpm-3.5.5-3.i386.rpm | 45 kB 00:00
(6/15): php53-xmlrpc-5.3.3-13.el5_8.i386.rpm | 53 kB 00:00
(7/15): php53-pdo-5.3.3-13.el5_8.i386.rpm | 67 kB 00:00
(8/15): php53-mysql-5.3.3-13.el5_8.i386.rpm | 88 kB 00:00
(9/15): php53-gd-5.3.3-13.el5_8.i386.rpm | 109 kB 00:00
(10/15): php53-xml-5.3.3-13.el5_8.i386.rpm | 113 kB 00:00
(11/15): php53-soap-5.3.3-13.el5_8.i386.rpm | 147 kB 00:00
(12/15): freetype-2.2.1-31.el5_8.1.i386.rpm | 312 kB 00:00
(13/15): libxslt-1.1.17-2.el5_2.2.i386.rpm | 485 kB 00:00
(14/15): libX11-1.0.3-11.el5_7.1.i386.rpm | 797 kB 00:00
(15/15): php53-mbstring-5.3.3-13.el5_8.i386.rpm | 1.2 MB 00:01
--------------------------------------------------------------------------------
Total 606 kB/s | 3.4 MB 00:05
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php53-pdo 1/15
Installing : libXdmcp 2/15
Installing : freetype 3/15
Installing : libXau 4/15
Installing : libxslt 5/15
Installing : php53-xml 6/15
Installing : php53-mysql 7/15
Installing : php53-mbstring 8/15
Installing : php53-bcmath 9/15
Installing : php53-soap 10/15
Installing : php53-xmlrpc 11/15
Installing : xorg-x11-filesystem 12/15
Installing : libX11 13/15
Installing : libXpm 14/15
Installing : php53-gd 15/15
 
Installed:
php53-bcmath.i386 0:5.3.3-13.el5_8 php53-gd.i386 0:5.3.3-13.el5_8
php53-mbstring.i386 0:5.3.3-13.el5_8 php53-mysql.i386 0:5.3.3-13.el5_8
php53-pdo.i386 0:5.3.3-13.el5_8 php53-soap.i386 0:5.3.3-13.el5_8
php53-xml.i386 0:5.3.3-13.el5_8 php53-xmlrpc.i386 0:5.3.3-13.el5_8
 
Dependency Installed:
freetype.i386 0:2.2.1-31.el5_8.1 libX11.i386 0:1.0.3-11.el5_7.1
libXau.i386 0:1.0.1-3.1 libXdmcp.i386 0:1.0.1-2.1
libXpm.i386 0:3.5.5-3 libxslt.i386 0:1.1.17-2.el5_2.2
xorg-x11-filesystem.noarch 0:7.1-2.fc6
 
Complete!
[root@remotehelp ~]#
 
[root@remotehelp ~]# yum install libmcrypt-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.de.leaseweb.net
* extras: mirror.de.leaseweb.net
* updates: mirror.de.leaseweb.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package libmcrypt-devel.i386 0:2.5.8-4.el5.centos set to be updated
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
libmcrypt-devel i386 2.5.8-4.el5.centos extras 10 k
 
Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
 
Total download size: 10 k
Is this ok [y/N]: y
Downloading Packages:
libmcrypt-devel-2.5.8-4.el5.centos.i386.rpm | 10 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libmcrypt-devel 1/1
 
Installed:
libmcrypt-devel.i386 0:2.5.8-4.el5.centos
 
Complete!
[root@remotehelp ~]#

Компиляция и установка модуля mcrypt для PHP 5.3 под CentOS 5

По умолчанию php53-mcrypt для PHP 5.3 под CentOS 5 отсутствует в репозитории по умолчанию, а использование модулей php53-mcrypt из сторонних репозиториев скомпилированных под другие ОС чревато проблемами и поэтому php53-mcrypt для PHP 5.3 нужно скомпилировать из исходных кодов под CentOS 5, загружаем и распаковываем в домашний каталог /root:

[root@remotehelp ~]# wget http://museum.php.net/php5/php-5.3.3.tar.gz
........................
[root@remotehelp ~]# tar xf php-5.3.3.tar.gz

Теперь установим компилятор, так как в CentOS 5 он отсутствует по умолчанию:

[root@remotehelp mcrypt]# yum install gcc

Можно начинать процес компиляции. Конфигурируем:

[root@remotehelp ~]# cd php-5.3.3/ext/mcrypt/
[root@remotehelp mcrypt]# phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
[root@remotehelp mcrypt]# aclocal
configure.in:8: warning: LT_AC_PROG_SED is m4_require'd but is not m4_defun'd
configure.in:8: LT_AC_PROG_SED is required by...
acinclude.m4:2683: PHP_CONFIG_NICE is expanded from...
configure.in:8: the top level
 
[root@remotehelp mcrypt]# ./configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking target system type... i686-redhat-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/i
nclude/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/ph
p/ext/date/lib
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate
PHP parsers.
checking for gawk... gawk
checking for mcrypt support... yes, shared
checking for libmcrypt version... >= 2.5.6
checking for mcrypt_module_open in -lmcrypt... no
checking for mcrypt_module_open in -lmcrypt... yes
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
configure: creating ./config.status
config.status: creating config.h
[root@remotehelp mcrypt]#

Компилируем mcrypt.so

[root@remotehelp mcrypt]# make
/bin/sh /root/php-5.3.3/ext/mcrypt/libtool --mode=compile cc -I. -I/root/php-5.
3.3/ext/mcrypt -DPHP_ATOM_INC -I/root/php-5.3.3/ext/mcrypt/include -I/root/php-5
.3.3/ext/mcrypt/main -I/root/php-5.3.3/ext/mcrypt -I/usr/include/php -I/usr/incl
ude/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/
ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/php-5.3.
3/ext/mcrypt/mcrypt.c -o mcrypt.lo
mkdir .libs
cc -I. -I/root/php-5.3.3/ext/mcrypt -DPHP_ATOM_INC -I/root/php-5.3.3/ext/mcrypt
/include -I/root/php-5.3.3/ext/mcrypt/main -I/root/php-5.3.3/ext/mcrypt -I/usr/i
nclude/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Ze
nd -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2
-c /root/php-5.3.3/ext/mcrypt/mcrypt.c -fPIC -DPIC -o .libs/mcrypt.o
/bin/sh /root/php-5.3.3/ext/mcrypt/libtool --mode=compile cc -I. -I/root/php-5.
3.3/ext/mcrypt -DPHP_ATOM_INC -I/root/php-5.3.3/ext/mcrypt/include -I/root/php-5
.3.3/ext/mcrypt/main -I/root/php-5.3.3/ext/mcrypt -I/usr/include/php -I/usr/incl
ude/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/
ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/php-5.3.
3/ext/mcrypt/mcrypt_filter.c -o mcrypt_filter.lo
cc -I. -I/root/php-5.3.3/ext/mcrypt -DPHP_ATOM_INC -I/root/php-5.3.3/ext/mcrypt
/include -I/root/php-5.3.3/ext/mcrypt/main -I/root/php-5.3.3/ext/mcrypt -I/usr/i
nclude/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Ze
nd -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2
-c /root/php-5.3.3/ext/mcrypt/mcrypt_filter.c -fPIC -DPIC -o .libs/mcrypt_filt
er.o
/root/php-5.3.3/ext/mcrypt/mcrypt_filter.c: In function 'php_mcrypt_filter_creat
e':
/root/php-5.3.3/ext/mcrypt/mcrypt_filter.c:210: warning: passing argument 1 of '
mcrypt_module_open' discards qualifiers from pointer target type
/bin/sh /root/php-5.3.3/ext/mcrypt/libtool --mode=link cc -DPHP_ATOM_INC -I/root
/php-5.3.3/ext/mcrypt/include -I/root/php-5.3.3/ext/mcrypt/main -I/root/php-5.3.
3/ext/mcrypt -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM
-I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
-DHAVE_CONFIG_H -g -O2 -o mcrypt.la -export-dynamic -avoid-version -prefer-pi
c -module -rpath /root/php-5.3.3/ext/mcrypt/modules mcrypt.lo mcrypt_filter.lo
-lmcrypt
cc -shared .libs/mcrypt.o .libs/mcrypt_filter.o -lmcrypt -Wl,-soname -Wl,mcry
pt.so -o .libs/mcrypt.so
creating mcrypt.la
(cd .libs && rm -f mcrypt.la && ln -s ../mcrypt.la mcrypt.la)
/bin/sh /root/php-5.3.3/ext/mcrypt/libtool --mode=install cp ./mcrypt.la /root/p
hp-5.3.3/ext/mcrypt/modules
cp ./.libs/mcrypt.so /root/php-5.3.3/ext/mcrypt/modules/mcrypt.so
cp ./.libs/mcrypt.lai /root/php-5.3.3/ext/mcrypt/modules/mcrypt.la
PATH="$PATH:/sbin" ldconfig -n /root/php-5.3.3/ext/mcrypt/modules
----------------------------------------------------------------------
Libraries have been installed in:
/root/php-5.3.3/ext/mcrypt/modules
 
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
 
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 
Build complete.
Don't forget to run 'make test'.
 
[root@remotehelp mcrypt]#

Проверяем mcrypt.so

[root@remotehelp mcrypt]# make test
 
Build complete.
Don't forget to run 'make test'.
 
 
=====================================================================
PHP : /usr/bin/php
PHP_SAPI : cli
PHP_VERSION : 5.3.3
ZEND_VERSION: 2.3.0
PHP_OS : Linux - Linux remotehelp 2.6.32-042stab055.10 #1 SMP Thu May 10 15
:38:32 MSD 2012 i686
INI actual : /root/php-5.3.3/ext/mcrypt/tmp-php.ini
More .INIs :
CWD : /root/php-5.3.3/ext/mcrypt
Extra dirs :
VALGRIND : Not used
=====================================================================
TIME START 2012-07-04 19:47:38
=====================================================================
PASS Test for blowfish compatibility [tests/blowfish.phpt]
PASS Bug #35496 (Crash in mcrypt_generic()/mdecrypt_generic() without proper ini
t). [tests/bug35496.phpt]
PASS Bug #37595 (mcrypt_generic calculates data length in wrong way) [tests/bug3
7595.phpt]
PASS Bug #41252 (Calling mcrypt_generic without first calling mcrypt_generic_ini
t crashes) [tests/bug41252.phpt]
PASS Bug #43143 (Warning about empty IV with MCRYPT_MODE_ECB) [tests/bug43143.ph
pt]
PASS Bug #46010 (warnings incorrectly generated for iv in ecb mode) [tests/bug46
010.phpt]
PASS Bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes) [tests/bug4
9738.phpt]
PASS Bug #8040 (MCRYPT_MODE_* do not seem to exist) [tests/bug8040.phpt]
PASS mcrypt_cbc [tests/mcrypt_cbc.phpt]
PASS Test mcrypt_cbc() function : basic functionality [tests/mcrypt_cbc_3des_dec
rypt.phpt]
PASS Test mcrypt_cbc() function : basic functionality [tests/mcrypt_cbc_3des_enc
rypt.phpt]
PASS Test mcrypt_cbc() function : error conditions [tests/mcrypt_cbc_error.phpt]
 
PASS Test mcrypt_cbc() function : usage variation [tests/mcrypt_cbc_variation1.p
hpt]
PASS Test mcrypt_cbc() function : usage variation [tests/mcrypt_cbc_variation2.p
hpt]
PASS Test mcrypt_cbc() function : usage variation [tests/mcrypt_cbc_variation3.p
hpt]
PASS Test mcrypt_cbc() function : usage variation [tests/mcrypt_cbc_variation4.p
hpt]
PASS Test mcrypt_cbc() function : usage variation [tests/mcrypt_cbc_variation5.p
hpt]
PASS mcrypt_cbf [tests/mcrypt_cbf.phpt]
PASS mcrypt_create_iv [tests/mcrypt_create_iv.phpt]
PASS mcrypt_decrypt [tests/mcrypt_decrypt.phpt]
PASS Test mcrypt_decrypt() function : basic functionality [tests/mcrypt_decrypt_
3des_cbc.phpt]
PASS Test mcrypt_decrypt() function : basic functionality [tests/mcrypt_decrypt_
3des_ecb.phpt]
PASS Test mcrypt_decrypt() function : error conditions [tests/mcrypt_decrypt_err
or.phpt]
PASS Test mcrypt_decrypt() function : usage variation [tests/mcrypt_decrypt_vari
ation1.phpt]
PASS Test mcrypt_decrypt() function : usage variation [tests/mcrypt_decrypt_vari
ation2.phpt]
PASS Test mcrypt_decrypt() function : usage variation [tests/mcrypt_decrypt_vari
ation3.phpt]
PASS Test mcrypt_decrypt() function : usage variation [tests/mcrypt_decrypt_vari
ation4.phpt]
PASS Test mcrypt_decrypt() function : usage variation [tests/mcrypt_decrypt_vari
ation5.phpt]
PASS mcrypt_ecb [tests/mcrypt_ecb.phpt]
PASS Test mcrypt_cbc() function : basic functionality [tests/mcrypt_ecb_3des_dec
rypt.phpt]
PASS Test mcrypt_ecb() function : basic functionality [tests/mcrypt_ecb_3des_enc
rypt.phpt]
PASS Test mcrypt_ecb() function : error conditions [tests/mcrypt_ecb_error.phpt]
 
PASS Test mcrypt_ecb() function : usage variation [tests/mcrypt_ecb_variation1.p
hpt]
PASS Test mcrypt_ecb() function : usage variation [tests/mcrypt_ecb_variation2.p
hpt]
PASS Test mcrypt_ecb() function : usage variation [tests/mcrypt_ecb_variation3.p
hpt]
PASS Test mcrypt_ecb() function : usage variation [tests/mcrypt_ecb_variation4.p
hpt]
PASS Test mcrypt_ecb() function : usage variation [tests/mcrypt_ecb_variation5.p
hpt]
PASS mcrypt_enc_get_algorithms_name [tests/mcrypt_enc_get_algorithms_name.phpt]
PASS mcrypt_enc_get_block_size [tests/mcrypt_enc_get_block_size.phpt]
PASS mcrypt_enc_get_iv_size [tests/mcrypt_enc_get_iv_size.phpt]
PASS mcrypt_enc_get_key_size [tests/mcrypt_enc_get_key_size.phpt]
PASS mcrypt_enc_get_modes_name [tests/mcrypt_enc_get_mode_name.phpt]
PASS mcrypt_enc_get_supported_key_sizes [tests/mcrypt_enc_get_supported_key_size
s.phpt]
PASS mcrypt_enc_is_block_algorithm [tests/mcrypt_enc_is_block_algorithm.phpt]
PASS mcrypt_enc_is_block_algorithm_mode [tests/mcrypt_enc_is_block_algorithm_mod
e.phpt]
PASS mcrypt_enc_is_block_mode [tests/mcrypt_enc_is_block_mode.phpt]
PASS mcrypt_enc_self_test [tests/mcrypt_enc_self_test.phpt]
PASS Test mcrypt_encrypt() function : TripleDES functionality [tests/mcrypt_encr
ypt_3des_cbc.phpt]
PASS Test mcrypt_encrypt() function : TripleDES functionality [tests/mcrypt_encr
ypt_3des_ecb.phpt]
PASS Test mcrypt_encrypt() function : error conditions [tests/mcrypt_encrypt_err
or.phpt]
PASS Test mcrypt_encrypt() function : usage variation - different types for ciph
er [tests/mcrypt_encrypt_variation1.phpt]
PASS Test mcrypt_encrypt() function : usage variation [tests/mcrypt_encrypt_vari
ation2.phpt]
PASS Test mcrypt_encrypt() function : usage variation [tests/mcrypt_encrypt_vari
ation3.phpt]
PASS Test mcrypt_encrypt() function : usage variation [tests/mcrypt_encrypt_vari
ation4.phpt]
PASS Test mcrypt_encrypt() function : usage variation [tests/mcrypt_encrypt_vari
ation5.phpt]
PASS mcrypt filters [tests/mcrypt_filters.phpt]
PASS mcrypt_get_block_size [tests/mcrypt_get_block_size.phpt]
PASS mcrypt_get_cipher_name [tests/mcrypt_get_cipher_name.phpt]
PASS mcrypt_enc_get_iv_size [tests/mcrypt_get_iv_size.phpt]
PASS mcrypt_get_key_size [tests/mcrypt_get_key_size.phpt]
PASS mcrypt_list_algorithms [tests/mcrypt_list_algorithms.phpt]
PASS mcrypt_list_modes [tests/mcrypt_list_modes.phpt]
PASS mcrypt_module_get_algo_block_size [tests/mcrypt_module_get_algo_block_size.
phpt]
PASS mcrypt_module_get_algo_key_size [tests/mcrypt_module_get_algo_key_size.phpt
]
PASS mcrypt_module_get_supported_key_sizes [tests/mcrypt_module_get_supported_ke
y_sizes.phpt]
PASS mcrypt_module_is_block_algorithm [tests/mcrypt_module_is_block_algorithm.ph
pt]
PASS mcrypt_module_is_block_algorithm_mode [tests/mcrypt_module_is_block_algorit
hm_mode.phpt]
PASS mcrypt_module_is_block_mode [tests/mcrypt_module_is_block_mode.phpt]
PASS mcrypt_module_open [tests/mcrypt_module_open.phpt]
PASS mcrypt_module_self_test [tests/mcrypt_module_self_test.phpt]
PASS mcrypt_ofb [tests/mcrypt_ofb.phpt]
PASS Test mcrypt_encrypt() function : TripleDES functionality [tests/mcrypt_rijn
dael128_128BitKey.phpt]
PASS Test mcrypt_encrypt() function : TripleDES functionality [tests/mcrypt_rijn
dael128_256BitKey.phpt]
=====================================================================
TIME END 2012-07-04 19:48:04
 
=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 0
Exts tested : 28
---------------------------------------------------------------------
 
Number of tests : 73 73
Tests skipped : 0 ( 0.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 0 ( 0.0%) ( 0.0%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 73 (100.0%) (100.0%)
---------------------------------------------------------------------
Time taken : 26 seconds
=====================================================================
 
We would like to send this report automatically to the
PHP QA team, to give us a better understanding of how
the test cases are doing. If you don't want to send it
immediately, you can choose "s" to save the report to
a file that you can send us later.
Do you want to send this report now? [Yns]: n
[root@remotehelp mcrypt]#

Устанавливаем mcrypt.so

[root@remotehelp mcrypt]# make install
Installing shared extensions: /usr/lib/php/modules/
[root@remotehelp mcrypt]#

Создаём файл конфигурации, подключаем mcrypt.so

[root@remotehelp mcrypt]# echo -e "; Enable mcrypt extension module\nextension=m
crypt.so" | tee /etc/php.d/mcrypt.ini
; Enable mcrypt extension module
extension=mcrypt.so
[root@remotehelp mcrypt]# 

Перезапускаем веб сервер

[root@remotehelp mcrypt]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified
domain name, using 94.249.240.244 for ServerName
[ OK ]
[root@remotehelp mcrypt]#

Поднимаемся в домашний каталог и удаляем всё его содержимое

[root@remotehelp mcrypt]# cd ../../../
[root@remotehelp mcrypt]# rm -f -R *

Установка Pear для PHP 5.3 под CentOS 5

[root@remotehelp ~]# wget http://pear.php.net/go-pear.phar
--2012-07-05 00:26:20-- http://pear.php.net/go-pear.phar
Resolving pear.php.net... 78.129.214.25
Connecting to pear.php.net|78.129.214.25|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3681106 (3.5M) [application/octet-stream]
Saving to: `go-pear.phar'
 
100%[======================================>] 3,681,106 148K/s in 23s
 
2012-07-05 00:26:43 (159 KB/s) - `go-pear.phar' saved [3681106/3681106]
 
[root@remotehelp ~]#
 
 
[root@remotehelp ~]# php go-pear.phar
 
Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type 'all' to change all of them or simply press Enter to
accept these locations.
 
1. Installation base ($prefix) : /usr
2. Temporary directory for processing : /tmp/pear/install
3. Temporary directory for downloads : /tmp/pear/install
4. Binaries directory : /usr/bin
5. PHP code directory ($php_dir) : /usr/share/pear
6. Documentation directory : /usr/docs
7. Data directory : /usr/data
8. User-modifiable configuration files directory : /usr/cfg
9. Public Web Files directory : /usr/www
10. Tests directory : /usr/tests
11. Name of configuration file : /etc/pear.conf
 
1-11, 'all' or Enter to continue:
Beginning install...
PHP Warning: date(): It is not safe to rely on the system's timezone settings.
You are *required* to use the date.timezone setting or the date_default_timezone
_set() function. In case you used any of those methods and you are still getting
this warning, you most likely misspelled the timezone identifier. We selected '
Europe/Moscow' for 'MSD/4.0/DST' instead in phar:///root/go-pear.phar/PEAR/Regis
try.php on line 1012
PHP Warning: date(): It is not safe to rely on the system's timezone settings.
You are *required* to use the date.timezone setting or the date_default_timezone
_set() function. In case you used any of those methods and you are still getting
this warning, you most likely misspelled the timezone identifier. We selected '
Europe/Moscow' for 'MSD/4.0/DST' instead in phar:///root/go-pear.phar/PEAR/Regis
try.php on line 1012
PHP Warning: date(): It is not safe to rely on the system's timezone settings.
You are *required* to use the date.timezone setting or the date_default_timezone
_set() function. In case you used any of those methods and you are still getting
this warning, you most likely misspelled the timezone identifier. We selected '
Europe/Moscow' for 'MSD/4.0/DST' instead in phar:///root/go-pear.phar/PEAR/Regis
try.php on line 1012
PHP Warning: date(): It is not safe to rely on the system's timezone settings.
You are *required* to use the date.timezone setting or the date_default_timezone
_set() function. In case you used any of those methods and you are still getting
this warning, you most likely misspelled the timezone identifier. We selected '
Europe/Moscow' for 'MSD/4.0/DST' instead in phar:///root/go-pear.phar/PEAR/Regis
try.php on line 1012
Configuration written to /etc/pear.conf...
Initialized registry...
Preparing to install...
installing phar:///root/go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.3.7.tar
...
installing phar:///root/go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt-1.3.0.
tar...
installing phar:///root/go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.9.4.tar...
installing phar:///root/go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.0.
4.tar...
installing phar:///root/go-pear.phar/PEAR/go-pear-tarballs/XML_Util-1.2.1.tar...
install ok: channel://pear.php.net/Archive_Tar-1.3.7
install ok: channel://pear.php.net/Console_Getopt-1.3.0
install ok: channel://pear.php.net/Structures_Graph-1.0.4
install ok: channel://pear.php.net/XML_Util-1.2.1
install ok: channel://pear.php.net/PEAR-1.9.4
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
PEAR: To install optional features use "pear install pear/PEAR#featurename"
 
The 'pear' command is now at your service at /usr/bin/pear
 
** The 'pear' command is not currently in your PATH, so you need to
** use '/usr/bin/pear' until you have added
** '/usr/bin' to your PATH environment variable.
 
Run it without parameters to see the available actions, try 'pear list'
to see what packages are installed, or 'pear help' for help.
 
For more information about PEAR, see:
 
http://pear.php.net/faq.php
http://pear.php.net/manual/
 
Thanks for using go-pear!
 
[root@remotehelp ~]#
 
 
[root@remotehelp ~]# rm -f go-pear.phar

Установка phpmyadmin в CentOS 5

В репозиториях по умолчанию нет пакета phpmyadmin, а поэтому будем скачивать и устанавливать с оф. сайта:

[root@remotehelp html]# cd /var/www/html
[root@remotehelp html]# wget -c http://downloads.sourceforge.net/project/phpmyadmin/
    phpMyAdmin/2.11.11.3/phpMyAdmin-2.11.11.3-all-languages.tar.gz?r=&ts=1341425459
    &use_mirror=netcologne
[root@remotehelp html]# tar xvfz phpMyAdmin-2.11.11.3-all-languages.tar.gz
[root@remotehelp html]# mv phpMyAdmin-2.11.11.3-all-languages phpmyadmin2
[root@remotehelp html]# cd phpmyadmin2
[root@remotehelp html]# cp config.sample.inc.php config.inc.php
 
vi config.inc.php
$cfg['blowfish_secret'] = 'secretwords';
 
При cookie-аутентификации, в конфигурационном файле необходимо задать парольную фразу 
    установив значение директивы $cfg['blowfish_secret'].
 
[root@remotehelp html]# cd /var/www/html
[root@remotehelp html]# wget -c http://downloads.sourceforge.net/project/phpmyadmin/
    phpMyAdmin/3.5.1/phpMyAdmin-3.5.1-all-languages.tar.gz?r=http%3A%2F%2F
    sourceforge.net%2Fprojects%2Fphpmyadmin%2Ffiles%2FphpMyAdmin%2F3.5.1%2F
    &ts=1341426355&use_mirror=netcologne
[root@remotehelp html]# tar xvfz phpMyAdmin-3.5.1-all-languages.tar.gz
[root@remotehelp html]# mv phpMyAdmin-3.5.1-all-languages phpmyadmin3
[root@remotehelp html]# cd phpmyadmin3
[root@remotehelp html]# cp config.sample.inc.php config.inc.php
 
vi config.inc.php
$cfg['blowfish_secret'] = 'secretwords';

При cookie-аутентификации, в конфигурационном файле необходимо задать парольную фразу установив значение директивы $cfg['blowfish_secret'].

Для увеличения времени жизни сессии phpMyAdmin, добавляем в конец файла config.inc.php строки:

//увеличит время жизни куки до 1 недели
$sessLifetime = 3600 * 24 * 7;
ini_set ( 'session.gc_maxlifetime' , $sessLifetime );
$cfg['LoginCookieValidity'] = $sessLifetime;

Проверка конфигурации PHP 5.3 в CentOS 5

Создаём phpinfo.php и проверяем конфиг

vi /var/www/html/phpinfo.php
<?php 
 
// Show all information, defaults to INFO_ALL
phpinfo();
 
// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);

Парковка домена на VPS в CentOS 5

Если выделенный адрес, то достаточно просто в настройках DNS домена сменить IP для А записи, это как раз наш случай, в других случаях возможно нужно будет создать поддержку домена в файле hosts, httpd virtual hosts или DNS но, в нашем слечае работает обычная смена IP (указан в общих настройках VPS - 94.249.240.244) для А записи в настройках DNS домена itadmin.org.ua. Для теста можно посетить http://itadmin.org.ua/ - со временем этот домен будет перепаркован или переадресован на этот самый сайт, на котором вы сейчас находитесь.

Проверка и установка обновлений CentOS 5 и всех его пакетов

[root@remotehelp ~]# cat /etc/*release
CentOS release 5.7 (Final)
[root@remotehelp ~]# uname -i
i386
 
[root@remotehelp ~]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.de.leaseweb.net
* extras: mirror.de.leaseweb.net
* updates: mirror.de.leaseweb.net
base | 1.1 kB 00:00
extras | 2.1 kB 00:00
updates | 1.9 kB 00:00
vz-base | 951 B 00:00
vz-updates | 951 B 00:00
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package aspell.i386 12:0.60.3-12 set to be updated
---> Package audit-libs.i386 0:1.8-2.el5 set to be updated
---> Package audit-libs-python.i386 0:1.8-2.el5 set to be updated
---> Package bind.i386 30:9.3.6-20.P1.el5_8.1 set to be updated
---> Package bind-libs.i386 30:9.3.6-20.P1.el5_8.1 set to be updated
---> Package bind-utils.i386 30:9.3.6-20.P1.el5_8.1 set to be updated
---> Package binutils.i386 0:2.17.50.0.6-20.el5_8.3 set to be updated
---> Package caching-nameserver.i386 30:9.3.6-20.P1.el5_8.1 set to be updated
---> Package centos-release.i386 10:5-8.el5.centos set to be updated
---> Package centos-release-notes.i386 0:5.8-0 set to be updated
---> Package coreutils.i386 0:5.97-34.el5_8.1 set to be updated
---> Package cups-libs.i386 1:1.3.7-30.el5 set to be updated
---> Package curl.i386 0:7.15.5-15.el5 set to be updated
---> Package device-mapper.i386 0:1.02.67-2.el5 set to be updated
---> Package device-mapper-event.i386 0:1.02.67-2.el5 set to be updated
---> Package device-mapper-multipath.i386 0:0.4.7-48.el5_8.1 set to be updated
---> Package dhclient.i386 12:3.0.5-31.el5 set to be updated
---> Package e2fsprogs.i386 0:1.39-34.el5_8.1 set to be updated
---> Package e2fsprogs-libs.i386 0:1.39-34.el5_8.1 set to be updated
---> Package expat.i386 0:1.95.8-11.el5_8 set to be updated
---> Package fetchmail.i386 0:6.3.6-4.el5 set to be updated
---> Package file.i386 0:4.17-21 set to be updated
---> Package ftp.i386 0:0.17-37.el5 set to be updated
---> Package gawk.i386 0:3.1.5-15.el5 set to be updated
---> Package glibc.i686 0:2.5-81.el5_8.2 set to be updated
---> Package glibc-common.i386 0:2.5-81.el5_8.2 set to be updated
---> Package gnutls.i386 0:1.4.1-7.el5_8.2 set to be updated
---> Package groff.i386 0:1.18.1.1-13.el5 set to be updated
---> Package hmaccalc.i386 0:0.9.6-4.el5 set to be updated
---> Package initscripts.i386 0:8.45.42-1.el5.centos set to be updated
---> Package iproute.i386 0:2.6.18-13.el5 set to be updated
---> Package iptables.i386 0:1.3.5-9.1.el5 set to be updated
---> Package iscsi-initiator-utils.i386 0:6.2.0.872-13.el5 set to be updated
---> Package kpartx.i386 0:0.4.7-48.el5_8.1 set to be updated
---> Package krb5-libs.i386 0:1.6.1-70.el5 set to be updated
---> Package less.i386 0:436-9.el5 set to be updated
---> Package libacl.i386 0:2.2.39-8.el5 set to be updated
---> Package libgcc.i386 0:4.1.2-52.el5_8.1 set to be updated
---> Package libgcrypt.i386 0:1.4.4-5.el5_8.2 set to be updated
---> Package libpng.i386 2:1.2.10-17.el5_8 set to be updated
---> Package libsmbclient.i386 0:3.0.33-3.39.el5_8 set to be updated
---> Package libstdc++.i386 0:4.1.2-52.el5_8.1 set to be updated
---> Package libtiff.i386 0:3.8.2-15.el5_8 set to be updated
---> Package libusb.i386 0:0.1.12-6.el5 set to be updated
---> Package libxml2.i386 0:2.6.26-2.1.15.el5_8.2 set to be updated
---> Package lsof.i386 0:4.78-6 set to be updated
---> Package lvm2.i386 0:2.02.88-7.el5 set to be updated
---> Package man-pages.noarch 0:2.39-20.el5 set to be updated
---> Package mkinitrd.i386 0:5.1.19.6-75.el5 set to be updated
---> Package mktemp.i386 3:1.5-24.el5 set to be updated
---> Package nash.i386 0:5.1.19.6-75.el5 set to be updated
---> Package net-snmp.i386 1:5.3.2.2-17.el5_8.1 set to be updated
---> Package net-snmp-libs.i386 1:5.3.2.2-17.el5_8.1 set to be updated
---> Package net-snmp-utils.i386 1:5.3.2.2-17.el5_8.1 set to be updated
---> Package net-tools.i386 0:1.60-82.el5 set to be updated
---> Package nscd.i386 0:2.5-81.el5_8.2 set to be updated
---> Package nspr.i386 0:4.8.9-1.el5_8 set to be updated
---> Package nss.i386 0:3.13.1-5.el5_8 set to be updated
---> Package openldap.i386 0:2.3.43-25.el5 set to be updated
---> Package openssh.i386 0:4.3p2-82.el5 set to be updated
---> Package openssh-clients.i386 0:4.3p2-82.el5 set to be updated
---> Package openssh-server.i386 0:4.3p2-82.el5 set to be updated
---> Package openssl.i686 0:0.9.8e-22.el5_8.4 set to be updated
---> Package perl.i386 4:5.8.8-38.el5 set to be updated
---> Package popt.i386 0:1.10.2.3-28.el5_8 set to be updated
---> Package postgresql-libs.i386 0:8.1.23-5.el5_8 set to be updated
---> Package procps.i386 0:3.2.7-18.el5 set to be updated
---> Package python.i386 0:2.4.3-46.el5_8.2 set to be updated
---> Package python-libs.i386 0:2.4.3-46.el5_8.2 set to be updated
---> Package rpm.i386 0:4.4.2.3-28.el5_8 set to be updated
---> Package rpm-libs.i386 0:4.4.2.3-28.el5_8 set to be updated
---> Package rpm-python.i386 0:4.4.2.3-28.el5_8 set to be updated
---> Package samba.i386 0:3.0.33-3.39.el5_8 set to be updated
---> Package samba-client.i386 0:3.0.33-3.39.el5_8 set to be updated
---> Package samba-common.i386 0:3.0.33-3.39.el5_8 set to be updated
---> Package samba-swat.i386 0:3.0.33-3.39.el5_8 set to be updated
---> Package setup.noarch 0:2.5.58-9.el5 set to be updated
---> Package shadow-utils.i386 2:4.0.17-20.el5 set to be updated
---> Package sudo.i386 0:1.7.2p1-13.el5 set to be updated
---> Package tar.i386 2:1.15.1-32.el5_8 set to be updated
---> Package tzdata.i386 0:2012c-1.el5 set to be updated
---> Package util-linux.i386 0:2.13-0.59.el5 set to be updated
---> Package vixie-cron.i386 4:4.1-81.el5 set to be updated
---> Package wget.i386 0:1.11.4-3.el5_8.2 set to be updated
---> Package xinetd.i386 2:2.3.14-16.el5 set to be updated
---> Package yum.noarch 0:3.2.22-39.el5.centos set to be updated
---> Package yum-fastestmirror.noarch 0:1.1.16-21.el5.centos set to be updated
base/filelists | 3.0 MB 00:03
extras/filelists_db | 214 kB 00:00
updates/filelists_db | 2.1 MB 00:02
vz-base/filelists | 979 B 00:00
vz-updates/filelists | 360 B 00:00
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
Package Arch Version Repository
Size
================================================================================
Updating:
aspell i386 12:0.60.3-12 base 946 k
audit-libs i386 1.8-2.el5 base 80 k
audit-libs-python i386 1.8-2.el5 base 80 k
bind i386 30:9.3.6-20.P1.el5_8.1 updates 981 k
bind-libs i386 30:9.3.6-20.P1.el5_8.1 updates 864 k
bind-utils i386 30:9.3.6-20.P1.el5_8.1 updates 174 k
binutils i386 2.17.50.0.6-20.el5_8.3 updates 3.0 M
caching-nameserver i386 30:9.3.6-20.P1.el5_8.1 updates 63 k
centos-release i386 10:5-8.el5.centos base 20 k
centos-release-notes i386 5.8-0 base 40 k
coreutils i386 5.97-34.el5_8.1 updates 3.6 M
cups-libs i386 1:1.3.7-30.el5 base 200 k
curl i386 7.15.5-15.el5 base 235 k
device-mapper i386 1.02.67-2.el5 base 799 k
device-mapper-event i386 1.02.67-2.el5 base 24 k
device-mapper-multipath i386 0.4.7-48.el5_8.1 updates 2.9 M
dhclient i386 12:3.0.5-31.el5 base 281 k
e2fsprogs i386 1.39-34.el5_8.1 updates 827 k
e2fsprogs-libs i386 1.39-34.el5_8.1 updates 120 k
expat i386 1.95.8-11.el5_8 updates 78 k
fetchmail i386 6.3.6-4.el5 base 527 k
file i386 4.17-21 base 318 k
ftp i386 0.17-37.el5 base 55 k
gawk i386 3.1.5-15.el5 base 1.7 M
glibc i686 2.5-81.el5_8.2 updates 5.3 M
glibc-common i386 2.5-81.el5_8.2 updates 16 M
gnutls i386 1.4.1-7.el5_8.2 updates 351 k
groff i386 1.18.1.1-13.el5 base 1.9 M
hmaccalc i386 0.9.6-4.el5 base 22 k
initscripts i386 8.45.42-1.el5.centos base 1.6 M
iproute i386 2.6.18-13.el5 base 813 k
iptables i386 gt; Package yum.noarch 0:3.2.22-39.el5.centos set to be updated
---1.3.5-9.1.el5 base 238 k
iscsi-initiator-utils i386 6.2.0.872-13.el5 base 1.0 M
kpartx i386 0.4.7-48.el5_8.1 updates 428 k
krb5-libs i386 1.6.1-70.el5 base 669 k
less i386 436-9.el5 base 106 k
libacl i386 2.2.39-8.el5 base 19 k
libgcc i386 4.1.2-52.el5_8.1 updates 97 k
libgcrypt i386 1.4.4-5.el5_8.2 updates 251 k
libpng i386 2:1.2.10-17.el5_8 updates 241 k
libsmbclient i386 3.0.33-3.39.el5_8 updates 909 k
libstdc++ i386 4.1.2-52.el5_8.1 updates 363 k
libtiff i386 3.8.2-15.el5_8 updates 309 k
libusb i386 0.1.12-6.el5 base 26 k
libxml2 i386 2.6.26-2.1.15.el5_8.2 updates 797 k
lsof i386 4.78-6 base 323 k
lvm2 i386 2.02.88-7.el5 base 3.1 M
man-pages noarch 2.39-20.el5 base 4.2 M
mkinitrd i386 5.1.19.6-75.el5 base 480 k
mktemp i386 3:1.5-24.el5 base 14 k
nash i386 5.1.19.6-75.el5 base 1.1 M
net-snmp i386 1:5.3.2.2-17.el5_8.1 updates 703 k
net-snmp-libs i386 1:5.3.2.2-17.el5_8.1 updates 1.3 M
net-snmp-utils i386 1:5.3.2.2-17.el5_8.1 updates 191 k
net-tools i386 1.60-82.el5 base 361 k
nscd i386 2.5-81.el5_8.2 updates 172 k
nspr i386 4.8.9-1.el5_8 updates 121 k
nss i386 3.13.1-5.el5_8 updates 1.1 M
openldap i386 2.3.43-25.el5 base 298 k
openssh i386 4.3p2-82.el5 base 291 k
openssh-clients i386 4.3p2-82.el5 base 455 k
openssh-server i386 4.3p2-82.el5 base 275 k
openssl i686 0.9.8e-22.el5_8.4 updates 1.5 M
perl i386 4:5.8.8-38.el5 base 12 M
popt i386 1.10.2.3-28.el5_8 updates 76 k
postgresql-libs i386 8.1.23-5.el5_8 updates 197 k
procps i386 3.2.7-18.el5 base 212 k
python i386 2.4.3-46.el5_8.2 updates 59 k
python-libs i386 2.4.3-46.el5_8.2 updates 5.8 M
rpm i386 4.4.2.3-28.el5_8 updates 1.2 M
rpm-libs i386 4.4.2.3-28.el5_8 updates 929 k
rpm-python i386 4.4.2.3-28.el5_8 updates 61 k
samba i386 3.0.33-3.39.el5_8 updates 16 M
samba-client i386 3.0.33-3.39.el5_8 updates 5.7 M
samba-common i386 3.0.33-3.39.el5_8 updates 6.7 M
samba-swat i386 3.0.33-3.39.el5_8 updates 8.2 M
setup noarch 2.5.58-9.el5 base 125 k
shadow-utils i386 2:4.0.17-20.el5 base 1.0 M
sudo i386 1.7.2p1-13.el5 base 351 k
tar i386 2:1.15.1-32.el5_8 updates 748 k
tzdata i386 2012c-1.el5 updates 766 k
util-linux i386 2.13-0.59.el5 base 1.9 M
vixie-cron i386 4:4.1-81.el5 base 81 k
wget i386 1.11.4-3.el5_8.2 updates 582 k
xinetd i386 2:2.3.14-16.el5 base 126 k
yum noarch 3.2.22-39.el5.centos base 1.0 M
yum-fastestmirror noarch 1.1.16-21.el5.centos base 21 k
 
Transaction Summary
================================================================================
Install 0 Package(s)
Upgrade 87 Package(s)
 
Total download size: 129 M
Is this ok [y/N]: y
.............................................
(65/87): shadow-utils-4.0.17-20.el5.i386.rpm | 1.0 MB 00:00
(66/87): nss-3.13.1-5.el5_8.i386.rpm | 1.1 MB 00:01
(67/87): nash-5.1.19.6-75.el5.i386.rpm | 1.1 MB 00:01
(68/87): rpm-4.4.2.3-28.el5_8.i386.rpm | 1.2 MB 00:02
(69/87): net-snmp-libs-5.3.2.2-17.el5_8.1.i386.rpm | 1.3 MB 00:01
(70/87): openssl-0.9.8e-22.el5_8.4.i686.rpm | 1.5 MB 00:02
(71/87): initscripts-8.45.42-1.el5.centos.i386.rpm | 1.6 MB 00:01
(72/87): gawk-3.1.5-15.el5.i386.rpm | 1.7 MB 00:01
(73/87): groff-1.18.1.1-13.el5.i386.rpm | 1.9 MB 00:01
(74/87): util-linux-2.13-0.59.el5.i386.rpm | 1.9 MB 00:01
(75/87): device-mapper-multipath-0.4.7-48.el5_8.1.i386.r | 2.9 MB 00:03
(76/87): binutils-2.17.50.0.6-20.el5_8.3.i386.rpm | 3.0 MB 00:03
(77/87): lvm2-2.02.88-7.el5.i386.rpm | 3.1 MB 00:03
(78/87): coreutils-5.97-34.el5_8.1.i386.rpm | 3.6 MB 00:04
(79/87): man-pages-2.39-20.el5.noarch.rpm | 4.2 MB 00:05
(80/87): glibc-2.5-81.el5_8.2.i686.rpm | 5.3 MB 00:05
(81/87): samba-client-3.0.33-3.39.el5_8.i386.rpm | 5.7 MB 00:06
(82/87): python-libs-2.4.3-46.el5_8.2.i386.rpm | 5.8 MB 00:06
(83/87): samba-common-3.0.33-3.39.el5_8.i386.rpm | 6.7 MB 00:07
(84/87): samba-swat-3.0.33-3.39.el5_8.i386.rpm | 8.2 MB 00:09
(85/87): perl-5.8.8-38.el5.i386.rpm | 12 MB 00:14
(86/87): samba-3.0.33-3.39.el5_8.i386.rpm | 16 MB 00:21
(87/87): glibc-common-2.5-81.el5_8.2.i386.rpm | 16 MB 00:20
--------------------------------------------------------------------------------
Total 799 kB/s | 129 MB 02:45
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : setup 1/174
Updating : centos-release-notes 2/174
Updating : centos-release 3/174
Updating : tzdata 4/174
Updating : glibc-common 5/174
Updating : nash 6/174
Updating : man-pages 7/174
Updating : libgcc 8/174
Updating : glibc 9/174
Updating : popt 10/174
Updating : audit-libs 11/174
Updating : mktemp 12/174
Updating : device-mapper 13/174
Updating : e2fsprogs-libs 14/174
Updating : nspr 15/174
Updating : nss 16/174
Updating : perl 17/174
Updating : libstdc++ 18/174
Updating : libacl 19/174
Updating : coreutils 20/174
Updating : krb5-libs 21/174
Updating : openssl 22/174
Updating : openldap 23/174
Updating : util-linux 24/174
Updating : shadow-utils 25/174
Updating : net-snmp-libs 26/174
Updating : bind-libs 27/174
Updating : e2fsprogs 28/174
Updating : libtiff 29/174
Updating : kpartx 30/174
Updating : libgcrypt 31/174
Updating : gnutls 32/174
Updating : expat 33/174
Updating : libpng 34/174
Updating : cups-libs 35/174
Updating : procps 36/174
Updating : device-mapper-multipath 37/174
Updating : tar 38/174
Updating : hmaccalc 39/174
Updating : device-mapper-event 40/174
Updating : lvm2 41/174
Updating : gawk 42/174
Updating : net-tools 43/174
Updating : iproute 44/174
Updating : initscripts 45/174
Updating : openssh 46/174
Updating : bind 47/174
Updating : libsmbclient 48/174
Updating : samba-common 49/174
Updating : samba 50/174
Updating : postgresql-libs 51/174
Updating : curl 52/174
Updating : libusb 53/174
Updating : aspell 54/174
Updating : libxml2 55/174
Updating : file 56/174
Updating : samba-client 57/174
Updating : openssh-server 58/174
warning: /etc/ssh/sshd_config created as /etc/ssh/sshd_config.rpmnew
Updating : openssh-clients 59/174
Updating : vixie-cron 60/174
Updating : dhclient 61/174
Updating : bind-utils 62/174
Updating : nscd 63/174
Updating : sudo 64/174
Updating : fetchmail 65/174
Updating : wget 66/174
Updating : groff 67/174
Updating : less 68/174
Updating : iptables 69/174
Updating : binutils 70/174
Updating : lsof 71/174
Updating : ftp 72/174
Updating : xinetd 73/174
Updating : caching-nameserver 74/174
Updating : samba-swat 75/174
Updating : python 76/174
Updating : rpm-libs 77/174
Updating : rpm 78/174
Updating : iscsi-initiator-utils 79/174
Updating : python-libs 80/174
Updating : rpm-python 81/174
Updating : net-snmp 82/174
Updating : net-snmp-utils 83/174
Updating : mkinitrd 84/174
Updating : audit-libs-python 85/174
Updating : yum 86/174
Updating : yum-fastestmirror 87/174
Cleanup : cups-libs 88/174
Cleanup : postgresql-libs 89/174
Cleanup : openssl 90/174
Cleanup : device-mapper 91/174
Cleanup : less 92/174
Cleanup : glibc-common 93/174
Cleanup : hmaccalc 94/174
Cleanup : gnutls 95/174
Cleanup : gawk 96/174
Cleanup : libgcrypt 97/174
Cleanup : expat 98/174
Cleanup : rpm-python 99/174
Cleanup : nscd 100/174
Cleanup : audit-libs 101/174
Cleanup : openssh-server 102/174
Cleanup : e2fsprogs 103/174
Cleanup : popt 104/174
Cleanup : mktemp 105/174
Cleanup : net-snmp-libs 106/174
Cleanup : python 107/174
Cleanup : bind 108/174
Cleanup : yum-fastestmirror 109/174
Cleanup : samba-swat 110/174
Cleanup : shadow-utils 111/174
Cleanup : yum 112/174
Cleanup : initscripts 113/174
Cleanup : openssh 114/174
Cleanup : lvm2 115/174
Cleanup : device-mapper-multipath 116/174
Cleanup : openssh-clients 117/174
Cleanup : sudo 118/174
Cleanup : perl 119/174
Cleanup : libsmbclient 120/174
Cleanup : nspr 121/174
Cleanup : tar 122/174
Cleanup : vixie-cron 123/174
Cleanup : bind-libs 124/174
Cleanup : rpm 125/174
Cleanup : krb5-libs 126/174
Cleanup : nash 127/174
Cleanup : caching-nameserver 128/174
Cleanup : samba-common 129/174
Cleanup : libxml2 130/174
Cleanup : curl 131/174
Cleanup : iscsi-initiator-utils 132/174
Cleanup : net-tools 133/174
Cleanup : kpartx 134/174
Cleanup : xinetd 135/174
Cleanup : libpng 136/174
Cleanup : procps 137/174
Cleanup : file 138/174
Cleanup : libtiff 139/174
Cleanup : util-linux 140/174
Cleanup : fetchmail 141/174
Cleanup : iptables 142/174
Cleanup : net-snmp-utils 143/174
Cleanup : libusb 144/174
Cleanup : coreutils 145/174
Cleanup : binutils 146/174
Cleanup : lsof 147/174
Cleanup : device-mapper-event 148/174
Cleanup : libgcc 149/174
Cleanup : nss 150/174
Cleanup : samba-client 151/174
Cleanup : bind-utils 152/174
Cleanup : audit-libs-python 153/174
Cleanup : iproute 154/174
Cleanup : centos-release 155/174
Cleanup : samba 156/174
Cleanup : e2fsprogs-libs 157/174
Cleanup : glibc 158/174
Cleanup : tzdata 159/174
Cleanup : libstdc++ 160/174
Cleanup : mkinitrd 161/174
Cleanup : rpm-libs 162/174
Cleanup : python-libs 163/174
Cleanup : openldap 164/174
Cleanup : wget 165/174
Cleanup : libacl 166/174
Cleanup : ftp 167/174
Cleanup : groff 168/174
Cleanup : man-pages 169/174
Cleanup : aspell 170/174
Cleanup : net-snmp 171/174
Cleanup : centos-release-notes 172/174
Cleanup : setup 173/174
Cleanup : dhclient 174/174
 
Updated:
aspell.i386 12:0.60.3-12
audit-libs.i386 0:1.8-2.el5
audit-libs-python.i386 0:1.8-2.el5
bind.i386 30:9.3.6-20.P1.el5_8.1
bind-libs.i386 30:9.3.6-20.P1.el5_8.1
bind-utils.i386 30:9.3.6-20.P1.el5_8.1
binutils.i386 0:2.17.50.0.6-20.el5_8.3
caching-nameserver.i386 30:9.3.6-20.P1.el5_8.1
centos-release.i386 10:5-8.el5.centos
centos-release-notes.i386 0:5.8-0
coreutils.i386 0:5.97-34.el5_8.1
cups-libs.i386 1:1.3.7-30.el5
curl.i386 0:7.15.5-15.el5
device-mapper.i386 0:1.02.67-2.el5
device-mapper-event.i386 0:1.02.67-2.el5
device-mapper-multipath.i386 0:0.4.7-48.el5_8.1
dhclient.i386 12:3.0.5-31.el5
e2fsprogs.i386 0:1.39-34.el5_8.1
e2fsprogs-libs.i386 0:1.39-34.el5_8.1
expat.i386 0:1.95.8-11.el5_8
fetchmail.i386 0:6.3.6-4.el5
file.i386 0:4.17-21
ftp.i386 0:0.17-37.el5
gawk.i386 0:3.1.5-15.el5
glibc.i686 0:2.5-81.el5_8.2
glibc-common.i386 0:2.5-81.el5_8.2
gnutls.i386 0:1.4.1-7.el5_8.2
groff.i386 0:1.18.1.1-13.el5
hmaccalc.i386 0:0.9.6-4.el5
initscripts.i386 0:8.45.42-1.el5.centos
iproute.i386 0:2.6.18-13.el5
iptables.i386 0:1.3.5-9.1.el5
iscsi-initiator-utils.i386 0:6.2.0.872-13.el5
kpartx.i386 0:0.4.7-48.el5_8.1
krb5-libs.i386 0:1.6.1-70.el5
less.i386 0:436-9.el5
libacl.i386 0:2.2.39-8.el5
libgcc.i386 0:4.1.2-52.el5_8.1
libgcrypt.i386 0:1.4.4-5.el5_8.2
libpng.i386 2:1.2.10-17.el5_8
libsmbclient.i386 0:3.0.33-3.39.el5_8
libstdc++.i386 0:4.1.2-52.el5_8.1
libtiff.i386 0:3.8.2-15.el5_8
libusb.i386 0:0.1.12-6.el5
libxml2.i386 0:2.6.26-2.1.15.el5_8.2
lsof.i386 0:4.78-6
lvm2.i386 0:2.02.88-7.el5
man-pages.noarch 0:2.39-20.el5
mkinitrd.i386 0:5.1.19.6-75.el5
mktemp.i386 3:1.5-24.el5
nash.i386 0:5.1.19.6-75.el5
net-snmp.i386 1:5.3.2.2-17.el5_8.1
net-snmp-libs.i386 1:5.3.2.2-17.el5_8.1
net-snmp-utils.i386 1:5.3.2.2-17.el5_8.1
net-tools.i386 0:1.60-82.el5
nscd.i386 0:2.5-81.el5_8.2
nspr.i386 0:4.8.9-1.el5_8
nss.i386 0:3.13.1-5.el5_8
openldap.i386 0:2.3.43-25.el5
openssh.i386 0:4.3p2-82.el5
openssh-clients.i386 0:4.3p2-82.el5
openssh-server.i386 0:4.3p2-82.el5
openssl.i686 0:0.9.8e-22.el5_8.4
perl.i386 4:5.8.8-38.el5
popt.i386 0:1.10.2.3-28.el5_8
postgresql-libs.i386 0:8.1.23-5.el5_8
procps.i386 0:3.2.7-18.el5
python.i386 0:2.4.3-46.el5_8.2
python-libs.i386 0:2.4.3-46.el5_8.2
rpm.i386 0:4.4.2.3-28.el5_8
rpm-libs.i386 0:4.4.2.3-28.el5_8
rpm-python.i386 0:4.4.2.3-28.el5_8
samba.i386 0:3.0.33-3.39.el5_8
samba-client.i386 0:3.0.33-3.39.el5_8
samba-common.i386 0:3.0.33-3.39.el5_8
samba-swat.i386 0:3.0.33-3.39.el5_8
setup.noarch 0:2.5.58-9.el5
shadow-utils.i386 2:4.0.17-20.el5
sudo.i386 0:1.7.2p1-13.el5
tar.i386 2:1.15.1-32.el5_8
tzdata.i386 0:2012c-1.el5
util-linux.i386 0:2.13-0.59.el5
vixie-cron.i386 4:4.1-81.el5
wget.i386 0:1.11.4-3.el5_8.2
xinetd.i386 2:2.3.14-16.el5
yum.noarch 0:3.2.22-39.el5.centos
yum-fastestmirror.noarch 0:1.1.16-21.el5.centos
 
Complete!
[root@remotehelp ~]#
 
[root@remotehelp ~]# cat /etc/*release
CentOS release 5.8 (Final)
[root@remotehelp ~]# reboot

На наш VPS с комплектацией по умолчанию мы дополнительно установили PHP 5.3, MySQL 5.0, phpMyAdmin 2,3, обновили CentOS 5 и все его пакеты. После перезагрузки смотрим на количество потребляемых ресурсов:

[root@remotehelp ~]# top
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 2160 676 580 S 0.0 0.5 0:00.14 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd/9530
3 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khelper/9530
95 root 16 -4 2264 584 364 S 0.0 0.4 0:00.00 udevd
392 root 20 0 1816 624 520 S 0.0 0.5 0:00.02 syslogd
403 root 20 0 7244 1036 632 S 0.0 0.8 0:00.00 sshd
412 root 20 0 2836 864 688 S 0.0 0.7 0:00.00 xinetd
444 root 20 0 3716 1316 1148 S 0.0 1.0 0:00.01 mysqld_safe
495 mysql 20 0 133m 17m 3592 S 0.0 13.5 0:02.46 mysqld
549 root 20 0 9312 1680 672 S 0.0 1.3 0:00.20 sendmail
572 smmsp 20 0 8268 1476 604 S 0.0 1.1 0:00.00 sendmail
582 root 20 0 27556 8032 4680 S 0.0 6.1 0:00.41 httpd
590 root 20 0 4500 1112 568 S 0.0 0.8 0:00.01 crond
592 apache 20 0 27556 4660 1228 S 0.0 3.6 0:00.00 httpd
599 root 20 0 5688 716 436 S 0.0 0.5 0:00.00 saslauthd
600 root 20 0 5688 432 152 S 0.0 0.3 0:00.00 saslauthd
628 root 20 0 10080 2932 2380 S 0.0 2.2 0:00.13 sshd
663 root 20 0 3824 1516 1272 S 0.0 1.2 0:00.03 bash
682 root 20 0 2292 1024 832 R 0.0 0.8 0:00.00 top

В контрольной веб панели VPS получаем примерно такие значения:

Bandwidth Usage 0% 0 KB of 0 KB Used / 0 KB Free
Memory Usage 19% 24.78 MB of 128 MB Used / 103.22 MB Free
VSwap Usage 0% 0 KB of 640 MB Used / 640 MB Free
Disk Usage 7% 723.48 MB of 10 GB Used / 9.29 GB Free

В общей сложности имеем под работу сайта свободных около 100 МВ оперативной памяти, 640 MB файла подкачки, 9.29 GB свободного места на жестком диске и процессор:

[root@remotehelp ~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 44
model name : Intel(R) Xeon(R) CPU L5630 @ 2.13GHz
stepping : 2
cpu MHz : 266.683
cache size : 12288 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp
lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf
pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse
4_1 sse4_2 popcnt aes lahf_lm ida arat dts tpr_shadow vnmi flexpriority ept vpid
bogomips : 4266.92
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
 
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 44
model name : Intel(R) Xeon(R) CPU L5630 @ 2.13GHz
stepping : 2
cpu MHz : 266.683
cache size : 12288 KB
physical id : 0
siblings : 8
core id : 1
cpu cores : 4
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp
lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf
pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse
4_1 sse4_2 popcnt aes lahf_lm ida arat dts tpr_shadow vnmi flexpriority ept vpid
bogomips : 4266.51
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
 
[root@remotehelp ~]#

И что не говори, а самые малые параметры VPS это намного больше чем даёт виртуальный хостинг на котором висят сотни, а то и тысячи веб сайтов!

На следующей странице читаем про установку бесплатной контрольной панели ISPConfig...

Добавить комментарий

АХТУНГ! Все комменты модерасятся модерастом. Мессаги исключительно рекламного или оскорбительного содержания не публикуются, а поэтому злостным спамерам, пранкерам и прочей сетевой нечисти рекомендуем напрасно не тратить своего времени и удовлетворять свои больные фантазии на специализированных Интернет ресурсах! Разумная же критика, замечания, дополнения и хвалебные оды приветствуются, также допускается легкий флуд или троллинг :)


Защитный код
Обновить

Рейтинг@Mail.ru 4 megabytes