Actually the problem is due to some settings in the mailing list administrative panel
1.enter into mailing list (via cpanel)
2.In general options
Maximum length in kilobytes (KB) of a message body. Use 0 for no limit
set it to 0.
3.This will fix the issue.
Friday, October 30, 2009
Some Scripts
1. To print natural numbers
for i in `seq 1 10` ;do echo $i;done;
2.To print a-z
for i in {a..z};do echo $i;done;
3.To delete all the accounts from a server
for i in `cat /etc/userdomains`;do /scripts/killacct;done;
4.sed -i s/on/off/g php.ini
this will on all off options
5.for i in `cat new2.txt` ; do echo "-------------------$i----------------";ssh -p 1291 -l root $i /usr/local/apache/bin/httpd -v ; e ;done
to fine out version of apache of servers in the file new2.txt
6.grep server version?
for i in `cat new2.txt` ; do echo "-------------------$i----------------";ssh -p 1291 -l root $i /usr/local/apache/bin/httpd -v | grep "Server version" ; e ;done
7. To find out mysql db user?
find /home/costagr/public_html -type f -exec grep -H username_ '{}' \;
8. To copy zone files into a file
ll | awk print '{print $9}'| cat > test
9. Script to replace email id in zone file
for i in `cat /var/named/test` ; do sed -i 's/judyndenis.yahoo.com/convergencecos.gmail.com/g' $i; done
10.script to copy usernames into a file
cat /etc/userdomains | cut -d ':' -f2 >> domaintxt
11. cut command
cat all.txt | cut -d ',' -f2-4 | sort > new.txt
12. It will list 10 files in the decreasing order according to their size
ls -al -SR | head -10
13. Script To watch load for each second ?
watch -n1 w
14. To find out the all space used by a reseller
for a in `grep resellerlogin /etc/trueuserowners | cut -d":" -f1`; do quota -s $a| tail -n 1 | awk {'print $2'};done
15. Replace command
replace 'source' 'destintaion' -- filename
eg; need to change jibin in file.txt to A
replace 'jibin' 'A' -- file.txt
for i in `seq 1 10` ;do echo $i;done;
2.To print a-z
for i in {a..z};do echo $i;done;
3.To delete all the accounts from a server
for i in `cat /etc/userdomains`;do /scripts/killacct;done;
4.sed -i s/on/off/g php.ini
this will on all off options
5.for i in `cat new2.txt` ; do echo "-------------------$i----------------";ssh -p 1291 -l root $i /usr/local/apache/bin/httpd -v ; e ;done
to fine out version of apache of servers in the file new2.txt
6.grep server version?
for i in `cat new2.txt` ; do echo "-------------------$i----------------";ssh -p 1291 -l root $i /usr/local/apache/bin/httpd -v | grep "Server version" ; e ;done
7. To find out mysql db user?
find /home/costagr/public_html -type f -exec grep -H username_ '{}' \;
8. To copy zone files into a file
ll | awk print '{print $9}'| cat > test
9. Script to replace email id in zone file
for i in `cat /var/named/test` ; do sed -i 's/judyndenis.yahoo.com/convergencecos.gmail.com/g' $i; done
10.script to copy usernames into a file
cat /etc/userdomains | cut -d ':' -f2 >> domaintxt
11. cut command
cat all.txt | cut -d ',' -f2-4 | sort > new.txt
12. It will list 10 files in the decreasing order according to their size
ls -al -SR | head -10
13. Script To watch load for each second ?
watch -n1 w
14. To find out the all space used by a reseller
for a in `grep resellerlogin /etc/trueuserowners | cut -d":" -f1`; do quota -s $a| tail -n 1 | awk {'print $2'};done
15. Replace command
replace 'source' 'destintaion' -- filename
eg; need to change jibin in file.txt to A
replace 'jibin' 'A' -- file.txt
How to install the script VZFREE
VZFREE is a script which is showing guaranteed memory usage
=================
* Download vzfree-0.1.tgz (1.5kb)
* Unpack the tarball and change into the directory
* Type “make && sudo make install“
===============
# vzfree
Total Used Free
Kernel: 49.83M 3.57M 46.26M
Allocate: 250.00M 103.91M 146.09M (256M Guaranteed)
Commit: 147.93M 53.07M 94.86M (47.6% of Allocated)
Swap: 0.03M (0.1% of Committed)
==============
=================
* Download vzfree-0.1.tgz (1.5kb)
* Unpack the tarball and change into the directory
* Type “make && sudo make install“
===============
# vzfree
Total Used Free
Kernel: 49.83M 3.57M 46.26M
Allocate: 250.00M 103.91M 146.09M (256M Guaranteed)
Commit: 147.93M 53.07M 94.86M (47.6% of Allocated)
Swap: 0.03M (0.1% of Committed)
==============
Saturday, October 24, 2009
Disable ftp root login
We can disable ftp root login by using the following
===========
1. go to WHM
2. Main >> Service Configuration >> FTP Server Configuration
3.select "Allow Logins with Root Password" as No
============
===========
1. go to WHM
2. Main >> Service Configuration >> FTP Server Configuration
3.select "Allow Logins with Root Password" as No
============
Friday, October 23, 2009
sar command is not working
sar -q
there is no such file or directory
/var/log/sa/sa23
Solution:
sar 1 10 -o sa23
there is no such file or directory
/var/log/sa/sa23
Solution:
sar 1 10 -o sa23
Apache 404 error " script not found or unable to stat: /usr/local/apache/cgi-bin/form.cgi,"
Solution :
copy the form.cgi to /usr/local/apache/cgi-bin/
from the given location
copy the form.cgi to /usr/local/apache/cgi-bin/
from the given location
Cpanel having two password
The problem is that you can go to cpanel with 2 different passwords.
you can test:
http://controlip.net:2082/
user: control
pass1: teleip
pass2: GranVia0
----------------------
VPS : 22arroba.com
usuario : xxarrob
password : e621023
=========================
We can disable the cpanel root login by using the following
=============
1.go to WHM
2.Tweak settings ==>> Disable login with root or reseller password into the users' cPanel interface. Also disable switch account dropdown in themes with switch account feature.
3.Check this option .i.e disabling the cpanel access with resellers root password
you can test:
http://controlip.net:2082/
user: control
pass1: teleip
pass2: GranVia0
----------------------
VPS : 22arroba.com
usuario : xxarrob
password : e621023
=========================
We can disable the cpanel root login by using the following
=============
1.go to WHM
2.Tweak settings ==>> Disable login with root or reseller password into the users' cPanel interface. Also disable switch account dropdown in themes with switch account feature.
3.Check this option .i.e disabling the cpanel access with resellers root password
Wednesday, October 21, 2009
php: error while loading shared libraries: libpq.so.3+php
1.try to link the libraries
2./scripts/easyapache
2./scripts/easyapache
Name servers are not displayng in WHM under Main >> Networking Setup >> Nameserver IPs
Solution:
If the domain is not in the dns zone then add the domain into dns zone
Default Setting up Name Servers on CPANEL / WHM
I found this interesting article about name server setup on http://www.webhostingtalk.com/.
Setting up nameservers in WHM/Cpanel
1. Log into WHM
2. Goto Server Setup =>> Edit Setup
Make sure your primary IP is correct under Main Shared Virtual Host IP
Make sure your Hostname is correct under Hostname (server1.xyz.com)
Under Primary Nameserver enter your primary nameserver (ns1.xyz.com), click on Assign Ip Address, then click on Add A entry for this nameserver
Under Secondary Nameserver enter your secondary nameserver (ns2.xyz.com), click on Assign Ip Address, then click on Add A entry for this nameserver
Note: You can add a third and fourth name server if you wish, however this is not necessary. All name servers will be automatically assigned to any accounts you setup later. You will have to manually disable extra nameservers from each account.
Scroll to the bottom and click Save.
Goto DNS Functions =>> Edit a DNS Zone
Choose the primary domain for the server and click Edit
The beginning of your Zone File should look something like this:
-------------------------------------------
; Zone File for ip-2-ip.net
$TTL 14400
@ 14440 IN SOA ns1.xyz.com. admin.xyz.com
-------------------------------------------
In SOA add your primary ns (ns1.xyz.com.) and contact email (admin.xyz.com.). Put a period at the end of your nameserver, and use a period in place of @ in your contact email and add a period at the end too.)
In most cases you should have the following Record Types:
-------------------------------------------
xyz.com. 14440 IN NS ns1.xyz.com.
xyz.com. 14440 IN NS ns2.xyz.com.
xyz.com. 14440 IN A 123.123.123.12 (primary IP Address)
localhost.xyz.com. 14440 IN A 127.0.0.1
xyz.com. 14440 IN MX 0 xyz.com.
mail 14440 IN CNAME xyz.com.
www 14440 IN CNAME xyz.com.
ftp 14440 IN A 123.123.123.13
ns1 14440 IN A 123.123.123.12
ns2 14440 IN A 123.123.123.13
server1 14440 IN A 123.123.123.12 (primary IP Address)
-------------------------------------------
If you do not have A records for your Nameservers add them now. If you use Managed DNS for your domain name, also add A records to your domain name with your DNS.
If you made changes to your zone file, scroll down to the bottom and click on Save
Goto DNS Functions =>> Perform a DNS Cleanup
Now log out of WHM and SSH to your server and login as root.
Note: You can download Putty by Clicking Here (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html). It's a clean running application that will not require installation on Windows-boxes.
Once logged in...
At command prompt type: pico /etc/nameserverips
Make sure all of your nameservers are listed
123.123.123.12=ns1.xyz.com
123.123.123.13=ns2.xyz.com
123.123.123.14=0
123.123.123.15=0
123.123.123.16=0
Remove any nameservers that do not belong.
If you make changes to the file, then press the following keys on your keyboard Ctrl o and then Enter to save the file, then Ctrl x to exit.
At command prompt type: pico /etc/resolv.conf
There should only be three records in the resolv.conf file... localhost, primary nameserver, secondary nameserver.
nameserver 127.0.0.1
nameserver 123.123.123.12
nameserver 123.123.123.13
Remove anything else and then save and exit.
At the prompt type: pico /etc/wwwacct.conf
Make sure all of the information is correct. Remove anything that does not belong, save, then exit.
ADDR 123.123.123.12
CONTACTEMAIL admin@xyz.com
CONTACTPAGER
DEFMOD x
ETHDEV
FTPTYPE proftpd
HOMEDIR /home
HOMEMATCH home
HOST server1.xyz.com
LOGSTYLE combined
MINUID
NS ns1.xyz.com
NS2 ns2.xyz.com
ns3
SCRIPTALIAS y
ns4
At the prompt type: pico /etc/named.conf
Scroll down to the bottom of the file to the zone records.
-------------------------------------------
zone "xyz.com" {
type master;
file "/var/named/xyz.com.db";
};
-------------------------------------------
Make sure all domain zone records are correct. Remove any zone records that are old or do not belong there. If you make any changes, save and then exit.
At the prompt type: pico /etc/host.conf[b]
This file should look like this:
[b]order hosts,bind
At the prompt type: pico /etc/host
This file should look like this:
-------------------------------------------
# Do not remove the following line, or various programs
# that require network functionality will fail.
123.123.123.12 server1.xyz.com server1
127.0.0.1 localhost
-------------------------------------------
Now your done and your nameservers will work like a pro.
Source: http://www.webhostingtalk.com/archiv.../t-327461.html
If the domain is not in the dns zone then add the domain into dns zone
Default Setting up Name Servers on CPANEL / WHM
I found this interesting article about name server setup on http://www.webhostingtalk.com/.
Setting up nameservers in WHM/Cpanel
1. Log into WHM
2. Goto Server Setup =>> Edit Setup
Make sure your primary IP is correct under Main Shared Virtual Host IP
Make sure your Hostname is correct under Hostname (server1.xyz.com)
Under Primary Nameserver enter your primary nameserver (ns1.xyz.com), click on Assign Ip Address, then click on Add A entry for this nameserver
Under Secondary Nameserver enter your secondary nameserver (ns2.xyz.com), click on Assign Ip Address, then click on Add A entry for this nameserver
Note: You can add a third and fourth name server if you wish, however this is not necessary. All name servers will be automatically assigned to any accounts you setup later. You will have to manually disable extra nameservers from each account.
Scroll to the bottom and click Save.
Goto DNS Functions =>> Edit a DNS Zone
Choose the primary domain for the server and click Edit
The beginning of your Zone File should look something like this:
-------------------------------------------
; Zone File for ip-2-ip.net
$TTL 14400
@ 14440 IN SOA ns1.xyz.com. admin.xyz.com
-------------------------------------------
In SOA add your primary ns (ns1.xyz.com.) and contact email (admin.xyz.com.). Put a period at the end of your nameserver, and use a period in place of @ in your contact email and add a period at the end too.)
In most cases you should have the following Record Types:
-------------------------------------------
xyz.com. 14440 IN NS ns1.xyz.com.
xyz.com. 14440 IN NS ns2.xyz.com.
xyz.com. 14440 IN A 123.123.123.12 (primary IP Address)
localhost.xyz.com. 14440 IN A 127.0.0.1
xyz.com. 14440 IN MX 0 xyz.com.
mail 14440 IN CNAME xyz.com.
www 14440 IN CNAME xyz.com.
ftp 14440 IN A 123.123.123.13
ns1 14440 IN A 123.123.123.12
ns2 14440 IN A 123.123.123.13
server1 14440 IN A 123.123.123.12 (primary IP Address)
-------------------------------------------
If you do not have A records for your Nameservers add them now. If you use Managed DNS for your domain name, also add A records to your domain name with your DNS.
If you made changes to your zone file, scroll down to the bottom and click on Save
Goto DNS Functions =>> Perform a DNS Cleanup
Now log out of WHM and SSH to your server and login as root.
Note: You can download Putty by Clicking Here (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html). It's a clean running application that will not require installation on Windows-boxes.
Once logged in...
At command prompt type: pico /etc/nameserverips
Make sure all of your nameservers are listed
123.123.123.12=ns1.xyz.com
123.123.123.13=ns2.xyz.com
123.123.123.14=0
123.123.123.15=0
123.123.123.16=0
Remove any nameservers that do not belong.
If you make changes to the file, then press the following keys on your keyboard Ctrl o and then Enter to save the file, then Ctrl x to exit.
At command prompt type: pico /etc/resolv.conf
There should only be three records in the resolv.conf file... localhost, primary nameserver, secondary nameserver.
nameserver 127.0.0.1
nameserver 123.123.123.12
nameserver 123.123.123.13
Remove anything else and then save and exit.
At the prompt type: pico /etc/wwwacct.conf
Make sure all of the information is correct. Remove anything that does not belong, save, then exit.
ADDR 123.123.123.12
CONTACTEMAIL admin@xyz.com
CONTACTPAGER
DEFMOD x
ETHDEV
FTPTYPE proftpd
HOMEDIR /home
HOMEMATCH home
HOST server1.xyz.com
LOGSTYLE combined
MINUID
NS ns1.xyz.com
NS2 ns2.xyz.com
ns3
SCRIPTALIAS y
ns4
At the prompt type: pico /etc/named.conf
Scroll down to the bottom of the file to the zone records.
-------------------------------------------
zone "xyz.com" {
type master;
file "/var/named/xyz.com.db";
};
-------------------------------------------
Make sure all domain zone records are correct. Remove any zone records that are old or do not belong there. If you make any changes, save and then exit.
At the prompt type: pico /etc/host.conf[b]
This file should look like this:
[b]order hosts,bind
At the prompt type: pico /etc/host
This file should look like this:
-------------------------------------------
# Do not remove the following line, or various programs
# that require network functionality will fail.
123.123.123.12 server1.xyz.com server1
127.0.0.1 localhost
-------------------------------------------
Now your done and your nameservers will work like a pro.
Source: http://www.webhostingtalk.com/archiv.../t-327461.html
Thursday, October 8, 2009
To download backup from cpanel
wget http://agrupaci:51/*-78+_09@j@servercristiano.com:2082/download?file=backup-10.8.2009_03-16-36_agrupaci.tar.gz
===================
wget http://uname:pass@domainname.com:2082/download?file=backup-10.8.2009_03-16-36_agrupaci.tar.gz
=====================
===================
wget http://uname:pass@domainname.com:2082/download?file=backup-10.8.2009_03-16-36_agrupaci.tar.gz
=====================
Wednesday, October 7, 2009
Thursday, October 1, 2009
up2date, aptitude,yum commands
1. For centos servers we can use yum
2.for debian servers we can use aptitude
3.For RHEL (redhat servers) we can use up2date
2.for debian servers we can use aptitude
3.For RHEL (redhat servers) we can use up2date
To grep mulitiple contents
[root@server ~]# rpm -qa | egrep 'binutils|compat-db'
binutils-2.17.50.0.6-12.el5
compat-db-debuginfo-4.2.52-5.1
[root@server ~]#
===============
php -m | egrep -i 'curl| XML|MySQL|GD|mbstring|gettext'
curl
gd
binutils-2.17.50.0.6-12.el5
compat-db-debuginfo-4.2.52-5.1
[root@server ~]#
===============
php -m | egrep -i 'curl| XML|MySQL|GD|mbstring|gettext'
curl
gd
Subscribe to:
Posts (Atom)