Ubuntu Gutsy Gibbon server CD mozete skinuti ovdje http://releases.ubuntu.com/7.10/ubuntu-7.10-server-i386.iso
Koristiti cemo sljedece software
* Web Server: Apache 2.2 i PHP5
* Database Server: MySQL 5.0
* Mail Server: Postfix
* DNS Server: BIND9
* FTP Server: proftpd
* POP3/IMAP
* Webalizer za statistike posijeta
Instalacija
Ubacite vas Ubuntu install CD te izaberite Install to the hard disk:
Zatim izaberite jezik povasoj zelji ja sam ovaj puta uzeo engleski
Zatim izaberite lokaciju na kojoj se nalazite
Odaberite vrstu vase tipovnice
Instalacijski CD ce od ovoga trenutka provjeravati vase hardware kao i IP adresu preko DHCP-a ako postoji.
Nakon nekog veremna ovisno o brzini vase masine, morate upisati ime vaseg servera
Sada dolazimo do particioniranja diska sto ce sigurno mnoge zbuniti
no to cu morati nakandano objasniti u jednom drugom postu,
Izaberite particiju
Kada ste gotovi stisnite na Yes tada ce vas vas ubuntu pitati Write the changes to disks? naravno potvrditi cete sa Yes
Poslje toga ubuntu ce sam kreirati praticije te ih i formatirati
Konfigurirajte vremensku zonu, UTC je uvijek dobar izbor
Kreirajte novog usera (korisnika) naprimjer Administrator (Admin nemozete kreirati kao korisnicko ime jer je to ime rezervirano)
Sada ce te biti pitani za password koji morate potvrditi ( dobar pasword se sastoji od malih i velikih slova te brojeva Primjer: Rf5T67hjZ)
Nakon sto ste kliknuli na Continue sljedi instalacija baznog systema pricekati cemo da zavrsi, trajati moze i do 20 min. zavisi od jacine masine
Sada ce vas vas ubuntu pitati koje software zelite instalirati vi cete izabrati samo OpenSSH (ostatak instaliramo poslje) server tako da se mozemo spojiti na naserver sa drugog compa
preko porta 22 sa alatom PuTTY (http://chiark.greenend.org.uk/%7Esgtatham/putty/
PuTTY i text editori ce u buducnosti biti nas najveci prijatelj jer kao sto znamo serveri nemaju grafickog sucelja tj. ne instalira se iz sigurnosnih razloga
Nastavak instalacije,
Nakon nekoliko minuta gotovi smo te izvadimo CD i restartamo nas server
Restartali smo server sada pocinjemo sa konfiguracijom web,mysql,dns i ostalih aplikacija servera
Kao prvo logiramo se sa user i passwordom kojeg smo kako je gore navedeno kreirali ( mozete i sa drugog computera koristeci gore navedeni alat PuTTY)
Zatim da bi mogli instalirati potrebne aplikacije moramo biti ROOT user ali mu prvo moramo kreirati password sa sljedecom komandom
- Kod: Označi sve
sudo passwd root
stavimo password te upisemo sljedecu komandu da bi postali ROOT tj da bi imali potpune ovlasti nad serverom
- Kod: Označi sve
su
Sada smo root user i od sada pocijne muzika
Prvo cemo instalirati text editor sa kojim cemo obradjivati files (fajlove) datoteke
vi ili vim su malo komplicirani zato mozemo upotrijebiti i nano koji je standardno vec instaliran ko vecine linux distribucija
- Kod: Označi sve
apt-get install vim-full
IP adresu cemo promjeniti u staticnu kako je dolje prikazano, naravno morate paziti na vas gateway i netmask
- Kod: Označi sve
vi /etc/network/interfaces ili nano /etc/network/interfaces
- Kod: Označi sve
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
Restartati cemo network
- Kod: Označi sve
/etc/init.d/networking restart
Sada editirajte /etc/hosts da izgleda kao dolje,
- Kod: Označi sve
vi /etc/hosts ili nano /etc/hosts
- Kod: Označi sve
127.0.0.1 localhost.localdomain localhost
192.168.0.100 server1.example.com server1
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
poslje toga izvrsiti cemo sljedece
- Kod: Označi sve
echo server1.example.com > /etc/hostname
/etc/init.d/hostname.sh start
Ili
- Kod: Označi sve
hostname
hostname -f
Oboje bi trebalo dati isti rezultat a to je server1.example.com
Sada cemo napraviti potreban update systema no prije toga moramo izuzeti instalacijeski CD jer updates vucemo sa weba
- Kod: Označi sve
vi /etc/apt/sources.list ili nano /etc/apt/sources.list
zatim kao dolje navedeno mora izgledati
- Kod: Označi sve
#deb cdrom:[Ubuntu-Server 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://de.archive.ubuntu.com/ubuntu/ gutsy main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ gutsy main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://de.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://de.archive.ubuntu.com/ubuntu/ gutsy universe
deb-src http://de.archive.ubuntu.com/ubuntu/ gutsy universe
deb http://de.archive.ubuntu.com/ubuntu/ gutsy-updates universe
deb-src http://de.archive.ubuntu.com/ubuntu/ gutsy-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://de.archive.ubuntu.com/ubuntu/ gutsy multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ gutsy multiverse
deb http://de.archive.ubuntu.com/ubuntu/ gutsy-updates multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ gutsy-updates multiverse
## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://de.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
# deb http://archive.canonical.com/ubuntu gutsy partner
# deb-src http://archive.canonical.com/ubuntu gutsy partner
deb http://security.ubuntu.com/ubuntu gutsy-security main restricted
deb-src http://security.ubuntu.com/ubuntu gutsy-security main restricted
deb http://security.ubuntu.com/ubuntu gutsy-security universe
deb-src http://security.ubuntu.com/ubuntu gutsy-security universe
deb http://security.ubuntu.com/ubuntu gutsy-security multiverse
deb-src http://security.ubuntu.com/ubuntu gutsy-security multiverse
Pokrenemo komandu za update, eventualno cemo trebati restartati server poslje toga
- Kod: Označi sve
apt-get update
- Kod: Označi sve
reboot
Zatim Instalacija nekih aplikacija koje cemo poslje trebati
- Kod: Označi sve
apt-get install binutils cpp fetchmail flex gcc libarchive-zip-perl libc6-dev libcompress-zlib-perl libdb4.3-dev libpcre3 libpopt-dev lynx m4 make ncftp nmap openssl perl perl-modules unzip zip zlib1g-dev autoconf automake1.9 libtool bison autotools-dev g++ build-essential
DNS Server
Instalirati cemo dns
- Kod: Označi sve
apt-get install bind9
MySQL
Zatim mysql
- Kod: Označi sve
apt-get install mysql-server mysql-client libmysqlclient15-dev
Biti ce te pitani za password te ga i odredite, isti ce biti dodan useru root@localhost kao i root@server1.vasadomena.com
New password for the MySQL "root" user: <-- vas rootsqlpasswordd
Editirati cemo /etc/mysql/my.cnf kako je dolje navedeno
- Kod: Označi sve
vi /etc/mysql/my.cnf ili nano /etc/mysql/my.cnf
- Kod: Označi sve
[...]
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1
#
[...]
Restartati cemo mysql
- Kod: Označi sve
/etc/init.d/mysql restart
Sljedecom komandom cemo provjerti dali mysql radi
- Kod: Označi sve
netstat -tap | grep mysql
odaziv bi trebao biti sljedeci
- Kod: Označi sve
root@server1:~# netstat -tap | grep mysql
tcp 0 0 *:mysql *:* LISTEN 5286/mysqld
root@server1:~#
---->Nastavak sljedi<----