I will change my host provider within a month. I’ve been using Midphase for several years and have decided to use Linode as my next virtual private service provider. I will move this site there in the next few weeks. This will be my first time moving a domain and I hope the transfer will be smooth without too much down time. After all, I know my readers worldwide are hanging on to every word I type and deserve a site that runs 24 by 7 🙂
Since I will have total control of this host, I decided to use Tengine, a great fork of the Nginx web/proxy server. Here is my note on how to compile and config Tengine on Debian/Ubuntu, and then setup WordPress. During my study and testing, the following sites are pretty helpful.
I followed and modified processes from all 3 sites above and made my own. It works for me so far. It is documented here and I will modify it as necessary. Right now the Tengine server only hosts one domain. I will very likely add more domains down the road. I’d love to hear your comments and recommendations. One thing that is not documented here is the installation of WordPress SuperCache plugin. I plan to use that after the site is moved.
[code language=”bash”]
sudo apt-get update
sudo apt-get upgrade –show-upgraded
sudo apt-get install libpcre3-dev build-essential libssl-dev
wget http://tengine.taobao.org/download/tengine-1.5.1.tar.gz
tar xzf tengine-1.5.1.tar.gz
cd tengine-1.5.1/
./configure –user=www-data –group=www-data –with-http_ssl_module
make
sudo make install
[/code]
sudo vim /etc/init.d/nginx
Please copy and paste code from here for /etc/init.d/nginx
[code language=”bash”]
sudo chmod +x /etc/init.d/nginx
sudo update-rc.d nginx defaults
sudo /etc/init.d/nginx start
sudo apt-get install php5-cli php5-cgi spawn-fcgi psmisc
sudo apt-get install mysql-server php5-mysql
[/code]
sudo vim /etc/php5/cli/php.ini
Please uncomment this line in /etc/php5/cli/php.ini. It should be around line 944.
; extension=msql.so
sudo vim /usr/bin/php-fastcgi
Please copy and paste code from here for /usr/bin/php-fastcgi
sudo vim /etc/init.d/php-fastcgi
Please copy and paste code from here for /etc/init.d/php-fastcgi
[code language=”bash”]
sudo chmod +x /usr/bin/php-fastcgi
sudo chmod +x /etc/init.d/php-fastcgi
[/code]
Create an empty MySQL database
[code language=”bash”]
wget http://wordpress.org/latest.tar.gz
tar xzf latest.tar.gz
sudo mkdir -p /var/www
sudo cp -r wordpress/* /var/www
sudo chown -R www-data:www-data /var/www/
sudo update-rc.d php-fastcgi defaults
[/code]
sudo vim /usr/local/nginx/conf/nginx.conf
Please copy and paste code from here for /usr/local/nginx/conf/nginx.conf
[code language=”bash”]
sudo /etc/init.d/php-fastcgi start
sudo /etc/init.d/nginx reload
[/code]
Now go to http://localhost and your test WordPress site should be ready to go.
One response to “Setting up WordPress on Debian/Ubuntu running Tengine web server”
Hello:
Thanks for the article. Though when i start the service on an amazon ec2 instance i am getting an error mentioning the below : –
Starting nginx: /etc/init.d/nginx: line 30: start-stop-daemon: command not found
Please guide.