Skocz do zawartości

Elber

Użytkownicy
  • Zawartość

    93
  • Rejestracja

  • Ostatnio

Posty napisane przez Elber


  1. Zainstalowałem ten xcache z repozytoriów i mi vB wywala

    Warning: xcache_isset() [function.xcache-isset]: xcache.var_size is either 0 or too small to enable var data caching in [path]/includes/class_datastore.php on line 557
    
    Warning: xcache_isset() [function.xcache-isset]: xcache.var_size is either 0 or too small to enable var data caching in [path]/includes/class_datastore.php on line 557
    
    Warning: xcache_unset() [function.xcache-unset]: xcache.var_size is either 0 or too small to enable var data caching in [path]/includes/class_datastore.php on line 596
    
    Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in [path]/includes/class_datastore.php on line 597
    
    Warning: xcache_unset() [function.xcache-unset]: xcache.var_size is either 0 or too small to enable var data caching in [path]/includes/class_datastore.php on line 596
    
    Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in [path]/includes/class_datastore.php on line 597
    
    Warning: xcache_unset() [function.xcache-unset]: xcache.var_size is either 0 or too small to enable var data caching in [path]/includes/class_datastore.php on line 596


  2. Teraz mam wynik z innego serwera. Są na nim 2 fora jedno małe drugie troszkę większe. Fora są oparte o skrypt vBulletin. Rozmiar większej bazy to 90 MB a mniejszej to 20 MB. Jak mam ustawić poszczególne wartości w my.cnf żeby było najoptymalniej.

     

    MY.CNF

    #
    # The MySQL database server configuration file.
    #
    # You can copy this to one of:
    # - "/etc/mysql/my.cnf" to set global options,
    # - "~/.my.cnf" to set user-specific options.
    # 
    # One can use all long options that the program supports.
    # Run program with --help to get a list of available options and with
    # --print-defaults to see which it would actually understand and use.
    #
    # For explanations see
    # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
    
    # This will be passed to all mysql clients
    # It has been reported that passwords should be enclosed with ticks/quotes
    # escpecially if they contain "#" chars...
    # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
    [client]
    port		= 3306
    socket		= /var/run/mysqld/mysqld.sock
    
    # Here is entries for some specific programs
    # The following values assume you have at least 32M ram
    
    # This was formally known as [safe_mysqld]. Both versions are currently parsed.
    [mysqld_safe]
    socket		= /var/run/mysqld/mysqld.sock
    nice		= 0
    
    [mysqld]
    #
    # * Basic Settings
    #
    user		= mysql
    pid-file	= /var/run/mysqld/mysqld.pid
    socket		= /var/run/mysqld/mysqld.sock
    port		= 3306
    basedir		= /usr
    datadir		= /var/lib/mysql
    tmpdir		= /tmp
    language	= /usr/share/mysql/english
    skip-external-locking
    #
    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.
    bind-address		= 127.0.0.1
    #
    # * Fine Tuning
    #
    key_buffer		= 8M
    max_allowed_packet	= 8M
    thread_stack		= 128K
    thread_cache_size	= 128K
    # This replaces the startup script and checks MyISAM tables if needed
    # the first time they are touched
    myisam-recover		= BACKUP
    wait_timeout 		= 30
    #max_connections 	= 100
    table_cache 	= 8M
    tmp_table_size 	= 32M
    max_heap_table_size 	= 32M
    
    #thread_concurrency 	= 10
    #
    # * Query Cache Configuration
    #
    query_cache_limit 	= 8M
    query_cache_size 	= 32M
    
    join_buffer_size	= 16M
    #
    # * Logging and Replication
    #
    # Both location gets rotated by the cronjob.
    # Be aware that this log type is a performance killer.
    #log		= /var/log/mysql/mysql.log
    #
    # Error logging goes to syslog. This is a Debian improvement 
    #
    # Here you can see queries with especially long duration
    #log_slow_queries	= /var/log/mysql/mysql-slow.log
    log-slow-queries 	= /var/log/mysql/log-slow-queries.log
    #long_query_time = 2
    #log-queries-not-using-indexes
    #
    # The following can be used as easy to replay backup logs or for replication.
    # note: if you are setting up a replication slave, see README.Debian about
    # 	other settings you may need to change.
    #server-id		= 1
    #log_bin			= /var/log/mysql/mysql-bin.log
    expire_logs_days	= 10
    max_binlog_size 	= 100M
    #binlog_do_db		= include_database_name
    #binlog_ignore_db	= include_database_name
    #
    # * BerkeleyDB
    #
    # Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
    skip-bdb
    #
    # * InnoDB
    #
    # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
    # Read the manual for more InnoDB related options. There are many!
    # You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
    #skip-innodb
    #
    # * Security Features
    #
    # Read the manual, too, if you want chroot!
    # chroot = /var/lib/mysql/
    #
    # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
    #
    # ssl-ca=/etc/mysql/cacert.pem
    # ssl-cert=/etc/mysql/server-cert.pem
    # ssl-key=/etc/mysql/server-key.pem
    innodb_buffer_pool_size = 32M
    
    
    [mysqldump]
    quick
    quote-names
    max_allowed_packet	= 16M
    
    [mysql]
    #no-auto-rehash	# faster start of mysql but no tab completition
    
    [isamchk]
    key_buffer		= 32M
    #
    # * NDB Cluster
    #
    # See /usr/share/doc/mysql-server-*/README.Debian for more information.
    #
    # The following configuration is read by the NDB Data Nodes (ndbd processes)
    # not from the NDB Management Nodes (ndb_mgmd processes).
    #
    # [MYSQL_CLUSTER]
    # ndb-connectstring=127.0.0.1
    
    
    #
    # * IMPORTANT: Additional settings that can override those from this file!
    # The files must end with '.cnf', otherwise they'll be ignored.
    #
    !includedir /etc/mysql/conf.d/
    

     

    Wynik mysqltuner.pl

     

    -------- General Statistics --------------------------------------------------
    [--] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 5.0.51a-24+lenny2-log
    [OK] Operating on 32-bit architecture with less than 2GB RAM
    
    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster 
    [--] Data in MyISAM tables: 81M (Tables: 364)
    [--] Data in InnoDB tables: 96K (Tables: 6)
    [--] Data in MEMORY tables: 252K (Tables: 4)
    [!!] Total fragmented tables: 15
    
    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 4m 59s (6K q [20.706 qps], 899 conn, TX: 267M, RX: 1M)
    [--] Reads / Writes: 87% / 13%
    [--] Total buffers: 106.0M global + 18.5M per thread (100 max threads)
    [!!] Maximum possible memory usage: 1.9G (97% of installed RAM)
    [OK] Slow queries: 0% (0/6K)
    [OK] Highest usage of available connections: 5% (5/100)
    [OK] Key buffer size / total MyISAM indexes: 8.0M/25.7M
    [OK] Key buffer hit rate: 99.5% (159K cached / 753 reads)
    [OK] Query cache efficiency: 54.2% (2K cached / 4K selects)
    [OK] Query cache prunes per day: 0
    [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 336 sorts)
    [!!] Joins performed without indexes: 2
    [OK] Temporary tables created on disk: 9% (22 on disk / 236 total)
    [OK] Thread cache hit rate: 99% (5 created / 899 connections)
    [OK] Table cache hit rate: 98% (397 open / 403 opened)
    [OK] Open file limit used: 1% (768/65K)
    [OK] Table locks acquired immediately: 99% (3K immediate / 3K locks)
    [OK] InnoDB data size / buffer pool: 96.0K/32.0M
    
    -------- Recommendations -----------------------------------------------------
    General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    MySQL started within last 24 hours - recommendations may be inaccurate
    Reduce your overall MySQL memory footprint for system stability
    Adjust your join queries to always utilize indexes
    Variables to adjust:
    *** MySQL's maximum memory usage is dangerously high ***
    *** Add RAM before increasing MySQL buffer variables ***
    join_buffer_size (> 16.0M, or always use indexes with joins)


  3. Na serwerze jest kilkanaście stron i kilkanaście baz danych :) To wynik wykonany po paru dniach od zmiany ustawień:

     

    -------- General Statistics --------------------------------------------------
    [--] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 5.0.51a-24+lenny2-log
    [OK] Operating on 32-bit architecture with less than 2GB RAM
    
    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster 
    [--] Data in MyISAM tables: 65M (Tables: 351)
    [--] Data in InnoDB tables: 86M (Tables: 271)
    [!!] Total fragmented tables: 30
    
    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 5d 19h 51m 19s (3M q [6.361 qps], 144K conn, TX: 829M, RX: 569M)
    [--] Reads / Writes: 53% / 47%
    [--] Total buffers: 418.0M global + 2.6M per thread (100 max threads)
    [OK] Maximum possible memory usage: 680.5M (34% of installed RAM)
    [OK] Slow queries: 0% (0/3M)
    [OK] Highest usage of available connections: 15% (15/100)
    [OK] Key buffer size / total MyISAM indexes: 96.0M/66.9M
    [OK] Key buffer hit rate: 100.0% (587M cached / 78K reads)
    [OK] Query cache efficiency: 33.1% (585K cached / 1M selects)
    [!!] Query cache prunes per day: 57852
    [OK] Sorts requiring temporary tables: 0% (5 temp sorts / 158K sorts)
    [!!] Temporary tables created on disk: 27% (30K on disk / 111K total)
    [OK] Thread cache hit rate: 99% (321 created / 144K connections)
    [OK] Table cache hit rate: 98% (722 open / 732 opened)
    [OK] Open file limit used: 1% (805/65K)
    [OK] Table locks acquired immediately: 99% (2M immediate / 2M locks)
    [!!] InnoDB data size / buffer pool: 86.6M/64.0M
    
    -------- Recommendations -----------------------------------------------------
    General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    When making adjustments, make tmp_table_size/max_heap_table_size equal
    Reduce your SELECT DISTINCT queries without LIMIT clauses
    Variables to adjust:
    query_cache_size (> 128M)
    tmp_table_size (> 128M)
    max_heap_table_size (> 128M)
    innodb_buffer_pool_size (>= 86M)
    

     

    Co teraz zrobić / zmienić i na ile ? :)


  4. Ponieważ mysqltuner powiadomił, że tabele są pofragmentowane, to warto uruchomić na nich optymalizację:

     

    myisamchk -r --sort-index /var/lib/mysql/*/*.MYI
    mysqladmin reload;mysqladmin refresh;
    

     

    a w my.cnf proponowałbym następujące zmiany:

     

    #
    # indeksy zajmuja jedynie 62MB, wiec mozna spokojnie zmniejszyc
    # key_buffer do 96MB
    #
    
    key_buffer = 96M
    
    
    #
    # Zwiekszyc rozmiar tymczasowych tablic tworzonych w pamieci RAM, gdyz
    # za duze zapisywane sa niepotrzebnie na dysku, co spowalnia dzialanie
    #
    
    tmp_table_size = 128M
    max_heap_table_size = 128M
    
    #
    # bufor dla InnoDB jest za maly, trzeba zwiekszyc
    #
    
    innodb_buffer_pool_size = 64M
    

     

    Ustawiłem tak jak napisałeś i teraz mam

     >> MySQLTuner 1.0.1 - Major Hayden <major@mhtx.net>
    >> Bug reports, feature requests, and downloads at http://mysqltuner.com/
    >> Run with '--help' for additional options and output filtering
    Please enter your MySQL administrative login: root
    Please enter your MySQL administrative password:
    
    -------- General Statistics --------------------------------------------------
    [--] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 5.0.51a-24+lenny2-log
    [OK] Operating on 32-bit architecture with less than 2GB RAM
    
    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
    [--] Data in MyISAM tables: 59M (Tables: 351)
    [--] Data in InnoDB tables: 53M (Tables: 271)
    [!!] Total fragmented tables: 3
    
    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 2m 33s (2K q [17.131 qps], 495 conn, TX: 3M, RX: 302K)
    [--] Reads / Writes: 79% / 21%
    [--] Total buffers: 802.0M global + 2.6M per thread (100 max threads)
    [OK] Maximum possible memory usage: 1.0G (53% of installed RAM)
    [OK] Slow queries: 0% (0/2K)
    [OK] Highest usage of available connections: 9% (9/100)
    [OK] Key buffer size / total MyISAM indexes: 96.0M/57.9M
    [OK] Key buffer hit rate: 98.1% (529K cached / 9K reads)
    [!!] Query cache efficiency: 12.0% (192 cached / 1K selects)
    [OK] Query cache prunes per day: 0
    [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 146 sorts)
    [OK] Temporary tables created on disk: 19% (33 on disk / 172 total)
    [OK] Thread cache hit rate: 97% (14 created / 495 connections)
    [OK] Table cache hit rate: 49% (643 open / 1K opened)
    [OK] Open file limit used: 1% (741/65K)
    [OK] Table locks acquired immediately: 99% (1K immediate / 1K locks)
    [OK] InnoDB data size / buffer pool: 53.3M/64.0M
    
    -------- Recommendations -----------------------------------------------------
    General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    MySQL started within last 24 hours - recommendations may be inaccurate
    Variables to adjust:
    query_cache_limit (> 256M, or use smaller result sets)

     

    Na ile ustawić ten query_cache_limit ? query_cache_size mam na 512M


  5. Jakie proponujecie ustawić wartości i co zmienić w konfiguracji mysql ?

     

    Wynik z mysqltuner.pl

     

     >> MySQLTuner 1.0.1 - Major Hayden <major@mhtx.net>
    >> Bug reports, feature requests, and downloads at http://mysqltuner.com/
    >> Run with '--help' for additional options and output filtering
    Please enter your MySQL administrative login: root
    Please enter your MySQL administrative password:
    
    -------- General Statistics --------------------------------------------------
    [--] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 5.0.51a-24+lenny2-log
    [OK] Operating on 32-bit architecture with less than 2GB RAM
    
    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
    [--] Data in MyISAM tables: 59M (Tables: 351)
    [--] Data in InnoDB tables: 48M (Tables: 271)
    [!!] Total fragmented tables: 19
    
    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 1d 5h 48m 17s (749K q [6.987 qps], 36K conn, TX: 1B, RX: 138M)
    [--] Reads / Writes: 53% / 47%
    [--] Total buffers: 600.0M global + 2.6M per thread (100 max threads)
    [OK] Maximum possible memory usage: 862.5M (43% of installed RAM)
    [OK] Slow queries: 0% (0/749K)
    [OK] Highest usage of available connections: 13% (13/100)
    [OK] Key buffer size / total MyISAM indexes: 512.0M/61.4M
    [OK] Key buffer hit rate: 100.0% (212M cached / 48K reads)
    [OK] Query cache efficiency: 30.8% (123K cached / 400K selects)
    [!!] Query cache prunes per day: 106079
    [OK] Sorts requiring temporary tables: 0% (2 temp sorts / 35K sorts)
    [!!] Temporary tables created on disk: 27% (6K on disk / 23K total)
    [OK] Thread cache hit rate: 99% (45 created / 36K connections)
    [OK] Table cache hit rate: 86% (1K open / 1K opened)
    [OK] Open file limit used: 1% (919/65K)
    [OK] Table locks acquired immediately: 99% (640K immediate / 640K locks)
    [!!] InnoDB data size / buffer pool: 48.3M/38.0M
    
    -------- Recommendations -----------------------------------------------------
    General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    When making adjustments, make tmp_table_size/max_heap_table_size equal
    Reduce your SELECT DISTINCT queries without LIMIT clauses
    Variables to adjust:
    query_cache_size (> 32M)
    tmp_table_size (> 32M)
    max_heap_table_size (> 16M)
    innodb_buffer_pool_size (>= 48M)

     

    Mój my.cnf

     

    #
    # The MySQL database server configuration file.
    #
    # You can copy this to one of:
    # - "/etc/mysql/my.cnf" to set global options,
    # - "~/.my.cnf" to set user-specific options.
    #
    # One can use all long options that the program supports.
    # Run program with --help to get a list of available options and with
    # --print-defaults to see which it would actually understand and use.
    #
    # For explanations see
    # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
    
    # This will be passed to all mysql clients
    # It has been reported that passwords should be enclosed with ticks/quotes
    # escpecially if they contain "#" chars...
    # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
    [client]
    port 	= 3306
    socket 	= /var/run/mysqld/mysqld.sock
    
    # Here is entries for some specific programs
    # The following values assume you have at least 32M ram
    
    # This was formally known as [safe_mysqld]. Both versions are currently parsed.
    [mysqld_safe]
    socket 	= /var/run/mysqld/mysqld.sock
    nice 	= 0
    
    [mysqld]
    #
    # * Basic Settings
    #
    user 	= mysql
    pid-file 	= /var/run/mysqld/mysqld.pid
    socket 	= /var/run/mysqld/mysqld.sock
    port 	= 3306
    basedir 	= /usr
    datadir 	= /var/lib/mysql
    tmpdir 	= /tmp
    language 	= /usr/share/mysql/english
    skip-external-locking
    #
    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.
    bind-address 	= 127.0.0.1
    #
    # * Fine Tuning
    #
    key_buffer 	= 512M
    max_allowed_packet 	= 16M
    thread_stack 	= 128K
    thread_cache_size 	= 8
    # This replaces the startup script and checks MyISAM tables if needed
    # the first time they are touched
    myisam-recover 	= BACKUP
    wait_timeout 	= 30
    #max_connections 	= 100
    table_cache 	= 1M
    #thread_concurrency 	= 10
    #
    # * Query Cache Configuration
    #
    query_cache_limit 	= 4M
    query_cache_size 	= 32M
    #
    # * Logging and Replication
    #
    # Both location gets rotated by the cronjob.
    # Be aware that this log type is a performance killer.
    #log 	= /var/log/mysql/mysql.log
    #
    # Error logging goes to syslog. This is a Debian improvement 
    #
    # Here you can see queries with especially long duration
    #log_slow_queries 	= /var/log/mysql/mysql-slow.log
    log-slow-queries 	= /var/log/mysql/log-slow-queries.log
    #long_query_time = 2
    #log-queries-not-using-indexes
    #
    # The following can be used as easy to replay backup logs or for replication.
    # note: if you are setting up a replication slave, see README.Debian about
    # 	other settings you may need to change.
    #server-id 	= 1
    #log_bin 	= /var/log/mysql/mysql-bin.log
    expire_logs_days 	= 10
    max_binlog_size 	= 100M
    #binlog_do_db 	= include_database_name
    #binlog_ignore_db 	= include_database_name
    #
    # * BerkeleyDB
    #
    # Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
    skip-bdb
    #
    # * InnoDB
    #
    # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
    # Read the manual for more InnoDB related options. There are many!
    # You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
    #skip-innodb
    #
    # * Security Features
    #
    # Read the manual, too, if you want chroot!
    # chroot = /var/lib/mysql/
    #
    # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
    #
    # ssl-ca=/etc/mysql/cacert.pem
    # ssl-cert=/etc/mysql/server-cert.pem
    # ssl-key=/etc/mysql/server-key.pem
    innodb_buffer_pool_size = 38M
    
    
    [mysqldump]
    quick
    quote-names
    max_allowed_packet 	= 16M
    
    [mysql]
    #no-auto-rehash # faster start of mysql but no tab completition
    
    [isamchk]
    key_buffer 	= 16M
    
    #
    # * NDB Cluster
    #
    # See /usr/share/doc/mysql-server-*/README.Debian for more information.
    #
    # The following configuration is read by the NDB Data Nodes (ndbd processes)
    # not from the NDB Management Nodes (ndb_mgmd processes).
    #
    # [MYSQL_CLUSTER]
    # ndb-connectstring=127.0.0.1
    
    
    #
    # * IMPORTANT: Additional settings that can override those from this file!
    # The files must end with '.cnf', otherwise they'll be ignored.
    #
    !includedir /etc/mysql/conf.d/
    


  6. Udało mi się zainstalować najnowszą wersje webmina już, ale teraz mam problem. Myślałem że to będzie jak w DA, że dodam sobie użytkownika, baze, domene i wgram stronę. A tu multum funkcj, których nie znam. Mogłby ktoś powiedzieć jak dodać domene, konto ftp, mysql?

     

    Zainstaluj i skonfiguruj sobie ispCP. Jeśli nie umiesz to jest wiele osób które za drobną opłatą zrobią to za Ciebie. Jak coś to GG 564555


  7. Co dziennie dostaje wiadomość od mojego Crone o takim temacie

    Cron <root@pixelmeal> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

    i takie treści

    run-parts: /etc/cron.daily/amavisd-new exited with return code 1

     

    Generalnie próbowałem jakoś zrobić żeby mi tego nie wysyłał ale nie wiem jak ... ma ktoś może jakiś pomysł ?

     

    TO mój /etc/cron.daily/amavisd-new

    #!/bin/sh
    #
    # Daily maintenance for amavisd-new
    # $Id: amavisd-new.cron.daily 930 2006-08-10 13:38:45Z hmh $
    #
    test -e /usr/sbin/amavisd-new-cronjob && exec /usr/sbin/amavisd-new-cronjob sa-clean
    

     

    A to /usr/sbin/amavisd-new-cronjob

    #!/bin/sh
    
    # amavisd-new cronjob helper
    #
    # Run it as root or as the amavis user
    #
    # First parameter specifies which cronjob routine to run:
    # 	sa-sync: 	spamassassin fast sync
    # 	sa-clean: 	spamassassin cleanup
    
    test -e /usr/bin/sa-learn || exit 0
    test -e /usr/sbin/amavisd-new || exit 0
    
    SUUSER="amavis"
    
    set -e
    umask 022
    
    # WATCH OUT FOR PROPER QUOTING LEVEL WHEN CALLING THIS!
    do_amavis_cmd() {
    	if [ "$(id -u -n)" != "${SUUSER}" ]; then
    	exec /bin/su - "${SUUSER}" -c "$*"
    	else
    	# to get the same quoting level as the su path
    	CMD="$*"
    	exec ${CMD}
    	fi
    }
    
    case $1 in
    	sa-sync)
    	do_amavis_cmd "/usr/bin/sa-learn --sync &>/dev/null"
    	;;
    	sa-clean)
    	do_amavis_cmd "/usr/bin/sa-learn --sync --force-expire &>/dev/null"
    	;;
    	*)
    	echo "$0: unknown cron routine $1" >&2
    	exit 1
    	;;
    esac
    
    exit 0
    

     

    Dziwne bo jak wykonam

    test -e /usr/sbin/amavisd-new-cronjob

    to nic nie wypluwa

     

    jak wykonam

    test -e /usr/sbin/amavisd-new-cronjob && exec /usr/sbin/amavisd-new-cronjob sa-clean

    To wyłącza mi PuTTy czyli zrywa połączenie z ssh

     

    tak samo jak wykonam samo

    exec /usr/sbin/amavisd-new-cronjob sa-clean

     

    A jak dam

    /usr/sbin/amavisd-new-cronjob sa-clean

    czyli bez exec to też mi nic nie wypluwa ...


  8. Kurcze teraz zauważyłem że wp.pl w ogólnie nie przyjmuje maili z mojego serwera, tylko dostaje powiadomienie

    Undelivered Mail Returned to Sender
    
    This is the mail system at host mail.pixelmeal.com.
    
    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.
    
    For further assistance, please send mail to postmaster.
    
    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.
    
    	The mail system
    
    <mcelber@wp.pl>: host mx.wp.pl[212.77.101.4] said: 554 (#5.3.0) Nie przyjmiemy
    tej wiadomosci poniewaz jest to spam - zobacz strone:
    http://poczta.wp.pl/pub_polityka_antyspamowa.html / We can't accept this
    message because it is spam - see:
    http://poczta.wp.pl/pub_bulk_email_policy.html [127] (in reply to end of
    DATA command)
    
    Reporting-MTA: dns; mail.pixelmeal.com
    X-Postfix-Queue-ID: D70323E641
    X-Postfix-Sender: rfc822; elber@pixelmeal.com
    Arrival-Date: Mon, 30 Nov 2009 17:08:20 +0100 (CET)
    
    Final-Recipient: rfc822; mcelber@wp.pl
    Original-Recipient: rfc822;mcelber@wp.pl
    Action: failed
    Status: 5.0.0
    Remote-MTA: dns; mx.wp.pl
    Diagnostic-Code: smtp; 554 (#5.3.0) Nie przyjmiemy tej wiadomosci poniewaz jest
    to spam - zobacz strone: http://poczta.wp.pl/pub_polityka_antyspamowa.html
    / We can't accept this message because it is spam - see:
    http://poczta.wp.pl/pub_bulk_email_policy.html [127]
    

     

    to spf pixelmeal.com

    pixelmeal.com. 	IN 	TXT 	"v=spf1 a mx ip4:91.121.142.229 include:pixelmeal.com include:ns356736.ovh.net ~all"

     

    a to ns356736.ovh.net

    ns356736.ovh.net. 	IN 	TXT 	"v=spf1 a mx ip4:91.121.142.229 ~all"

     

    Brakuje tutaj czegoś? Źle coś jest wpisane ? Czemu nie dochodzą maile na wp.pl


  9. Sam nie wiem. Teraz mój skrypt wygląda tak:

    #!/bin/bash
    
    KAT='/home/virtual'
    ARCH='/var/tmp'
    DZISIAJ=`date +%d-%m-%Y`
    STARE=`date +%d-%m-%Y --date="10 days ago"`
    DELETE="$STARE.*"
    HOST='host'
    USER='login'
    PASSWD='hasło'
    
    ls -1 $KAT |while read domena; do
    	echo "Archiwzowanie: $domena"
    	( cd $KAT/$domena/backups && tar czf ${ARCH}/${DZISIAJ}.${domena}.tar.gz . )
    	ncftpput -u $USER -p $PASSWD -a $HOST / ${ARCH}/${DZISIAJ}.${domena}.tar.gz
    	rm ${ARCH}/${DZISIAJ}.${domena}.tar.gz
    done
    
    ftp -n $HOST << EOF
    user $USER $PASSWD
    prompt
    mdelete $DELETE
    quit
    EOF
    

     

    Jest tutaj coś źle napisane albo coś poprawić ? ;)


  10. Witam, mam IspCP 1.0.2 i zauważyłem że niektóre maile które są przekierowane na np. era.blackberry.com czy też na inne serwery lokalne w mojej miejscowości nie dochodzą. Co dziwne nie dotyczy to wszystkich serwerów, bo np. jak wyśle maila na adres admin@mcelber.pl który jest przekierowany na gmail to wszystko ładnie dochodzi a jak wysyłam maile których adresy są przekierowane na np. interka.pl era.blackberry.com nie dochodzą ... a na o2.pl dochodzą dopiero po kilkunastu minutach ;)

     

    To SPF domeny która jest przekierowana na mail era.blackberry.com

     

    77bluemachine.pl. 	IN 	TXT 	"v=spf1 a mx ip4:91.121.142.229 include:pixelmeal.com include:ns356736.ovh.net ~all"

     

    to pixelmeal.com

    pixelmeal.com. 	IN 	TXT 	"v=spf1 a mx ip4:91.121.142.229 include:pixelmeal.com include:ns356736.ovh.net ~all"

     

    a to ns356736.ovh.net

    ns356736.ovh.net. 	IN 	TXT 	"v=spf1 a mx ip4:91.121.142.229 ~all"

     

    Brakuje tutaj czegoś? Źle coś jest wpisane ?


  11. A nie prościej ?

     

    date +%d-%m-%Y --date="14 days ago"
    

    Domyślam się, że chodzi o tu backup w OVH. Tam jest tylko dostęp przez ftp i klucza ssh nie zainstalujesz.

     

    Hmm myślałem nad czymś tego typu

     

    #!/bin/bash
    
    STARE=`date +%d-%m-%Y --date="10 days ago"`
    DELETE="$STARE.*"
    
    ftp -n $HOST << EOF
    user $USER $PASSWD
    delete $DELETE
    quit
    EOF
    

    ale mi wywala

    Could not delete 14-11-2009.*: No such file or directory

     

    mimo, że pliki z początkiem w nazwie 14-11-2009. są.

     

    Źle kombinuje ?


  12. Mam dzisiaj dobry dzień to ci napiszę

     

    #!/bin/bash
    
    KAT='/home/virtual'
    ARCH='/var/tmp'
    DZISIAJ=`date +%d-%m-%Y`
    ZDALNY='user@192.168.1.20:/var/backups'
    
    
    ls -1 $KAT |while read domena; do
    echo "archiwzowanie: $domena"
    ( cd $KAT/$domena/backups && tar czf ${ARCH}/${DZISIAJ}.${domena}.tar.gz . )
    scp ${ARCH}/${DZISIAJ}.${domena}.tar.gz ${ZDALNY}
    done

     

    Wysyłanie czegokolwiek przez FTP jest moim zdaniem przeżytkiem - nie dość że niebezpieczne bo hasła jawnym tekstem lecą, to jeszcze nie da się go sensownie oskryptować. Dlatego jest przez scp bo to jedna linijka. Musisz tylko wygenerować klucz użytkownika który będzie robił kopię:

    ssh-keygen

    I przesłać klucz: ~/.ssh/id_dsa.pub to katalogu .ssh zdalnego użytkownika na zdalnym serwerze - klucz musi tam nosić nazwę authorized_keys. Wtedy możesz się logować bez hasła, więc skrypt będzie śmigać. Usuwanie starszych plików pozostawiam ci w charakterze pracy domowej. ;)

     

    A jak koniecznie musisz to przesyłać ftp-em to zainteresuj się czymś co się nazywa "expect".

    http://pl.wikipedia.org/wiki/Expect

     

    A jeśli to ftp to ftp backupowe do którego mama dostęp tylko za pomocą ftp z mojego serwera i login to nazwa serwera ? To jak mam skonfigurować klucz ssh ? bo jak tworze katalog .ssh na ftp i przesyłam tam plik to nic mi to nie daje :)


  13. Witam, potrzebuje skrypt, który codziennie o 3 w nocy (ale to sobie dodam crona) będzie pakował foldery /home/virtual/*/backups/ tam gdzie * to są nazwy domen i dobrze by było aby każdy spakowany folder backups z folderu * miał taką nazwą jak * czyli np. mam /home/virtual/domena1.pl/backups/ i chce żeby zawartość backups spakowało jako aktualnadata.domena1.pl.tar.gz albo jakieś inne rozszerzenie może być i analogicznie jak mam potem /home/virtual/domena2.pl/backups/ żeby spakowało jako aktualnadata.domena2.pl.tar.gz (aktualnadata to data w formacie dd-mm-rrrr) i następnie te wszystkie pliki tar.gz wysłało mi na serwer FTP, i dobrze by było aby jeszcze z tego FTP usuwało pliki starsze niż 14 dni. Ma ktoś coś takiego, ewentualnie mógł by takie coś ktoś napisać ?


  14. Witam, mam mały problem, otóż mam stronę która wykorzystuje .htaccess ale coś nie działa bo jak na nią wchodzę to mi się wyświetla "No input file specified." Oto zawartość pliku .htaccess:

     

    RewriteEngine on
    RewriteCond $1 !^(index\.php|img|galeria|js|css|robots\.txt|test\.php)
    RewriteRule ^(.*)$ /index.php/$1 [L]
    #
    #RewriteEngine on
    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteRule ^(.*)$ /index.php/$1 [L]

     

    Co i gdzie muszę ustawić aby wszystko działało ?


  15. Witam, potrzebuje jakiegoś darmowego panelu który będzie spełniał następujące funkcje:

    - bezpieczeństwo

    - tworzeniu klientów

    - tworzenie kont e-mail

    - tworzenie kont www / domen /subdomen /

    - przekierowanie domen

    - ustawianie miejsca na dysku i transferu / Quota

    - własne strony błędów

    - php.ini do każdej domeny

     

    Zna ktoś coś fajnego ? I co polecacie do statystyk www ??

×