-
Notifications
You must be signed in to change notification settings - Fork 3
Chunliang Lyu edited this page Jul 26, 2016
·
4 revisions
$ apt-get install php5-fpm
$ apt-get install php5-pear libpcre3-dev build-essential
$ pecl install apc
$ cat extension=apc.so > /etc/php5/conf.d/apc.ini
Set request_terminate_timeout=30s
in /etc/php5/fpm/pool.d/www.conf
for php5-fpm.
credit: http://serverfault.com/a/179136/229918
Ensure /etc/php5/fpm/php.ini
has the following settings:
upload_max_filesize = 100M
post_max_size = 100M
Ensure Nginx has the following settings:
http {
#...
client_max_body_size 100m;
#...
}
Stop MySQL using the following command:
$ sudo service mysql stop
$ sudo cp -R -p /var/lib/mysql /srv/db/
$ # change `datadir` in file /etc/mysql/my.cnf, from `/var/lib/mysql` to `/srv/db/mysql`
$ # replace all `/var/lib/mysql` with `/srv/db/mysql` in `/etc/apparmor.d/usr.sbin.mysqld`
$ sudo /etc/init.d/apparmor reload
$ sudo service mysql restart
Start MySQL automatically
sudo update-rc.d mysql defaults
MySQL crashes all the time, may due to the default buffer size. add the following line to /etc/mysql/my.cnf
:
innodb_buffer_pool_size = 32M
Use a non-default port:
Ensure the following settings in /etc/ssh/sshd_config
, and restart ssh server.
PermitRootLogin no
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM yes