snmpconf
/etc/snmp/snmp/snmp.conf
proc sendmail
proc popa3d
proc proftpd
proc httpd
proc mysqld
disk /
load 30 25 20
exec smart0 /bin/sh /etc/snmp/snmp/smartcheck.0
smartcheck.0
#!/bin/sh
if /usr/sbin/smartctl -a -i -d cciss,0 /dev/cciss/c0d0 | /bin/grep Status | /bin/grep OK 1>/dev/null 2>/dev/null; then
echo “OK: 0/cciss”;
exit 1;
else
echo “ALERT: 0/cciss”;
exit 2;
fi
[root@gwmail5 /]# snmpwalk -v 2c -c public hostname extTable
UCD-SNMP-MIB::extIndex.1 = INTEGER: 1
UCD-SNMP-MIB::extIndex.2 = INTEGER: 2
UCD-SNMP-MIB::extIndex.3 = INTEGER: 3
UCD-SNMP-MIB::extNames.1 = STRING: smart0
UCD-SNMP-MIB::extNames.2 = STRING: smart1
UCD-SNMP-MIB::extNames.3 = STRING: smart2
UCD-SNMP-MIB::extCommand.1 = STRING: /bin/sh
UCD-SNMP-MIB::extCommand.2 = STRING: /bin/sh
UCD-SNMP-MIB::extCommand.3 = STRING: /bin/sh
UCD-SNMP-MIB::extResult.1 = INTEGER: 1
UCD-SNMP-MIB::extResult.2 = INTEGER: 1
UCD-SNMP-MIB::extResult.3 = INTEGER: 1
UCD-SNMP-MIB::extOutput.1 = STRING: OK: 0/cciss
UCD-SNMP-MIB::extOutput.2 = STRING: OK: 1/cciss
UCD-SNMP-MIB::extOutput.3 = STRING: OK: 2/cciss
UCD-SNMP-MIB::extErrFix.1 = INTEGER: 0
UCD-SNMP-MIB::extErrFix.2 = INTEGER: 0
UCD-SNMP-MIB::extErrFix.3 = INTEGER: 0
UCD-SNMP-MIB::extErrFixCmd.1 = STRING:
UCD-SNMP-MIB::extErrFixCmd.2 = STRING:
UCD-SNMP-MIB::extErrFixCmd.3 = STRING:
Down source PHP + http://www.acme.com/software/thttpd/thttpd-2.21b.tar.gz
phpinfo() –> + –with-thttpd=../thttpd-2.21b ( /sapi/thttpd/README )
‘./configure’ ‘–prefix=/usr’ ‘–with-apxs2=/usr/sbin/apxs’ ‘–prefix=/usr’ ‘–sysconfdir=/etc’ ‘–disable-safe-mode’ ‘–enable-apc’ ‘–enable-apc-mmap’ ‘–enable-memory-limit’ ‘–enable-suhosin’ ‘–disable-magic-quotes’ ‘–enable-zend-multibyte’ ‘–enable-mbregex’ ‘–enable-tokenizer=shared’ ‘–with-config-file-scan-dir=/etc/php’ ‘–with-config-file-path=/etc/httpd’ ‘–with-mod_charset’ ‘–with-layout=PHP’ ‘–enable-sigchild’ ‘–enable-xml’ ‘–with-libxml-dir=/usr’ ‘–enable-simplexml’ ‘–enable-spl’ ‘–enable-filter’ ‘–disable-debug’ ‘–with-openssl=shared’ ‘–with-pcre-regex=/usr’ ‘–with-zlib=shared,/usr’ ‘–enable-bcmath=shared’ ‘–with-bz2=shared,/usr’ ‘–enable-calendar=shared’ ‘–enable-ctype=shared’ ‘–with-curl=shared’ ‘–with-curlwrappers’ ‘–enable-dba=shared’ ‘–with-gdbm=/usr’ ‘–with-db4=/usr’ ‘–enable-dbase=shared’ ‘–enable-exif=shared’ ‘–enable-ftp=shared’ ‘–with-gd=shared’ ‘–with-jpeg-dir=/usr’ ‘–with-png-dir=/usr’ ‘–with-zlib-dir=/usr’ ‘–with-xpm-dir=/usr’ ‘–with-freetype-dir=/usr’ ‘–with-t1lib=/usr’ ‘–enable-gd-native-ttf’ ‘–enable-gd-jis-conv’ ‘–with-gettext=shared,/usr’ ‘–with-gmp=shared,/usr’ ‘–with-iconv=shared’ ‘–with-ldap=shared’ ‘–enable-mbstring=shared’ ‘–with-hash’ ‘–with-mhash=shared,/usr’ ‘–with-mysql=shared,/usr’ ‘–with-mysqli=shared,/usr/bin/mysql_config’ ‘–enable-pdo=shared’ ‘–with-pdo-mysql=shared,/usr’ ‘–with-pdo-sqlite=shared’ ‘–with-pspell=shared,/usr’ ‘–with-mm=/usr’ ‘–enable-shmop=shared’ ‘–with-snmp=shared,/usr’ ‘–enable-soap=shared’ ‘–enable-sockets’ ‘–with-sqlite=shared’ ‘–with-regex=php’ ‘–enable-sysvmsg’ ‘–enable-sysvsem’ ‘–enable-sysvshm’ ‘–enable-wddx=shared’ ‘–with-xsl=shared,/usr’ ‘–enable-zip=shared’ ‘–with-tsrm-pthreads’ ‘–enable-shared=yes’ ‘–enable-static=no’ ‘–with-gnu-ld’ ‘–with-pic’ ‘–build=i486-slackware-linux’ –with-thttpd=../thttpd-2.21b ;make ;make install
Remove world-readable in libthttpd.c
cd ../thttpd-2.21b; ./configure ; make ; make install
thttpd -C /etc/thttpd.conf
# This section overrides defaults
dir=/home/thttpd
#chroot
user=thttpd# default = nobody
logfile=/var/log/thttpd.log
pidfile=/var/run/thttpd.pid
# This section _documents_ defaults in effect
port=809
# nosymlink# default = !chroot
vhost
# nocgipat
# nothrottles
# host=202.157.154.140
# charset=iso-8859-1
—– centos ——
http://vault.centos.org/5.10/updates/SRPMS/ download srpms
rpmbuild --rebuild [the downloaded file]
Ctrl-C
cd /usr/src/redhat/BUILD/php-5.3.3
perl suid
perl -MCPAN -e shell
>install MIME::Base64
openwebmail-tool.pl –init
openwebmail.conf
domainnames auto
auth_module auth_unix.pl
mailspooldir /var/mail
ow_cgidir /home/www/…/cgi-bin/openwebmail
ow_cgiurl /cgi-bin/openwebmail
ow_htmldir /home/www/…/openwebmail
ow_htmlurl /openwebmail
logfile /var/log/openwebmail.log
virtusertable /etc/mail/virtusertable
use_syshomedir no
ow_usersdir /home/opwm
login_fieldwidth 25
enable_changepwd yes
default_timeoffset +0700
default_style BoringGray
default_iconset Adjunct.Silver
dbm.conf
dbm_ext .db
dbmopen_ext .db
dbmopen_haslock yes
auth_unix.conf
passwdfile_plaintext /etc/passwd
passwdfile_encrypted /etc/shadow
passwdmkdb none
check_expire no
check_nologin no
check_shell no
check_cobaltuser no
change_smbpasswd no
chmod 755 /home/opwm
vipw
abc:x:1000:100::/home/opwm/abc:/bin/bash
~/sendmail-8.14.3/devtools/Site/site.config.m4
APPENDDEF(`confMAPDEF', `-DNEWDB -DSTARTTLS -DSASL=2 -DTCPWRAPPERS -DNIS -DMAP_REGEX')
APPENDDEF(`confLIBS', `-lnsl -lssl -lcrypto -lsasl2 -lwrap -lm -ldb -lresolv')
APPENDDEF(`conf_libmilter_ENVDEF', `-DMILTER')
APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER')
APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER_ROOT_UNSAFE ')
/usr/share/sendmail/cf/cf/sendmail-slackware-tls-sasl.mc
/usr/share/sendmail/cf/cf# ./Build sendmail.mc
dnl# define(`confAUTH_OPTIONS’, `A y’)dnl
define(`confAUTH_MECHANISMS’, `LOGIN PLAIN DIGEST-MD5 CRAM-MD5′)dnl
TRUST_AUTH_MECH(`LOGIN PLAIN DIGEST-MD5 CRAM-MD5′)dnl
~/cyrus-sasl-2.1.23# ./configure –prefix=/usr –disable-anon –enable-plain –enable-login –disable-krb4 –with-saslauthd=/var/state/saslauthd –with-openssl –with-plugindir=/usr/lib/sasl2 –disable-cram –disable-digest –disable-otp
/usr/lib/sasl2/Sendmail.conf
pwcheck_method: saslauthd
mech_list: LOGIN PLAIN
--------------- Centos ------------
yum install cyrus-sasl-plan
define(`confAUTH_OPTIONS', `A')dnl
define(`confAUTH_MECHANISMS', `LOGIN PLAIN')dnl
TRUST_AUTH_MECH(`LOGIN PLAIN')dnl
VirtualDocumentRoot /home/www/%-2%-1/%1%2
VirtualScriptAlias /home/www/%-2%-1/%1%2/cgi-bin
<VirtualHost 203.113.172.97:80>
php_admin_flag register_globals On
php_admin_value file_upload 1
php_admin_value upload_tmp_dir /tmp
php_admin_value session.save_path /tmp
</VirtualHost>
Include /etc/httpd/basepaths/*
basepaths/daigiaphat.com
<VirtualHost 203.113.172.97:80>
ServerName www.daigiaphat.com
ServerAlias daigiaphat.com
php_admin_flag safe_mode On
php_admin_value open_basedir /home/www/daigiaphatcom/wwwdaigiaphat/
php_admin_flag register_globals Off
php_admin_value file_upload 1
php_admin_value upload_tmp_dir /home/www/daigiaphatcom/wwwdaigiaphat/tmp/
php_admin_value session.save_path /tmp
</VirtualHost>
phpinfo();
‘./configure’ ‘–prefix=/usr’ ‘–with-apxs2=/usr/sbin/apxs’ ‘–prefix=/usr’ ‘–sysconfdir=/etc’ ‘–disable-safe-mode’ ‘–enable-apc’ ‘–enable-apc-mmap’ ‘–enable-memory-limit’ ‘–enable-suhosin’ ‘–disable-magic-quotes’ ‘–enable-zend-multibyte’ ‘–enable-mbregex’ ‘–enable-tokenizer=shared’ ‘–with-config-file-scan-dir=/etc/php’ ‘–with-config-file-path=/etc/httpd’ ‘–with-mod_charset’ ‘–with-layout=PHP’ ‘–enable-sigchild’ ‘–enable-xml’ ‘–with-libxml-dir=/usr’ ‘–enable-simplexml’ ‘–enable-spl’ ‘–enable-filter’ ‘–disable-debug’ ‘–with-openssl=shared’ ‘–with-pcre-regex=/usr’ ‘–with-zlib=shared,/usr’ ‘–enable-bcmath=shared’ ‘–with-bz2=shared,/usr’ ‘–enable-calendar=shared’ ‘–enable-ctype=shared’ ‘–with-curl=shared’ ‘–with-curlwrappers’ ‘–enable-dba=shared’ ‘–with-gdbm=/usr’ ‘–with-db4=/usr’ ‘–enable-dbase=shared’ ‘–enable-exif=shared’ ‘–enable-ftp=shared’ ‘–with-gd=shared’ ‘–with-jpeg-dir=/usr’ ‘–with-png-dir=/usr’ ‘–with-zlib-dir=/usr’ ‘–with-xpm-dir=/usr’ ‘–with-freetype-dir=/usr’ ‘–with-t1lib=/usr’ ‘–enable-gd-native-ttf’ ‘–enable-gd-jis-conv’ ‘–with-gettext=shared,/usr’ ‘–with-gmp=shared,/usr’ ‘–with-iconv=shared’ ‘–with-ldap=shared’ ‘–enable-mbstring=shared’ ‘–with-hash’ ‘–with-mhash=shared,/usr’ ‘–with-mysql=shared,/usr’ ‘–with-mysqli=shared,/usr/bin/mysql_config’ ‘–enable-pdo=shared’ ‘–with-pdo-mysql=shared,/usr’ ‘–with-pdo-sqlite=shared’ ‘–with-pspell=shared,/usr’ ‘–with-mm=/usr’ ‘–enable-shmop=shared’ ‘–with-snmp=shared,/usr’ ‘–enable-soap=shared’ ‘–enable-sockets’ ‘–with-sqlite=shared’ ‘–enable-sqlite-utf8′ ‘–with-regex=php’ ‘–enable-sysvmsg’ ‘–enable-sysvsem’ ‘–enable-sysvshm’ ‘–enable-wddx=shared’ ‘–with-xsl=shared,/usr’ ‘–enable-zip=shared’ ‘–with-tsrm-pthreads’ ‘–enable-shared=yes’ ‘–enable-static=no’ ‘–with-gnu-ld’ ‘–with-pic’ ‘–build=i486-slackware-linux’
remove ‘
remove imap
./configure –prefix=/usr –with-apxs2=/usr/sbin/apxs –prefix=/usr –sysconfdir=/etc –disable-safe-mode –enable-apc –enable-apc-mmap –enable-memory-limit –enable-suhosin –disable-magic-quotes –enable-zend-multibyte –enable-mbregex –enable-tokenizer=shared –with-config-file-scan-dir=/etc/php –with-config-file-path=/etc/httpd –with-mod_charset –with-layout=PHP –enable-sigchild –enable-xml –with-libxml-dir=/usr –enable-simplexml –enable-spl –enable-filter –disable-debug –with-openssl=shared –with-pcre-regex=/usr –with-zlib=shared,/usr –enable-bcmath=shared –with-bz2=shared,/usr –enable-calendar=shared –enable-ctype=shared –with-curl=shared –with-curlwrappers –enable-dba=shared –with-gdbm=/usr –with-db4=/usr –enable-dbase=shared –enable-exif=shared –enable-ftp=shared –with-gd=shared –with-jpeg-dir=/usr –with-png-dir=/usr –with-zlib-dir=/usr –with-xpm-dir=/usr –with-freetype-dir=/usr –with-t1lib=/usr –enable-gd-native-ttf –enable-gd-jis-conv –with-gettext=shared,/usr –with-gmp=shared,/usr –with-iconv=shared –with-ldap=shared –enable-mbstring=shared –with-hash –with-mhash=shared,/usr –with-mysql=shared,/usr –with-mysqli=shared,/usr/bin/mysql_config –enable-pdo=shared –with-pdo-mysql=shared,/usr –with-pdo-sqlite=shared –with-pspell=shared,/usr –with-mm=/usr –enable-shmop=shared –with-snmp=shared,/usr –enable-soap=shared –enable-sockets –with-sqlite=shared –enable-sqlite-utf8 –with-regex=php –enable-sysvmsg –enable-sysvsem –enable-sysvshm –enable-wddx=shared –with-xsl=shared,/usr –enable-zip=shared –with-tsrm-pthreads –enable-shared=yes –enable-static=no –with-gnu-ld –with-pic –build=i486-slackware-linux
make , make install
cp ./modules/* /usr/lib/php/extensions
httpd
./configure –enable-so –enable-modules=all
Include /usr/local/apache2/conf/mod_php.conf
Include /etc/httpd/basepaths/*
—————
# Load the PHP module:
LoadModule php5_module /usr/lib/httpd/modules/libphp5.so
AddType application/x-httpd-php .php
———-
Hi all,
Chiều nay Dũng mời toàn team route tại quán 63 để rửa máy mới nhé. Nếu mà không rửa thì sẽ bị đất nhậu luôn cái máy thì căng lém. hehehhe
shadow-4.0.3.tar.bz2 + shadow.gcc34.diff.gz -> patch < xmalloc.c.diff
for i in `ls`; do echo $i;cat $i | grep “check_user_name”; done
libmisc/chkname.c ->
(*name >= ‘0′ && *name <= ‘9′) ||
*name == ‘_’ || *name == ‘-’ ||
*name == ‘.’ || *name == ‘.’ ||
(*name == ‘$’ && *(name+1) == NULL)))
return 0;
Hehe, Mod Dung sẽ đóng góp nhiều bài vào cái chỗ này. Tui sẽ cóp pi, dán, copi dán và dán ….