Archive for the 'linux' Category
Published by admin on February 1, 2009
under linux
[root@ns99 ~]# wget http://ftp.riken.jp/Linux/fedora/releases/10/Fedora/source/SRPMS/squid-3.0.STABLE10-1.fc10.src.rpm
–02:00:53– http://ftp.riken.jp/Linux/fedora/releases/10/Fedora/source/SRPMS/squid-3.0.STABLE10-1.fc10.src.rpm
=> `squid-3.0.STABLE10-1.fc10.src.rpm’
Resolving ftp.riken.jp… 134.160.38.1
Connecting to ftp.riken.jp|134.160.38.1|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 2,006,085 (1.9M) [application/x-wais-source]
100%[=============================>] 2,006,085 1.40M/s 02:00:54 (1.40 MB/s) -
`squid-3.0.STABLE10-1.fc10.src.rpm’ saved [2006085/2006085]
[root@ns99 ~]# rpm -ivh squid-3.0.STABLE10-1.fc10.src.rpm
warning: squid-3.0.STABLE10-1.fc10.src.rpm: V3 DSA signature: NOKEY, key ID 4ebfc273
1:squid warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
########################################### [100%]
warning: user mockbuild does not exist – using root
warning: group mockbuild does not exist – using root
[root@ns99 ~]# cd /usr/src/redhat/SPECS/
[root@ns99 SPECS]# rpmbuild –bb squid.spec
error: Failed build dependencies:
linuxdoc-tools is needed by squid-3.0.STABLE10-1.i386
[root@ns99 SPECS]# yum install linuxdoc-tools
Loading "fastestmirror" plugin
Setting up Install Process
Setting up repositories
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
Parsing package install arguments
Resolving Dependencies
–> Populating transaction set with selected packages. Please wait.
—> Downloading header for linuxdoc-tools to pack into transaction set.
linuxdoc-tools-0.9.20-14. 100% |=========================| 27 kB 00:00
—> Package linuxdoc-tools.i386 0:0.9.20-14 set to be updated
–> Running transaction check Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
linuxdoc-tools i386 0.9.20-14 base 396 k Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 396 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): linuxdoc-tools-0.9 100% |=========================| 396 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: linuxdoc-tools ######################### [1/1]
Installed: linuxdoc-tools.i386 0:0.9.20-14
Complete!
[root@ns99 SPECS]# rpmbuild –bb squid.spec
[root@ns99 SPECS]# rpm -Uvh /usr/src/redhat/RPMS/i386/squid-3.0.STABLE10-1.i386.rpm
Published by admin on January 31, 2009
under linux
Activate dag repository
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
install package
root@ns99 ~ # yum install postgrey
edit startup script /etc/init.d/postgrey
#OPTIONS=”–unix=$SOCKET”
OPTIONS=”–whitelist-clients=/etc/postfix/postgrey_whitelist_clients –whitelist
recipients=/etc/postfix/postgrey_whitelist_recipients –inet=10023 -d –unix=$SOCKET”
startup postgrey when system is bootup
root@ns99 ~ # chkconfig postgrey on
install filter to postfix /etc/postfix/main.cf
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, check_policy_service inet:127.0.0.1:10023
edit white-list as you need /etc/postfix/postgrey_whitelist_clients
Check delay from maillog
cat /var/log/maillog | postgreyreport
Published by admin on January 31, 2009
under linux
In computing, Sender Policy Framework (SPF) allows software to identify messages that are or are not authorized to use the domain name in the SMTP HELO and MAIL FROM (Return-Path) commands, based on information published in a sender policy of the domain owner. Forged return paths are common in e-mail spam and result inbackscatter. SPF is defined in RFC 4408. from wikipedia
Install require packages
root@ns99 ~ # yum install perl-Mail-SPF
Get SPF module from http://www.openspf.org/Software Newest at this time is 2.007 and Install SPF module
root@ns99 ~ # wget http://www.openspf.org/blobs/postfix-policyd-spf-perl-2.007.tar.gz
root@ns99 ~ # tar zxvf postfix-policyd-spf-perl-2.007.tar.gz
root@ns99 ~ # mv postfix-policyd-spf-perl-2.007/postfix-policyd-spf-perl /usr/local/lib.
add following line to /etc/postfix/master.cf
policy unix - n n – 0 spawn
user=nobody argv=/usr/bin/perl /usr/local/lib/policyd-spf-perl
add following line to /etc/postfix/main.cf
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, check_policy_service,
check_policy_service unix:private/policy
policy_time_limit = 3600
Add SPF record to your DNS. SPF record can be wizardly made from
http://old.openspf.org/wizard.html?mydomain=example.com&submit=Go%21
spf01 IN TXT “v=spf1 +ip4:xxx.xxx.xxx.xxx/24 ~all”
spf02 IN TXT “v=spf1 +ip4:yyy.yyy.yyy.yyy/24 ~all”
@ IN TXT “v=spf1 include:spf01.example.com include:spf02.example.com ~all”
Published by admin on January 18, 2009
under linux
1, Get FedoraCore php src rpm
-> http://ftp.riken.jp/Linux/fedora/releases/9/Fedora/source/SRPMS/
2, Install php 5.2.5.src.rpm, and modify spec
root@ns99 ~# rpm -ivh php-5.2.5-7.fc9.src.rpm
root@ns99 SPECS#cd /usr/src/redhat/SPECS
replace php.spec as provide here. ” it for avoid error on php test step”
Download php.spec here
3, build rpm and install
If any package need for dependency, install before build rpm.
root@ns99 SPECS#rpmbuild –bb php.spec
root@ns99 SPECS#cd ../RPMS/i386/
root@ns99 i386# rpm -Uvh php-common-5.2.5-7.i386.rpm php-mysql-5.2.5-7.i386.rpm php-debuginfo-5.2.5-7.i386.rpm php-ncurses-5.2.5-7.i386.rpm php-devel-5.2.5-7.i386.rpm php-odbc-5.2.5-7.i386.rpm php-pdo-5.2.5-7.i386.rpm php-gd-5.2.5-7.i386.rpm php-pgsql-5.2.5-7.i386.rpm php-imap-5.2.5-7.i386.rpm php-snmp-5.2.5-7.i386.rpm php-ldap-5.2.5-7.i386.rpm php-5.2.5-7.i386.rpm php-mbstring-5.2.5-7.i386.rpm php-bcmath-5.2.5-7.i386.rpm php-mcrypt-5.2.5-7.i386.rpm php-xml-5.2.5-7.i386.rpm php-cli-5.2.5-7.i386.rpm php-mhash-5.2.5-7.i386.rpm php-xmlrpc-5.2.5-7.i386.rpm
Published by admin on December 30, 2008
under linux
Download src rpm
http://ftp.riken.jp/Linux/centos/4.7/centosplus/SRPMS/
httpd-2.0.63-2.el4s1.centos.2.src.rpm
Install src rpm
ns2 ~ # rpm -ivh httpd-2.0.63-2.el4s1.centos.2.src.rpm
ns2 ~ # cd /usr/src/redhat/SPECS
ns2 SPECS # vim httpd.spec
%define contentdir /var/www -> %define contentdir /home
ns2 SPECS # rpmbuild -bb /usr/src/redhat/SPECS/httpd.spec
error: Failed build dependencies:
xmlto >= 0.0.11 is needed by httpd-2.0.63-2.el4s1.centos.2.i386
apr-devel >= 0.9.4-20 is needed by httpd-2.0.63-2.el4s1.centos.2.i386
apr-util-devel is needed by httpd-2.0.63-2.el4s1.centos.2.i386
distcache-devel is needed by httpd-2.0.63-2.el4s1.centos.2.i386
Install missing packages
ns2 SPECS # yum install xmlto apr-devel apr-util-devel distcache-devel
ns2 SPECS # rpmbuild -bb /usr/src/redhat/SPECS/httpd.spec
ns2 SPECS # cd ../RPMS
ns2 RPMS # rpm -ivh –force httpd-2.0.63-2.el4s1.centos.2.i386.rpm
ns2 ~ # /etc/init.d/httpd restart
ns2 ~ # suexec -V
Published by admin on December 30, 2008
under linux
1, add “ftp” use flag to /etc/make.conf
ns2 ~ # emerge proftpd
ns2 ~ # cd /etc/proftpd
ns2 proftpd # cp proftpd.conf.distrib proftpd.conf
ns2 proftpd # vim proftpd.conf
ServerName “ProFTPD Default Installation” -> ServerName “ftp.ns2.example.local”
#DefaultRoot ~ -> comment out
if you like to enable root login: add
RootLogin on
change Server Identification: add
ServerIndent on ” Ftp Server at …..”
ns2 proftpd # /etc/init.d/proftpd start && rc-update add proftpd default
ns2 etc # vim ftpusers
Comment out root
Published by admin on December 29, 2008
under linux
List all installed packages on gentoo you might use gentoolkit.
ns2 ~ # equery list
Additional reference : http://www.gentoo.org/doc/en/gentoolkit.xml
Published by admin on December 29, 2008
under linux
Install apache2 with php, mysql and ssl
1, Modify /etc/make.conf
add those use flag : apache2 ssl pam xml xml2 pcre session unicode php mysql innodb berkdb
ns2 ~ # emerge apache mysql php
……… when it done
ns2 ~ # /usr/bin/mysql_install_db
ns2 ~ # /etc/init.d/apache restart && rc-update add apache default
Published by admin on December 27, 2008
under linux
1, Setup vmware to suspend or shutdown from Edit virtual machine startup/shutdown settings
2. add “/etc/init.d/vmware stop” into /etc/conf.d/local.stop
Refrence : http://www.wiredrevolution.com/gentoo/run-a-command-at-boot-with-gentoo
Normally in Gentoo you would want to create an init script via rc-update to start a service at boot. However if there are a few miscellaneous commands you would like to run you can add them to local.start.
The local.start init script is similar to rc.local in other distributions. It is the last init script to be run after all other services have been started at the end of the boot process.
Add your commands to local.start file located here.
/etc/conf.d/local.start
You can also make commands run when the system is shutdown. These commands should be placed in local.stop located here.
/etc/conf.d/local.stop
Published by admin on December 27, 2008
under linux
When Vmware server2 console not popup with those error
ns2 ~ # firefox
No running windows found
/root/.mozilla/firefox/t0qxjlxh.default/extensions/VMwareVMRC@vmware.com/plugins/bin/
vmware-vmrc: symbol lookup error
/root/.mozilla/firefox/t0qxjlxh.default/extensions/VMwareVMRC@vmware.com/plugins/lib/
libvmwareui.so.0/libvmwareui.so.0: undefined symbol: _ZThn16_N3Gtk5TableD1Ev
try
ns2 ~ # VMWARE_USE_SHIPPED_GTK=yes firefox
« Previous Page — Next Page »