Saturday, May 10, 2008

Installing Lighttpd (Ubuntu)

sudo apt-get install libpcre3-dev
sudo apt-get install zlib1g-dev
sudo apt-get install libglib2.0-dev
sudo apt-get install libbz2-dev

wget for the source (see lighttpd website)
unzip

./configure
make
make install

sed -e 's/FOO/lighttpd/g' doc/rc.lighttpd > /etc/init.d/lighttpd
chmod a+rx /etc/init.d/lighttpd
mkdir /etc/sysconfig
cp -p doc/sysconfig.lighttpd /etc/sysconfig/lighttpd
install -Dp ./doc/lighttpd.conf /etc/lighttpd/lighttpd.conf
update-rc.d lighttpd defaults

Access MySQL from Another Server (Ubuntu)

Apparently, my.cnf (/etc/mysql/my.cnf) shipped with
bind-address = 127.0.0.1

The reason being
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.

Okay, but I need to access mysql from another server. Anyway, just change this to your IP and it should be good.

Don't forget to restart mysql
sudo /etc/init.d/mysql restart

source: http://dev.mysql.com/doc/refman/5.0/en/can-not-connect-to-server.html
third comment.

Slice Setup

Login as root.

apt-get update
apt-get dist-upgrade

adduser
# just in case sudo is not installed yet
apt-get install sudo
visudo
# add following line
ALL=(ALL) ALL

chmod 1777 /tmp

test login with your user
make sure your user can run sudo

sudo vi /etc/ssh/sshd_config
PermitRootLogin no

/etc/init.d/ssh restart

Login as your user

sudo apt-get install build-essential

# install Ruby
sudo apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby

sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby
sudo ln -s /usr/bin/ri1.8 /usr/bin/ri
sudo ln -s /usr/bin/rdoc1.8 /usr/bin/rdoc
sudo ln -s /usr/bin/irb1.8 /usr/bin/irb


# setting up mysql
sudo apt-get install mysql-server mysql-common mysql-client libmysqlclient15-dev libmysqlclient15off

sudo mysqladmin -u root password newrootsqlpassword