#top main / test


main-test - link with title
name - name and title wo link

#top prebash


EDITOR=vim crontab -e

cat /etc/fstab | head  -1; echo
echo -en "password\npassword\n" | smbpasswd -s -a username

if [ -z "$variable" ];then
	echo IFIF;
elif [ -n "$value" ];then
	echo ELIF;
else
	echo ELSE;
fi

ENVNAME=value
ENVNAME=$var
export ENVNAME=value
export ENVNAME=$var
unset ENVNAME

EDITOR=vim crontab -e

type=daemon.notice; echo "nowtime=`date +%s` type=$type" | logger -p $type

type=daemon.warn; echo "nowtime=`date +%s` type=$type"   | logger -p $type

type=daemon.crit; echo "nowtime=`date +%s` type=$type"   | logger -p $type

cat /etc/fstab | head  -1; echo
echo -en "password\npassword\n" | smbpasswd -s -a username

while [ -n "$variable" ];do
echo DO...
done

if [ -z "$variable" ];then
	echo IFIF;
elif [ -n "value" ];then
	echo ELIF;
else
	echo ELSE;
fi

ENVNAME=value
ENVNAME=$var
export ENVNAME=value
export ENVNAME=$var
unset ENVNAME





#top preconf


#top PgSQL Config


EXAMPLES
Plik konfiguracyjny: /etc/postgresql/postgresql.cnf
# - Memory -

shared_buffers = 1024MB                 # min 128kB
                                        # (change requires restart)
temp_buffers = 8MB                      # min 800kB
#max_prepared_transactions = 0          # zero disables the feature
                                        # (change requires restart)
# Note:  Increasing max_prepared_transactions costs ~600 bytes of shared memory
# per transaction slot, plus lock space (see max_locks_per_transaction).
# It is not advisable to set max_prepared_transactions nonzero unless you
# actively intend to use prepared transactions.
work_mem = 1MB                          # min 64kB
maintenance_work_mem = 16MB             # min 1MB
max_stack_depth = 2MB                   # min 100kB



#top MySQL sysconfig


cat > /etc/sysconfig/mysqld << EOF
# /etc/sysconfig/mysqld
# mysql config file
MYCNF=/etc/mysqld/my.cnf
# (oe) Remove --skip-networking to enable network access from
# non local clients. Access from localhost will still work.
#MYSQLD_OPTIONS="--nice=19 --skip-grant-tables" # --skip-networking
# When I try to remotely connect it would take quite a while to connect.
# I fixed this delay by adding the "skip-name-resolve" to my.ini
# [Warning] 'user' entry 'root@cen05' ignored in --skip-name-resolve mode.
MYSQLD_OPTIONS="" # "--master-connect-retry=10" "--skip-networking"
MYSQLD_PREOPTS="--defaults-file=$MYCNF"
# (oe) set TMPDIR and TMP environment variables
# datadir defined also in my.cnf
# but sometimes mysqldump dies because
# cannot write to files /.tmp dir
datadir=/srv/mysql
TMPDIR="\${datadir}/.tmp"
TMP="\${TMPDIR}"
EOF



#top MySQL ErrorLog


EXAMPLES
Plik konfiguracyjny: /etc/my.cnf, /etc/mysqld/my.cnf
[mysqld]
# The MySQL server
general_log = 1
general_log_file = /var/log/mysqld/mysqld.log
log-queries-not-using-indexes = 1
slow-query-log = 1
slow_query_log_file = /var/log/mysqld/slow-queries.log

[mysqld_save]
log-error = /var/log/mysqld/mysqld.log



#top Postfix main.cf


# INPUT RATE CONTROL
#
# Specify 0 to disable the feature. Valid delays are 0..10.
#
#in_flow_delay = 1s
in_flow_delay = 1s

The last step is to add the following block of code to /etc/postfix/main.cf:

and setting up configuration parameters (db_table, db_wherecol, db_messagequota, etc) inside the Perl script,
then modify the postfix data restriction class smtpd_data_restrictions like the following:




#top vhosts default


EXAMPLES
$HTTP[  "host"  ]   !=   "news.example.org" {
    simple-vhost.server-root   =    "/srv/nginx/vhosts/"
    simple-vhost.default-host = "example.org"
    simple-vhost.document-root = "pages"
    server.errorlog = log_root + "/default-error.log"
    accesslog.filename = log_root + "/default-access.log"
}

$HTTP["host"] == "news.example.org" {
    server.document-root = "/var/www/servers/news2.example.org/pages/"
    server.errorlog = log_root + "/news_example_org-error.log"
    accesslog.filename = log_root + "/news_example_org-access.log"
}



#top vhosts SSL


EXAMPLES
$SERVER["socket"] == "10.0.0.1:443" {
        ssl.engine = "enable"
        ssl.pemfile = "/etc/lighttpd/ssl/domain1.com.pem"
        ssl.use-sslv2 = "disable"
        $HTTP["host"] == "domain1.com" {
          server.document-root = "/srv/nginx/vhosts/domain1.com"
        }
        server.errorlog = log_root + "/domain1_com-error.log"
        accesslog.filename = log_root + "/domain1_com-access.log"
    }

$SERVER["socket"] == "10.0.0.2:443" {
        ssl.engine = "enable"
        ssl.pemfile = "/etc/lighttpd/ssl/domain2.com.pem"
        ssl.use-sslv2 = "disable"
        $HTTP["host"] == "domain2.com" {
          server.document-root = "/www/servers/domain2.com"
        }
        server.errorlog = log_root + "/domain2_com-error.log"
        accesslog.filename = log_root + "/domain2_com-access.log"
    }



#top TLS Cert/Key File


Zobacz także TLS Cert/Key File dla: Apache | Nginx | Lighttpd | HAProxy | Varnish | SQUID

Dokumentacja Lighttpd: Secure HTTP / Configuration / Details
Dokumentacja Lighttpd: Chained certificates
Dokumentacja Lighttpd: Diffie-Hellman and Elliptic-Curve Diffie-Hellman parameters
Składnia: ssl.pemfile = /path/to/the/PEM.file
Składnia: ssl.ca-file = /path/to/the/CA.file
Składnia: ssl.dh-file = /path/to/the/PEM/file/for/Diffie-Hellman.key
Opis:

EXAMPLES
ssl.pemfile = "/etc/lighttpd/ssl/server.pem"
ssl.ca-file = "/etc/lighttpd/ssl/ca.crt"
ssl.dh-file = "/etc/lighttpd/ssl/dh2048.pem"





#top ahref


#top internal


bash (bash = main/bash)
os-bash (os:bash = os/bash)
db-mysql (db:mysql = db/mysql)
db-mysql-install (db:mysql:install = db/mysql/install)

test (test = main/test)



#top external


http://cen05.xen.wbcd.pl
http://cen05.xen.wbcd.pl:81
http://cen05.xen.wbcd.pl/
http://cen05.xen.wbcd.pl:81/
http://cen05.xen.wbcd.pl/globals.php
http://user@cen05.xen.wbcd.pl/globals.php
http://user:pass@cen05.xen.wbcd.pl/globals.php
http://cen05.xen.wbcd.pl/globals.php?a=1
http://cen05.xen.wbcd.pl/globals.php?a=1&b=2
http://cen05.xen.wbcd.pl/globals.php?a=1&b=2#c3



#top table


OS Services db code
Linux Named MySQL Ansi C
OpenBSD Apache PostgreSQL PHP
FreeBSD Postfix SQLite PERL
Solaris Dovecot MsSQL JavaScript



#top list


#top ullist


OS
  • Linux
    • sysctl
    • procfs
    • iptables
  • OpenBSD
  • FreeBSD
  • Solaris
  • bash/shell
    • ab
    • arping
    • awk
      • asort
      • gensub
      • gsub
      • index
      • length
      • match
      • split
      • sprintf
      • strtonum
      • sub
      • substr
      • tolower
      • toupper



#top ollist


Services
  1. Named/Bind
    1. Instalacja
      1. Instalacja step 1
      2. Instalacja step 2
      3. Instalacja step 3
    2. Konfiguracja
    3. Przydatne informacje
  2. Apache
    1. Instalacja
      1. Instalacja step 1
      2. Instalacja step 2
      3. Instalacja step 3
    2. Konfiguracja
    3. Przydatne informacje
  3. Postfix
    1. Instalacja
      1. Instalacja step 1
      2. Instalacja step 2
      3. Instalacja step 3
    2. Konfiguracja
    3. Przydatne informacje




Zmodyfikowany ostatnio: 2018/08/24 15:12:38 (5 lat temu), textsize: 9,38 kB, htmlsize: 22,3 kB

Zapraszam do komentowania, zgłaszania sugestii, propozycji, własnych przykładów, ...
Dodaj komentarzKomentarze użytkowników
0:   (2016/03/15 20:20:17)  
bluray@wbcd.pl
0:   (2015/10/20 21:23:11)  
sp@cen05.xen.wbcd.pl
0:   (2015/10/20 21:22:36)  
sp@cen05.xen.wbcd.pl
0:   (2015/10/20 21:21:40)  
sp@cen05.xen.wbcd.pl
0:   (2015/10/03 07:53:18)  
sp@cen05.xen.wbcd.pl
0:   (2015/10/02 00:27:14)  
sp@cen05.xen.wbcd.pl
0:   (2013/07/22 18:31:56)  
admin@cen05.xen.wbcd.pl
0:   (2013/07/22 18:31:03)  
admin@cen05.xen.wbcd.pl
0:   (2013/07/19 22:32:08)  
admin@cen05.xen.wbcd.pl
0:   (2013/07/15 00:08:47)  
admin@o2.pl
0:   (2013/07/14 23:55:45)  
admin@o2.pl
0:   (2013/07/14 23:55:12)  
admin@o2.pl
0:   (2013/07/14 02:14:28)  
cbrbob@10g.pl
0:   (2013/07/14 02:12:09)  
admin@o2.pl
0:   (2013/07/14 00:03:00)  
admin@o2.pl
0:   (2013/07/14 00:02:00)  
admin@o2.pl
0:   (2013/07/14 00:01:00)  
admin@o2.pl
0:   (2013/07/22 07:37:30)  
sp@cen05.xen.wbcd.pl