Sunday, July 8, 2007

Quick fixes for issues on Linux and Windows server

part A) Quick fixes for issues on Linux and Windows server :

Following are the useful commands and tweaks used on Linux and Windows servers :

A) To Upgrade php on Cpanel:

1) first login as :

For Linux server:
server ip address
root /

OR

For Windows server:
server ip address
Username: Administrator /

2) ssh rootpasswd
commands:

# /scripts/easyapache >> select 7 >> enter >> select most comman options >>
exit >> exit >> do you want to save >> yes. >> enter.
type: # php -m> to view the installed component.
type: # php -v> to view the version of php.

===========================================

B) To Rrestore an account from another server (ssh)
1) ssh root (Old)
passwd (old)
2) ssh
root (New)
passwd (New)
In old:

# /usr/local/cpanel/cpkeyclt : to upload the license

===============================================

C) How to change the Hostname :

Files to change the hostname
# /etc/hosts
# /etc/sysconffig/network
# /etc/httpd/conf/httpd.conf
# /proc/sys/kernel/hostname

================================================

D) How to solve the problem of Fantastico De Luxe WHM Admin.

1) login to client server via ssh.
2) check permissions of /etc/httpd/conf/httpd.conf file it should be 644.
3) if problem doesn't solves then run command : # /scripts/upcp --force
4) if then also problem doesn't solve then go to the link:

http://netenberg.com/forum/viewtopic.php?t=950)
Copy the following lines from the site:

# cd /usr/local/cpanel/whostmgr/docroot/cgi
# wget -N http://www.netenberg.com/files/free/fantastico_whm_admin.tgz
# tar -xzpf fantastico_whm_admin.tgz
# rm -rf fantastico_whm_admin.tgz.

6)Paste it in the shell and press enter.
7) Now go to the WHM>>addon>>fantisco>>install>>install (clickhere)

=================================================

E) How to update the stats of a particular User.

1) login to server via ssh.
2) # grep /etc/userdomains to know the username.
OR
# cat /etc/userdomains | grep
3) copy the username.
4) type command
# /scripts/runweblogs >>enter

This will update the stats of the user.
==================================================

F) How to deleted unwanted things from /usr partion.

1) Login to client machine via ssh.
# df -h
3) then go to :
# cd /usr/local/apache/logs
# ls -ihS
# echo > error_log
# echo > suexec_log
# cd ../domlogs/
# ls -lhS | head -n 20
# echo > anyone from the list.

===================================================

Upgrading PHP from shell:

http://layer1.cpanel.net/buildapache/1/libmcrypt-2.5.7.tar.gz
http://layer1.cpanel.net/buildapache/1/mhash-0.8.18.tar.gz
http://layer1.cpanel.net/buildapache/1/curl-7.12.0.tar.gz
http://layer1.cpanel.net/buildapache/1/php-4.4.1.tar.gz

./configure --prefix=/usr/local --with-xml --enable-bcmath
--enable-calendar --with-curl --enable-exif --enable-ftp --with-gd
--with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6
--enable-mbstring --enable-mbstr-enc-trans --enable-mbregex --with-mcrypt
--with-mhash --enable-magic-quotes --with-mysqli --with-mysql=/usr
--with-openssl --enable-discard-path --with-pear --enable-so

# wget http://layer1.cpanel.net/buildapache/1/libmcrypt-2.5.7.tar.gz
# tar -zxvf libmcrypt-2.5.7.tar.gz
# cd libmcrypt-2.5.7
# ./configure
# make
# make install