Steps to Enable PPP Module in a VPS:
To enable PPP module on a VPS, the Hardware Node should have the following module enabled.
*HN means Hardware Node
HN # modprobe ppp_async
HN # modprobe ppp_deflate
HN # lsmod | grep ppp
ppp_deflate 9793 2
zlib_deflate 21977 1 ppp_deflate
ppp_async 15169 1
crc_ccitt 6337 1 ppp_async
ppp_generic 30165 6 ppp_deflate,ppp_async
slhc 10561 1 ppp_generic
HN # vzctl stop [VEnumber]
HN # vzctl set [VEnumber] --features ppp:on --save
HN # vzctl start [VEnumber]
HN # vzctl set [VEnumber] --devices c:108:0:rw --save
HN # vzctl exec [VEnumber] mknod /dev/ppp c 108 0
HN # vzctl exec [VEnumber] chmod 600 /dev/ppp
INSIDE THE VPS:
To check whether PPP is enabled or not:
VE# /usr/sbin/pppd
You should see gibberish in the standard output like
~�}#�!}!}!} }4}"}&} } } } }%}&)Q�}4}'}"}(}"p})
Thursday, 27 December 2012
How to enable PPP Module to a VPS on OpenVZ
Sunday, 23 December 2012
How to upgrade tomcat from 5.x to 7 on cpanel server
When you have installed tomcat by using Easy-Apache then it installed Tomcat 5.5 and if you want to installed Tomcat 7.0.34 then you need to made some necessary changes on the server.
1) First install Tomcat 5.5 by using Easy-Apache means java is also installed at the time of Easy-Apache. The Tomcat 5 is installed in /usr/local/jakarta/ directory with the symbolic link tomcat. For example:
[~]# ll /usr/local/jakarta
drwxr-xr-x 4 tomcat nobody 4096 Apr 5 17:15 ./
drwxr-xr-x 22 root root 4096 Mar 5 15:39 ../
drwxr-xr-x 12 tomcat nobody 4096 Apr 4 17:02 apache-tomcat-5.5.30/
lrwxrwxrwx 1 tomcat nobody 39 Apr 4 17:04 tomcat -> /usr/local/jakarta/apache-tomcat-5.5.30/
2) Then download and extract Tomcat 7 in /usr/local/jakarta directory
[~]# cd /usr/local/jakarta
[/usr/local/jakarta]# wget http://apache.cs.utah.edu/tomcat/tom...-7.0.34.tar.gz
[/usr/local/jakarta]# tar -xzvf apache-tomcat-7.0.34.tar.gz
3) Then Change the tomcat symbolic link to point to your new version (i.e. /usr/local/jakarta/apache-tomcat-7.0.34)
[/usr/local/jakarta]# ln -s /usr/local/jakarta/apache-tomcat-7.0.34 tomcat
Now it shows
[~]# ll /usr/local/jakarta
drwxr-xr-x 4 tomcat nobody 4096 Apr 5 17:15 ./
drwxr-xr-x 22 root root 4096 Mar 5 15:39 ../
drwxr-xr-x 12 tomcat nobody 4096 Apr 4 17:02 apache-tomcat-5.5.30/
drwxr-xr-x 9 tomcat nobody 4096 Apr 4 17:01 apache-tomcat-7.0.34/
lrwxrwxrwx 1 tomcat nobody 39 Apr 4 17:04 tomcat -> /usr/local/jakarta/apache-tomcat-7.0.34/
4) Then compile the new Tomcat version on cPanel server.
[~]# cd /usr/local/jakarta/apache-tomcat-7.0.34
[/usr/local/jakarta/apache-tomcat-7.0.34]# cd ./bin
[/usr/local/jakarta/apache-tomcat-7.0.34/bin]# tar xvfz commons-deamon-native.tar.gz
[/usr/local/jakarta/apache-tomcat-7.0.34/bin]# cd commons-daemon-1.0.x-native-src/unix
[/usr/local/jakarta/apache-tomcat-7.0.34/bin/commons-daemon-1.0.x-native-src/unix]# ./configure
[~]# make
[~]# cp jsvc ../..
[~]# cd ../../..
5) Copy over any Host blocks from /usr/local/jakarta/tomcat/conf/server.xml from the old Tomcat install to the new Tomcat install (you may or may not be able to set up new hosts through WHM).
Example:
cp /usr/local/jakarta/apache-tomcat-5.5.30/conf/server.xml /usr/local/jakarta/tomcat/conf/
6) Copy over /usr/local/jakarta/tomcat/conf/workers.properties from the old Tomcat install to the new Tomcat install.
Example:
# cp /usr/local/jakarta/apache-tomcat-5.5.30/conf/workers.properties /usr/local/jakarta/tomcat/conf/
7) Restart the server
[/]# reboot
Or
[/]# /usr/local/jakarta/tomcat/bin/shutdown.sh
[/]# /usr/local/jakarta/tomcat/bin/startup.sh
[/]# /etc/init.d/httpd restart
9) Check Tomcat Version
[/]# sh /usr/local/jakarta/tomcat/bin/version.sh
The cPanel EasyApache system makes it easy to recompile Apache with various add-ons and modules.
If you ever need your old Tomcat back just stop Tomcat, flip the tomcat symbolic link back to the old install, and restart Tomcat.
Sunday, 2 December 2012
vzquota : (error) Quota on syscall for id 101: Device or resource busy
Quota on syscall for id, Device or resource busy on OpenVZ
Failing quota off with 'Device or resource busy' error means that some file from VE private area was in use: might be some process running on HN opened it or just somebody had an ssh session opened with current dir in /vz/private/101/..
Error:
#vzctl restart 101
Restarting container
Starting container...
vzquota : (error) Quota on syscall for id 101: Device or resource busy
vzquota : (error) Possible reasons:
vzquota : (error) - Container's root is already mounted
vzquota : (error) - there are opened files inside Container's private area
vzquota : (error) - your current working directory is inside Container's
vzquota : (error) private area
vzquota : (error) Currently used file(s):
Try this:
# lsof 2> /dev/null | egrep '/vz/root/101 | /vz/private/101'
If any process lists, then kill that process and start the VPS again.
Failing quota off with 'Device or resource busy' error means that some file from VE private area was in use: might be some process running on HN opened it or just somebody had an ssh session opened with current dir in /vz/private/101/..
Error:
#vzctl restart 101
Restarting container
Starting container...
vzquota : (error) Quota on syscall for id 101: Device or resource busy
vzquota : (error) Possible reasons:
vzquota : (error) - Container's root is already mounted
vzquota : (error) - there are opened files inside Container's private area
vzquota : (error) - your current working directory is inside Container's
vzquota : (error) private area
vzquota : (error) Currently used file(s):
Try this:
# lsof 2> /dev/null | egrep '/vz/root/101 | /vz/private/101'
If any process lists, then kill that process and start the VPS again.
Tuesday, 20 November 2012
Error in Kloxo: Could not open database connection
You may get the below error while trying to access Kloxo Control Panel
"Could not open database connection"
You can fix this by two ways,
Fix 1:
Open your phpMyAdmin http://ip:7778/thirdparty/phpMyAdmin and enter the Root Login details.
Select the "Privileges"
"Could not open database connection"
You can fix this by two ways,
Fix 1:
Open your phpMyAdmin http://ip:7778/thirdparty/phpMyAdmin and enter the Root Login details.
Locate Kloxo and select "Edit Privileges"
Click "Check All " options
Next, Go to the Bottom of the Page and select "password" and enter the password.
Then Click "Go"
Thats it!!. Now Kloxo should work fine.
Fix 2:
mysql -u root -p
mysql> grant all on kloxo.* to kloxo@localhost identified by '{new password}';
mysql> flush privileges;
mysql> quit
cat "{new password}" > usr/local/lxlabs/kloxo/etc/conf/kloxo.pass
sh /script/restart
Friday, 16 November 2012
ERROR! MySQL is running but PID file could not be found
You may get the below Error:
[root@server ~]# /etc/init.d/mysql status
ERROR! MySQL is running but PID file could not be found
Fix:
1.Check for mysql directory:
[root@server ~]# ll /var/run/mysql
ls: /var/run/mysql: No such file or directory
2.Create a mysql directory:
[root@server ~]# mkdir /var/run/mysql
3.Enter into the created directory:
[root@server ~]# cd /var/run/mysql/
4.Create the mysqld process id:
[root@server mysql]# touch mysqld.pid
5.Changing the ownership of mysqld.pid
[root@server mysql]# chown mysql:mysql mysqld.pid
6.Restart the MySQL:
[root@server mysql]# /etc/init.d/mysql restart
ERROR! MySQL manager or server PID file could not be found!
Starting MySQL.................................................................. .................................. SUCCESS!
7.Check the Status of MySQL:
[root@server mysql]# /etc/init.d/mysql status
SUCCESS! MySQL running (1583)
Thats it!!!
[root@server ~]# /etc/init.d/mysql status
ERROR! MySQL is running but PID file could not be found
Fix:
1.Check for mysql directory:
[root@server ~]# ll /var/run/mysql
ls: /var/run/mysql: No such file or directory
2.Create a mysql directory:
[root@server ~]# mkdir /var/run/mysql
3.Enter into the created directory:
[root@server ~]# cd /var/run/mysql/
4.Create the mysqld process id:
[root@server mysql]# touch mysqld.pid
5.Changing the ownership of mysqld.pid
[root@server mysql]# chown mysql:mysql mysqld.pid
6.Restart the MySQL:
[root@server mysql]# /etc/init.d/mysql restart
ERROR! MySQL manager or server PID file could not be found!
Starting MySQL.................................................................. .................................. SUCCESS!
7.Check the Status of MySQL:
[root@server mysql]# /etc/init.d/mysql status
SUCCESS! MySQL running (1583)
Thats it!!!
Tuesday, 16 October 2012
Installing RKHunter on CentOS 5.x & 6.x
Steps to Installing RKHunter
#cd /usr/local/src
#wget http://nchc.dl.sourceforge.net/project/rkhunter/rkhunter/1.4.0/rkhunter-1.4.0.tar.gz
#tar -zxvf rkhunter-1.4.0.tar.gz
#cd rkhunter-1.4.0
#./installer.sh --layout default --install
#/usr/local/bin/rkhunter --update
#/usr/local/bin/rkhunter --propupd
#rm -Rf /usr/local/src/rkhunter*
#cd
Adding to Daily Cron
#vi /etc/cron.daily/rkhunter.sh
Add the Below text to rkhunter.sh
#!/bin/sh
(
/usr/local/bin/rkhunter --versioncheck
/usr/local/bin/rkhunter --update
/usr/local/bin/rkhunter --cronjob --report-warnings-only
) | /bin/mail -s 'rkhunter Daily Run (PutYourServerNameHere)' your@email.here
Chmod rkhunter.sh to root only
#chmod 700 /etc/cron.daily/rkhunter.sh
#cd /usr/local/src
#wget http://nchc.dl.sourceforge.net/project/rkhunter/rkhunter/1.4.0/rkhunter-1.4.0.tar.gz
#tar -zxvf rkhunter-1.4.0.tar.gz
#cd rkhunter-1.4.0
#./installer.sh --layout default --install
#/usr/local/bin/rkhunter --update
#/usr/local/bin/rkhunter --propupd
#rm -Rf /usr/local/src/rkhunter*
#cd
Adding to Daily Cron
#vi /etc/cron.daily/rkhunter.sh
Add the Below text to rkhunter.sh
#!/bin/sh
(
/usr/local/bin/rkhunter --versioncheck
/usr/local/bin/rkhunter --update
/usr/local/bin/rkhunter --cronjob --report-warnings-only
) | /bin/mail -s 'rkhunter Daily Run (PutYourServerNameHere)' your@email.here
Chmod rkhunter.sh to root only
#chmod 700 /etc/cron.daily/rkhunter.sh
Monday, 15 October 2012
Error while installing CHKROOTKIT on CentOS 6
Error:
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [strings-static] Error 1
Fix:
yum install glibc-static
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [strings-static] Error 1
Fix:
yum install glibc-static
Subscribe to:
Posts (Atom)




