Архив метки: vesta

Квоты на CentOS и Vesta

Для включения квот

1
 sudo /usr/local/vesta/bin/v-add-sys-quota
 sudo /usr/local/vesta/bin/v-add-sys-quota

Для автоматического обновления квот скрипт для запуска в cron:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# info: update user statistics
# options: USER
#
# Function logs user parameters into statistics database.
 
 
#----------------------------------------------------------#
#                    Variable&Function                     #
#----------------------------------------------------------#
 
# Argument defenition
user=$1
 
# Importing system enviroment  as we run this script
#       mostly by cron wich not read it by itself
source /etc/profile
 
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
 
 
#----------------------------------------------------------#
#                       Action                             #
#----------------------------------------------------------#
 
# Creating user_list
if [ -z "$user" ]; then
    user_list=$(ls $VESTA/data/users)
else
    user_list="$user"
fi
 
# Updating sys quotas
for user in $user_list; do
    QUOTA_UPDATE=$VESTA/bin/v-update-user-quota
    sudo ${QUOTA_UPDATE} $user
done
 
exit
#!/bin/bash
# info: update user statistics
# options: USER
#
# Function logs user parameters into statistics database.


#----------------------------------------------------------#
#                    Variable&Function                     #
#----------------------------------------------------------#

# Argument defenition
user=$1

# Importing system enviroment  as we run this script
#       mostly by cron wich not read it by itself
source /etc/profile

# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf


#----------------------------------------------------------#
#                       Action                             #
#----------------------------------------------------------#

# Creating user_list
if [ -z "$user" ]; then
    user_list=$(ls $VESTA/data/users)
else
    user_list="$user"
fi

# Updating sys quotas
for user in $user_list; do
    QUOTA_UPDATE=$VESTA/bin/v-update-user-quota
    sudo ${QUOTA_UPDATE} $user
done

exit

Vesta php 5.3

Для того чтобы установить php 5.3, нужно для начала удалить существующий

1
2
3
4
5
6
7
8
9
10
service httpd stop
yum -y remove php*
yum -y install php php-bcmath php-cli php-common php-gd php-imap php-mbstring php-mcrypt php-mysql php-pdo php-soap php-tidy php-xml php-xmlrpc php-pecl-apc phpMyAdmin roundcubemail
mv -f /etc/php.ini.rpmsave /etc/php.ini
mv -f /etc/roundcubemail/db.inc.php.rpmsave /etc/roundcubemail/db.inc.php
mv -f /etc/roundcubemail/main.inc.php.rpmsave /etc/roundcubemail/main.inc.php
mv -f /etc/phpMyAdmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php
mv -f /etc/httpd/conf.d/roundcubemail.conf.rpmsave /etc/httpd/conf.d/roundcubemail.conf
mv -f /etc/httpd/conf.d/phpMyAdmin.conf.rpmsave /etc/httpd/conf.d/phpMyAdmin.conf
service httpd start
service httpd stop
yum -y remove php*
yum -y install php php-bcmath php-cli php-common php-gd php-imap php-mbstring php-mcrypt php-mysql php-pdo php-soap php-tidy php-xml php-xmlrpc php-pecl-apc phpMyAdmin roundcubemail
mv -f /etc/php.ini.rpmsave /etc/php.ini
mv -f /etc/roundcubemail/db.inc.php.rpmsave /etc/roundcubemail/db.inc.php
mv -f /etc/roundcubemail/main.inc.php.rpmsave /etc/roundcubemail/main.inc.php
mv -f /etc/phpMyAdmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php
mv -f /etc/httpd/conf.d/roundcubemail.conf.rpmsave /etc/httpd/conf.d/roundcubemail.conf
mv -f /etc/httpd/conf.d/phpMyAdmin.conf.rpmsave /etc/httpd/conf.d/phpMyAdmin.conf
service httpd start