Bittylicious Setup: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
==Base OS== | |||
#Install Wheezy | #Install Wheezy | ||
#apt-get install php5 mysql-server apache2 emacs23-nox | #apt-get install php5 mysql-server apache2 emacs23-nox | ||
| Line 5: | Line 7: | ||
#echo bittylicious.com > /etc/hostname | #echo bittylicious.com > /etc/hostname | ||
#Change /etc/hosts to have bittylicious.com as the main hostname | #Change /etc/hosts to have bittylicious.com as the main hostname | ||
==MySQL== | |||
#Configure MySQL ''bittylicious'' and ''bittyuser'' users | #Configure MySQL ''bittylicious'' and ''bittyuser'' users | ||
#Copy across privilege tables - they're quite complicated | #Copy across privilege tables - they're quite complicated | ||
| Line 16: | Line 21: | ||
require valid-user | require valid-user | ||
#Generate a suitable .htpasswd as well | #Generate a suitable .htpasswd as well | ||
#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 | |||
==If you have been compromised== | ==If you have been compromised== | ||
#Change all API keys | #Change all API keys | ||
Revision as of 08:26, 11 July 2013
Base OS
- Install Wheezy
- apt-get install php5 mysql-server apache2 emacs23-nox
- apt-get install openssh-server phpmyadmin fail2ban
- Install csf/lfd
- echo bittylicious.com > /etc/hostname
- Change /etc/hosts to have bittylicious.com as the main hostname
MySQL
- Configure MySQL bittylicious and bittyuser users
- Copy across privilege tables - they're quite complicated
- Copy MySQL data
- Change phpmyadmin path by changing /etc/apache/conf.d/phpmyadmin.conf and editing the line to read Alias /803693 /usr/share/phpmyadmin
- Also add the following just underneath the first <Directory directive: AllowOverride AuthConfig
- Add the following to .htaccess in /usr/share/phpmyadmin
AuthUserFile /usr/share/phpmyadmin/.htpasswd AuthName "Restricted" AuthType Basic require valid-user
- Generate a suitable .htpasswd as well
- 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
If you have been compromised
- Change all API keys