ondrejsika.com

shm (sika hosting manager) documentation

Tool for managing PHP hosting on Apache2 and MySQL

Authors

Ondrej Sika ondrejsika.com dev@ondrejsika.com

Source

Documentation ondrejsika.com/docs/shm
Bitbucket bitbucket.org/sikaondrej/shm

Installation

Clone GIT repository to /opt/shm
# git clone git@bitbucket.org:sikaondrej/shm.git /opt/shm
add shm/bin to path
# echo "PATH=$PATH:/opt/shm/bin" > ~/.bashrc
create config files

/etc/shm/db

MYSQL_USER="root"
MYSQL_PASSWD="mypasswd"

/etc/shm/php

WWW="/var/www/"  # php hosting storage
APACHE2_SITE="/etc/apache2/sites-available/"  # apache virtualhost conf
and restart bash
$ bash

Usage

Create PHP hosting

$ sudo shm-php-create [domain] [[passwd]]
Create dir structure, user & apache2 conf for hosting and activate it.

Create MySQL user

$ sudo shm-mysql-create [domain] [[passwd]]
Create user from domain name and grant privileges for database start "$username_".