Setup MyLVS: Difference between revisions

From MyLVS
Jump to navigation Jump to search
Line 9: Line 9:
=Setup Apache=
=Setup Apache=
Copy the configuration to your Apache Webserver:
Copy the configuration to your Apache Webserver:
  cp /var/www/mylvs/templates/etc/apache2/sites-available/mylvs.conf /etc/apache2/sites-enabled/
  cp /var/www/mylvs/templates/etc/apache2/sites-available/mylvs.conf /etc/apache2/sites-available/


Optional copy the Webservice configuration to your Apache Webserver:
Optional copy the Webservice configuration to your Apache Webserver:
  cp /var/www/mylvs/templates/etc/apache2/sites-available/ws.mylvs.foo.conf /etc/apache2/sites-enabled/
  cp /var/www/mylvs/templates/etc/apache2/sites-available/ws.mylvs.foo.conf /etc/apache2/sites-available/


Verify the myLVS Web configuration and enable it with a2ensite:
Verify the myLVS Web configuration and enable it with a2ensite:

Revision as of 18:33, 27 August 2015

Setup mySQL

At the very step we need to setup the database with all the required tables, please use the import script mylvs.sql to do so.
You will find the script within the archive or on your disk in: /var/www/mylvs/templates/mysql_data/mylvs.sql

mysql -u root -p < /var/www/mylvs/templates/mysql_data/mylvs.sql


You may also see: Create the Database and the Users

Setup Apache

Copy the configuration to your Apache Webserver:

cp /var/www/mylvs/templates/etc/apache2/sites-available/mylvs.conf /etc/apache2/sites-available/

Optional copy the Webservice configuration to your Apache Webserver:

cp /var/www/mylvs/templates/etc/apache2/sites-available/ws.mylvs.foo.conf /etc/apache2/sites-available/

Verify the myLVS Web configuration and enable it with a2ensite:

a2ensite mylvs.conf

Optional verify the myLVS Monitor configuration and enable it with a2ensite:

a2ensite ws.mylvs.foo.conf

Restart Apache

service apache2 restart

Add a demo account to apache, this will be the login through the browser, note that this step is required:

root@mylvs01:/# htpasswd -c /var/www/mylvs/wwwroot/.htpasswd.users demo

Login to myLVS

Depending on your client OS you may add a hostheader to your host file, to do this type

  • Linux
# vi /etc/hosts
  • Windows (Administrator command shell)
notepad c:\Windows\System32\drivers\etc\hosts

Add:

192.168.x.y	mylvs.foo
  • Note: The Windows DNS Cache requires a reload:
ipconfig/flushdns

Navigate your prefered browser to mylvs.foo, login using demo, demo.
You should see a screen similar the this:

Note: To setup a fresh configuration you could easily setup the node and servers through the setup and begin then from scratch.

Automatic load of myLVS setting

To automatic load the myLVS Web configuration it is requires to setup sysmctl which comes new with Debian 8.
This configuration will start on boot only using the type oneshot, it is very important to load this after mysql.service startup command
Get the configuration from the templates and copy it to the systemd user directory

cp /var/www/mylvs/templates/etc/systemd/system/mylvs-init.service /etc/systemd/system/

Alternative get the myLVS Monitor startup configuration from the templates and copy it to the systemd user directory

cp /var/www/mylvs/templates/etc/systemd/system/ mylvsmon.service /etc/systemd/system/


  • First status
root@mylvs01:/systemctl status mylvs-init.service
mylvs-init.service - myLVS Startup Script
 Loaded: loaded (/etc/systemd/system/mylvs-init.service; disabled)
 Active: inactive (dead)
  • Enable
root@mylvs01:/systemctl enable mylvs-init.service
Created symlink from /etc/systemd/system/multi-user.target.wants/mylvs-init.service to /etc/systemd/system/mylvs-init.service.
  • Reload (optional)
root@mylvs01:/systemctl daemon-reload
  • Reboot to test
  • Live Status
root@mylvs01:/home/demo# systemctl status mylvs-init.service
mylvs-init.service - myLVS Startup Script
  Loaded: loaded (/etc/systemd/system/mylvs-init.service; enabled)
  Active: inactive (dead) since Mon 2015-08-17 14:53:48 EDT; 1min 38s ago
 Process: 933 ExecStart=/usr/bin/perl /var/www/mylvs/mylvsinit.pl -a (code=exited, status=0/SUCCESS)
Main PID: 933 (code=exited, status=0/SUCCESS)