Установка на вируальную машину (VM) Ubuntu 12.04 подключенную к сети в режиме "bridge"
VM - вируальная машина VMWare / VirtualBox.
FQDN для VM - vm.localrfa.com
Локальный пользователь в VM - admin/password
Host - локальный компютер с установленной VM и подкоюченный к локальной сети.
#На VM в terminal:
sudo nano /etc/hosts
>127.0.0.1 localhost vm vm.localrfa.com localrfa.com
sudo nano /etc/hostname
>vm
ifconfig # get _vm_ip_ address
sudo apt-get install ssh openssh-server openssl
sudo reboot
# на Host (Mac/Linux)
ping _vm_ip_
sudo nano /etc/hosts
>_vm_ip_ vm.localrfa.com localrfa.com
ssh This email address is being protected from spambots. You need JavaScript enabled to view it.
# на Host (Windows)
ping _vm_ip_
open in explorer c:\Windows\System32\drivers\etc
http://www.korolevskiy.com/blog/120-izmenenie-fajla-hosts-v-windows-xp-7-8.html
>_vm_ip_ vm.localrfa.com localrfa.com
Install putty. In putty in ssh session
ssh This email address is being protected from spambots. You need JavaScript enabled to view it.
MySQL
#На Host в ssh сессии (или в терминале на VM):
sudo apt-get install nmap # network tool
nmap localhost # no 3306 expected, no mysql yet
sudo add-apt-repository 'deb http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu precise main’ # add repository
sudo apt-get update #update links
sudo apt-get install mysql-server-5.6 #install mysql 5.6
mysql --version # get mysql version, test
nmap localhost # should be 3306, test
sudo iptables -A INPUT -p tcp --dport 3306 -j ACCEPT #open 3306 in firewall
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf #open mysql config for changes
>bind-address = 0.0.0.0 #open access on all local IP, bad for security but good for us
>#skip-external-locking #comment disable access from outside
# save file Control+O, exit Control+X
sudo service mysql restart #restart mysql
sudo ufw allow 3306 # optional, test
sudo ufw status #optional, test
nmap localhost # should be 3306, test
netstat -nlt | grep 3306 # test, shold show 3306 is open on 0.0.0.0
# on Host Mac or Windows (need install telnet) run in command line
telnet _vm_ip_ 3306
# should get some readable respons from mysql. no login
# on VM in terminal
mysql -u root -p
# type password for root “123” or your mysql password for mysql root user, никогда так не делайте на реальном сервере, хотя все можно поменять потом
mysql>GRANT ALL ON *.* TO 'root' IDENTIFIED BY '123' WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES;
mysql>EXIT;
sudo ufw allow 3306 # optional, test
sudo ufw status #optional, test
## connetc to server in MySQLWorkbranch IP with port 3306, user "root", pass "123"
Crate database "bugs", user "bugs" with password "123", grant access on database "bugs"
Скрипт для установки bugzilla 4.2 + tesctopia 2.4. В принципн для bugzilla 5 + tesctopia 3 тоже самое, только testopia ставится из git repository, и немного больше гемороя с копированием. Все делается на VM в terminal с установленным mysql, bd=bugs, user=bugs, pass=123
sudo apt-get install apache2
cd Downloads/
wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.4.12.tar.gz
tar zxvf bugzilla-4.4.12.tar.gz
cd /var/www/
sudo mv ~/Downloads/bugzilla-4.4.12 ./bugzilla
sudo chown -R www-data:www-data bugzilla
sudo su
cd bugzilla/
perl install-module.pl --all
./checksetup.pl #install required, just copy/past strings from output and run with sudo
nano ./localconfig
# change to:
>$webservergroup = 'www-data';
>$db_pass = '123';
# save file
./checksetup.pl #install required, just copy/past string from output and run with sudo
nano /etc/apache2/apache2.conf
# add in end of file
AddHandler cgi-script .cgi
Options +ExecCGI +FollowSymLinks
DirectoryIndex index.cgi index.html
AllowOverride Limit FileInfo Indexes Options
# save
service apache2 restart
cd /var/www/bugzilla/
wget https://ftp.mozilla.org/pub/mozilla.org/webtools/testopia/testopia-2.5-BUGZILLA-4.2.tar.gz
tar zxvf testopia-2.5-BUGZILLA-4.2.tar.gz
rm testopia-2.5-BUGZILLA-4.2.tar.gz
./checksetup.pl #install required, just copy/past string from output and run with sudo
# install required dependencies
./checksetup.pl # add user This email address is being protected from spambots. You need JavaScript enabled to view it. with password "password"
exit
sudo chown -R www-data:www-data /var/www/bugzilla
# open in browser on Host http://vm.localrfa.com/bugzilla
# login as user This email address is being protected from spambots. You need JavaScript enabled to view it. with password "password", check testopia functional exists
# go to Administration > Parameters > Set urlbase to http://vm.localrfa.com/bugzilla/
Phpmyadmin
еще рекомендую поставить phpmyadmin для управления mysql через browser. Ставиться в 4 строки с установленным apache2
sudo apt-get install phpmyadmin apache2-utils
# provide password for mysql root user and for admin user on phpmyadmin
sudo nano /etc/apache2/apache2.conf
# past in end of config
Include /etc/phpmyadmin/apache.conf
# save config
sudo service apache2 restart
# in browser on Host run http://vm.localrfa.com/phpmyadmin
# User “root”, pass “123” or your pass for mysql user root
Та-дам! Рулитье MySQL через WEB UI
Вариант 1. Local Postfix
#Create snapshot VM
Create a new user on VM with name "bugs" and with some password
sudo nano /etc/hosts
#add or chache to your "vm vm.localrfa.com localrfa.com"
>127.0.0.1 localhost vm vm.localrfa.com localrfa.com
sudo apt-get install postfix
>Local only
>localrfa.com
sudo nano /etc/postfix/virtual
>@localhost admin, bugs
>@localrfa.com admin, bugs
sudo nano /etc/postfix/main.cf
>myhostname = vm.localrfa.com
>virtual_alias_maps = hash:/etc/postfix/virtual
sudo service postfix reload
sudo postmap /etc/postfix/virtual
sudo apt-get install thunderbird
>add two mail accounts admin, bugs
Вариант 2. Postfix+Dovecot