torstai 7. toukokuuta 2015

SSH Git-repository

On ssh-server install git:

$ sudo apt-get install git
Create empty folder for git:
$mkdir gitkansio && cd gitkansio
Initialize git repository
$git --bare init

On local machine:

Create Git folder with Git:
$mkdir gittest && cd gittest
$sudo apt-get install git
$git init
Create some files
$ echo "lol" >> test.txt
Commit to Git
$git add .
$git commit -m "testing git"
Add remote repository
$git remote add origin ssh://
Push to remote
$git push origin master
$ git branch --set-upstream master origin/master

Clone the repository:
$ git clone ssh://

to remove: $ git remote rm origin

Check remotes with command: git remote -v 
Set new remote: git remote set-url origin ssh://

keskiviikko 6. toukokuuta 2015

Development mode on with LAMP

I was wondering how to setup development mode on with LAMP.

What you have to do is to set in /etc/apache2/ports.con this: Listen
That means, only localhost can access apache and no one else can see it.

Second thing, setup php development mode on by editing file /etc/php5/apache2/php.ini and set display_errors = On from Off value.

Create apache benchmark logs

ab -n 100 -c 20 http://localhost/ > benchmarklog-$(date +\%d\%m\%y).txt

ab -n 100 -c 20 http://localhost/ > /home/shnigi/public_html/ablogs/log-$(date +\%d\%m\%y).txt