Bittylicious Setup

From GigaTux Wiki
Revision as of 09:48, 11 July 2013 by Cocodude (talk | contribs)
Jump to navigation Jump to search

Base OS

  1. Install Wheezy
  2. apt-get install php5 mysql-server apache2 emacs23-nox
  3. apt-get install openssh-server phpmyadmin fail2ban less
  4. Install csf/lfd
  5. echo bittylicious.com > /etc/hostname
  6. Change /etc/hosts to have bittylicious.com as the main hostname
  7. Change /root/.bashrc to have the line export PS1=${RED}'\u'${LGRAY}@${LBLUE}'bittylicious.com'${LGRAY}'>_'${NO_COL}' \w\$ '

MySQL

  1. Configure MySQL bittylicious and bittyuser users
  2. Copy across privilege tables - they're quite complicated
  3. Copy MySQL data
  4. Change phpmyadmin path by changing /etc/apache/conf.d/phpmyadmin.conf and editing the line to read Alias /803693 /usr/share/phpmyadmin
  5. Also add the following just underneath the first <Directory directive: AllowOverride AuthConfig
  6. Add the following to .htaccess in /usr/share/phpmyadmin
AuthUserFile /usr/share/phpmyadmin/.htpasswd
AuthName "Restricted"
AuthType Basic
require valid-user
  1. Generate a suitable .htpasswd as well
  2. In my.cnf, change the following:
log_slow_queries        = /var/log/mysql/mysql-slow.log
long_query_time = 2
log-queries-not-using-indexes
log_bin                 = /var/log/mysql/mysql-bin.log
general_log_file        = /var/log/mysql/mysql.log
general_log             = 1

Apache

  1. Copy /etc/apache/sites-available/default, default-ssl and dev
  2. Copy SSL certificates: cp -rav /oldroot/etc/ssl/startssl private /etc/ssl/

If you have been compromised

  1. Change all API keys