Custom Search

Ubuntu server 8.10 installation - Scanning the mirror hangs

I am a little surprise when Ubuntu 8.10 server installation seems like hangs in scanning the mirror during the installation step. It was more than 10 minutes I think and the installation screen just freezes like the picture below:


I wonder did I make a mistake during network configuration steps? No, I did the same steps a few times already including when I installed Ubuntu 8.04. Although there are slightly different steps in Ubuntu 8.10, but the configuration is just the same to me. I was not worry about the configuration, I know I set it up right. But the networking itself made me worry. The connection to the Internet has been bad for a few weeks already.

So I opened a web browser from windows to check the Internet connection, and I found it was ok. That means the installation should be ok. Maybe I should wait a little longer. I just leaved Ubuntu scanning the mirror and went take a bath. When I went back, I see the screen still scanning the mirror. Something must be wrong. It was the time when I tried to interrupt the installation, the screen moved.
That means the installation was ok. It just took some times to scan the mirror. I mean quite some times to scan the mirror. That never happened before. Then it stop again this time it scans the security updates repository:

I wasn't worry anymore. Take how much times you need, I know you were ok!

Ubuntu copy paste in command line terminal

Sometimes we need to copy text from somewhere and paste it in Ubuntu command line for some reasons. For example, you are learning Linux bash shell scripting from the Internet. It is faster, easier and safer if you can copy an example bash script from the Internet and paste it in command line rather than typing it. How do you copy and paste text in Ubuntu command line? Here is how I do it.



Using cat command


This is one of the mostly used command in Linux, at least by me. The cat command normally used to read file but also can be used to append text to a file. We are going to use that append part to copy and paste text in command line terminal. Let's see an example:





This is a script from the Internet that I want to copy. So I highlight the text, right-click and choose copy.



Next, open Ubuntu command line terminal and using cat command to paste the text I copied earlier. Here is the steps:




luzar@ubuntu:~$ cat >> paste.txt
NameVirtualHost *
<VirtualHost * >
ServerAdmin webmaster@localhost

DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
luzar@ubuntu:~$ ls -l | grep paste.txt
-rw-r--r-- 1 luzar luzar 432 2008-12-12 18:55 paste.txt
luzar@ubuntu:~$ cat paste.txt
NameVirtualHost *
<VirtualHost * >
ServerAdmin webmaster@localhost

DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
luzar@ubuntu:~$


Here is explanation of the example above. The command cat >> paste.txt will append text(input) into a file name paste.txt. Press enter and you'll see no command prompt. That means cat is waiting for the input. So, right-click to paste the text we copied earlier. When we finished, press Ctrl+d to save and exit.



The ls -l | grep paste.txt and cat paste.txt just to show result of what we did.



That's all. Light and easy.

Ubuntu apache server installation

This is a guide on how to install web server in Ubuntu. Ubuntu uses Apache as a web server. In this tutorial, user will learn how to check apache2 package in Ubuntu system before proceed to the apache2 installation itself. Apache2 web server can be installed from binary package or from source. The easiest method is installing apache2 web server from binary package using package management system.

Check apache server in Ubuntu

First, you have to check whether apache has been installed in your system or not. You can use any of the methods shown below:

Example using dpkg command to check apache in Ubuntu:

luzar@ubuntu:~$ sudo dpkg -l | grep apache
ii  apache2              2.2.8-1ubuntu0.3   Next generation, scalable, extendable web server
ii  apache2-mpm-prefork  2.2.8-1ubuntu0.3  Traditional model for Apache HTTPD
ii  apache2-utils        2.2.8-1ubuntu0.3  utility programs for webservers
ii  apache2.2-common     2.2.8-1ubuntu0.3  Next generation, scalable, extendable web server
ii  libapache2-mod-php5  5.2.4-2ubuntu5.4  server-side, HTML-embedded scripting language
luzar@ubuntu:~$

Example using ps command to check apache service in Ubuntu:

luzar@ubuntu:~$ ps aux | grep apache2
root      4594  0.0  1.3  20460  6748 ?  Ss  22:05  0:00 /usr/sbin/apache2 -k start
www-data  5247  0.0  0.6  20460  3376 ?  S   22:57  0:00 /usr/sbin/apache2 -k start
www-data  5248  0.0  0.6  20460  3376 ?  S   22:57  0:00 /usr/sbin/apache2 -k start
www-data  5249  0.0  0.6  20460  3376 ?  S   22:57  0:00 /usr/sbin/apache2 -k start
www-data  5253  0.0  0.6  20460  3376 ?  S   22:57  0:00 /usr/sbin/apache2 -k start
www-data  5255  0.0  0.6  20460  3376 ?  S   22:57  0:00 /usr/sbin/apache2 -k start
luzar     8448  0.0  0.1  3004   756 pts/0   R+   23:51   0:00 grep apache2
luzar@ubuntu:~$

Example using aptitude command to search apache package in Ubuntu:

luzar@ubuntu:~$ sudo aptitude search apache2
[sudo] password for luzar:
i   apache2                  - Next generation, scalable, extendable web
v   apache2-dev              -
p   apache2-doc              - documentation for apache2
v   apache2-mpm              -
p   apache2-mpm-event        - Event driven model for Apache HTTPD
p   apache2-mpm-itk          - multiuser MPM for Apache 2.2
p   apache2-mpm-perchild     - Transitional package - please remove
i   apache2-mpm-prefork      - Traditional model for Apache HTTPD
p   apache2-mpm-worker       - High speed threaded model for Apache HTTPD
p   apache2-prefork-dev      - development headers for apache2
p   apache2-src              - Apache source code
p   apache2-threaded-dev     - development headers for apache2
i   apache2-utils            - utility programs for webservers
i   apache2.2-common         - Next generation, scalable, extendable web
p   gforge-web-apache2       - collaborative development tool - web part
p   libapache2-authenntlm-perl  - Perform Microsoft NTLM and Basic User Auth
p   libapache2-mod-apparmor  - changehat AppArmor library as an Apache mo
p   libapache2-mod-apreq2    - generic Apache request library - Apache mo
p   libapache2-mod-auth-kerb    - apache2 module for Kerberos authentication
p   libapache2-mod-auth-mysql   - Apache 2 module for MySQL authentication
p   libapache2-mod-auth-openid  - OpenID authentication module for Apache2
p   libapache2-mod-auth-pam     - module for Apache2 which authenticate usin
p   libapache2-mod-auth-pgsql   - Module for Apache2 which provides pgsql au
p   libapache2-mod-auth-plain   - Module for Apache2 which provides plaintex
p   libapache2-mod-auth-radius  - Apache 2.x module for RADIUS authenticatio
p   libapache2-mod-auth-shadow    - Apache2 module for authentication using sh
p   libapache2-mod-auth-sys-group   - Module for Apache2 which checks user again
p   libapache2-mod-authnz-external  - authenticate Apache against external authe
p   libapache2-mod-bt           - BitTorrent tracker for the Apache2 web ser
p   libapache2-mod-bt-dev       - Header files for mod_bt
p   libapache2-mod-chroot       - run Apache in a secure chroot environment
p   libapache2-mod-defensible   - module for Apache2 which provides DNSBL us
p   libapache2-mod-dnssd        - Zeroconf support for Apache 2 via avahi
p   libapache2-mod-encoding     - Apache2 module for non-ascii filename inte
p   libapache2-mod-evasive      - evasive module to minimize HTTP DoS or bru
p   libapache2-mod-fastcgi      - Apache 2 FastCGI module for long-running C
p   libapache2-mod-fcgid        - an alternative module compat with mod_fast
p   libapache2-mod-geoip        - GeoIP support for apache2
p   libapache2-mod-jk           - Apache 2 connector for the Tomcat Java ser
p   libapache2-mod-layout       - Apache web page content wrapper
p   libapache2-mod-ldap-userdir  - Apache module that provides UserDir lookup
p   libapache2-mod-line-edit    - search-and-replace line editor module for
p   libapache2-mod-log-sql      - Use SQL to store/write your apache queries
p   libapache2-mod-log-sql-dbi   - Use SQL to store/write your apache queries
p   libapache2-mod-log-sql-mysql  - Use SQL to store/write your apache queries
p   libapache2-mod-log-sql-ssl    - Use SQL to store/write your apache queries
p   libapache2-mod-macro        - Create macros inside apache2 config files
p   libapache2-mod-mime-xattr   - Apache2 module to get MIME info from files
p   libapache2-mod-mono         - Apache module for running ASP.NET applicat
p   libapache2-mod-musicindex   - Browse, stream, download and search throug
p   libapache2-mod-neko         - Apache module for running server-side neko
p   libapache2-mod-perl2        - Integration of perl with the Apache2 web s
p   libapache2-mod-perl2-dev    - Integration of perl with the Apache2 web s
p   libapache2-mod-perl2-doc    - Integration of perl with the Apache2 web s
i   libapache2-mod-php5         - server-side, HTML-embedded scripting langu
p   libapache2-mod-proxy-html   - Apache2 filter module for HTML links rewri
p   libapache2-mod-python       - Apache 2 module that embeds Python within
p   libapache2-mod-python-doc   - Apache 2 module that embeds Python within
v   libapache2-mod-python2.5    -
p   libapache2-mod-random       - Create random ads, quotes and redirects
p   libapache2-mod-removeip     - Module to remove IP from apache2's logs
p   libapache2-mod-rpaf         - module for Apache2 which takes the last IP
p   libapache2-mod-ruby         - Embedding Ruby in the Apache2 web server
p   libapache2-mod-scgi         - Apache module implementing the SCGI protoc
p   libapache2-mod-shib         - Shibboleth implements the OASIS SAML v1.1
p   libapache2-mod-speedycgi    - apache2 module to speed up perl scripts by
p   libapache2-mod-suphp        - Apache2 module to run php scripts with the
p   libapache2-mod-vhost-hash-alias - Fast and efficient way to manage virtual h
p   libapache2-mod-vhost-ldap   - Apache 2 module for Virtual Hosting from L
p   libapache2-mod-wsgi         - Python WSGI adapter module for Apache
p   libapache2-mod-xmlrpc2      - XMLRPC Server module for Apache2 web serve
p   libapache2-modbt-perl       - Perl bindings for mod_bt
p   libapache2-modxslt          - XSLT processing module for Apache 2.0.x ba
p   libapache2-redirtoservname  - Apache 2 module to redirect users to the c
p   libapache2-request-perl     - generic Apache request library - Perl modu
p   libapache2-svn              - Subversion server modules for Apache
p   libapache2-webauth          - Apache 2 modules for WebAuth authenticatio
p   libapache2-webkdc           - Apache 2 modules for a WebAuth authenticat
p   php5-apache2-mod-bt         - PHP bindings for mod_bt
p   rt3.6-apache2               - Apache 2 specific files for request-tracke
p   torrus-apache2              - Universal front-end for Round-Robin Databa
luzar@ubuntu:~$

All the results above shown that apache is already installed in my system. If you didn't have apache yet, then you can install apache with a guide below.

Install apache server in Ubuntu

You can use any package management system in Ubuntu to install apache package. Ubuntu has two package management systems, apt and aptitude. However, apt is the most popular package management system and used by many system administrator. You can used any package management tool but it's recommended you stick with one that you are comfortable with.

Install apache package with apt-get command

Apt-get can be used to install, upgrade or remove package. This is an example of how to use apt-get command to install apache2 package:


sudo apt-get install apache2

Install apache package with aptitude command

Aptitude is the latest package management system developed for Debian. Ubuntu does not include aptitude in its official distribution. However, user can install aptitude using apt-get if they want aptitude in their system. Example using aptitude command to install apache2 package:


sudo aptitude install apache2