How to install cacti on Debian 7

Installing cacti on Debian 7 is very easy.

Issue an apt-get install cacti

apt-get install cacti

Then follow the prompts for mysql root password and cacti db password (which it creates).

Then go to http://localhost/cacti

Click next and confirm a few options.

Login with admin/admin
It will then ask you to change the default password.

Install Jenkins on Debian 7

Here’s how I installed Jenkins on Debian 7.

$ wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
$ sudo echo 'deb http://pkg.jenkins-ci.org/debian binary/' >> /etc/apt/sources.list
$ sudo apt-get update
$ sudo apt-get install jenkins

BaseRepositoryInterface Base Eloquent Repository

Here’s a base Eloquent Repository.

interface BaseRepositoryInterface
{
    /**
     * Execute the query and get the first result.
     *
     * @param array  $columns
     * @return \Illuminate\Database\Eloquent\Model|null|static
     * @static
     */
    public function first($columns);

    /**
     * Execute the query and get the first result or throw an exception.
     *
     * @param array  $columns
     * @return \Illuminate\Database\Eloquent\Model
     * @static
     */
    public function firstOrFail($columns);

    /**
     * Execute the query as a "select" statement.
     *
     * @param array  $columns
     * @return \Illuminate\Database\Eloquent\Collection|\Eloquent[]|static[]
     * @static
     */
    public function get($columns);

    /**
     * Pluck a single column from the database.
     *
     * @param string  $column
     * @return mixed|static
     * @static
     */
    public function pluck($column);

    /**
     * Get an array with the values of a given column.
     *
     * @param string  $column
     * @param string  $key
     * @return array
     * @static
     */
    public function lists($column, $key = null);

    /**
     * Get a paginator for the "select" statement.
     *
     * @param int    $perPage
     * @param array  $columns
     * @return \Illuminate\Pagination\Paginator
     * @static
     */
    public function paginate($perPage = null, $columns = array());

    /**
     * Get the hydrated models without eager loading.
     *
     * @param array  $columns
     * @return array
     * @static
     */
    public function getModels($columns = array());

    /**
     * Eager load the relationships for the models.
     *
     * @param array  $models
     * @return array
     * @static
     */
    public function eagerLoadRelations($models);

    /**
     * Add a relationship count condition to the query.
     *
     * @param string  $relation
     * @param string  $operator
     * @param int     $count
     * @param string  $boolean
     * @return \Illuminate\Database\Eloquent\Builder
     * @static
     */
    public function has($relation, $operator = '>=', $count = 1, $boolean = 'and');

    /**
     * Add a relationship count condition to the query with an "or".
     *
     * @param string  $relation
     * @param string  $operator
     * @param int     $count
     * @return \Illuminate\Database\Eloquent\Builder
     * @static
     */
    public function orHas($relation, $operator = '>=', $count = 1);

    /**
     * Get the underlying query builder instance.
     *
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function getQuery();
    

    /**
     * Set the underlying query builder instance.
     *
     * @param \Illuminate\Database\Query\Builder  $query
     * @return void
     * @static
     */
    public function setQuery($query);
    

    /**
     * Get the relationships being eagerly loaded.
     *
     * @return array
     * @static
     */
    public function getEagerLoads();
    

    /**
     * Set the relationships being eagerly loaded.
     *
     * @param array  $eagerLoad
     * @return void
     * @static
     */
    public function setEagerLoads($eagerLoad);
    

    /**
     * Get the model instance being queried.
     *
     * @return \Illuminate\Database\Eloquent\Model
     * @static
     */
    public function getModel();
    

    /**
     * Set a model instance for the model being queried.
     *
     * @param \Illuminate\Database\Eloquent\Model  $model
     * @return \Illuminate\Database\Eloquent\Builder
     * @static
     */
    public function setModel($model);
    

    /**
     * Set the columns to be selected.
     *
     * @param array  $columns
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function select($columns = array());
    

    /**
     * Add a new select column to the query.
     *
     * @param mixed  $column
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function addSelect($column);
    

    /**
     * Force the query to only return distinct results.
     *
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function distinct();
    

    /**
     * Set the table which the query is targeting.
     *
     * @param string  $table
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function from($table);
    

    /**
     * Add a join clause to the query.
     *
     * @param string  $table
     * @param string  $first
     * @param string  $operator
     * @param string  $second
     * @param string  $type
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function join($table, $first, $operator = null, $second = null, $type = 'inner');
    

    /**
     * Add a left join to the query.
     *
     * @param string  $table
     * @param string  $first
     * @param string  $operator
     * @param string  $second
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function leftJoin($table, $first, $operator = null, $second = null);
    

    /**
     * Add a basic where clause to the query.
     *
     * @param string  $column
     * @param string  $operator
     * @param mixed   $value
     * @param string  $boolean
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function where($column, $operator = null, $value = null, $boolean = 'and');
    

    /**
     * Add an "or where" clause to the query.
     *
     * @param string  $column
     * @param string  $operator
     * @param mixed   $value
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function orWhere($column, $operator = null, $value = null);
    

    /**
     * Add a raw where clause to the query.
     *
     * @param string  $sql
     * @param array   $bindings
     * @param string  $boolean
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function whereRaw($sql, $bindings = array(), $boolean = 'and');
    

    /**
     * Add a raw or where clause to the query.
     *
     * @param string  $sql
     * @param array   $bindings
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function orWhereRaw($sql, $bindings = array());
    

    /**
     * Add a where between statement to the query.
     *
     * @param string  $column
     * @param array   $values
     * @param string  $boolean
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function whereBetween($column, $values, $boolean = 'and');
    

    /**
     * Add an or where between statement to the query.
     *
     * @param string  $column
     * @param array   $values
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function orWhereBetween($column, $values);
    

    /**
     * Add a nested where statement to the query.
     *
     * @param Closure  $callback
     * @param string   $boolean
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function whereNested($callback, $boolean = 'and');
    

    /**
     * Add an exists clause to the query.
     *
     * @param Closure  $callback
     * @param string   $boolean
     * @param bool     $not
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function whereExists($callback, $boolean = 'and', $not = false);
    

    /**
     * Add an or exists clause to the query.
     *
     * @param Closure  $callback
     * @param bool     $not
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function orWhereExists($callback, $not = false);
    

    /**
     * Add a where not exists clause to the query.
     *
     * @param Closure  $calback
     * @param string   $boolean
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function whereNotExists($callback, $boolean = 'and');
    

    /**
     * Add a where not exists clause to the query.
     *
     * @param Closure  $calback
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function orWhereNotExists($callback);
    

    /**
     * Add a "where in" clause to the query.
     *
     * @param string  $column
     * @param mixed   $values
     * @param string  $boolean
     * @param bool    $not
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function whereIn($column, $values, $boolean = 'and', $not = false);
    

    /**
     * Add an "or where in" clause to the query.
     *
     * @param string  $column
     * @param mixed   $values
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function orWhereIn($column, $values);
    

    /**
     * Add a "where not in" clause to the query.
     *
     * @param string  $column
     * @param mixed   $values
     * @param string  $boolean
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function whereNotIn($column, $values, $boolean = 'and');
    

    /**
     * Add an "or where not in" clause to the query.
     *
     * @param string  $column
     * @param mixed   $values
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function orWhereNotIn($column, $values);
    

    /**
     * Add a "where null" clause to the query.
     *
     * @param string  $column
     * @param string  $boolean
     * @param bool    $not
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function whereNull($column, $boolean = 'and', $not = false);
    

    /**
     * Add an "or where null" clause to the query.
     *
     * @param string  $column
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function orWhereNull($column);
    

    /**
     * Add a "where not null" clause to the query.
     *
     * @param string  $column
     * @param string  $boolean
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function whereNotNull($column, $boolean = 'and');
    

    /**
     * Add an "or where not null" clause to the query.
     *
     * @param string  $column
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function orWhereNotNull($column);
    

    /**
     * Handles dynamic "where" clauses to the query.
     *
     * @param string  $method
     * @param string  $parameters
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function dynamicWhere($method, $parameters);
    

    /**
     * Add a "group by" clause to the query.
     *
     * @param dynamic  $columns
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function groupBy();
    

    /**
     * Add a "having" clause to the query.
     *
     * @param string  $column
     * @param string  $operator
     * @param string  $value
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function having($column, $operator = null, $value = null);
    

    /**
     * Add a raw having clause to the query.
     *
     * @param string  $sql
     * @param array   $bindings
     * @param string  $boolean
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function havingRaw($sql, $bindings = array(), $boolean = 'and');
    

    /**
     * Add a raw or having clause to the query.
     *
     * @param string  $sql
     * @param array   $bindings
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function orHavingRaw($sql, $bindings = array());
    

    /**
     * Add an "order by" clause to the query.
     *
     * @param string  $column
     * @param string  $direction
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function orderBy($column, $direction = 'asc');
    

    /**
     * Set the "offset" value of the query.
     *
     * @param int  $value
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function skip($value);
    

    /**
     * Set the "limit" value of the query.
     *
     * @param int  $value
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function take($value);
    

    /**
     * Set the limit and offset for a given page.
     *
     * @param int  $page
     * @param int  $perPage
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function forPage($page, $perPage = 15);
    

    /**
     * Add a union statement to the query.
     *
     * @param \Illuminate\Database\Query\Builder|\Closure  $query
     * @param bool $all
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function union($query, $all = false);
    

    /**
     * Add a union all statement to the query.
     *
     * @param \Illuminate\Database\Query\Builder|\Closure  $query
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function unionAll($query);
    

    /**
     * Get the SQL representation of the query.
     *
     * @return string
     * @static
     */
    public function toSql();
    

    /**
     * Indicate that the query results should be cached.
     *
     * @param int  $minutes
     * @param string  $key
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function remember($minutes, $key = null);
    

    /**
     * Execute the query as a fresh "select" statement.
     *
     * @param array  $columns
     * @return array
     * @static
     */
    public function getFresh($columns = array());
    

    /**
     * Execute the query as a cached "select" statement.
     *
     * @param array  $columns
     * @return array
     * @static
     */
    public function getCached($columns = array());
    

    /**
     * Get a unique cache key for the complete query.
     *
     * @return string
     * @static
     */
    public function getCacheKey();
    

    /**
     * Generate the unique cache key for the query.
     *
     * @return string
     * @static
     */
    public function generateCacheKey();
    

    /**
     * Concatenate values of a given column as a string.
     *
     * @param string  $column
     * @param string  $glue
     * @return string
     * @static
     */
    public function implode($column, $glue = null);
    

    /**
     * Build a paginator instance from a raw result array.
     *
     * @param \Illuminate\Pagination\Environment  $paginator
     * @param array  $results
     * @param int    $perPage
     * @return \Illuminate\Pagination\Paginator
     * @static
     */
    public function buildRawPaginator($paginator, $results, $perPage);
    

    /**
     * Get the count of the total records for pagination.
     *
     * @return int
     * @static
     */
    public function getPaginationCount();
    

    /**
     * Determine if any rows exist for the current query.
     *
     * @return bool
     * @static
     */
    public function exists();
    

    /**
     * Retrieve the "count" result of the query.
     *
     * @param string  $column
     * @return int
     * @static
     */
    public function count($column = '*');
    

    /**
     * Retrieve the minimum value of a given column.
     *
     * @param string  $column
     * @return mixed
     * @static
     */
    public function min($column);
    

    /**
     * Retrieve the maximum value of a given column.
     *
     * @param string  $column
     * @return mixed
     * @static
     */
    public function max($column);
    

    /**
     * Retrieve the sum of the values of a given column.
     *
     * @param string  $column
     * @return mixed
     * @static
     */
    public function sum($column);
    

    /**
     * Retrieve the average of the values of a given column.
     *
     * @param string  $column
     * @return mixed
     * @static
     */
    public function avg($column);
    

    /**
     * Execute an aggregate function on the database.
     *
     * @param string  $function
     * @param array   $columns
     * @return mixed
     * @static
     */
    public function aggregate($function, $columns = array());
    

    /**
     * Insert a new record into the database.
     *
     * @param array  $values
     * @return bool
     * @static
     */
    public function insert($values);
    

    /**
     * Insert a new record and get the value of the primary key.
     *
     * @param array   $values
     * @param string  $sequence
     * @return int
     * @static
     */
    public function insertGetId($values, $sequence = null);
    

    /**
     * Run a truncate statement on the table.
     *
     * @return void
     * @static
     */
    public function truncate();
    

    /**
     * Merge an array of where clauses and bindings.
     *
     * @param array  $wheres
     * @param array  $bindings
     * @return void
     * @static
     */
    public function mergeWheres($wheres, $bindings);
    

    /**
     * Get a copy of the where clauses and bindings in an array.
     *
     * @return array
     * @static
     */
    public function getAndResetWheres();
    

    /**
     * Create a raw database expression.
     *
     * @param mixed  $value
     * @return \Illuminate\Database\Query\Expression
     * @static
     */
    public function raw($value);
    

    /**
     * Get the current query value bindings.
     *
     * @return array
     * @static
     */
    public function getBindings();
    

    /**
     * Set the bindings on the query builder.
     *
     * @param array  $bindings
     * @return void
     * @static
     */
    public function setBindings($bindings);
    

    /**
     * Merge an array of bindings into our bindings.
     *
     * @param \Illuminate\Database\Query\Builder  $query
     * @return \Illuminate\Database\Query\Builder|static
     * @static
     */
    public function mergeBindings($query);
    

    /**
     * Get the database query processor instance.
     *
     * @return \Illuminate\Database\Query\Processors\Processor
     * @static
     */
    public function getProcessor();
    

    /**
     * Get the query grammar instance.
     *
     * @return \Illuminate\Database\Grammar
     * @static
     */
    public function getGrammar();
}

Depends: libssl0.9.8 (>= 0.9.8m-1) but it is not installable

I was setting up a webserver on Debian 7 but ran in to a dependency issue for nginx. It said I needed libssl0.9.8. Well I had libssl1.0.x which left me wondering was it in compatible. Yes it is. I needed to download the deb and install it.

[email protected]:~# apt-get install nginx nginx-light php5-fpm php5-gd php5-curl php5-mysql libssl-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libssl-dev is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nginx-light : Depends: libssl0.9.8 (>= 0.9.8m-1) but it is not installable
E: Unable to correct problems, you have held broken packages.

wget the correct deb http://snapshot.debian.org/package/openssl098/0.9.8o-7/#libssl0.9.8_0.9.8o-7

wget http://snapshot.debian.org/archive/debian/20110406T213352Z/pool/main/o/openssl098/libssl0.9.8_0.9.8o-7_i386.deb

Then install it.

sudo dpkg -i libssl0.9.8_0.9.8o-7_i386.deb