Managing init Scripts in Ubuntu 13.04

Normally, I use chkconfig tool in SUSE or RedHat to manage init scripts. This tool is missing in Ubuntu. The alternative is to use the sysv-rc-conf tool.

First, install the tool:

sudo apt-get install sysv-rc-conf

To check the configuration of an init script, such as apache2, run:

sudo sysv-rc-conf --list apache2

To disable a script, such as apache2:

sudo sysv-rc-conf apache2 off

To enable it again:

sudo sysv-rc-conf apache2 on

To create a new script manually, use the same syntax as for chkconfig.


Publishing an iOS App to App Store from Xcode 5

I publish apps on a regular basis, every few months. But, every time the process seems to change. Anyway, today, when I tried to publish an app the usual way from the Archive view of the Organizer window, Xcode started giving meaningless error messages about “no identities are available for signing”. Then it kept crashing. As it turns out, the process to publish an app to app store has changed.

Continue reading

Nginx in Ubuntu 13.04 Quick Start Guide

1. Install Nginx:

sudo apt-get install nginx

2. Where are the files?

dpkg -L nginx-full

dpkg -L nginx-common

dpkg -L nginx

3. Starting and stopping:

cd /etc/init.d

sudo ./nginx start

sudo ./nginx stop

4. Go on a test drive. Start the server, then,

curl http://localhost

Default document root is /usr/share/nginx/html. Change index.html there and make sure changes are picked up by the server.

View the access log file: /var/log/nginx/access.log.

4. Edit basic settings like document root

vi /etc/nginx/sites-enabled/default

5. Edit advanced settings like worker process, log file location:

vi /etc/nginx/nginx.conf

Note: total number of HTTP requests served = worker_processes X worker_connections.