netdata + nginx proxy pass on Debian Jessie

Hi fellas, i had a issue with my CS:Go server and decided to investigate whats going on there.which is obvious thing to do first lol. and i was looking for a good monitoring software which could run on web. and i found netdata 😀

Whats netdata?

quote from netdata’s github page:

netdata is a system for distributed real-time performance and health monitoring. It provides unparalleled insights, in real-time, of everything happening on the system it runs (including applications such as web and database servers), using modern interactive web dashboards.

netdata is fast and efficient, designed to permanently run on all systems (physical & virtual servers, containers, IoTdevices), without disrupting their core function.

netdata runs on Linux, FreeBSD, and MacOS.

 

sounds really cool!

but i needed also revese proxy and a simple authentication. so why not nginx? eh ?

Install netdata.

installing requirements

install netdata

now a few things before move into nginx configuration.

start netdata on boot.

systemd:

init.d

Running behind nginx

i used as a virtual host.

check the server_name and backend server ip if required.

check out the netdata’s wiki for more information.
https://github.com/firehol/netdata/wiki/Running-behind-nginx

Basic Authentication

change the name as you want.

add to configuration.

How to install PHP 7 on Debian 8 Jessie

source : https://github.com/kasparsd/php-7-debian

Hey fellas! today we’re gonna be installing the new version of PHP which is 7.

well i never really thought i’ll ever use PHP lang but as you can see as i running wordpress no choice…

anyway this is for debian and maybe ubuntu works.

Installing PHP 7

Boom very simple to install php 7.

but i like to use systemctl. if you are so do this.

Configuration files

All PHP configuration files are stored under /usr/local/php7:

Installing Extensions

Please note that you need to restart php7-fpm to activate the extension.

Install the Memcached Extension

Install the Imagick Extension

source : https://github.com/kasparsd/php-7-debian

Auto reloading Sanic app

Hey there i was looking for auto reload for sanic and finally found it!

almost implemented by my self. lol.

there’s 2 way you can auto reload you app.

Method 1.

use entr

http://entrproject.org/

Run arbitrary commands when files change.

this is the perfect solution!

Lets try it!

Simple. not even gonna talk about it. lol.

Method 2.

Use the gunicorn worker for sanic.

https://github.com/messense/sanic-gunicorn

Run the server with Gunicorn worker.

Those 2 methods was not by me!

source:

https://gitter.im/sanic-python/Lobby?at=58d03fca5917e26076b6fe0b

https://gitter.im/sanic-python/Lobby?at=58cfcd506d7eb18404e854fd

Sanic the asynchronous web framework for Python 3.5+

Sanic?

Sup fellas! its me again 😀

have you guys ever heard about Sanic? No? well Sanic is Flask-like, uvloop-based web server that’s written to go fast. so since its aysnc it requires Python 3.5+.

Async?

asyncio is an asynchronous I/O framework shipping with the Python Standard Library. Thanks for the great job! well done!

Alright. now you guys see that its fast as f**k right? there’s one more thing that i liked its flask like!

so because its flask like syntax and everything i ported my entire project into sanic lol. i took about 2 week +

On top of being Flask-like, Sanic supports async request handlers. This means you can use the new shiny async/await syntax from Python 3.5, making your code non-blocking and speedy.

Benchmark

All tests were run on an AWS medium instance running ubuntu, using 1 process. Each script delivered a small JSON response and was tested with wrk using 100 connections. Pypy was tested for Falcon and Flask but did not speed up requests.

Server Implementation Requests/sec Avg Latency
Sanic Python 3.5 + uvloop 33,342 2.96ms
Wheezy gunicorn + meinheld 20,244 4.94ms
Falcon gunicorn + meinheld 18,972 5.27ms
Bottle gunicorn + meinheld 13,596 7.36ms
Flask gunicorn + meinheld 4,988 20.08ms
Kyoukai Python 3.5 + uvloop 3,889 27.44ms
Aiohttp Python 3.5 + uvloop 2,979 33.42ms
Tornado Python 3.5 2,138 46.66ms

Examples

this is hello world example.

Nice yeah ? if you liked then lets contribute! You can contribute and help build it!.

Read the docs!

Documentation on Readthedocs.

How to Host Deticated Unturned Server on Linux

Hello everyone! first of all. i wanna apologize about my service was down for a few months. i’m not gonna tell the whole reason ( who’s give a fuck ?) but i was in the middle of my school exams and i couldn’t fix the issues i had on the web server so i shutdown. and sadly all my data’s are gone! yay! but anyways i’m back and ill try my best to provide contents for y’all!

This content is updated! 2017/03/21

Based on RocketMod’s Script: This is very very basic step.

source:https://github.com/RocketMod/Rocket.Unturned/tree/b8c887584a335b8e2d2a69eb6b7b62f0e77dd2f7/Rocket.Unturned/Scripts/Linux

For Debian Users!

Quick Fix for: gmcs: Cannot find the specified file

Install the prerequisites (Shown in the recipe above)

from here you should have a user for the server

Copy the contents of the linux download in the root of the folder you want your Unturned 3 environment in

Start the server, pick any single word as unique instance name

To update Unturned & Rocket simply exit the server and the screen and start from step 2

## Issues on Linux, and how to solve them
1.
Symptoms:
My server crashes frequently or not so frequently during startup, runtime or shutdown.
The console becomes unresponsive and output freezes completely but it does forward console input to the server instance.
After being unresponsive for an unknown time period the server finally crashes with a SIGSEGV exception.
Solution:
Downgrade from Mono v4.x.x to Mono v3.12.1
System:
Ubuntu 16.04, 64-bit

source:https://github.com/RocketMod/Rocket.Unturned/tree/b8c887584a335b8e2d2a69eb6b7b62f0e77dd2f7/Rocket.Unturned/Scripts/Linux

Start Stop AutoUpdate etc

 

Yes. if you follow the github instruction your server should be fine!
And for my server i was using my own script then i decided to share with you all!
so on your own risk if you wanna take it here we go ↓

github link: https://github.com/qwexvf/dotfiles/blob/master/start.sh

*Warning i assume that your have at least basic script experience ><

i still working on this shit so…… it might not work.

make sure you fix the permissions

Usage: