Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
PHP Warning: Unknown: open_basedir restriction in effect. File(/usr/share/roundcubemail/index.php) is not within the allowed path(s): (/home/admin/web:/home/admin/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp) in Unknown on line 0
PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
PHP Fatal error: Unknown: Failed opening required '/usr/share/roundcubemail/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
./vst-install.sh: line 334: /usr/local/vesta/bin/v-add-user: No such file or directory
Error: can't create admin usermkdir -p $VESTA/conf
mkdir -p $VESTA/log
mkdir -p $VESTA/data
mkdir -p $VESTA/ssl# Configuring run levels
chkconfig iptables off
...
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux
setenforce 0
...
# Install additional packages
yum -y install screen mc libpng libjpeg curl curl libmcrypt \
libmcrypt mhash mhash freetype openssl flex libxml2 \
ImageMagick sqlite sqlite GeoIP GeoIP-data GeoIP pcre pcre \
sudo bc mailx lsof ntp
...
rpms="nginx httpd httpd-devel.$arch mod_ssl mod_ruid2 mod_extract_forwarded
webalizer awstats mysql mysql-server php php-bcmath php-cli php-common
php-devel.$arch php-gd php-imap php-mbstring php-mcrypt php-mysql
php-pdo php-soap php-tidy php-xml php-xmlrpc phpMyAdmin exim dovecot
clamd spamassassin roundcubemail bind bind-utils bind-libs vsftpd
rrdtool vesta vesta-nginx vesta-php"
yum -y --enablerepo=remi install $rpms
if [ -e /etc/init.d/sendmail ]; then
chkconfig sendmail off
fi
if [ -e /etc/init.d/postfix ]; then
chkconfig postfix off
fi
chkconfig exim on
# Configuring ssl keys
cd /usr/local/vesta/ssl
wget $CHOST/$VERSION/certificate.crt -O certificate.crt
wget $CHOST/$VERSION/certificate.key -O certificate.key
# Apache
wget $CHOST/$VERSION/httpd.conf -O /etc/httpd/conf/httpd.conf
wget $CHOST/$VERSION/httpd-status.conf -O /etc/httpd/conf.d/status.conf
wget $CHOST/$VERSION/httpd-ssl.conf -O /etc/httpd/conf.d/ssl.conf
wget $CHOST/$VERSION/httpd.log -O /etc/logrotate.d/httpd
# Nginx
wget $CHOST/$VERSION/nginx.conf -O /etc/nginx/nginx.conf
wget $CHOST/$VERSION/nginx-status.conf -O /etc/nginx/conf.d/status.conf
# VsFTP
wget $CHOST/$VERSION/vsftpd.conf -O /etc/vsftpd/vsftpd.conf
# MySQL
wget $CHOST/$VERSION/mysql.cnf -O /etc/my.cnf
# Bind
wget $CHOST/$VERSION/named.conf -O /etc/named.conf
# Exim
wget $CHOST/$VERSION/exim.conf -O /etc/exim/exim.conf
wget $CHOST/$VERSION/dnsbl.conf -O /etc/exim/dnsbl.conf
wget $CHOST/$VERSION/spam-blocks.conf -O /etc/exim/spam-blocks.conf
wget $CHOST/$VERSION/clamd.conf -O /etc/clamd.conf
...
Error: package default not exist
Error: can't create admin userNo package GeoIP-data available.
No package php-devel.i386 available.
wget http://vestacp.com/pub/vst-install.shsession.save_handler = memcached
session.save_path = "tcp://127.0.0.1:11211"Warning: Unknown: Failed to write session data (memcached). Please verify that the current setting of session.save_path is correct (/home/admin/tmp) in Unknown on line 0php_admin_value session.save_path /home/admin/tmp
/**
* Функция визуализации логов
*
* @param string $file адрес до файла лога
* @param int $countRec число записей для отображения
*/
function viewLog( $file, $countRec )
{
if( file_exists( $file ) && is_readable( $file ))
{
$file = file($file);
$new_arr = array_slice($file, -$countRec);
unset($file);
$html = '<table style="width:100%; text-align: justify">
';
$i = 1;
foreach ( $new_arr as $value )
{
$color = 'gray';
if( stristr( $value, 'PHP Warning' ) !== false )
{
$color = 'yellow';
}
elseif( stristr( $value , 'PHP Fatal error') !== false )
{
$color = 'red';
}
$html .= '
<tr>
<td style="background-color:' . $color . '">
' . $i++ . ') ' . $value . '
</td>
</tr>';
}
unset($file);
$html .= '</table>';
return $html;
}
else
{
return false;
}
}
GPL панель управления сервером Vesta