Category: Centos Notes

  • Installing yum to guest OS (centos) in openvz

    root@host#:vzpkg install (veid) yum -p Loaded plugins: rpm2vzrpm Cleaning repos: base0 base1 base2 base3 20 metadata files removed 10 sqlite files removed 0 metadata files removed Loaded plugins: rpm2vzrpm base0 | 951 B 00:00 base0/filelists | 824 B 00:00 base0/primary | 1.3 kB 00:00 base0/other | 707 B 00:00 base1 | 951 B 00:00 base1/filelists…

  • How to check the memory using of the container in openvz.

    First login to main host then execute the command below. For example we will display the memory using of this container id “1010”. ~#vzlist -a Then select the container id (ex.1010). ~#cat /proc/user_beancounters | grep -A23 “1010:”

  • How to increase disk quota of your virtual server using OpenVZ.

    Below are the steps on how to increase disk quota of a virtual server running on openvz. 1. Check the disk status of your disk quota. [root@openvz ~]# vzquota stat 101 [root@openvz ~]# vzquota stat 101 resource          usage       softlimit      hardlimit    grace 1k-blocks         631508         2097152        2306867 inodes          29386          200000         220000 2. In this example, I will…

  • How to backup/restore vm from openvz in Centos 5.8

    http://webserverpage.com/?p=237 This is in continuation of the link above. [root@openvz ~]# vzlist -a CTID      NPROC STATUS    IP_ADDR         HOSTNAME 101         12 running   192.168.2.127   subopenvz.com Backup/Restore Openvz VMs with vzdump on CentOS 1. Download and install cstream as it is a depedency for vzdump. http://pkgs.repoforge.org/cstream/ wget http://pkgs.repoforge.org/cstream/cstream-2.7.4-3.el6.rf.i686.rpm rpm -Uvh cstream-2.7.4-3.el6.rf.i686.rpm 2. Download and install vzdump. http://download.openvz.org/contrib/utils/vzdump/ wget…

  • How to install OpenVZ in CentOS 5.6

    Follow the steps below. 1. Turn off SELinux vi /etc/selinux/config /************************************************************************/ SELINUX=disabled SELINUXTYPE=targeted SETLOCALDEFS=0 /************************************************************************/ 2. Reboot the machine then type the command below to see the status of the selinux if it is completely disabled. Reboot 3. Remove the firewall chkconfig iptables –level 2345 off chkconfig iptables –list cd /etc/yum.repos.d wget http://download.openvz.org/openvz.repo rpm –import …

  • How to reset or view your current admin password in PLESK 11 or any version.

    You may need to have a root access to the main server where the PLESK have been installed. Please type the command below to show your current password. [root@centos ]# /usr/local/psa/bin/admin –show-password sKyMI8DrPa6B Below is the command to reset the ‘admin’ user password. [root@centos ]# /usr/local/psa/bin//init_conf -u -passwd

  • Raw SMTP Sending

    [root@centos home]# telnet 127.0.0.1 25 Trying 127.0.0.1… Connected to localhost.localdomain (127.0.0.1). Escape character is ‘^]’. 220 centos.centos.com ESMTP Postfix HELO webserverpage.com 250 mail.webserverpage.com MAIL FROM: <barrack.obama@usa.com> 250 ok RCPT TO: <choi@webserverpage.com> 250 ok DATA 354 go ahead From: “Barrack Obama” Subject: President Message Peace! . 250 ok 1354599764 qp 21307

  • Installing suPHP on CentOS

    Installing suPHP in centOS. Download the suPHP package first thru terminal. wget http://www.suphp.org/download/suphp-0.7.1.tar.gz then extract it. tar -zxvf suphp-0.7.1.tar.gz cd suphp-0.7.1.tar.gz yum install gcc gcc-c++ httpd-devel yum install make ./configure –with-apr=/usr/bin/apr-1-config –with-apache-user=apache –prefix=/usr make && make install vi /etc/httpd/conf/httpd.conf Add below line LoadModule suphp_module modules/mod_suphp.so Add below line in the <Directory /> section of your…

  • Host multiple domain name in a Virtual Host.

    1. You may need to install apache in your CentOS box. yum install httpd 2. Edit the httpd.conf file. vi /etc/httpd/conf/httpd.conf Below is my customize httpd.conf which host two websites (siteone.com and sitetwo.com). Listen *:80 <VirtualHost 192.168.2.124:80> ServerAdmin test@webserverpage.com ServerName siteone.com ServerAlias www.siteone.com DocumentRoot /var/www/html/siteone DirectoryIndex index.html index.pl index.php DocumentRoot /var/www/html/siteone ScriptAlias /cgi-bin/ /var/www/html/siteone/cgi-bin/ <Directory…

  • Install & Configure the BIND DNS Server

      Install & Configure the BIND DNS Server Install BIND 1. Make sure you have internet connectivity and install the BIND DNS server. [root@centos#]yum install bind 2. Set your DNS server setting to resolve to your loopback interface. Edit the configuration of you interface. [root@centos#]vi /etc/sysconfig/network-scripts/ifcfg-eth0 # Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ DEVICE=eth0 NM_CONTROLLED=”no” DNS1=127.0.0.1…