Scaling Magento presentation with 60 slides and notes, which was then reviewed by Alan Storm.
Theo truyền thống, các dịch vụ (services or daemons) trên Linux hoặc Unix được khởi động thông qua một SysV init script. Chúng thực chất là các kịch bản Bourne Shell, thường được đặt trong một thư mục như /etc/rc.d/init.d và được gọi với một vài đối số (động từ) như start, stop hoặc restart, tức là dùng để khỏi động, tắt hoặc khỏi động lại dịch vụ.
Start thường liên quan đến việc gọi một dịch vụ nhị phân , sau đó fork ra một tiến trình nền (chính xác hơn l là daemonizes). Kịch bản shell có xu hướng chậm, khó đọc, dài dòng và mong manh. Mặc dù chúng vô cùng linh hoạt (sau cùng thì cũng chỉ là code), nhưng có một vài điểm rất khó làm đúng với một kịch bản shell, ví dụ ra lệnh thực hiện song song (parallelized), giám sát chính xác các tiến trình hoặc cấu hình các bối cảnh thực hiện một cách chi tiết.
# nginx config for A+ SSL Labs rating as of 9-2014 | |
# Broad legacy compatibility including IE8/XP, Android 2.3+, openssl 0.9.8 clients | |
# Blocks most bot scans IP probes. | |
# | |
# *** Assumes: _HOSTNAME_ is replaced *** | |
# | |
# Includes OCSP stapling, HSTS Strict Transport security, | |
# session resumption, legacy backwards compatibility (XP, Android 2.3-4.3) | |
# | |
# Requires nginx 1.6.x. See: http://nginx.org/en/linux_packages.html, e.g.: |
1. OpenBox | |
sudo apt-get install xorg openbox | |
su - x | |
vncpasswd ->>>> gitcmnhub | |
#!/bin/bash | |
PATH="$PATH:/usr/bin/" | |
export USER="x" |
server { | |
listen 80; | |
server_name demo.wp.com; | |
root /home/wp/public; | |
index index.php index.html index.htm; | |
access_log /var/log/nginx/wp_access.log; | |
error_log /var/log/nginx/wp_error.log; |
#!/bin/bash | |
cat $0 |
#!/bin/cat |
#!/bin/bash | |
. /etc/init.d/functions | |
DAEMON=/usr/bin/supervisord | |
PIDFILE=/var/run/supervisord.pid | |
[ -x "$DAEMON" ] || exit 0 | |
start() { |
[unix_http_server] | |
file=/var/run/supervisor.sock ; (the path to the socket file) | |
chmod=0700 ; socket file mode (default 0700) | |
[supervisord] | |
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) | |
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) | |
logfile_backups=10 ; (num of main logfile rotation backups;default 10) | |
loglevel=info ; (log level;default info; others: debug,warn,trace) | |
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) |