Helps you managing LAMP basic needs (virtualHost, Ftp users, Mysql Database)
This shell script helps you managing LAMP basic needs (virtualHost, Ftp users, Mysql Database) You have a linux server, and you always lose time configuring your websites, downloading last cms versions, installing mysql databases... This script will help you earn time and let you focus on managing your contents.
This shell script was developped & tested on an Ubuntu 12.10
First, rename conf.sh.dist to conf.sh
And then you must just specify your mysql administrator login & password.
ShellVhostManager.sh -H -d -p -f -m -l -c -v -s -h -t -r -k -H: Host . -p: Project name. -d: Domains(fr|com|net). -f: Ftp User Name (will generate user pwd) -m: Mysql username (will generate user pwd) DB name will be the host name -l: Passwords length. (default 10 chars) -c: CMS/Framework/Repository to install (allowed values are: wordpress, prestashop, sf2, owncloud, seafile, import, git, hg, svn) -v: CMS/Framework Version (By Default last version is allready set) -s: Subdomain. -h: Print this Help. -t: Log Type (echo|file) to get silent mode set it to file." -r: Repository url we want to clone (git/hg/svn) -k: Keep this vhost protected with htaccess/htpasswd (login|passwd)
$ ./bin/ShellVhostManager.sh -p myprojects -H prestashop -d "fr|com|tk" -f ous -c prestashop -m DbUsr -D DbName
If you choose option "-c import ", you'll be asked your FTP host:login:pwd and it will download all available files You must set a dump file of your mysql database, so it will install it with the previously created mysql user
Here is the Generated VHOST content:
<VirtualHost *:80>
ServerName prestashop.fr
ServerAlias www.prestashop.fr prestashop.fr www.prestashop.com prestashop.com www.prestashop.tk prestashop.tk
DocumentRoot /var/www/myprojects/prestashop.fr
ErrorLog /var/log/apache2/myprojects/prestashop.fr/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/myprojects/prestashop.fr/access.log combined
</VirtualHost>
#Requirements
#Todo