VPS Ubuntu 14.04 + MariaDB + Nginx + Drupal筆記
隨便記。第一次安裝 MariaDB + Nginx + Drupal。
不過MariaDB及Nginx的參數設定才是大學問啦~
首先更改主機名稱
vi /etc/hostname
vi /etc/hosts
接著設定ufw防火牆
ufw enable
ufw allow 80/tcp
ufw allow from Your IP
設定時區並重新開機
dpkg-reconfigure tzdata
sync
reboot
安裝MariaDB
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
add-apt-repository 'deb http://ftp.kaist.ac.kr/mariadb/repo/10.0/ubuntu trusty main'
apt-get update
apt-get install mariadb-server
安裝Postfix及nginx
aptitude install postfix nginx
安裝drush
aptitude install drush
pear channel-discover pear.drush.org
pear install drush/drush
設定Nginx conf檔
vi /etc/nginx/sites-enabled/drupal (參考下面的寫法,留意/var/run/php5-fpm.sock路徑)
cd /usr/share/nginx/
drush dl drupal
安裝PHP-FPM (FastCGI Process Manager)及設定參數
aptitude install install php5-fpm
vi /etc/php5/fpm/php.ini
cgi.fix_pathinfo = 0
vi /etc/php5/fpm/pool.d/www.conf
listen = /var/run/php5-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
補齊Drupal需使用的式
aptitude install php5-gd
/etc/init.d/nginx restart
參考資料
MariaDB
http://tecadmin.net/install-mariadb-10-on-ubuntu/
Nginx
http://drupaltaiwan.org/forum/20141121/11376
Nginx Drupal Conf
https://www.nginx.com/resources/wiki/start/topics/recipes/drupal/
如果要更精進的研究Drupal Nginx效能
不過MariaDB及Nginx的參數設定才是大學問啦~
首先更改主機名稱
vi /etc/hostname
vi /etc/hosts
接著設定ufw防火牆
ufw enable
ufw allow 80/tcp
ufw allow from Your IP
設定時區並重新開機
dpkg-reconfigure tzdata
sync
reboot
安裝MariaDB
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
add-apt-repository 'deb http://ftp.kaist.ac.kr/mariadb/repo/10.0/ubuntu trusty main'
apt-get update
apt-get install mariadb-server
安裝Postfix及nginx
aptitude install postfix nginx
安裝drush
aptitude install drush
pear channel-discover pear.drush.org
pear install drush/drush
設定Nginx conf檔
vi /etc/nginx/sites-enabled/drupal (參考下面的寫法,留意/var/run/php5-fpm.sock路徑)
cd /usr/share/nginx/
drush dl drupal
安裝PHP-FPM (FastCGI Process Manager)及設定參數
aptitude install install php5-fpm
vi /etc/php5/fpm/php.ini
cgi.fix_pathinfo = 0
vi /etc/php5/fpm/pool.d/www.conf
listen = /var/run/php5-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
補齊Drupal需使用的式
aptitude install php5-gd
/etc/init.d/nginx restart
參考資料
MariaDB
http://tecadmin.net/install-mariadb-10-on-ubuntu/
Nginx
http://drupaltaiwan.org/forum/20141121/11376
Nginx Drupal Conf
https://www.nginx.com/resources/wiki/start/topics/recipes/drupal/
如果要更精進的研究Drupal Nginx效能
留言