Difference between revisions of "Plesk in VE"
Botinki Kira (talk | contribs) m (Robot: Automated text replacement (-VPS +container)) |
(Update to allow Plesk VPN install to recognize kernel release) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | Below is an example transcript of installing Plesk into an OpenVZ | + | Below is an example transcript of installing Plesk into an OpenVZ container (container#11): |
<pre> | <pre> | ||
Line 7: | Line 7: | ||
container private area was created | container private area was created | ||
− | # vzctl set 11 --quotaugidlimit 150 | + | # vzctl set 11 --quotaugidlimit 150 \ |
− | + | --numproc 400:400 \ | |
− | + | --kmemsize 16384000:18022400 \ | |
− | + | --privvmpages 262144:292912 \ | |
− | + | --hostname=plesk.example.com \ | |
− | + | --diskspace 2000000:2000000 \ | |
− | + | --shmpages 16384:16384 \ | |
− | + | --ipadd 127.1.2.3 \ | |
− | + | --save | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Saved parameters for container 11 | Saved parameters for container 11 | ||
Line 48: | Line 35: | ||
</pre> | </pre> | ||
− | If you want to run a VPN server inside the | + | If you want to run a VPN server inside the container you need to [[VPN via the TUN/TAP device|TUN/TAP module]]. The following commands consolidate what needs to be done: |
<pre> | <pre> | ||
# modprobe tun | # modprobe tun | ||
Line 61: | Line 48: | ||
</pre> | </pre> | ||
− | Make sure that the | + | Make sure that the container's hostname (plesk.example.com) is resolving correctly to the container's IP address (127.1.2.3). You can also add the corresponding record to /etc/hosts as a workaround. |
− | Then, go to http://www. | + | Due to how the Plesk VPN package install script works, it uses a regex on the output of "uname -r" to determine the kernel release to assure you have a minimum version of Virtuozzo (version 021stab025). So what you can do is get your version with "uname -r", and set the VE release name to fit the regex. For example: |
+ | <pre> | ||
+ | # uname -r | ||
+ | 2.6.18-194.26.1.el5.028stab079.2 | ||
+ | # echo "2.6.18-194stab079.2" > /proc/sys/kernel/virt_osrelease | ||
+ | # vzctl restart 11 | ||
+ | </pre> | ||
+ | |||
+ | Then, go to http://www.parallels.com/download/plesk8/ and download the appropriate autoinstaller or the appropriate RPM. In this case, [http://download1.parallels.com/Plesk/Plesk8.1/CentOS4.3/psa_installer_v3.1.0_build061201.02_os_CentOS_4.3_i386 CentOS] 4.3. | ||
If you want to download the autoinstaller all you need to do is: | If you want to download the autoinstaller all you need to do is: | ||
Line 69: | Line 64: | ||
# cp -f /etc/resolv.conf /vz/private/11/etc/resolv.conf | # cp -f /etc/resolv.conf /vz/private/11/etc/resolv.conf | ||
# vzctl enter 11 | # vzctl enter 11 | ||
− | entered into | + | entered into container 11 |
# cd | # cd | ||
− | # wget http://download1. | + | # wget http://download1.parallels.com/Plesk/Plesk8.1/CentOS4.3/psa_installer_v3.1.0_build061201.02_os_CentOS_4.3_i386 |
# chmod a+x psa* | # chmod a+x psa* | ||
# ./psa_installer_v3.1.0_build061201.02_os_CentOS_4.3_i386 | # ./psa_installer_v3.1.0_build061201.02_os_CentOS_4.3_i386 | ||
Line 90: | Line 85: | ||
"/etc/init.d/psa start" and | "/etc/init.d/psa start" and | ||
"/etc/init.d/psa stop" respectively. | "/etc/init.d/psa stop" respectively. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</pre> | </pre> | ||
[[Plesk install full output]] | [[Plesk install full output]] | ||
− | + | Plesk "about" webpage: | |
− | http://www. | + | : http://www.parallels.com/en/products/plesk/ |
− | http://www. | + | : http://www.parallels.com/en/products/plesk/docs/ |
− | Done. You can create a [[Debian_template_creation#Preparing_for_and_packing_template_cache|prepackaged template]] from this | + | Done. You can create a [[Debian_template_creation#Preparing_for_and_packing_template_cache|prepackaged template]] from this container for future installations. |
− | [[ | + | [[Category:HOWTO]] |
Latest revision as of 16:42, 29 February 2012
Below is an example transcript of installing Plesk into an OpenVZ container (container#11):
# vzctl create 11 --ostemplate centos-4-i386-default Creating container private area: /vz/private/11 Performing postcreate actions container private area was created # vzctl set 11 --quotaugidlimit 150 \ --numproc 400:400 \ --kmemsize 16384000:18022400 \ --privvmpages 262144:292912 \ --hostname=plesk.example.com \ --diskspace 2000000:2000000 \ --shmpages 16384:16384 \ --ipadd 127.1.2.3 \ --save Saved parameters for container 11 # vzctl set 11 --userpasswd root:pass Changing password for user root. passwd: all authentication tokens updated successfully. # vzctl set 11 --iptables "iptable_filter iptable_mangle ipt_limit ipt_multiport ipt_tos ipt_TOS ipt_REJECT ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_LOG ipt_length ip_conntrack ip_conntrack_ftp ip_conntrack_irc ipt_conntrack ipt_state ipt_helper iptable_nat ip_nat_ftp ip_nat_irc" --save Saved parameters for container 11 # vzctl start 11 Starting container ... container is mounted Adding IP address(es): 192.168.51.55 Setting CPU units: 1000 Set hostname: plesk.local Setting quota ugidlimit: 150 container start in progress...
If you want to run a VPN server inside the container you need to TUN/TAP module. The following commands consolidate what needs to be done:
# modprobe tun # lsmod | grep tun tun 6624 0 # vzctl set 11 --devices c:10:200:rw --save Setting devices Saved parameters for container 11 # vzctl exec 11 mkdir -p /dev/net # vzctl exec 11 mknod /dev/net/tun c 10 200 # vzctl exec 11 chmod 600 /dev/net/tun
Make sure that the container's hostname (plesk.example.com) is resolving correctly to the container's IP address (127.1.2.3). You can also add the corresponding record to /etc/hosts as a workaround.
Due to how the Plesk VPN package install script works, it uses a regex on the output of "uname -r" to determine the kernel release to assure you have a minimum version of Virtuozzo (version 021stab025). So what you can do is get your version with "uname -r", and set the VE release name to fit the regex. For example:
# uname -r 2.6.18-194.26.1.el5.028stab079.2 # echo "2.6.18-194stab079.2" > /proc/sys/kernel/virt_osrelease # vzctl restart 11
Then, go to http://www.parallels.com/download/plesk8/ and download the appropriate autoinstaller or the appropriate RPM. In this case, CentOS 4.3.
If you want to download the autoinstaller all you need to do is:
# cp -f /etc/resolv.conf /vz/private/11/etc/resolv.conf # vzctl enter 11 entered into container 11 # cd # wget http://download1.parallels.com/Plesk/Plesk8.1/CentOS4.3/psa_installer_v3.1.0_build061201.02_os_CentOS_4.3_i386 # chmod a+x psa* # ./psa_installer_v3.1.0_build061201.02_os_CentOS_4.3_i386
Proceed as you would if you were installing Plesk without OpenVZ.
When the installation over you will see something along the lines of:
Congratulations! Plesk has been successfully installed on your server. To complete the system configuration, please proceed to URL: https://plesk.local:8443/ or https://127.0.0.1:8443/ Use the login name 'admin' and password 'setup'. Further, use the following commands to start and stop Plesk: "/etc/init.d/psa start" and "/etc/init.d/psa stop" respectively.
Plesk "about" webpage:
Done. You can create a prepackaged template from this container for future installations.