OpenVCP: Difference between revisions

From Alpine Linux
No edit summary
m (minor layout changes)
Line 1: Line 1:
This document will be a quick c/p guide to setup openvcp on Alpine linux.
== What is openvcp? ==
== What is openvcp? ==


Line 7: Line 5:
== Install openvcp daemon ==
== Install openvcp daemon ==


apk add util-vserver libvserver php-tls sqlite sqlite-dev libxml2 libxml2-dev libpcap libpcap-dev rsync libtool alpine-sdk
{{Cmd|apk add util-vserver libvserver php-tls sqlite sqlite-dev libxml2 libxml2-dev libpcap libpcap-dev rsync libtool alpine-sdk}}


Download  
Download  


cd /tmp/
{{Cmd|cd /tmp/
wget http://files.openvcp.org/openvcpd-0.5rc3.tar.gz
wget http://files.openvcp.org/openvcpd-0.5rc3.tar.gz}}


Unpack and delete tar file
Unpack and delete tar file


tar zxvf openvcpd-0.5rc3.tar.gz  
{{Cmd|tar zxvf openvcpd-0.5rc3.tar.gz}}


cd openvcpd-0.5rc3/
{{Cmd|cd openvcpd-0.5rc3/}}


Configure Compile & install the daemon
Configure Compile & install the daemon


./configure --prefix=/usr --sysconfdir=/etc
{{Cmd|./configure --prefix=/usr --sysconfdir=/etc
make
make
make install  
make install}}


Create directories  
Create directories  


mkdir -p /vservers/backups
{{Cmd|mkdir -p /vservers/backups
mkdir -p /vservers/userbackups
mkdir -p /vservers/userbackups
mkdir -p /vservers/images
mkdir -p /vservers/images}}


Edit the config file
Edit the config file
Line 36: Line 34:
Change "IP" to your own ip and "Ifaces" to the interface you want to measure traffic on
Change "IP" to your own ip and "Ifaces" to the interface you want to measure traffic on


nano /etc/openvcpd.conf
{{Cmd|nano /etc/openvcpd.conf}}


Copy some images to your image directory usually "/vservers/images" (e.g.:  http://www.openvcp.org/wiki/Downloads. ( These Images are just folders that contain a Linux system )  
Copy some images to your image directory usually "/vservers/images" (e.g.:  http://www.openvcp.org/wiki/Downloads. ( These Images are just folders that contain a Linux system )  
Line 42: Line 40:
Start the daemon  
Start the daemon  


openvcpd
{{Cmd|openvcpd}}
 
== Install openvcp web access ==
 
apk add lighttpd mysql mysql-client php-mysql php-mysqli php php-xml php-gettext php-sockets php-gd
 
== Configuring Lighttpd ==
 
'''Edit lighttpd.conf'''
 
nano +46 /etc/lighttpd/lighttpd.conf
 
Uncomment lines:


uncoment    include "mod_fastcgi.conf", save and exit
== Install openvcp web access with Lighttpd ==


{{:Setting Up Lighttpd With FastCGI}}


'''Starting http service and adding to boot'''
Install extra packages


  /etc/init.d/lighttpd start && rc-update add lighttpd default
{{Cmd|apk add mysql mysql-client php-mysql php-mysqli php-gettext php-sockets}}


== Configuring MySql ==
== Configuring MySql ==
Line 73: Line 60:
Note: you can import the database from command line or from the openvcp web page later.
Note: you can import the database from command line or from the openvcp web page later.


mysql -u root -p
{Cmd|mysql -u root -p}}


CREATE DATABASE openvcp;
{Cmd|CREATE DATABASE openvcp;
GRANT ALL PRIVILEGES ON openvcp.* TO "root";
GRANT ALL PRIVILEGES ON openvcp.* TO "root";
FLUSH PRIVILEGES;
FLUSH PRIVILEGES;
EXIT
EXIT}}


== Installing openvcp web access ==
== Installing openvcp web access ==
Line 84: Line 71:
Make webapps folder
Make webapps folder


mkdir /usr/share/webapps/ -p
{Cmd|mkdir /usr/share/webapps/ -p}}


Download  
Download  


cd /usr/share/webapps/
{Cmd|cd /usr/share/webapps/
wget http://files.openvcp.org/openvcp-web-0.5rc3.tar.gz
wget http://files.openvcp.org/openvcp-web-0.5rc3.tar.gz}}


Unpack and delete tar file
Unpack and delete tar file


tar zxvf openvcp-web-0.5rc3.tar.gz
{Cmd|tar zxvf openvcp-web-0.5rc3.tar.gz
rm openvcp-web-0.5rc3.tar.gz
rm openvcp-web-0.5rc3.tar.gz}}


Change Folder Persmissions
Change Folder Persmissions


  chmod -R 777 /usr/share/webapps/openvcp/core/cache
{Cmd|chmod -R 777 /usr/share/webapps/openvcp/core/cache}}


Make symlinks to openvcp
Make symlinks to openvcp


ln -s /usr/share/webapps/openvcp/ /var/www/localhost/htdocs/openvcp
{Cmd|ln -s /usr/share/webapps/openvcp/ /var/www/localhost/htdocs/openvcp}}


== Configuring openvcp web access ==
== Configuring openvcp web access ==
Line 130: Line 117:


Congratulations, you installed openvcp!
Congratulations, you installed openvcp!


You have openvcp web access system working, to access go to http://WEBSERVER_IP_ADDRESS/openvcp/ user: ''Admin'' password: ''test''
You have openvcp web access system working, to access go to http://WEBSERVER_IP_ADDRESS/openvcp/ user: ''Admin'' password: ''test''
== Licence ==
'''Licence:'''
openvcp is published under the GNU General Public Licence (GPL).

Revision as of 09:19, 23 June 2011

What is openvcp?

OpenVCP is a Open-Source VServer Control Panel published under the GNU General Public Licence (GPL). OpenVCP is developed for use with Linux in combination with Linux-Vserver ( http://www.linux-vserver.org ). It provides a web-based interface to manage a whole farm of VServer hosts, build guests, control the guests, account traffic and much more.

Install openvcp daemon

apk add util-vserver libvserver php-tls sqlite sqlite-dev libxml2 libxml2-dev libpcap libpcap-dev rsync libtool alpine-sdk

Download

cd /tmp/ wget http://files.openvcp.org/openvcpd-0.5rc3.tar.gz

Unpack and delete tar file

tar zxvf openvcpd-0.5rc3.tar.gz

cd openvcpd-0.5rc3/

Configure Compile & install the daemon

{{{1}}}

Create directories

mkdir -p /vservers/backups mkdir -p /vservers/userbackups mkdir -p /vservers/images

Edit the config file

Change "IP" to your own ip and "Ifaces" to the interface you want to measure traffic on

nano /etc/openvcpd.conf

Copy some images to your image directory usually "/vservers/images" (e.g.: http://www.openvcp.org/wiki/Downloads. ( These Images are just folders that contain a Linux system )

Start the daemon

openvcpd

Install openvcp web access with Lighttpd

Basic Installation

For installing the additional packages first activate community packages and update the package index

Install the required packages:

# apk add lighttpd php82 fcgi php82-cgi

Configure Lighttpd

Edit lighttpd.conf (/etc/lighttpd/lighttpd.conf) and uncomment the line:

Contents of /etc/lighttpd/lighttpd.conf

... include "mod_fastcgi.conf" ...

Edit mod_fastcgi.conf (/etc/lighttpd/mod_fastcgi.conf), find and change /usr/bin/php-cgi to /usr/bin/php-cgi82.

Contents of /etc/lighttpd/mod_fastcgi.conf

... "bin-path" => "/usr/bin/php-cgi82" # php-cgi ...

Start lighttpd service and add it to default runlevel

# rc-service lighttpd start # rc-update add lighttpd default

Install extra packages

apk add mysql mysql-client php-mysql php-mysqli php-gettext php-sockets

Configuring MySql

/usr/bin/mysql_install_db --user=mysql
/etc/init.d/mysql start && rc-update add mysql default
/usr/bin/mysqladmin -u root password 'password'

Create the openvcp database

Note: you can import the database from command line or from the openvcp web page later.

{Cmd|mysql -u root -p}}

{Cmd|CREATE DATABASE openvcp; GRANT ALL PRIVILEGES ON openvcp.* TO "root"; FLUSH PRIVILEGES; EXIT}}

Installing openvcp web access

Make webapps folder

{Cmd|mkdir /usr/share/webapps/ -p}}

Download

{Cmd|cd /usr/share/webapps/ wget http://files.openvcp.org/openvcp-web-0.5rc3.tar.gz}}

Unpack and delete tar file

{Cmd|tar zxvf openvcp-web-0.5rc3.tar.gz rm openvcp-web-0.5rc3.tar.gz}}

Change Folder Persmissions

{Cmd|chmod -R 777 /usr/share/webapps/openvcp/core/cache}}

Make symlinks to openvcp

{Cmd|ln -s /usr/share/webapps/openvcp/ /var/www/localhost/htdocs/openvcp}}

Configuring openvcp web access

Browse to: http://WEBSERVER_IP_ADDRESS/openvcp/ and Install openvcp completing the information as appropriate from the web browser.

Openvcp Installation steps:

Welcome to the setup of OpenVCP

MySQL

  • host: localhost
  • dn: openvcp
  • user: root
  • Password: password
  • prefix: openvcp_

Other

  • location: /openvcp

relative to webroot

  • default locale: en_US
  • admin email: yourname@email.com

After set all click on "setup" to finish the installation.

Congratulations, you installed openvcp!

You have openvcp web access system working, to access go to http://WEBSERVER_IP_ADDRESS/openvcp/ user: Admin password: test