ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · •...

20
ISPConfig with Drupal Multi-site Drupal Camp 2014 Yelba

Transcript of ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · •...

Page 1: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

ISPConfig with Drupal Multi-site

Drupal Camp 2014

Yelba

Page 2: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

Role in Role

• Visual Studio 2008

• Asp.net

Page 3: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

Requirements

• VPS Provider like Linode and AWS EC2• A server running one of these distros:

– Debian 7.5– Ubuntu 14.04 LTS

• SSH to access server– putty

• Basic knowledge about UNIX Commands or NOT– a text editor ( pico, vi…)– Configuration Files– Ctrl-C & Ctrl-V

Page 4: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

Deploy a Linux Distribution

Page 5: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

Prepare your server for ISPConfig

• The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3)

– Starting from page 3 of 5

Page 6: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

Skip Steps

• 4. Install The SSH Server (Optional)

• 9. Synchronize the System Clock

• 13. Install Mailman

• 19. Install SquirrelMail

Page 7: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

Steps 6. Configure The Network

Page 8: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

7. Update Your Debian Installation

Page 9: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

Step 17. Install Jailkit

Page 10: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

Step 20. Install ISPConfig 3

Page 11: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

Install Drush

Page 12: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

Login to ISPConfig 3

Page 13: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

Creating sites

• Add new client

– Add new website

• Add new aliasdomain

– Add new User (Database) -- c1username

– Add new Database – c1dbmame

• Add more Database

– Add new Shell-User

Page 14: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

su - orz99cd /var/www/clients/client1/web1

drush pm-download --drupal-project-rename=I drupalchown -R web1.client1 drupalVIIcd drupalVI

wget -O profiles/standard/translations/drupal-7.31.zh-hant.po \http://ftp.drupal.org/files/translations/7.x/drupal/drupal-7.31.zh-hant.po

wget -O profiles/standard/translations/drupal-7.31.zh-hans.po \http://ftp.drupal.org/files/translations/7.x/drupal/drupal-7.31.zh-hans.po

wget -O profiles/standard/translations/drupal-7.31.ja.po \http://ftp.drupal.org/files/translations/7.x/drupal/drupal-7.31.ja.po

ISPConfig + Drupal Multisite

Page 15: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

ISPConfig + Drupal Multisite

cd web#cd /var/www/clients/client1/web1/web

ln -s drupalVII twampln -s drupalVII site

cd ../twampdrush site-install \--db-url=mysql://c1examplecom:UvLV1359@localhost/c1examplecomtwamp \--account-name="lisa" \--account-pass="ChangeASAP" \--account-mail="[email protected]" \--site-name="twamp" \--locale=zh-hant \--sites-subdir=example.com.twamp

Page 16: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

ISPConfig + Drupal Multisite

cd ../sitedrush site-install \--db-url=mysql://c1examplecom:UvLV1359@localhost/c1examplecomsite \--account-name="lisa" \--account-pass="ChangeASAP" \--account-mail="[email protected]" --site-name="example.com" \--locale=zh-hant \--sites-subdir=example.com.site

cd ../sitedrush site-install \--db-url=mysql://c1examplecom:UvLV1359@localhost/c1sucousto \--account-name="lisa" \--account-pass="ChangeASAP" \--account-mail="[email protected]" \--site-name="ice.to" \--locale=zh-hant \--sites-subdir=ice.to.site

Page 17: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

Enable Drupal Clean URL

Page 18: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

Clean URLs with NGINX

Page 19: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

Bonus

### install_docker ()#uname -r3.14.5-x86_64-linode42

apt-get install apt-transport-httpsapt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9

echo -e "deb http://get.docker.io/ubuntu docker main" > /etc/apt/sources.list.d/docker.list

apt-get updateapt-get -y install lxc-docker

docker run -i -t ubuntu /bin/bashcat /etc/issue#> Ubuntu 14.04 LTS \n \lexit

Page 20: ISPConfig with Drupal Multi-site2014.drupalcamp.tw/sites/default/files/DrucalCamp2014_s.pdf · • The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3) –Starting

Q & A