./configure --prefix=/usr/local/httpd --enable-modules=most --enable-mods-shared=most --enable-cache --enable-cache-disk --enable-so --enable-watchdog --enable-sed --enable-remoteip --enable-proxy
--enable-proxy-http --enable-proxy-connect --enable-proxy-ftp --enable-proxy-fcgi --enable-proxy-scgi
--enable-proxy-fdpass --enable-proxy-ajp --enable-proxy-balancer --enable-proxy-express
--enable-session --enable-session-cookie --enable-session-dbd --enable-ssl
--enable-dav --enable-dav-fs --enable-dav-lock --enable-vhost-alias --enable-actions --enable-userdir --enable-rewrite --with-apr=/usr/local/lib/apache/apr --with-apr-util=/usr/local/lib/apache/apr-util/ --with-z=/usr/local/lib/zlib/ --with-ssl=/usr/local/lib/opensll/ --enable-dbd
./configure --prefix=/usr/local/httpd --enable-so --enable-modules=most --enable-mods-shared=most --enable-authn-dbd --enable-authz-dbm --enable-file-cache --enable-cache --enable-disk-cache --enable-mem-cache --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http --enable-proxy-scgi --enable-proxy-ajp --enable-proxy-balancer --enable-ssl --enable-dav --enable-dav-fs --enable-dav-lock --enable-vhost-alias --enable-rewrite --with-apr=/usr/local/lib/apr --with-apr-util=/usr/local/lib/apr-util/ --with-z=/usr/local/lib/zlib/ --with-ssl=/usr/lib/openssl
./configure --prefix=/usr/local/mysql --enable-assembler --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=all --with-mysqld-user=mysql --with-big-tables --with-server-suffix=dbone --with-mysqld-ldflags=all-static --with-client-ldflags=all-static --with-mysqld-libs=all-static --with-plugins=partition,blackhole,ftexample,federated,archive,csv,heap,myisam,myisammrg,innobase,
./configure --prefix=/usr/local/phpexe --mandir=/usr/share/man/ --with-apxs2=/usr/local/httpd/bin/apxs --enable-safe-mode --enable-sigchild --enable-magic-quotes --with-libxml-dir=/usr/lib --with-openssl=/usr/local/lib/openssl/ --with-zlib=/usr/local/lib/zlib/ --with-xpm-dir=/usr/lib --with-libxml-dir=/usr/lib/ --enable-exif --with-zlib-dir=/usr/lib --enable-calendar --enable-ftp --with-gd=/usr/lib --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-freetype-dir=/usr/lib --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext=/usr/lib --enable-mbstring=all --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql/ --with-mysql=/usr/local/mysql/ --with-pdo-mysql=/usr/local/mysql/ --enable-soap --enable-sockets --enable-zip --enable-embedded-mysqli=shared --enable-shared --with-ttf=/usr/lib
./configure --prefix=/usr/local/phpcgi --mandir=/usr/share/man/ --enable-safe-mode --enable-sigchild --enable-magic-quotes --with-libxml-dir=/usr/lib --with-openssl=/usr/local/lib/openssl/ --with-zlib=/usr/local/lib/zlib/ --with-xpm-dir=/usr/lib --with-libxml-dir=/usr/lib/ --enable-exif --with-zlib-dir=/usr/lib --enable-calendar --enable-ftp --with-gd=/usr/lib --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-freetype-dir=/usr/lib --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext=/usr/lib --enable-mbstring=all --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql/ --with-mysql=/usr/local/mysql/ --with-pdo-mysql=/usr/local/mysql/ --enable-soap --enable-sockets --enable-zip --enable-embedded-mysqli=shared --enable-shared --with-ttf=/usr/lib --enable-fastcgi --enable-force-cgi-redirect --enable-fpm --with-ttf=/usr/lib
./configure --prefix=/usr/local/phpcgi --mandir=/usr/share/man/ --enable-safe-mode --enable-sigchild --enable-magic-quotes --with-libxml-dir=/usr/lib --with-openssl=/usr/lib --with-xpm-dir=/usr/lib --with-libxml-dir=/usr/lib/ --enable-exif --with-zlib-dir=/usr/lib --enable-calendar --enable-ftp --with-gd=/usr/lib --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-freetype-dir=/usr/lib --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext=/usr/lib --enable-mbstring=all --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql/ --with-mysql=/usr/local/mysql/ --with-pdo-mysql=/usr/local/mysql/ --enable-soap --enable-sockets --enable-zip --enable-embedded-mysqli=shared --enable-shared --with-ttf=/usr/lib --with-ttf=/usr/lib --enable-fastcgi --enable-force-cgi-redirect --enable-fpm
./configure --prefix=/usr/local/mysql --enable-assembler --with-pthread --with-embedded-server --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=all --with-mysqld-user=mysql --with-big-tables --with-server-suffix=dbone --with-mysqld-ldflags=-all-static --without-debug --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-libs=-all-static --with-plugins=partition,blackhole,ftexample,federated,archive,csv,heap,myisam,myisammrg,innobase
yum install ncurses-devel
yum -y install apr-devel apr-util check-devel cairo-devel pango-devel libxml2-devel expat-devel freetype-devel rrdtool-devel gettext python pcre pcre-devel
./configure --prefix=/usr/local/lib/confuse
./configure --prefix=/usr/local/ganglia --with-libconfuse=/usr/local/lib/confuse/
server1 192.168.1.7
server2 192.168.1.6
server3 192.168.1.3
yum -y install perl-CPAN install cpio install expat-devel gettext-devel autoconf wget
yum install cpio
yum install expat-devel
yum install gettext-devel
-A OUTPUT -p tcp --dport 20 -j ACCEPT
-A OUTPUT -p tcp --dport 21 -j ACCEPT
--enable-fastcgi --enable-force-cgi-redirect --enable-fpm
./configure --prefix=/usr/local/phpcgi --mandir=/usr/share/man/ --with-gd=/usr/lib/ --with-freetype-dir=/usr/lib --enable-safe-mode --enable-sigchild --enable-magic-quotes --with-libxml-dir=/usr/lib --with-openssl --with-xpm-dir=/usr/lib --with-libxml-dir=/usr/lib/ --enable-exif --with-zlib-dir=/usr/lib --enable-calendar --enable-ftp --with-gd=/usr/lib --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-freetype-dir=/usr --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext=/usr/lib --enable-mbstring=all --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql/ --with-mysql=/usr/local/mysql/ --with-pdo-mysql=/usr/local/mysql/ --enable-soap --enable-sockets --enable-zip --enable-embedded-mysqli=shared --enable-shared --with-ttf=/usr/lib --with-ttf=/usr/lib --enable-fastcgi --enable-force-cgi-redirect --enable-fpm
# nginx Startup script for the Apache HTTP Server
#
# chkconfig: 345 85 15
# description: Nginx is a high performance web server
# config: /etc/nginx/nginx.conf
# pidfile: /var/run/nginx.pid
#
# modify: waiting 20111007
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="nginx daemon"
NAME=nginx
DAEMON=/usr/local/webserver/nginx/sbin/$NAME
SCRIPTNAME=/etc/init.d/$NAME
# If the daemon file is not found, terminate the script.
test -x $DAEMON || exit 0
d_start() {
$DAEMON || echo -n " already running"
}
d_stop() {
$DAEMON -s quit || echo -n " not running"
}
d_reload() {
$DAEMON -s reload || echo -n " could not reload"
}
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
d_stop
echo "."
;;
reload)
echo -n "Reloading $DESC configuration..."
d_reload
echo "reloaded."
;;
restart)
echo -n "Restarting $DESC: $NAME"
d_stop
# Sleep for two seconds before starting again, this should give the
# Nginx daemon some time to perform a graceful stop.
sleep 2
d_start
echo "."
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|reload}" >&2
exit 3
;;
esac
exit 0
./configure --prefix=/usr/local/webserver/nginx --user=daemon --group=daemon --with-rtsig_module --with-select_module --with-poll_module --with-file-aio --with-http_ssl_module --with-http_realip_module --with-http_realip_module --with-http_addition_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-pcre --with-zlib=/tmp/zlib-1.2.7 --with-openssl=/tmp/openssl-0.9.8r --with-debug
rewrite ^/goods/([0-9]+)/?$ /index.php?app=goods&id=$1 last;
rewrite ^/goods/([0-9]+)/([^/]+)/?$ /index.php?app=goods&id=$1&act=$2 last;
rewrite ^/goods/([0-9]+)/([^/]+)/page_([^/]+)/?$ /index.php?app=goods&id=$1&act=$2&page=$3 last;
rewrite ^/groupbuy/([0-9]+)/?$ /index.php?app=groupbuy&id=$1 last;
rewrite ^/category/goods/?$ /index.php?app=category;
rewrite ^/category/(.*)/?$ /index.php?app=category&act=$1;
rewrite ^/brand/?$ /index.php?app=brand;
rewrite ^/article/([0-9]+).html$ /index.php?app=article&act=view&article_id=$1;
rewrite ^/store/([0-9]+)/?$ /index.php?app=store&id=$1;
rewrite ^/store/article/([0-9]+).html$ /index.php?app=store&act=article&id=$1;
rewrite ^/store/([0-9]+)/credit/?$ /index.php?app=store&id=$1&act=credit;
rewrite ^/store/([0-9]+)/credit/page_([^/]+)/?$ /index.php?app=store&id=$1&act=credit&page=$2;
rewrite ^/store/([0-9]+)/credit/([0-9]+)/?$ /index.php?app=store&id=$1&act=credit&eval=$2;
rewrite ^/store/([0-9]+)/credit/([0-9]+)/page_([^/]+)/?$ /index.php?app=store&id=$1&act=credit&eval=$2&page=$3;
rewrite ^/store/([0-9]+)/goods/?$ /index.php?app=store&id=$1&act=search;
rewrite ^/store/([0-9]+)/goods/page_([^/]+)/?$ /index.php?app=store&id=$1&act=search&page=$2;
rewrite ^/store/([0-9]+)/category/([0-9]+)/?$ /index.php?app=store&id=$1&act=search&cate_id=$2;
rewrite ^/store/([0-9]+)/category/([0-9]+)/page_([^/]+)/?$ /index.php?app=store&id=$1&act=search&cate_id=$2&page=$3;
rewrite ^/store/([0-9]+)/groupbuy/?$ /index.php?app=store&id=$1&act=groupbuy;
rewrite ^/store/([0-9]+)/groupbuy/page_([^/]+)/?$ /index.php?app=store&id=$1&act=groupbuy&page=$2;
#!/bin/sh
#
# Startup script for the server of memcached
#
# processname: memcached
# pidfile: /etc/memcached/memcached.pid
# logfile: /etc/memcached/memcached_log.txt
# memcached_home: /etc/memcached
# chkconfig: 35 21 79
# description: Start and stop memcached Service
# Source function library
. /etc/rc.d/init.d/functions
RETVAL=0
prog="memcached"
basedir=/etc/memcached
cmd=${basedir}/bin/memcached
pidfile="$basedir/${prog}.pid"
#logfile="$basedir/memcached_log.txt"
# 设置memcached启动参数
ipaddr="192.168.1.201" # 绑定侦听的IP地址
port="11211" # 服务端口
username="root" # 运行程序的用户身份
max_memory=64 # default: 64M | 最大使用内存
max_simul_conn=1024 # default: 1024 | 最大同时连接数
#maxcon=51200
#growth_factor=1.3 # default: 1.25 | 块大小增长因子
#thread_num=6 # default: 4
#verbose="-vv" # 查看详细启动信息
#bind_protocol=binary # ascii, binary, or auto (default)
start() {
echo -n $"Starting service: $prog"
$cmd -d -m $max_memory -u $username -l $ipaddr -p $port -c $max_simul_conn -P $pidfile
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
}
stop() {
echo -n $"Stopping service: $prog "
run_user=`whoami`
pidlist=`ps -ef | grep $run_user | grep memcached | grep -v grep | awk '{print($2)}'`
for pid in $pidlist
do
# echo "pid=$pid"
kill -9 $pid
if [ $? -ne 0 ]; then
return 1
fi
done
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
#reload)
# reload
# ;;
restart)
stop
start
;;
#condrestart)
# if [ -f /var/lock/subsys/$prog ]; then
# stop
# start
# fi
# ;;
status)
status memcached
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit $RETVAL
cp ganglia-3.4.0.tar.gz /tmp/
cd /tmp/
tar -zxvf ganglia-3.4.0.tar.gz
cd ganglia-3.4.0
./configure --help
yum install libpcre
yum install pcre pcre-devel
yum install python
./configure --help
yum install apr apr-devel
clear
./configure --help
./configure --prefix=/usr/local/ganglia
make
yum install gettext
yum install rrdtool
yum install rrdtool-devel
./configure --prefix=/usr/local/ganglia
yum install gettext-devel
./configure --prefix=/usr/local/ganglia
yum install libconfuse
yum install confuse
yum install freetype-devel
yum install confuse
yum install confuse
yum install expat
yum install expat expat-devel apr apr-devel apr-util apr-util-devel pcre pcre-devel python python-devel MySQL-python
./configure --prefix=/usr/local/ganglia
yum install apr-util
yum install apr-util-devel
./configure --prefix=/usr/local/ganglia
yum install libconfuse
yum install expat
./configure --prefix=/usr/local/ganglia
yum -y install apr-devel apr-util check-devel cairo-devel pango-devel libxml2-devel
rpmbuild glib2-devel dbus-devel freetype-devel fontconfig-devel gcc-c++ expat-devel
yum install libconfuse
yum install confuse
./configure --prefix=/usr/local/ganglia
yum install libconfuse-devel
yum install libconfuse
cd ..
ls
tar -zxvf confuse-2.7.tar.gz
cd confuse-2.7
ls
./configure --help
./configure --prefix=/usr/local/lib/confuse
make
make install
cd ,..
cd ..
ls
cd ganglia-3.4.0
./configure --help
./configure --prefix=/usr/local/ganglia --with-libconfuse=/usr/local/lib/confuse/ --with-gmetad
make
make install
cd /usr/local/ganglia/
dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName jzmt -sid jzmt -sysPassword 05aa98a130ae02d317b84b0e2af78dd112 -systemPassword 0593fa45312fbd668fff9742df68f131bd -sysmanPassword 0593fa45312fbd668fff9742df68f131bd -dbsnmpPassword 05a61b4031cf0846d4ff5ee49167d29a33 -emConfiguration NOEMAIL -hostUserName oracle -hostUserPassword 0530d8013231497df31fe6b1ea6bae50f2 -datafileJarLocation /u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates -datafileDestination /u01/app/oracle/product/10.2.0/data -responseFile NO_VALUE -characterset AL32UTF8 -obfuscatedPasswords true -sampleSchema false -oratabLocation /u01/app/oracle/product/10.2.0/db_1/install/oratab -recoveryAreaDestination /u01/app/oracle/flash_recovery_area
ulimit -SHn 65535
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5000
mysql config
./configure --prefix=/usr/local/mysql --without-debug --without-bench --enable-thread-safe-client --enable-assembler --enable-profiling --with-mysqld-ldflags=-all-static --with-client-ldfags=-all-static
--with-charset=latin1 --with-extra-charset=utf8,gbk --without-embedder-server --with-server-suffix = -community
uptime
w
last
du -sh /uri
iostat - d - x - k 1 5
vmstat 1 4
dstat
mpsta
ls -lF / | grep /$
file /sbin/init
lsb_release -a
lspci
netstat -na | awk '/^tcp/ { ++S[$NF] } END {for(a in S) print a,S[a]}'
traceroute
nslookup
dig
finger
lsof -i:8080
ps aux | grep -v grep | grep nginx
kill
killall
lastlog
dmesg
sar
pmap
strace
pstree
iptraf
tcpdump
nicstat
mysql 5.5 mysql5.6
cmake . -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=ON -DBUILD_CONFIG=mysql_release -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_UNIXODBC=1 -DCOMPILATION_COMMENT=-jzdb -DODBC_LIB_DIR=/usr/lib/ -DENABLE_DOWNLOADS=1 -DIGNORE_AIO_CHECK=1
ngixn 1.2.8
CFLAFS=-fPIC ./configure
make CFLAFS=-fPIC
make CFLAFS=-fPIC install
./configure --prefix=/usr/local/nginx --user=daemon --group=daemon --with-file-aio --with-http_ssl_module --with-http_geoip_module --with-http_stub_status_module --with-http_gzip_static_module --with-google_perftools_module --with-pcre --with-mail --with-mail_ssl_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-zlib=/tmp/zlib-1.2.7 --with-openssl=/tmp/openssl-0.9.8v --with-cc-opt='-O3' --with-cpu-opt=amd64