Archive for the tag 'Create'

How to create a new Container and install the Panel in it:

Create a container and configure it.

Issue the following commands:

vzctl create [CTID] [options]

where
* defines an arbitrary container ID number higher than 100, which is unique on the hardware node
* –save switch tells vzctl whether to save changes into the Container configuration file.

vzctl set [CTID] [setting_name] [value] [--save]

Automatically create proxy subdomain DNS entries in WHM.

This can be enabled on the Tweak Settings page.

Enabling this option will allow WHM to automatically create DNS entries for the following 4 subdomains for every user’s account (where example.com stands for the user’s domain):

* cpanel.example.com
* webmail.example.com
* webdisk.example.com
* whm.example.com

These subdomains allow users to easily access the features included with a cPanel installation.

We can use /scripts/proxydomains to create DNS entries manually.

Reference: http://cpanel.net

MySQL database does not work and returns “Can’t create/write to file” error

The problem is related to the mysql directory permission.

‘mysql’ user is not able to create a temporary file in /var/lib/mysql/ directory due to permissions lack

# ls -lda ~mysql/

drwxr-xr-x 5 root mysql 4096 Aug 31 09:56 /var/lib/mysql/

The solution is to go to /etc/init.d/mysqld_app_init file and change

chown root.mysql /var/lib/mysql

to

chown mysql.mysql /var/lib/mysql

Then restart mysqld service or just change owner of /var/lib/mysql directory to “mysql” instead of “root”

chown root /var/lib/mysql

How to create a range of ip addresses on ethx

Create a range file in /etc/sysconfig/network-scripts

Example:

#vi ifcfg-eth0-range1

Insert the following

DEVICE=eth0
BOOTPROTO=static
HWADDR=00:04:75:D4:C8:F9
IPADDR_START=192.168.0.6
IPADDR_END=192.168.0.10
CLONENUM_START=1
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
CLONENUM_START — interface clone number to start using for this range. # eg “1″

Which would start at eth0:1

Create and starting a openvz container.

To create and start a container, run the following commands:

# vzctl create CTID –ostemplate osname
# vzctl set CTID –ipadd a.b.c.d –save
# vzctl set CTID –nameserver a.b.c.d –save
# vzctl start CTID

Here CTID is the numeric ID for the container; osname is the name of the OS template for the container, and a.b.c.d is the IP address to be assigned to the container.

Example:

# vzctl create 101 –ostemplate fedora-core-5-minimal
# vzctl set 101 –ipadd 10.1.2.3 –save
# vzctl set 101 –nameserver 10.0.2.1 –save
# vzctl start 101

Next »