Twitter Updates

Tuesday, 24 June 2008

Screen tips

I am a big fan of screen for when working with terminals. When working with remote connections it is very handy if you require a new terminal do something and protects you against dropped connections. or if you start running a job that takes longer than expected, you can just disconnect and pick it up again later.

Just found this tip at
http://polishlinux.org/howtos/screen-tips-tricks/
Add this to ~/.screenrc
hardstatus alwayslastline
hardstatus string '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'

This gives a tab along the bottom of the open terminal (Screen Session).

also this line (from the same source) added to crontab
@reboot screen -S rtorrent -md /usr/bin/rtorrent

Will create new screen session (disconnected) and start the bit torrent program rtorrent.

To edit the crontab
$crontab -e

This page looks like a good crontab reference
http://mkaz.com/ref/unix_cron.html

Wednesday, 4 June 2008

Adding Samba Users

To add new users to Samba with out enabling ssh login to Ubuntu and Debian systems
$sudo adduser --disabled-login newuser
$sudo smbpasswd -a newuser

Don't forget to add the newuser to the smb.conf allowed user property

My favourite terminal torrent client

I have been looking for a nicer terminal bit torrent client than bit tornado for a while and came across rtorrent. It has its own wikipedia page. I have found this torrent client to be much faster than the official version.

It is easily installed on Debian and Ubuntu systems with
$sudo apt-get install rtorrent

NB: if $apt-cache search rtorrent does not return any results you may need to add some thing to your sources list.

On OS X it is available once you have installed and setup Darwin ports.
$sudo port install rtorrent
Good tutorial here for getting it running

Sunday, 1 June 2008

Installing phpmyadmin

Installing phpmyadmin for web admin of mysql database.
First install mysql
$sudo apt-get install mysql-server mysql-client php5-mysql

Then install phpmyadmin
$sudo apt-get install phpmyadmin

there is a howto forge document here that gives a fuller explanation.
The correct how to suggests that you include the config file in the main apache2.conf.

Ubuntu/Debian systems have a folder called sites-enabled sites-available in /etc/apache2 .
conf files in these folders are loaded. Generally you will write the .conf files in the available forlder and create soft links to them from the enabled folder. so instead of inlcudeing this line in apache2.conf
Include /etc/phpmyadmin/apache.conf

I suggest creating a link to it from the enabled folder
ln -s /etc/phpmyadmin/apache.conf /etc/apache2/sites-enabled/phpmyadmin

If doing it properly you should copy it to the sites-available and link to it there, rather than linking directly to it.

Ubuntu reconfigure software once installed

Note to self when you mess up the installation of a program by choosing the wrong options in the blue configuration screen run dpkg-reconfigure.
$sudo apt-get install somepackage
somepackage downloads installs and runs through configuration.
choose the wrong option and try to remember how to run the setup
$sudo dpkg-reconfigure somepackage

Ubuntu setting up Apache

Setting up Apache2 with php5 on my Ubuntu server is as simple as .

$sudo apt-get install apache2 php5 libapache2-mod-php5

Well Apache and php works, just got to get mySQL and phpmyadmin setup.
Used this page as reference.