Ubuntu

Introduction
Linux is an alternative to operating systems like Windows and Mac OS. Linux is also free and comes in many distributions. For the purposes of this page, Ubuntu is the distribution of choice that also ranks high on DistroWatch.
Tips and Tricks
- Setup Your Server the Right Way.
- 15 Tips for Power Users.
- How To Install A Ruby 1.8 Stack on Ubuntu 8.10 From Scratch.
- Pendrive Linux - Learn how to install and configure Ubuntu on a flash drive.
- How to Print to PDF in Ubuntu.
- How To Install Ubuntu on PlayStation 3.
- Fixing a Corrupt Sudoers File - Start by rebooting your machine and then pressging the “Enter” key to enter the GRUB boot menu. Select the Ubuntu-entry in question, prese “E”, select the line starting with “kernel”, press “E” again, navigate to the end of the line and append “init=/bin/bash” to the line. Press “Enter” to apply changes (these changes are temporary for the current session, nothing is saved to file). Press “B” to boot. You will now be in a very limited environment but enough to make changes and fixes as necessary.
- 17 Must-Have Free Apps for New Ubuntu Users
- Block a Website for Everyone But You
- The perils of InnoDB with Debian and startup scripts
- TimeMachine - Learn how to use TimeMachine with Ubuntu
- More TimeMachine - More notes on TimeMachine and Ubuntu.
- Nginx and Passenger Configuration Instructions.
- Install Ruby Rails on Ubuntu 9.04 Jaunty Jackalope
Getting Started
- Ubuntu Help - The official Ubuntu documentation.
- Getting Started
Server Install Steps
- Visit the Ubuntu web site and download the server ISO CD image.
- Once downloaded, burn the ISO file to CD, and reboot to start the installation process.
- Pick the server install from the main menu and follow the install screen prompts.
- When asked to detect keyboard, skip this and pick your country settings instead.
- When asked to to setup your hard disk pick “Guided - use entire disk”.
- When asked for automatic software updates, choose manual.
- When asked what software to install after the core has been installed choose: LAMP. It won’t work but pick it anyway.
Server Application Install Steps
With Ubuntu freshly installed, here are a few other apps worth installing to make Ubuntu more usable as a server and development platform (steps are provided afterwords on how to configure this software). Execute the following commands from the command line in order to install:
- sudo apt-get update
- sudo apt-get upgrade
- sudo apt-get install openssh-client
- sudo apt-get install openssh-server
- sudo apt-get install vsftpd
- sudo apt-get install zip
- sudo apt-get install apache2
- sudo apt-get install sqlite3
- sudo apt-get install mysql-server
- sudo apt-get install php5
- sudo apt-get install libapache2-mod-php5
- sudo apt-get install php5-cli
- sudo apt-get install php5-cgi
- sudo apt-get install php5-gd
- sudo apt-get install php5-xmlrpc
- sudo apt-get install php5-mysql
- sudo apt-get install postfix
- sudo apt-get install samba
- sudo apt-get install ruby
- sudo apt-get install ruby1.8-dev build-essential
- sudo apt-get install irb
- sudo apt-get install rdoc
Configure the Hostname
- Edit the /etc/hostname file with your name of choice.
- Run the following command to restart and apply your changes:
sudo /etc/init.d/hostname.h start
Configure the Network
- Edit the /etc/network/interfaces file adding the ip, netmask, and gateway for your ethernet adapter.
- Edit the /etc/resolv.conf so that it includes the primary and secondary DNS servers.
Configure the OpenSSH Server
- Edit the /etc/ssh/sshd_config file so that the “Banner” line is uncommented to pick up the changes.
- Edit the /etc/issue.net file as you see fit (maybe enter the name of your server or something clever).
- Restart the server: sudo /etc/init.d/ssh restart.
Configure the FTP Server
- Edit the /etc/vsftpd.conf file.
- Set anonymous_enable=NO
- Set local_enable=YES
- Set write_enable=YES
- Restart the server: sudo /etc/init.d/vsftpd restart
Configure Postfix
- During the installation, choose “Internet Site”, when asked.
- Edit the /etc/postfix/main.cf config file.
- Reboot: postfix reload
- Check either the /var/log/mail.log or /var/log/mail.err logs for errors.
Read the Ubuntu help documentation for further details if you need it. It is possible that you might need to reconfigure postfix once it has been installed. Do this by issuing sudo dpkg-reconfigure postfix from the command line.
Configure the Apache HTTP Server
- Create your own Apache web directory (instead of using the defaults). Example: /web.
- Create a new user group that will be associated with the newly created /web directory.
- Create and add team members to the new “web” user group.
- Set group permissions on the “web” directory so the new group can access the directory.
- Copy the /etc/apache2/sites-available/default file to a /etc/apache2/sites-available/(your site name) file.
- Edit the /etc/apache2/sites-available/(your site name) file.
- Set the ServerName to your private or public web address. Example: ..com.
- Set the ServerAdmin to your personal e-mail address.
- Set the DocumentRoot to whatever your newly created “web” directory path name is.
- Rename the /var/www directory to whatever your newly created “web” directory path is.
- Disable the default site: sudo a2dissite.
- Enable your new site: sudo a2ensite.
- Enable any additional modules by issuing the sudo a2enmod command and picking which module(s) you want to enable. Example: rewrite.
- Restart the server: sudo /etc/init.d/apache2 restart.
Configure MySQL
- Set the root password: sudo mysqladmin -u root password (your new password). You might also want to log into MySQL using the following command: mysql -u root -p. It is worthwhile to double check the root password is set.
- Edit the /etc/mysql/my.cnf file.
- Comment out the “bind-address=127.0.0.1″ line so connections can be accepted from other machines.
- Restart the server: sudo /etc/init.d/mysql restart
- Login to MySQL and create a default database: CREATE DATABASE (new database name here).
- Grant access to the new database for the main user or set of users who might need to access the database via MySQL Administrator or other GUI tools:
GRANT ALL PRIVILEGES ON <database>.* TO "<username>"@"<host>" IDENTIFIED BY "<password>";NOTE:<database>, <username>, <host>, and <password>should be replaced accordingly.
Configure Samba
- I strongly recommend, that if you are just wishing to use Samba to mount Windows drives, that you use the following command:
apt-get install smbfs. This is because the aptitude utility will not show this as a package that can be downloaded and you can only get it by using the apt-get command. - For creating mounts to Windows file systems, use the following instructions. Another source of information is Mounting SMBFS Shares Permanently found on the Just Linux web site.
- To test your Samba connections, use the following command: smbclient -L
<windows-box>-U<username>
Configure Subversion
- Follow the subversion install notes found here.
Configure Ruby and Ruby on Rails
To configure Ruby and Ruby on Rails, execute the following commands from the command line:
- sudo gem install ruby-debug
- sudo gem install sqlite3-ruby
- sudo gem install mysql
- sudo gem install rails
To configure Ruby Gems execute the following commands from the command line:
- wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
- tar xzf rubygems-1.3.1.tgz
- cd rubygems-1.3.1
- sudo ruby setup.rb
To configure Phusion Passenger, read my Phusion Passenger post.
Services
- Ubuntu Server Edition on Amazon - Easily setup Ubuntu on the Amazon EC2 cloud.
Applications
- Top 10 Ubuntu Downloads
- lsof - A handy debugging tool for listing files and processes currently open or in use by the operating system.
- Top 10 Apps
- ManDVD - Use it to create customized DVD menus.
- K3b - CD/DVD authoring software. Go here to learn more.
- Redcar - “An open-source programmers’ text editor for Gnome (Linux). It is designed to be compatible with Textmate bundles (a work in progress) and is written almost entirely in Ruby - with some Vala thrown in for speed.”
Search
Categories
- Adventures
(129)
- Announcements
(37)
- Business
(20)
- Electronics
(21)
- Epicurean
(10)
- Games
(2)
- Literature
(1)
- Mechanical
(4)
- Meetups
(17)
- Movies
(2)
- Music
(26)
- Photography
(1)
- Services
(28)
- Software
(128)