Aller au contenu

romain75

Membres
  • Compteur de contenus

    29
  • Inscription

  • Dernière visite

À propos de romain75

romain75's Achievements

Newbie

Newbie (1/14)

0

Réputation sur la communauté

  1. Le DSM 3 tout une histoire, le service n'est pas accessible depuis la version firefox/3.6.10 de MAC OS. Pourquoi?
  2. Bonjour, même chose pour moi! / # /usr/syno/etc/rc.d/S99iTunes.sh restart iTunes Server stopped iTunes Server started / #
  3. Bonjour Patrick, Crois tu normal qu'il faut 10s de plus au NAS pour charger une page banale? Mon dernier post sert à montrer mon avancement et savoir où sont les paramètres qui serviront à améliorer MYSQL. Le service LAMP du NAS est considérablement lent, pourquoi? La seule réponse que j'ai entendu de ta part, c'est que l'on ne peut pas comparer 2 machines de puissances différentes. Or 10 secondes, c'est tout de même énorme, tu penses pas qu'il pourrait avoir une optimisation à faire? Ou crois-tu qu'il faut changer de machine car la seule et unique solution que tu as à apporter est la puissance machine? Cdlt
  4. Le lancement de mysql se joue avec cette commande : PID_FILE=/tmp/mysqld.pid MYSQL_ARGS="--max_allowed_packet=8M" ${MYSQL_DIR}/share/mysql/mysql.server start --datadir=${DataDir}/mysql --pid-file=${PID_FILE} ${MYSQL_ARGS} vi /usr/syno/mysql/share/mysql/mysql.server #!/bin/sh # Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB # This file is public domain and comes with NO WARRANTY of any kind # MySQL daemon start/stop script. # Usually this is put in /etc/init.d (at least on machines SYSV R4 based # systems) and linked to /etc/rc3.d/S99mysql and /etc/rc0.d/K01mysql. # When this is done the mysql server will be started when the machine is # started and shut down when the systems goes down. # Comments to support chkconfig on RedHat Linux # chkconfig: 2345 64 36 # description: A very fast and reliable SQL database engine. # Comments to support LSB init script conventions ### BEGIN INIT INFO # Provides: mysql # Required-Start: $local_fs $network $remote_fs # Should-Start: ypbind nscd ldap ntpd xntpd # Required-Stop: $local_fs $network $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: start and stop MySQL # Description: MySQL is a very fast and reliable SQL database engine. ### END INIT INFO # If you install MySQL on some other places than /usr/syno/mysql, then you # have to do one of the following things for this script to work: # # - Run this script from within the MySQL installation directory # - Create a /etc/my.cnf file with the following information: # [mysqld] # basedir=<path-to-mysql-installation-directory> # - Add the above to any other configuration file (for example ~/.my.ini) # and copy my_print_defaults to /usr/bin # - Add the path to the mysql-installation-directory to the basedir variable # below. # # If you want to affect other MySQL variables, you should make your changes # in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files. # If you change base dir, you must also change datadir. These may get # overwritten by settings in the MySQL configuration files. basedir= datadir= # Default value, in seconds, afterwhich the script should timeout waiting # for server start. # Value here is overriden by value in my.cnf. # 0 means don't wait at all # Negative numbers mean to wait indefinitely service_startup_timeout=900 # The following variables are only set for letting mysql.server find things. # Set some defaults pid_file= server_pid_file= use_mysqld_safe=1 user=admin if test -z "$basedir" then basedir=/usr/syno/mysql bindir=/usr/syno/mysql/bin if test -z "$datadir" then datadir=/var/services/mysql fi sbindir=/usr/syno/mysql/sbin libexecdir=/usr/syno/mysql/libexec else bindir="$basedir/bin" if test -z "$datadir" then datadir="$basedir/data" fi sbindir="$basedir/sbin" libexecdir="$basedir/libexec" fi # datadir_set is used to determine if datadir was set (and so should be # *not* set inside of the --basedir= handler.) datadir_set= # # Use LSB init script functions for printing messages, if possible # lsb_functions="/lib/lsb/init-functions" if test -f $lsb_functions ; then . $lsb_functions else log_success_msg() { echo " SUCCESS! $@" } log_failure_msg() { echo " ERROR! $@" } fi PATH=/sbin:/usr/sbin:/bin:/usr/bin:$basedir/bin export PATH mode=$1 # start or stop shift other_args="$*" # uncommon, but needed when called from an RPM upgrade action # Expected: "--skip-networking --skip-grant-tables" # They are not checked here, intentionally, as it is the resposibility # of the "spec" file author to give correct arguments only. case `echo "testing\c"`,`echo -n testing` in *c*,-n*) echo_n= echo_c= ;; *c*,*) echo_n=-n echo_c= ;; *) echo_n= echo_c='\c' ;; esac parse_server_arguments() { for arg do case "$arg" in --basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` bindir="$basedir/bin" if test -z "$datadir_set"; then datadir="$basedir/data" fi sbindir="$basedir/sbin" libexecdir="$basedir/libexec" ;; --datadir=*) datadir=`echo "$arg" | sed -e 's/^[^=]*=//'` datadir_set=1 ;; --user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; --pid-file=*) server_pid_file=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; --service-startup-timeout=*) service_startup_timeout=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; --use-mysqld_safe) use_mysqld_safe=1;; --use-manager) use_mysqld_safe=0;; esac done } parse_manager_arguments() { for arg do case "$arg" in --pid-file=*) pid_file=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; --user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; esac done } wait_for_pid () { verb="$1" manager_pid="$2" # process ID of the program operating on the pid-file i=0 avoid_race_condition="by checking again" while test $i -ne $service_startup_timeout ; do case "$verb" in 'created') # wait for a PID-file to pop into existence. test -s $pid_file && i='' && break ;; 'removed') # wait for this PID-file to disappear test ! -s $pid_file && i='' && break ;; *) echo "wait_for_pid () usage: wait_for_pid created|removed manager_pid" exit 1 ;; esac # if manager isn't running, then pid-file will never be updated if test -n "$manager_pid"; then if kill -0 "$manager_pid" 2>/dev/null; then : # the manager still runs else # The manager may have exited between the last pid-file check and now. if test -n "$avoid_race_condition"; then avoid_race_condition="" continue # Check again. fi # there's nothing that will affect the file. log_failure_msg "Manager of pid-file quit without updating file." return 1 # not waiting any more. fi fi echo $echo_n ".$echo_c" i=`expr $i + 1` sleep 1 done if test -z "$i" ; then log_success_msg return 0 else log_failure_msg return 1 fi } # Get arguments from the my.cnf file, # the only group, which is read from now on is [mysqld] if test -x ./bin/my_print_defaults then print_defaults="./bin/my_print_defaults" elif test -x $bindir/my_print_defaults then print_defaults="$bindir/my_print_defaults" elif test -x $bindir/mysql_print_defaults then print_defaults="$bindir/mysql_print_defaults" else # Try to find basedir in /etc/my.cnf conf=/etc/my.cnf print_defaults= if test -r $conf then subpat='^[^=]*basedir[^=]*=\(.*\) dirs=`sed -e "/$subpat/!d" -e 's//\1/' $conf` for d in $dirs do d=`echo $d | sed -e 's/[ ]//g'` if test -x "$d/bin/my_print_defaults" then print_defaults="$d/bin/my_print_defaults" break fi if test -x "$d/bin/mysql_print_defaults" then print_defaults="$d/bin/mysql_print_defaults" break fi done fi # Hope it's in the PATH ... but I doubt it test -z "$print_defaults" && print_defaults="my_print_defaults" fi # # Read defaults file from 'basedir'. If there is no defaults file there # check if it's in the old (depricated) place (datadir) and read it from there # extra_args="" if test -r "$basedir/my.cnf" then extra_args="-e $basedir/my.cnf" else if test -r "$datadir/my.cnf" then extra_args="-e $datadir/my.cnf" fi fi parse_server_arguments `$print_defaults $extra_args mysqld server mysql_server mysql.server` $@ # Look for the pidfile parse_manager_arguments `$print_defaults $extra_args manager` # # Set pid file if not given # if test -z "$pid_file" then pid_file=$datadir/mysqlmanager-`/bin/hostname`.pid else case "$pid_file" in /* ) ;; * ) pid_file="$datadir/$pid_file" ;; esac fi if test -z "$server_pid_file" then server_pid_file=$datadir/`/bin/hostname`.pid else case "$server_pid_file" in /* ) ;; * ) server_pid_file="$datadir/$server_pid_file" ;; esac fi case "$mode" in 'start') # Start daemon # Safeguard (relative paths, core dumps..) cd $basedir manager=$bindir/mysqlmanager if test -x $libexecdir/mysqlmanager then manager=$libexecdir/mysqlmanager elif test -x $sbindir/mysqlmanager then manager=$sbindir/mysqlmanager fi echo $echo_n "Starting MySQL" if test -x $manager -a "$use_mysqld_safe" = "0" then if test -n "$other_args" then log_failure_msg "MySQL manager does not support options '$other_args'" exit 1 fi # Give extra arguments to mysqld with the my.cnf file. This script may # be overwritten at next upgrade. "$manager" \ --mysqld-safe-compatible \ --user="$user" \ --pid-file="$pid_file" >/dev/null 2>&1 & wait_for_pid created $!; return_value=$? # Make lock for RedHat / SuSE if test -w /var/lock/subsys then touch /var/lock/subsys/mysqlmanager fi exit $return_value elif test -x $bindir/mysqld_safe then # Give extra arguments to mysqld with the my.cnf file. This script # may be overwritten at next upgrade. pid_file=$server_pid_file $bindir/mysqld_safe --datadir=$datadir --pid-file=$server_pid_file $other_args >/dev/null 2>&1 & wait_for_pid created $!; return_value=$? # Make lock for RedHat / SuSE if test -w /var/lock/subsys then touch /var/lock/subsys/mysql fi exit $return_value else log_failure_msg "Couldn't find MySQL manager ($manager) or server ($bindir/mysqld_safe)" fi ;; 'stop') # Stop daemon. We use a signal here to avoid having to know the # root password. # The RedHat / SuSE lock directory to remove lock_dir=/var/lock/subsys/mysqlmanager # If the manager pid_file doesn't exist, try the server's if test ! -s "$pid_file" then pid_file=$server_pid_file lock_dir=/var/lock/subsys/mysql fi if test -s "$pid_file" then mysqlmanager_pid=`cat $pid_file` echo $echo_n "Shutting down MySQL" kill $mysqlmanager_pid # mysqlmanager should remove the pid_file when it exits, so wait for it. wait_for_pid removed "$mysqlmanager_pid"; return_value=$? # delete lock for RedHat / SuSE if test -f $lock_dir then rm -f $lock_dir fi exit $return_value else log_failure_msg "MySQL manager or server PID file could not be found!" fi ;; 'restart') # Stop the service and regardless of whether it was # running or not, start it again. if $0 stop $other_args; then $0 start $other_args else log_failure_msg "Failed to stop running server, so refusing to try to start." exit 1 fi ;; 'reload'|'force-reload') if test -s "$server_pid_file" ; then read mysqld_pid < $server_pid_file kill -HUP $mysqld_pid && log_success_msg "Reloading service MySQL" touch $server_pid_file else log_failure_msg "MySQL PID file could not be found!" exit 1 fi ;; 'status') # First, check to see if pid file exists if test -s "$server_pid_file" ; then read mysqld_pid < $server_pid_file if kill -0 $mysqld_pid 2>/dev/null ; then log_success_msg "MySQL running ($mysqld_pid)" exit 0 else log_failure_msg "MySQL is not running, but PID file exists" exit 1 fi else # Try to find appropriate mysqld process mysqld_pid=`pidof $libexecdir/mysqld` if test -z $mysqld_pid ; then if test "$use_mysqld_safe" = "0" ; then lockfile=/var/lock/subsys/mysqlmanager else lockfile=/var/lock/subsys/mysql fi if test -f $lockfile ; then log_failure_msg "MySQL is not running, but lock exists" exit 2 fi log_failure_msg "MySQL is not running" exit 3 else log_failure_msg "MySQL is running but PID file could not be found" exit 4 fi fi ;; *) # usage echo "Usage: $0 {start|stop|restart|reload|force-reload|status} [ MySQL server options ]" exit 1 ;; esac exit 0
  5. Bonjour, je dépose un message ici pour des questions de lenteur. En effet, je dispose d'une NAS SYNOLOGY DS207 et j'ai des problème de lenteur lorsque j'accède à mon site internet. Pour prendre en compte les différents aspects de lenteur, j'ai cherché à savoir si ça venait du réseau ou de la machine. Pour cela très simple j'ai installé dans le même réseau une autre machine cette fois sous WAMP avec le même site internet. Et j'ai remarqué une différence pour : WAMP : 5,93s LAMP (DS207) : 15,90s J'ai essayé d'optimisé le site mais je remarque que j'ai le script de chargement qui prend le plus de temps : WAMP : 0s (bizarre que ça soit nul) LAMP (DS207) : 12,21s Les ressources de Chrome m'indique que c'est du "document" mdrrr Pour apache, j'ai mis un cache pour les images, HTML, js, css. vi /usr/syno/apache/conf/httpd.conf LoadModule expires_module modules/mod_expires.so <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 2 minutes" ExpiresByType text/html "access plus 120 seconds" ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 month" ExpiresByType application/x-javascript "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" ExpiresByType image/gif "access plus 1 months" ExpiresByType image/jpeg "access plus 1 months" ExpiresByType image/png "access plus 1 months" </IfModule> LoadModule deflate_module modules/mod_deflate.so <IfModule mod_deflate.c> DeflateCompressionLevel 2 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css application/javascript SetOutputFilter DEFLATE Header append Vary User-Agent env=!dont-vary AddOutputFilter DEFLATE js css BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.[0678] no-gzip BrowserMatch \bMSIE\s7 !no-gzip !gzip-only-text/html </IfModule> J'ai limiter l'utilisation de l'administration du nas synology : vi /usr/syno/apache/conf/httpd.conf-sys MinSpareServers 1 MaxSpareServers 3 StartServers 1 Et maintenant, j'aimerai optimiser MYSQL : // Fichier de configuration lors du lancement vi /usr/syno/mysql/share/mysql/mysql.server // Une sauvegarde cp /etc/my.cnf /etc/my.cnf.bkp // J'ajoute les paramètres d'un fichier par défaut cp /usr/syno/mysql/share/mysql/my-medium.cnf /etc/my.cnf chmod 644 /etc/my.cnf Je test la manipulation suivante : # cp /usr/syno/mysql/share/mysql/my-medium.cnf /etc/my.cnf # /usr/syno/etc/rc.d/S21mysql.sh restart Stopping MySQL... Shutting down MySQL. SUCCESS! Starting MySQL... Starting MySQL... ERROR! Manager of pid-file quit without updating file. MYSQL data dir = /volume1/@database/mysql... Je reviens en arrière : # cp /etc/my.cnf.bkp /etc/my.cnf # /usr/syno/etc/rc.d/S21mysql.sh restart Stopping MySQL... ERROR! MySQL manager or server PID file could not be found! Starting MySQL... Starting MySQL. SUCCESS! MYSQL data dir = /volume1/@database/mysql... Les paramètres MYSQL doivent être uniquement dans le fichier /usr/syno/etc/rc.d/S21mysql.sh puisqu'il n'y à rien dans le fichier /etc/my.cnf #!/bin/sh PID_FILE=/tmp/mysqld.pid MYSQL_VERSION="5.1.34" MYSQL_DIR="/usr/syno/mysql" MYSQL_SERVICE_PATH="/var/services/mysql" DO_NETBKP_CANCEL_TMP_FILE="/tmp/do_netbkp_cancel.chk" LOCALBKP_CANCEL_TMP_FILE="/tmp/do_localbkp_cancel.chk" MYSQL_RCVR_DB_CONFLICT_LIST="/tmp/mysql_rcvr_db_conflict_list.tmp" MYSQL_RCVR_DB_NEW_LIST="/tmp/mysql_rcvr_db_new_list.tmp" MYSQL_FAIL=1 CANCEL_RET=2 MYSQL_PROG_PATH=/usr/syno/mysql/bin/mysql MYSQL_ARGS="--max_allowed_packet=8M" UpgradeDatabase() { # Upgrade MySQL database Ret=0 # Backup root password and reset password to empty echo "USE mysql;" > /tmp/mysql_init.$$ echo "DELETE FROM user WHERE user='upgrade_root_tmp';" >> /tmp/mysql_init.$$ echo "UPDATE user SET user='upgrade_root_tmp' WHERE user='root';" >> /tmp/mysql_init.$$ echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '' WITH GRANT OPTION;" >> /tmp/mysql_init.$$ echo "FLUSH PRIVILEGES;" >> /tmp/mysql_init.$$ ${MYSQL_DIR}/bin/mysqld_safe --init-file=/tmp/mysql_init.$$ --pid-file=${PID_FILE} & sleep 20 # Start Upgrade /usr/syno/mysql/bin/mysql_upgrade Ret=$? $0 stop rm /tmp/mysql_init.$$ sleep 3 # Restore root password echo "USE mysql;" > /tmp/mysql_init.$$ echo "DELETE FROM user WHERE user='root';" >> /tmp/mysql_init.$$ echo "UPDATE user SET user='root' WHERE user='upgrade_root_tmp';" >> /tmp/mysql_init.$$ ${MYSQL_DIR}/bin/mysqld_safe --init-file=/tmp/mysql_init.$$ --pid-file=${PID_FILE} & sleep 20 $0 stop rm /tmp/mysql_init.$$ sleep 3 return $Ret } CheckCancellingAction() { Ret=0; # check if user has canceld the backup task if [ $1 = "netbkp" ]; then if [ -f "${DO_NETBKP_CANCEL_TMP_FILE}" ]; then Ret=${CANCEL_RET} fi elif [ $1 = "localbkp" ]; then if [ -f "${LOCALBKP_CANCEL_TMP_FILE}" ]; then Ret=${CANCEL_RET} fi else Ret=${MYSQL_FAIL} fi return $Ret } BackupDatabase() { # Dump MySQL database Ret=0 DST_PATH=$1 BKPTYPE=$2 # Start dump for i in `find /var/services/mysql/* -type d` do # check if user has canceld the backup task CheckCancellingAction ${BKPTYPE} Ret=$? if [ ${Ret} -ne 0 ]; then return ${Ret} fi f=`basename ${i}` f_tmp=`echo $f | sed -e 's/@00/\\\\x/g'` f_tmp=`echo -e "$f_tmp"` # skip mysql and test databases if [ "${f_tmp}" = "mysql" -o "${f_tmp}" = "test" ]; then continue fi # dump database rm -f "$DST_PATH/${f}.sql" /usr/syno/mysql/bin/mysqldump --database "${f_tmp}" > "$DST_PATH/${f}.sql" # If fail to dump, return ${MYSQL_FAIL} if [ $? -ne 0 ]; then return ${MYSQL_FAIL} fi # check if user has canceld the backup task before excuting gzip command CheckCancellingAction ${BKPTYPE} Ret=$? if [ ${Ret} -ne 0 ]; then return ${Ret} fi rm -f "$DST_PATH/${f}.sql.gz" gzip -f "$DST_PATH/${f}.sql" done return $Ret } TablesSet() { db="$1" ext=$2 set_type=$3 `echo "use '${db}'; show tables;" | ${MYSQL_PROG_PATH} > /tmp/table_list.${ext}` cat /tmp/table_list.${ext} | while read line do if [ "${line}" = "Tables_in_${db}" ]; then continue; fi if [ ${set_type} = "rename" ]; then echo "use '${db}'; rename table \`${line}\` to \`${line}_${ext}\`;" | ${MYSQL_PROG_PATH} elif [ ${set_type} = "recover" ]; then ori_table=${line%_${ext}} echo "use '${db}'; rename table \`${line}\` to \`${ori_table}\`;" | ${MYSQL_PROG_PATH} elif [ ${set_type} = "drop_ori" ]; then # check if ${line} is the original table echo "${line}" | grep -q "_${ext}" if [ $? -eq 0 ]; then echo "use '${db}'; drop table \`${line}\`;" | ${MYSQL_PROG_PATH} fi elif [ ${set_type} = "drop_new" ]; then # check if ${line} is the original table echo "${line}" | grep -q "_${ext}" if [ $? -eq 0 ]; then continue; fi echo "use '${db}'; drop table \`${line}\`;" | ${MYSQL_PROG_PATH} fi done rm /tmp/table_list.${ext} } RestoreDatabase() { # Dump MySQL database Ret=0 OVERWRITE_DB=${2} # MySQL database has not been enabled. if [ ! -d "${MYSQL_SERVICE_PATH}" ]; then return ${MYSQL_FAIL} fi time=`date +%s` RESTORE_RET=0 echo -n > ${MYSQL_RCVR_DB_CONFLICT_LIST} echo -n > ${MYSQL_RCVR_DB_NEW_LIST} echo $1 for i in `find "$1"/*.sql.gz -type f` do DB_NAME=`basename "$i"` DB_NAME=${DB_NAME%.sql.gz} DB_NAME_TMP=`echo $DB_NAME | sed -e 's/@00/\\\\x/g'` DB_NAME_TMP=`echo -e "$DB_NAME_TMP"` # if database is conflict, need to rename its tables if [ -d "${MYSQL_SERVICE_PATH}/${DB_NAME}" ]; then if [ ${OVERWRITE_DB} = "yes" ]; then TablesSet "${DB_NAME_TMP}" ${time} "rename" # record conflict restored db to temp file echo "${DB_NAME_TMP}" >> ${MYSQL_RCVR_DB_CONFLICT_LIST} else continue; fi else # record new restored db to temp file echo "${DB_NAME_TMP}" >> ${MYSQL_RCVR_DB_NEW_LIST} fi gunzip -c "$1/${DB_NAME}.sql.gz" | ${MYSQL_PROG_PATH} # check if database is restored sucessfully if [ $? -ne 0 ]; then Ret=${MYSQL_FAIL}; break; fi done # Check If the restoration task is successful, # If failed, drop all new database and recover all tables in all conflict databases # If successful, drop all original tables in all conflct databases if [ ${Ret} -eq 0 ]; then # drop all original tables cat ${MYSQL_RCVR_DB_CONFLICT_LIST} | while read line do TablesSet "${line}" ${time} "drop_ori" done else # drop all new databases cat ${MYSQL_RCVR_DB_NEW_LIST} | while read line do echo "drop database ${line}" | /usr/syno/mysql/bin/msyql done cat ${MYSQL_RCVR_DB_CONFLICT_LIST} | while read line do TablesSet "${line}" ${time} "drop_new" TablesSet "${line}" ${time} "recover" done fi rm -f ${MYSQL_RCVR_DB_CONFLICT_LIST} rm -f ${MYSQL_RCVR_DB_NEW_LIST} return $Ret } case $1 in start) RunMySQL=`/bin/get_key_value /etc/synoinfo.conf runmysql` case "$RunMySQL" in [Yy][Ee][Ss]) ;; *) echo "MySQL is not enabled. Skip..." exit; ;; esac VolHome=`/usr/syno/bin/servicetool --get-service-volume mysql` ServiceOnVolume=$? if [ ${ServiceOnVolume} -eq 0 ]; then echo "Let User to choose where to set MySQL..." exit; fi DataDir=${VolHome}/@database NeedUpgrade=1 if [ ! -d ${DataDir}/mysql ]; then echo "Initialize MySQL..." mkdir $DataDir chown admin $DataDir su -l admin -c "/usr/syno/mysql/bin/mysql_install_db --datadir=${DataDir}/mysql --force" echo $MYSQL_VERSION > ${DataDir}/mysql/VERSION NeedUpgrade=0 elif [ -f ${DataDir}/mysql/VERSION ]; then grep $MYSQL_VERSION ${DataDir}/mysql/VERSION > /dev/null 2>&1 if [ $? -eq 0 ]; then NeedUpgrade=0 fi fi if [ $NeedUpgrade -eq 1 ]; then echo "Need to upgrade MySQL database. Starting..." UpgradeDatabase if [ $? -eq 0 ]; then echo $MYSQL_VERSION > ${DataDir}/mysql/VERSION fi fi echo "Starting MySQL..." ${MYSQL_DIR}/share/mysql/mysql.server start --datadir=${DataDir}/mysql --pid-file=${PID_FILE} ${MYSQL_ARGS} echo "MYSQL data dir = ${DataDir}/mysql..." ;; stop) echo "Stopping MySQL..." ${MYSQL_DIR}/share/mysql/mysql.server stop --pid-file=${PID_FILE} ;; restart) $0 stop sleep 1 $0 start ;; resetpassword) $0 stop sleep 3 echo "use mysql;" >/tmp/mysql_init.$$ echo "DELETE FROM user WHERE user='root';" >> /tmp/mysql_init.$$ echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '' WITH GRANT OPTION;" >> /tmp/mysql_init.$$ ${MYSQL_DIR}/bin/mysqld_safe --init-file=/tmp/mysql_init.$$ --pid-file=${PID_FILE} & sleep 20 $0 stop rm /tmp/mysql_init.$$ sleep 3 ;; backupdb) if [ -z "$2" -o -z "$3" ]; then echo "Usage: $1 backupdb destination_path backup_type[netbkp|localbkp]" return ${MYSQL_FAIL} fi BackupDatabase "$2" $3 Ret=$? return $Ret ;; restoredb) if [ -z "$2" -o -z "$3" ]; then echo "Usage: $1 restoredb source_path overwrite[yes|no]" return ${MYSQL_FAIL} fi RestoreDatabase "$2" $3 Ret=$? return $Ret ;; *) echo "Usage: $0 start|stop|backupdb|restoredb" ;; esac Comment optimiser MYSQL sur le NAS DS207? sources : http://dev.mysql.com...tion-files.html http://www.t-scripts.com/mysql/ http://www.geekwisdo.../cache-control1
  6. A ce que j'en ai compris il n'y a pas de mot de passe pour l'utilisateur admin de la base de donn
  7. MERCI, j'ai résolu le problème en passant à la version béta avec DSM 2.3 de synology. Je peux faire fonctionner artichow en revanche j'ai toujours un problème concernant pChart. + et merci pour l'info
  8. Pour se connecter à postgresql. Il faut tout d'abord se connecter en admin et à une base de données connue. /usr/syno/pgsql/bin/psql -d photo ou /usr/syno/pgsql/bin/psql -d mediacenter Liste des tables : SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON (c.relnamespace = n.oid); relname ----------------------------------------------- sql_sizing pg_toast_10563 pg_toast_10563_index sql_sizing_profiles table_constraints table_privileges tables triggered_update_columns triggers usage_privileges view_column_usage view_routine_usage view_table_usage views data_type_privileges element_types role_table_grants role_usage_grants routine_privileges routines schemata sequences pg_toast_10533 pg_toast_10533_index sql_features pg_toast_10538 pg_toast_10538_index pg_toast_2604 pg_toast_2604_index pg_toast_2606 pg_toast_2606_index pg_toast_2609 pg_toast_2609_index pg_toast_1255 pg_toast_1255_index pg_toast_2618 pg_toast_2618_index pg_toast_2619 pg_toast_2619_index pg_toast_1260 pg_toast_1260_index pg_toast_1262 pg_toast_1262_index pg_toast_2396 pg_toast_2396_index pg_aggregate_fnoid_index pg_am_name_index pg_am_oid_index pg_amop_opc_strat_index pg_amop_opr_opc_index pg_amproc_opc_proc_index pg_attrdef_adrelid_adnum_index pg_attrdef_oid_index pg_attribute_relid_attnam_index pg_attribute_relid_attnum_index pg_authid_rolname_index pg_authid_oid_index pg_auth_members_role_member_index pg_auth_members_member_role_index pg_autovacuum_vacrelid_index pg_cast_oid_index pg_cast_source_target_index pg_class_oid_index pg_class_relname_nsp_index pg_constraint_conname_nsp_index pg_constraint_conrelid_index pg_constraint_contypid_index pg_constraint_oid_index pg_conversion_default_index pg_conversion_name_nsp_index pg_conversion_oid_index pg_database_datname_index pg_database_oid_index pg_depend_depender_index pg_depend_reference_index pg_description_o_c_o_index pg_shdescription_o_c_index pg_index_indrelid_index pg_index_indexrelid_index pg_inherits_relid_seqno_index pg_language_name_index pg_language_oid_index pg_largeobject_loid_pn_index pg_namespace_nspname_index pg_namespace_oid_index pg_opclass_am_name_nsp_index pg_opclass_oid_index pg_operator_oid_index pg_operator_oprname_l_r_n_index pg_pltemplate_name_index pg_proc_oid_index pg_proc_proname_args_nsp_index pg_rewrite_oid_index pg_rewrite_rel_rulename_index pg_shdepend_depender_index pg_shdepend_reference_index pg_statistic_relid_att_index pg_tablespace_oid_index pg_tablespace_spcname_index pg_trigger_tgconstrname_index pg_trigger_tgconstrrelid_index pg_trigger_tgrelid_tgname_index pg_trigger_oid_index pg_type_oid_index pg_type_typname_nsp_index sql_implementation_info pg_toast_10543 pg_toast_10543_index pg_authid sql_languages pg_toast_10548 pg_toast_10548_index sql_packages pg_shadow pg_toast_10553 pg_toast_10553_index sql_parts pg_toast_10558 pg_toast_10558_index column_domain_usage column_privileges column_udt_usage columns constraint_column_usage constraint_table_usage domain_constraints domain_udt_usage domains pg_statistic enabled_roles key_column_usage parameters referential_constraints role_column_grants pg_settings role_routine_grants pg_cursors pg_prepared_xacts pg_prepared_statements pg_timezone_abbrevs pg_timezone_names pg_stat_all_tables pg_stat_sys_tables pg_stat_user_tables pg_statio_all_tables pg_statio_sys_tables pg_statio_user_tables pg_stat_all_indexes pg_stat_sys_indexes pg_stat_user_indexes pg_statio_all_indexes pg_statio_sys_indexes pg_statio_user_indexes pg_statio_all_sequences pg_statio_sys_sequences pg_statio_user_sequences pg_stat_activity pg_stat_database information_schema_catalog_name applicable_roles administrable_role_authorizations attributes check_constraint_routine_usage check_constraints pg_type pg_attribute pg_proc pg_class pg_autovacuum pg_attrdef pg_constraint pg_inherits pg_toast_16477 photo_user_pkey photo_user_username_key pg_toast_16477_index pg_toast_16853_index blog_config photo_access_right blog_config_config_id_seq pg_index pg_operator pg_opclass pg_am pg_amop pg_amproc pg_language pg_largeobject pg_aggregate pg_rewrite pg_trigger pg_listener pg_description pg_cast pg_namespace pg_conversion pg_depend pg_tablespace pg_pltemplate pg_shdepend pg_shdescription pg_database pg_auth_members pg_roles pg_group pg_user pg_rules pg_views pg_tables pg_indexes pg_stats pg_locks pg_toast_16860 pg_toast_16860_index blog_label pg_toast_16822 pg_toast_16822_index photo_log_pkey blog_article photo_access_right_pkey blog_article_article_id_seq blog_article_autosave blog_article_autosave_article_autosave_id_seq blog_label_label_id_seq blog_module photo_comment pg_toast_16839 photo_config photo_image_id_seq pg_toast_16839_index pg_toast_16500 pg_toast_16500_index blog_article_label photo_pkey photo_image_path_key photo_comment_id_seq blog_article_label_article_label_id_seq pg_toast_16513 pg_toast_16513_index blog_article_autosave_pkey photo_comment_pkey pg_toast_16846 blog_comment_pkey pg_toast_16846_index blog_article_label_pkey video_comment_id_seq blog_comment pg_toast_16528 pg_toast_16528_index blog_config_pkey video_comment_pkey video_desc_id_seq blog_comment_comment_id_seq pg_toast_16538 pg_toast_16538_index blog_label_label_name_key video_pkey video_path_key photo_comment_photoid_index blog_article_pkey pg_toast_16853 blog_label_pkey blog_module_pkey photo_config_config_id_seq photo_image pg_toast_16895 pg_toast_16895_index photo_config_pkey photo_log photo_share photo_user video_comment video_desc pg_toast_16915 pg_toast_16915_index photo_share_pkey photo_share_sharename_key (277 rows)
  9. /usr/syno/synoman/phpsrc/photo/include/database.php <?php $username = "admin"; $dbname = "photo"; $conn_string = "dbname=".$dbname." user=".$username; if (!isset($GLOBALS['dbconn_photo']) || $GLOBALS['dbconn_photo'] == null) { $GLOBALS['dbconn_photo'] = pg_connect($conn_string) or die("Failed to connect"); } $dbname = "mediaserver"; $conn_string = "dbname=".$dbname." user=".$username; if (!isset($GLOBALS['dbconn_media']) || $GLOBALS['dbconn_media'] == null) { $GLOBALS['dbconn_media'] = pg_connect($conn_string) or die("Failed to connect"); } ?>
  10. J'ai effectué la commande "ipkg list" en super-utilisateur ce qui me permet de voir tous les paquets linux que je peux installer Tu peux ensuite faire un "ipkg install lepaquet" dans cette liste. Ce paquet se télécharge grâce à l'Internet. # ipkg list 9base - 4+20090827-1 ... apache - 2.2.14-1 - The most popular web server on the internet apache-manual - 2.2.14-1 - Online documentation for the apache webserver ... Et logiquement si tu installes en effectuant : ipkg install php-apache cela installe Apache + la librairie PHP-apache Et pour répondre à ta question : Pour installer "mod_perl" sur apache d'origine, tu vas surrement avoir des difficultés à le faire avec une simple ligne de configuration. Perl est installer par défaut sur le nas... donc à voir avec Apache. Apache n'est pas vraiment gourmand. Et, activer + ou - de librairie à apache ne changera pas énormément au niveau des ressources. Même si pour l'administration ont n'a pas besoin de toutes les librairies mais d'une bonne configuration apache. Pour l'administration, je suppose qu'il faut : - Apache - Postgresql (et encore pas sûre) - ensuite tous les petits scripts (nécessite peut être CGI) Les sources dans le dossier /usr/syno/synoman/webman/ Le dossier /usr/syno/synoman/webman/indexdb/ suppose une base de données SQLite Tous les modules avec le chargement en AJAX sont dans le dossier : /usr/syno/synoman/webman/modules/ # ls about.html error.cgi lanman.html personal_quota.html status.html userman.cgi appebd.html esata.cgi login.cgi photostation.cgi surveillance.cgi userman.html appprivilege.cgi esata.html login.html photostation.html surveillance.html userwizard.cgi appprivilege.html ezsetup.html logman.cgi photowizard.cgi synodefs.cgi vhost.cgi appregistry.cgi filestation.cgi logman.html powermgr.cgi sysconfbkp.cgi volume.cgi appwin.html filestation.html logout.cgi powermgr.html sysconfbkp.html volume.html audiostation.cgi ftp.cgi mail.cgi pppoe.cgi terminalservice.cgi wanconfig.cgi audiostation.html ftp.html mail.html pppoe.html terminalservice.html wanconfig.html authenticate.cgi ftpblockedip.cgi mailstation.cgi printer.cgi time.cgi webman-admin.js backup.cgi ftpchrootuser.cgi mailstation.html printer.html time.html webman-common.js backup.html ftpwizard.cgi mediaserv.cgi reboot.cgi uistrings.cgi webman-user.js cleanrecycle.cgi groupman.cgi mediaserv.html reindex.cgi update.cgi webman.html cmzfilestation.cgi groupman.html modulelist.html search.cgi update.html webserv.cgi default.cgi hddman.cgi netbkpservice.cgi setupwizard.cgi uploadsslca.cgi webserv.html default.html hddman.html netbkpservice.html shareman.cgi uploaduserlist.cgi webwizard.cgi desktop.html index.cgi nfsservice.cgi shareman.html ups.cgi winmac.cgi disk.cgi inetwizard.cgi nfsservice.html sharewizard.cgi ups.html winmac.html downloadstation.cgi itunes.cgi packagemgr.cgi showhelp.cgi usbcopy.cgi downloadstation.html itunes.html packagemgr.html smart.cgi usbcopy.html dsmsetting.cgi language.cgi personal.cgi smart.html usbdisk.cgi dsmsetting.html language.html personal.html smartplaylist.cgi usbdisk.html empty.html lanman.cgi personal_quota.cgi status.cgi userhome.cgi Pour photostation, les sources se trouvent /usr/syno/synoman/phpsrc/photo/. Le fichier de connexion à la base de données : /usr/syno/synoman/phpsrc/photo/include/database.php La plupart des scripts SQL : /usr/syno/synoman/phpsrc/sql/ (blog.pgsql , photo.pgsql) Voilou après quelques recherches...
  11. Bonjour, je viens d'essayer d'installer sur un DS207+... conclusion tu perds les configurations apache et php La base mysql est en sous version. Le passage de MYSQL 4.2 à MYSQL 5 est plutôt compliqué. Je peux répondre à quelques unes de tes questions : 1) photostation ne fonctionne plus (il faut configurer php-pgsql et surrement postgresql - le passage à une autre version de postgresql impose de modifier toutes les configurations de l'interface d'administration (script propre à l'interface d'administration sur la base de données postgresql installée, en clair pas facile) une copie des base de données (mediaserver et photo) et schéma propre aux utilisateurs - un script php à configurer pour photostation dans le dossier include/database.php - Dépendances : php, pgsql, php-gd, php-pgsql... (à compléter) 2) Problème de configuration d'indexage avec le binaire synology - j'aimerai comprendre le code du binaire d'indexage, mais il faut le décompiler... 3) Interface d'administration... (c'est une grande difficulté... qui prend pas mal de temps) - il faut configurer le httpd.conf - Dépendances : php, pgsql, php-pear, php-pgsql... (à compléter) 4) Pour ton site internet - il faut configurer le httpd.conf - Dépendances : php, mysql, php-mysql,... Les commandes indispensables : // redémarrage de apache d'origine /usr/syno/etc/rc.d/S97apache-user.sh restart // redémarrage de apache ipkg /opt/etc/init.d/S80apache /opt/sbin/httpd -k restart /opt/sbin/apachectl -k stop // configuration PHP d'origine vi /usr/syno/etc/php.ini // redémarrage de postgresql /usr/syno/etc/rc.d/S20pgsql.sh restart // redémarrage de ssh d'origine /usr/syno/etc/rc.d/S95sshd.sh restart // redémarrage de mysql d'origine /usr/syno/etc/rc.d/S21mysql.sh restart Comment j'ai procéder pour configurer un LAMP (seulement pour ton site internet sans l'interface d'administration) : Sauvegarde Mysql: /usr/syno/mysql/bin/mysqldump -u root --password=motdepasse basededonnees < /volume1/web/backup/20100227_03h00.01_basededonnees.sql J'ai installer PHP avec ipkg: ipkg install php J'ai installer php librairie + apache ipkg install php-apache J'ai installer php librairie + mysql ipkg install php-mysql J'ai défini mon mot de passe root : /opt/bin/mysqladmin -u root password 'mot de passe' Ensuite dans mon phpmyadmin (ajout d'une nouvelle base de données). /opt/bin/mysql -u root --password=motdepasse basededonnees < /volume1/web/backup/20100227_03h00.01_basededonnees.sql En revanche j'ai configurer le httpd.conf pas idéalement : vi /opt/etc/apache2/httpd.conf # # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See <URL:http://httpd.apache.org/docs/2.2> for detailed information. # In particular, see # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html> # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "var/apache2/log/foo_log" # with ServerRoot set to "/opt" will be interpreted by the # server as "/opt/var/apache2/log/foo_log". # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # Do not add a slash at the end of the directory path. If you point # ServerRoot at a non-local disk, be sure to point the LockFile directive # at a local disk. If you wish to share the same ServerRoot for multiple # httpd daemons, you will need to change at least LockFile and PidFile. # ServerRoot "/opt" # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78: Listen # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so # LoadModule authn_file_module libexec/mod_authn_file.so LoadModule authn_dbm_module libexec/mod_authn_dbm.so LoadModule authn_anon_module libexec/mod_authn_anon.so LoadModule authn_dbd_module libexec/mod_authn_dbd.so LoadModule authn_default_module libexec/mod_authn_default.so LoadModule authz_host_module libexec/mod_authz_host.so LoadModule authz_groupfile_module libexec/mod_authz_groupfile.so LoadModule authz_user_module libexec/mod_authz_user.so LoadModule authz_dbm_module libexec/mod_authz_dbm.so LoadModule authz_owner_module libexec/mod_authz_owner.so LoadModule authz_default_module libexec/mod_authz_default.so LoadModule auth_basic_module libexec/mod_auth_basic.so LoadModule auth_digest_module libexec/mod_auth_digest.so LoadModule file_cache_module libexec/mod_file_cache.so LoadModule cache_module libexec/mod_cache.so LoadModule disk_cache_module libexec/mod_disk_cache.so LoadModule mem_cache_module libexec/mod_mem_cache.so LoadModule dbd_module libexec/mod_dbd.so LoadModule dumpio_module libexec/mod_dumpio.so LoadModule ext_filter_module libexec/mod_ext_filter.so LoadModule include_module libexec/mod_include.so LoadModule filter_module libexec/mod_filter.so LoadModule substitute_module libexec/mod_substitute.so LoadModule deflate_module libexec/mod_deflate.so LoadModule ldap_module libexec/mod_ldap.so LoadModule log_config_module libexec/mod_log_config.so LoadModule log_forensic_module libexec/mod_log_forensic.so LoadModule logio_module libexec/mod_logio.so LoadModule env_module libexec/mod_env.so LoadModule mime_magic_module libexec/mod_mime_magic.so LoadModule cern_meta_module libexec/mod_cern_meta.so LoadModule expires_module libexec/mod_expires.so LoadModule headers_module libexec/mod_headers.so LoadModule ident_module libexec/mod_ident.so LoadModule usertrack_module libexec/mod_usertrack.so LoadModule unique_id_module libexec/mod_unique_id.so LoadModule setenvif_module libexec/mod_setenvif.so LoadModule version_module libexec/mod_version.so LoadModule proxy_module libexec/mod_proxy.so LoadModule proxy_connect_module libexec/mod_proxy_connect.so LoadModule proxy_ftp_module libexec/mod_proxy_ftp.so LoadModule proxy_http_module libexec/mod_proxy_http.so LoadModule proxy_scgi_module libexec/mod_proxy_scgi.so LoadModule proxy_ajp_module libexec/mod_proxy_ajp.so LoadModule proxy_balancer_module libexec/mod_proxy_balancer.so LoadModule ssl_module libexec/mod_ssl.so LoadModule mime_module libexec/mod_mime.so LoadModule dav_module libexec/mod_dav.so LoadModule status_module libexec/mod_status.so LoadModule autoindex_module libexec/mod_autoindex.so LoadModule asis_module libexec/mod_asis.so LoadModule info_module libexec/mod_info.so LoadModule cgid_module libexec/mod_cgid.so LoadModule dav_fs_module libexec/mod_dav_fs.so LoadModule vhost_alias_module libexec/mod_vhost_alias.so LoadModule negotiation_module libexec/mod_negotiation.so LoadModule dir_module libexec/mod_dir.so LoadModule imagemap_module libexec/mod_imagemap.so LoadModule actions_module libexec/mod_actions.so LoadModule speling_module libexec/mod_speling.so LoadModule userdir_module libexec/mod_userdir.so LoadModule alias_module libexec/mod_alias.so LoadModule rewrite_module libexec/mod_rewrite.so <IfModule !mpm_netware_module> <IfModule !mpm_winnt_module> # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # User nobody Group #-1 </IfModule> </IfModule> # 'Main' server configuration # # The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # <VirtualHost> definition. These values also provide defaults for # any <VirtualHost> containers you may define later in the file. # # All of these directives may appear inside <VirtualHost> containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. admin@your-domain.com # ServerAdmin admin # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If your host doesn't have a registered DNS name, enter its IP address here. # #ServerName www.example.com:8000 ServerName *: # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/var/services/web" # # Each directory to which Apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). # # First, we configure the "default" to be a very restrictive set of # features. # <Directory /> Options FollowSymLinks AllowOverride None #Order deny,allow #Deny from all </Directory> # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # This should be changed to whatever you set DocumentRoot to. # <Directory "/var/services/web"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # Order allow,deny Allow from all </Directory> # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # <IfModule dir_module> DirectoryIndex index.html index.php </IfModule> # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # <FilesMatch "^\.ht"> Order allow,deny Deny from all Satisfy All </FilesMatch> # # ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a <VirtualHost> # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a <VirtualHost> # container, that host's errors will be logged there and not here. # ErrorLog "var/apache2/log/error_log" # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn <IfModule log_config_module> # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common <IfModule logio_module> # You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio </IfModule> # # The location and format of the access logfile (Common Logfile Format). # If you do not define any access logfiles within a <VirtualHost> # container, they will be logged here. Contrariwise, if you *do* # define per-<VirtualHost> access logfiles, transactions will be # logged therein and *not* in this file. # CustomLog "var/apache2/log/access_log" common # # If you prefer a logfile with access, agent, and referer information # (Combined Logfile Format) you can use the following directive. # #CustomLog "var/apache2/log/access_log" combined </IfModule> <IfModule alias_module> # # Redirect: Allows you to tell clients about documents that used to # exist in your server's namespace, but do not anymore. The client # will make a new request for the document at its new location. # Example: # Redirect permanent /foo http://www.example.com/bar # # Alias: Maps web paths into filesystem paths and is used to # access content that does not live under the DocumentRoot. # Example: # Alias /webpath /full/filesystem/path # # If you include a trailing / on /webpath then the server will # require it to be present in the URL. You will also likely # need to provide a <Directory> section to allow access to # the filesystem path. # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about trailing "/" apply to ScriptAlias # directives as to Alias. # ScriptAlias /cgi-bin/ "/opt/share/apache2/cgi-bin/" </IfModule> <IfModule cgid_module> # # ScriptSock: On threaded servers, designate the path to the UNIX # socket used to communicate with the CGI daemon of mod_cgid. # #Scriptsock var/apache2/run/cgisock </IfModule> # # "/opt/share/apache2/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # <Directory "/opt/share/apache2/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> # # DefaultType: the default MIME type the server will use for a document # if it cannot otherwise determine one, such as from filename extensions. # If your server contains mostly text or HTML documents, "text/plain" is # a good value. If most of your content is binary, such as applications # or images, you may want to use "application/octet-stream" instead to # keep browsers from trying to display binary files as though they are # text. # DefaultType text/plain <IfModule mime_module> # # TypesConfig points to the file containing the list of mappings from # filename extension to MIME-type. # TypesConfig etc/apache2/mime.types # # AddType allows you to add to or override the MIME configuration # file specified in TypesConfig for specific file types. # #AddType application/x-gzip .tgz # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. # #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz # # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # #AddHandler cgi-script .cgi # For type maps (negotiated resources): #AddHandler type-map var # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # #AddType text/html .shtml #AddOutputFilter INCLUDES .shtml </IfModule> # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # #MIMEMagicFile etc/apache2/magic # # Customizable error responses come in three flavors: # 1) plain text 2) local redirects 3) external redirects # # Some examples: #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html # # # EnableMMAP and EnableSendfile: On systems that support it, # memory-mapping or the sendfile syscall is used to deliver # files. This usually improves server performance, but must # be turned off when serving from networked-mounted # filesystems or if support for these functions is otherwise # broken on your system. # #EnableMMAP off #EnableSendfile off # Supplemental configuration # # The configuration files in the etc/apache2/extra/ directory can be # included to add extra features or to modify the default configuration of # the server, or you may simply copy their contents here and change as # necessary. # Server-pool management (MPM specific) #Include etc/apache2/extra/httpd-mpm.conf # Multi-language error messages #Include etc/apache2/extra/httpd-multilang-errordoc.conf # Fancy directory listings #Include etc/apache2/extra/httpd-autoindex.conf # Language settings #Include etc/apache2/extra/httpd-languages.conf # User home directories #Include etc/apache2/extra/httpd-userdir.conf # Real-time info on requests and configuration #Include etc/apache2/extra/httpd-info.conf # Virtual hosts #Include etc/apache2/extra/httpd-vhosts.conf # Local access to the Apache HTTP Server Manual #Include etc/apache2/extra/httpd-manual.conf # Distributed authoring and versioning (WebDAV) #Include etc/apache2/extra/httpd-dav.conf # Various default settings #Include etc/apache2/extra/httpd-default.conf # Secure (SSL/TLS) connections #Include etc/apache2/extra/httpd-ssl.conf # # Note: The following must must be present to support # starting without SSL on platforms with no /dev/random equivalent # but a statically compiled-in mod_ssl. # <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule> # # Cause the PHP interpreter to handle files with a .php extension. # AddType application/x-httpd-php .php #AddType application/x-httpd-php-source .phps # # PHP is an HTML-embedded scripting language which attempts to make it # easy for developers to write dynamically generated webpages. # LoadModule php5_module libexec/libphp5.so <Files *.js> Header unset Etag </Files> <Files *.css> Header unset Etag </Files> #CustomLog "|/var/packages/Webalizer/target/bin/rotatelogs /var/log/httpd-access-user Include /usr/syno/etc/httpd-vhost.conf-user DocumentRoot "/var/services/web" Listen 8082 Redémarrage du syno Voilou c'est fini Pour revenir en arrière (c'est très simple) : ipkg remove php-apache ipkg remove apache ipkg remove php-mysql ipkg remove mysql Redémarrage du syno ++
×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.