Archive for the ‘Dedicated Server Hosting’ Category
PhpMyAdmin Error :: SQLite failed to open/create session database
Written by Jahangir on October 29, 2008 – 4:58 am -Error :-
Getting following error whenever you access PhpMyAdmin either from WHM or cPanel.
Warning: session_start() [function.session-start]: SQLite: failed to open/create session database `/var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb' - unable to open database: /var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/session.inc.php on line 86 Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: sqlite (path: /var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/session.inc.php on line 86
Cause :-
This is usually a bug in the PhpMyAdmin configuration on cPanel server.
Solution :-
Manually edit /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini file as follow:
1) Login to shell of the server using root login details and open the file “/usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini” using vi or any other editor.
2) Search for the [Session] variable & underneath it, change the following
Replace:
——————————-
session.save_handler = sqlite
session.save_path = /var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb
——————————-
To:
——————————-
session.save_handler = files
session.save_path = /tmp
——————————-
By default, PhpMyAdmin uses sqlite as as the file handler, but it needs to be changed to files & the location of the session files to be stored needs to be changed to /tmp which is the standard/default place to store temporary files.
3) Once all changes done, save & exit the php.ini file & restart the apache using “/scripts/restartsrv_httpd“.
4) Also ‘chattr’ the file “/usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini” so that it doesn’t get reverted back to original whenever cPanel updates run.
Tags: /var/cpanel/userhomes/cpanelphpmyadmin/sessions/phpsess.sdb, PhpMyAdmin Error, phpmyadmin/php.ini, session.save_handler, session.save_path, SQLite: failed to open/create session database
Posted in Dedicated Server Hosting, Linux VPS Hosting | 1 Comment »
Change Time Zone On Linux VPS
Written by Jahangir on October 28, 2008 – 3:45 am -QUESTION
Is it possible to change system time in a VPS?
SOLUTION
You cannot change system time in a VPS because all VPS’s on the hardware node have the same system time. However, it is possible to change the default system timezone inside a VPS, for example, by replacing /etc/localtime with the file from /usr/share/zoneinfo which contains a description of your timezone.
1. Login as a Root.
2. Issue the following command.
[root@support ~]# tzselect
tzselect will prompt you with a series of questions to determine the appropriate time zone file to use.
Check the last line after tzselect is completed, it should look like: “Region/City”
3. Take the backup of the the current localtime file.
[root@support ~]# mv /etc/localtime /etc/localtime_org
4. Now update the localtime.
[root@support ~]# ln -s /usr/share/zoneinfo/"Region/City" /etc/localtime
Replace “Region/City” with the information given by tzselect [without ""].
5. Verify the changes done by “date” command.
[root@support007 ~]# date
Restart your VPS to take proper effect of the changes.
Tags: /etc/localtime, /usr/share/zoneinfo/, Change Time Zone On Linux VPS, date
Posted in Dedicated Server Hosting | No Comments »
Social Networking Sites
Written by Pravin on October 24, 2008 – 6:54 am -Social networking sites are building huge online communites of people sharing interests & activities. Social networking sites allows individuals to meet strangers which makes it unique. After joining a social network site, users are prompted to identify others in the system with whom they have a relationship. The label for these relationships differs depending on the site—popular terms include “Friends,” “Contacts,” and “Fans.” Most SNSs also provide a mechanism for users to leave messages on their Friends’ profiles. This feature typically involves leaving “comments,” although sites employ various labels for this feature. In addition, SNSs often have a private messaging feature similar to webmail. While both private messages and comments are popular on most of the major SNSs, they are not universally available.
Social networking has created new ways to communicate and share information. Social networking websites are being used regularly by millions of people, and it now seems that social networking will be an enduring part of everyday life.
Tags: Apple Filing Protocol (AFP), Distributed File System (DFS), File Allocation Table (FAT, File System, Google File System (GFS), HFS, Hierarchical Filesystem (HFS+), JFFS, Journaling Flash Filesystem (JFFS), logical volume, Macintosh Filesystem (MFS), NetWare Core Protocol (NCP), Network Filesystem, New Technology File System (NTFS), NFS (Network Filesystem), Record-oriented Filesystems, ReiserFS, SAN, SAN (Storage Area Network) Cluster Filesystem, Shared-disk Filesystem, SMB, SMB (Server Message), Solid-state media Filesystems, Storage Area Network, Xsan, YAFFS
Posted in Dedicated Server Hosting | 1 Comment »
ps Command
Written by Jahangir on October 23, 2008 – 7:04 am -What is ps command?
The ps command [Process Status] is a tool to display the running processes and identifying the programs that are running on the [Unix/Linux] system and the resources they are using, including their process identification numbers (PIDs).
It’s same like you see your running process using “Task-Manager” on your windows system.
The ps command displays information about the current workstation.
Advantage of ps command is that system admins will be able to see where the memory/cpu is used. ps will show the percentage of memory/cpu resource that is used by each process or task running in the system, With this command its easy to identified top memory/cpu hogging processes on system.
Here are some basic syntax and example of ps.
* ps r :- Shows only running processes.
* ps f :- Generates a full listing.
* ps e :- Shows the command environment for each process. This is useful in a situation where a program works for one user but not for another or works on one machine but not on another.
* ps -t pts/1 :- Shows processes associated with the specified tty. This is a useful to find out the process running on remote machine and for how long.
* ps aux :- aux is the options for ps command to see every process on the system.
To see only the memory resources occupied by each category of processes, such as Apache httpd, MySQL mysqld or Java, use the following command:
ps aux | awk ‘{print $4″\t”$11}’ | sort | uniq -c | awk ‘{print $2″ “$1″ “$3}’ | sort -nr
Tags: PIDs, Process Status, ps aux, ps command, What is ps command?
Posted in Dedicated Server Hosting | 1 Comment »
OSSEC
Written by Pravin on October 20, 2008 – 6:23 am -OSSEC is a scalable, multi-platform, open source Host-based Intrusion Detection System (HIDS). It has a powerful correlation and analysis engine, integrating log analysis, file integrity checking, Windows registry monitoring, centralized policy enforcement, rootkit detection, real-time alerting and active response. It runs on most operating systems, including Linux, OpenBSD, FreeBSD, MacOS, Solaris and Windows.
Installing OSSEC on Linux:
cd /tmp
wget http://www.ossec.net/files/ossec-hids-0.9-1a.tar.gz
tar xvfz ossec-hids-0.9-1a.tar.gz
Then we run the installation script:
cd ossec-hids-0.9-1a
./install.sh
The installation script will ask you a few questions:
** Para instalação em português, escolha [br].
** Fur eine deutsche Installation wohlen Sie [de].
** For installation in English, choose [en].
** Para instalar en Español , eliga [es].
** Pour une installation en français, choisissez [fr]
** Per l’installazione in Italiano, scegli [it].
** æ¥æ¬èªã§ã¤ã³ã¹ãã¼ã«ãã¾ãï¼é¸æãã¦ä¸ãã
ï¼[jp].
** Aby instalowaÄ w jÄzyku Polskim, wybierz [pl].
** ÐÐ»Ñ Ð¸Ð½ÑÑÑÑкÑий по ÑÑÑановке на ÑÑÑÑком ,введиÑе [ru].
** Türkçe kurulum için seçin [tr].
(en/br/de/es/fr/it/jp/pl/ru/tr) [en]: <– en (or one of the other options, if you don’t want to use English)
OSSEC HIDS v0.9-1 Installation Script – http://www.ossec.net
You are about to start the installation process of the OSSEC HIDS.
You must have a C compiler pre-installed in your system.
If you have any questions or comments, please send an e-mail
to dcid@ossec.net (or daniel.cid@gmail.com).
- System: Linux server.domain.com 2.6.8-2-386
- User: root
- Host: server.domain.com
— Press ENTER to continue or Ctrl-C to abort. – <– [ENTER]
1- What kind of installation do you want (server, agent, local or help)? <– local
- Choose where to install the OSSEC HIDS [/var/ossec]: <– /var/ossec
3.1- Do you want e-mail notification? (y/n) [y]: <– y
- What’s your e-mail address? <– domain@domain.com (please enter your own email address here)
- We found your SMTP server as: mail.domain.com.
- Do you want to use it? (y/n) [y]: <– y (normally you can accept the installer’s proposal, unless you want to use another SMTP server)
3.2- Do you want to run the integrity check daemon? (y/n) [y]: <– y
3.3- Do you want to run the rootkit detection engine? (y/n) [y]: <– y
- Do you want to enable active response? (y/n) [y]: <–y
- Do you want to enable the firewall-drop response? (y/n) [y]: <– y
- Do you want to add more IPs to the white list? (y/n)? [n]: <– n (unless you want to whitelist more IP addresses)
3.6- Setting the configuration to analyze the following logs:
– /var/log/messages
– /var/log/auth.log
– /var/log/syslog
– /var/log/mail.info
- If you want to monitor any other file, just change
the ossec.conf and add a new localfile entry.
Any questions about the configuration can be answered
by visiting us online at http://www.ossec.net .
— Press ENTER to continue — <– [ENTER]
- System is Linux (SysV).
- Init script modified to start OSSEC HIDS during boot.
Adding system startup for /etc/init.d/ossec …
/etc/rc0.d/K20ossec -> ../init.d/ossec
/etc/rc1.d/K20ossec -> ../init.d/ossec
/etc/rc6.d/K20ossec -> ../init.d/ossec
/etc/rc2.d/S20ossec -> ../init.d/ossec
/etc/rc3.d/S20ossec -> ../init.d/ossec
/etc/rc4.d/S20ossec -> ../init.d/ossec
/etc/rc5.d/S20ossec -> ../init.d/ossec
- Configuration finished properly.
- To start OSSEC HIDS:
/var/ossec/bin/ossec-control start
- To stop OSSEC HIDS:
/var/ossec/bin/ossec-control stop
- The configuration can be viewed or modified at /var/ossec/etc/ossec.conf
Thanks for using the OSSEC HIDS.
If you have any question, suggestion or if you find any bug,
contact us at contact@ossec.net or using our public maillist at
ossec-list@ossec.net
(http://mailman.underlinux.com.br/mailman/listinfo/ossec-list).
More information can be found at http://www.ossec.net
— Press ENTER to finish (maybe more information below). — <– [ENTER]
That’s it, OSSEC HIDS is now installed and ready to be started.
Starting And Running OSSEC HIDS:
In order to start OSSEC HIDS, we run this command:
/etc/init.d/ossec start
The output should look like this:
server1:/etc/init.d# /etc/init.d/ossec start
Starting OSSEC HIDS v0.9-1 (by Daniel B. Cid)…
Started ossec-maild…
Started ossec-execd…
Started ossec-analysisd…
Started ossec-logcollector…
Started ossec-syscheckd…
Completed.
server1:/etc/init.d#
As you might have seen during OSSEC HIDS installation, the installer also created the necessary system startup links for OSSEC HIDS, so that OSSEC HIDS will be started automatically whenever you boot/reboot your system.
After OSSEC HIDS has been started, it will run silently in the background, performing log analysis, integrity checking, rootkit detection, etc. You can check that it’s running by executing
ps aux
In the output you should find something like this:
ossecm 2038 0.0 0.4 1860 792 ? S 12:40 0:00 /var/ossec/bin/ossec-maild root 2042 0.0 0.3 1736 648 ? S 12:40 0:00 /var/ossec/bin/ossec-execd ossec 2046 0.2 0.5 2192 1136 ? S 12:40 0:00 /var/ossec/bin/ossec-analysisd root 2050 0.0 0.2 1592 556 ? S 12:40 0:00 /var/ossec/bin/ossec-logcollector root 2054 12.2 0.3 1756 616 ? S 12:40 0:05 /var/ossec/bin/ossec-syscheckd
The OSSEC HIDS log file is /var/ossec/logs/ossec.log, so you can check it to see what’s going on, e.g. with the tail command.
tail -f /var/ossec/logs/ossec.log
shows what’s happening in real-time. Press CTRL-C to leave it.
tail -n 100 /var/ossec/logs/ossec.log
shows you the last 100 lines of the OSSEC HIDS log.
Tags: Add new tag, Apple Filing Protocol (AFP), Distributed File System (DFS), File Allocation Table (FAT, File System, Google File System (GFS), HFS, Hierarchical Filesystem (HFS+), JFFS, Journaling Flash Filesystem (JFFS), logical volume, Macintosh Filesystem (MFS), NetWare Core Protocol (NCP), Network Filesystem, New Technology File System (NTFS), NFS (Network Filesystem), Record-oriented Filesystems, ReiserFS, SAN, SAN (Storage Area Network) Cluster Filesystem, Shared-disk Filesystem, SMB, SMB (Server Message), Solid-state media Filesystems, Storage Area Network, Xsan, YAFFS
Posted in Dedicated Server Hosting | 1 Comment »
Installing rar & unrar on Linux
Written by Pravin on October 20, 2008 – 5:39 am -
Installing rar & unrar on Linux is very simple.
root@server [~]# wget http://www.rarlab.com/rar/rarlinux-3.6.0.tar.gz
root@server [~]# tar -zxvf rarlinux-3.6.0.tar.gz
root@server [~]# cp rar unrar /bin
This will enable rar on your Linux server.
Tags: How Does Data Compression Work?, Linux and UNIX tar command, Lossy Compression, rar
Posted in Dedicated Server Hosting | 1 Comment »
MRTG Installation
Written by Pravin on October 20, 2008 – 5:29 am -
MRTG Installation Gudie:
1) yum install net-snmp-utils net-snmp, yum install mrtg
2) service snmpd start
3) chkconfig –add snmpd
4) vi /etc/snmp/snmpd.conf
## Find “group notConfigGroup v2c notConfigUser” & add ‘rocommunity supp0rt’
Below it & then restart snmpd.
5) Create a directory ‘mrtg’ or ‘myrtg’ under ‘/var/www/html’ OR
‘/usr/local/apache/htdocs/’.
6) cfgmaker –global ‘WorkDir: /usr/local/apache/htdocs/mymrtg’ –output /etc/mrtg/mymrtg.cfg supp0rt@192.168.5.2 (here the ip will be your server ip.)
7) vi /etc/mrtg/mymrtg.cfg & add following.
Target[192.168.5.2_2]: 2:supp0rt@192.168.5.2:
SetEnv[192.168.5.2_2]: MRTG_INT_IP=”127.0.0.1″ MRTG_INT_DESCR=”venet0″
MaxBytes[192.168.5.2_2]: 1250000
Title[192.168.5.2_2]: Traffic Analysis for 2 — 192.168.5.2
8) mrtg /etc/mrtg/mymrtg.cfg (you will get following output)
———————————————————————–
ERROR: Mrtg will most likely not work properly when the environment
variable LANG is set to UTF-8. Please run mrtg in an environment
where this is not the case. Try the following command to start:
env LANG=C /usr/bin/mrtg /etc/mrtg/mymrtg.cfg
9) env LANG=C /usr/bin/mrtg /etc/mrtg/mymrtg.cfg (you will get following output)
10) Point your browser to http://192.168.5.2/mymrtg/192.168.5.2_2.html.
Tags: Apple Filing Protocol (AFP), Distributed File System (DFS), File Allocation Table (FAT, File System, Google File System (GFS), HFS, Hierarchical Filesystem (HFS+), JFFS, Journaling Flash Filesystem (JFFS), logical volume, Macintosh Filesystem (MFS), NetWare Core Protocol (NCP), Network Filesystem, New Technology File System (NTFS), NFS (Network Filesystem), Record-oriented Filesystems, ReiserFS, SAN, SAN (Storage Area Network) Cluster Filesystem, Shared-disk Filesystem, SMB, SMB (Server Message), Solid-state media Filesystems, Storage Area Network, Xsan, YAFFS
Posted in Dedicated Server Hosting | No Comments »
rpm database rebuild
Written by Pravin on October 20, 2008 – 5:21 am -If any thing does wrong with the RPM database, you can use following way to rebuild the RPM database.
First remove the /var/lib/rpm/__db* files.
root@server [~]# cd /var/lib
root@server [~]# rm __db*
RPM Database rebuild:
root@server [~]# rpm --rebuilddb
root@server [~]# rpmdb_verify Packages
Tags: Apple Filing Protocol (AFP), Distributed File System (DFS), File Allocation Table (FAT, File System, Google File System (GFS), HFS, Hierarchical Filesystem (HFS+), JFFS, Journaling Flash Filesystem (JFFS), logical volume, Macintosh Filesystem (MFS), NetWare Core Protocol (NCP), Network Filesystem, New Technology File System (NTFS), NFS (Network Filesystem), Record-oriented Filesystems, ReiserFS, SAN, SAN (Storage Area Network) Cluster Filesystem, Shared-disk Filesystem, SMB, SMB (Server Message), Solid-state media Filesystems, Storage Area Network, Xsan, YAFFS
Posted in Dedicated Server Hosting, VPS hosting | 1 Comment »
LZO
Written by Pravin on October 20, 2008 – 5:00 am -LZO – Lempel-Ziv-Oberhumer is a lossless data compression algorithm that is focused on decompression speed. It is a portable lossless data compression library written in ANSI C. It offers pretty fast compression and *very* fast decompression. Decompression requires no memory. In addition there are slower compression levels achieving a quite competitive compression ratio while still decompressing at this very high speed.
Perl-LZO provides LZO bindings for Perl, i.e. you can access the LZO library from your Perl scripts thereby compressing ordinary Perl strings.
Tags: Apple Filing Protocol (AFP), Distributed File System (DFS), File Allocation Table (FAT, File System, Google File System (GFS), HFS, Hierarchical Filesystem (HFS+), JFFS, Journaling Flash Filesystem (JFFS), logical volume, Macintosh Filesystem (MFS), NetWare Core Protocol (NCP), Network Filesystem, New Technology File System (NTFS), NFS (Network Filesystem), Record-oriented Filesystems, ReiserFS, SAN, SAN (Storage Area Network) Cluster Filesystem, Shared-disk Filesystem, SMB, SMB (Server Message), Solid-state media Filesystems, Storage Area Network, Xsan, YAFFS
Posted in Dedicated Server Hosting | 1 Comment »
Installing Mysql on Windows
Written by Pravin on October 20, 2008 – 4:50 am -This installation is for Mysql 4 on Windows. Download Mysql 4 from http://dev.mysql.com/downloads.
Run the MSI file and use the following settings
* Typical Setup
* Skip Sign-Up
* make sure “Configure the MySQL Server now” is checked
* “Detailed Configuration”
* “Developer Machine”
* “Multifunctional Database”
* “InnoDB Tablespace Settings” – leave everything default
* “Decision Support (DSS)/OLAP”
* make sure “Enable TCP/IP Networking” is checked and leave the port number at 3306 (at this point, if you have a firewall, it will usually try to access itself on the localhost)
* “Standard Character Set”
* check “Install As Windows Service”
* enter your root password and I would recommend leaving “Enable root access from remote machines” unchecked
* then hit “execute” and it’ll install and set it up.
Tags: create database user, create mysql database, how to create mysql datbase, MyISAM, mysql, mysql database, mysql database optimization, mysql.user, Windows VPS
Posted in Dedicated Server Hosting | No Comments »





