Merge branch 'master' of https://git.nativenet.ch/nativenet.ch/nlvmi
This commit is contained in:
commit
8498ada9bf
35
README.md
35
README.md
|
@ -8,37 +8,6 @@ Nlvmi is written to be lightweight, functional and easy to understand and modify
|
||||||
Nlvmi supports multiple users (admins and restricted) on the frontend and also uses these users to run the VMs. No PAM, just su.<br/>
|
Nlvmi supports multiple users (admins and restricted) on the frontend and also uses these users to run the VMs. No PAM, just su.<br/>
|
||||||
Unix users have /bin/false as shell and the password is stored within the nlvmi database.<br/>
|
Unix users have /bin/false as shell and the password is stored within the nlvmi database.<br/>
|
||||||
|
|
||||||
**Deps:** <br/>
|
Please consult the [wiki](https://git.nativenet.ch/nativenet.ch/nlvmi/wiki) pages for more information.
|
||||||
bash <br/>
|
|
||||||
bridge-utils <br/>
|
|
||||||
nginx / apache / lighttpd <br/>
|
|
||||||
openssh <br/>
|
|
||||||
php <br/>
|
|
||||||
socat <br/>
|
|
||||||
sqlite3 / mariadb (only sqlite3 for now) <br/>
|
|
||||||
usermode-utilities <br/>
|
|
||||||
openssl (for managing remote servers) <br/>
|
|
||||||
|
|
||||||
**Manual install:** <br/>
|
![nlvmi screenshot](https://madathome.nativenet.ch/nlvmi_screenshot.png)
|
||||||
become root <br/>
|
|
||||||
cd /usr/local <br/>
|
|
||||||
git clone https://git.nativenet.ch/nativenet.ch/nlvmi.git <br/>
|
|
||||||
useradd nlvmi <br/>
|
|
||||||
ln -sf ${PWD}/nlvmi/nlvmi /usr/bin/ <br/>
|
|
||||||
ln -sf ${PWD}/nlvmi/wrap-nlvmi /usr/bin/ <br/>
|
|
||||||
ln -sf ${PWD}/nlvmi/web /var/www/localhost/htdocs/nlvmi --or wherever your webroot is<br/>
|
|
||||||
chown root:nlvmi nlvmi/*nlvmi <br/>
|
|
||||||
chmod +s nlvmi/wrap-nlvmi <br/>
|
|
||||||
mkdir /etc/nlvmi <br/>
|
|
||||||
cp nlvmi/vlvmi.conf /etc/nlvmi/ <br/>
|
|
||||||
-- if it is the masterserver, create the db - nlvmi createdb <br/>
|
|
||||||
chown nobody:root /etc/nlvmi <br/>
|
|
||||||
|
|
||||||
After that, you should be able to access /nlvmi with a webbrowser.
|
|
||||||
Create a new user (user will be admin) and add a server. For localhost, the connectstring should stay empty.
|
|
||||||
|
|
||||||
Do not forget to load the tun and tap kernel modules.
|
|
||||||
|
|
||||||
#not yet implemented... <br/>
|
|
||||||
mkdir /etc/nginx/nlvmi <br/>
|
|
||||||
add an "include nlvmi/*.conf" statement within nginx.conf's server declaration. <br/>
|
|
||||||
|
|
20
nlvmi.conf
20
nlvmi.conf
|
@ -7,12 +7,6 @@
|
||||||
#Loglovel 1-3, 3 is debug
|
#Loglovel 1-3, 3 is debug
|
||||||
LOGLEVEL="3"
|
LOGLEVEL="3"
|
||||||
|
|
||||||
#Where your images are stored like qcow2
|
|
||||||
VMDIRECTORY="/kvm|/dev/vg0"
|
|
||||||
|
|
||||||
#Where your iso images are stored
|
|
||||||
ISODIRECTORY="/kvm/iso"
|
|
||||||
|
|
||||||
#Where pids and monitor sockets are getting stored
|
#Where pids and monitor sockets are getting stored
|
||||||
RUNDIRECTORY="/run/nlvmi"
|
RUNDIRECTORY="/run/nlvmi"
|
||||||
|
|
||||||
|
@ -22,16 +16,14 @@ DATABASETYPE="sqlite"
|
||||||
#only sqlite settings
|
#only sqlite settings
|
||||||
SQLITEFILE="/etc/nlvmi/nlvmi.sqlite"
|
SQLITEFILE="/etc/nlvmi/nlvmi.sqlite"
|
||||||
|
|
||||||
#The unix user that runs php, to grand permissions on the sqlite file
|
#The unix user that runs php, to grant permissions on the sqlite file
|
||||||
PHPUSER="nobody"
|
PHPUSER="nobody"
|
||||||
|
|
||||||
#Masterserver only used for remote connections
|
#Masterserver only used for remote connections
|
||||||
MASTERSERVER="192.168.0.3"
|
#MASTERSERVER="192.168.0.3"
|
||||||
|
|
||||||
|
#Path to generate nginx configs
|
||||||
#only mariadb settings
|
#NGINXCONFIGPATH="/etc/nginx/nlvmi"
|
||||||
MARIAHOST="localhost"
|
#command to reload nginx
|
||||||
MARIADB="nlvmi"
|
#NGINXRESTARTCOMMAND="/etc/init.d/nginx restart"
|
||||||
MARIAUSER="root"
|
|
||||||
MARIAPASS=""
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
|
||||||
<link rel="stylesheet" href="bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
|
<link rel="stylesheet" href="bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
|
||||||
|
|
|
@ -112,7 +112,7 @@ if ($usersfound=="no"){
|
||||||
$user = clean($_POST['username']);
|
$user = clean($_POST['username']);
|
||||||
$pass = clean($_POST['password']);
|
$pass = clean($_POST['password']);
|
||||||
if ($pass == ""){
|
if ($pass == ""){
|
||||||
echo "$user is not allowed to login withou password.";
|
echo "$user is not allowed to login without a password.";
|
||||||
} else {
|
} else {
|
||||||
$sql="SELECT password,admin FROM users WHERE username='$user'";
|
$sql="SELECT password,admin FROM users WHERE username='$user'";
|
||||||
$res = $db_handle->query($sql);
|
$res = $db_handle->query($sql);
|
||||||
|
|
Loading…
Reference in New Issue