Ubuntu6.10LAMPServer

出自Ubuntu 正體中文 Wiki

跳轉到: 導航, 搜尋


目錄

前言

最常見的 Linux Server 大都是架設成 LAMP (Linux + Apache + Mysql + PHP),有了這些服務就可以建立網站,部落格,以及相簿等等的網站。 Ubuntu Server 安裝光碟,提供方便 LAMP 環境,無須管理者手動安裝 LAMP 套件,只要安裝時設定好基本資訊,剩下交給 Ubuntu Server 安裝程式就可完成。

光碟開機

圖片:2006111001.png

選擇第一項 Install to the hard disk ,安裝至硬碟。


設定語系

圖片:2006111002.png

選擇 Server 預設的語系。


圖片:2006111003.png

選擇 Server 所在地區。


設定鍵盤

圖片:2006111004.png

設定鍵盤排列,此步驟選擇不要自動檢測。


圖片:2006111005.png

選擇鍵盤語系


圖片:2006111006.png

選擇鍵盤排列方式


設定網路

DHCP 配發

圖片:2006111007.png

若設定的環境有 DHCP Server,系統將會得到 IP,並進行主機名稱設定。


固定 IP

圖片:2006111014.png

若環境沒有 DHCP Server,改用手動方式設定網路。


圖片:2006111015.png

指定 IP 。


圖片:2006111016.png

指定 Gateway 。


圖片:2006111017.png

指定 netmask 。


圖片:2006111018.png

指定 DNS Server 。


硬碟分割

圖片:2006111008.png

硬碟分割。


圖片:2006111009.png

最基本 / , swap 。

* 建議 /var 可以分開獨立,並且空間大一點,畢竟 LAMP Server儲存的位置都是在 /var 內。


圖片:2006111010.png

最後確認


設定時區

圖片:2006111011.png

不要選 UTC 時區,除非有需要才選。


套件安裝

圖片:2006111011.png

開始安裝基本套件


安裝 LAMP Server

圖片:2006111013.png

選擇安裝 LAMP Server,若有架設 DNS Server,一併選擇 DNS Server。


安裝完畢

圖片:2006111012.png

安裝完畢,重新開機。


後續設定

設定 Root 密碼

有些狀況需要 Root 密碼,而不是 sudo 的密碼,請啟動 Root 帳號,並設定安全複雜的密碼。

sudo passwd root

設定網路

  • 若要修改 IP
 
sudo vi /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254
sudo /etc/init.d/networking restart
  • 若要修改 DNS Server
sudo vi /etc/resolv.conf
search ssh.tw
nameserver 168.95.1.1

安裝 Openssh Server

sudo apt-get install ssh openssh-server

套件版本

  • Apache 2.0
  • PHP 5
  • Mysql 5

預設套件清單

ii  adduser                      3.92                    Add and remove users and groups
ii  alsa-base                    1.0.11-5ubuntu1         ALSA driver configuration files
ii  alsa-utils                   1.0.11-6ubuntu2         ALSA utilities
ii  apache2                      2.0.55-4ubuntu4         next generation, scalable, extendable web se
ii  apache2-common               2.0.55-4ubuntu4         next generation, scalable, extendable web se
ii  apache2-mpm-prefork          2.0.55-4ubuntu4         traditional model for Apache2
ii  apache2-utils                2.0.55-4ubuntu4         utility programs for webservers
ii  apt                          0.6.45ubuntu14          Advanced front-end for dpkg
ii  apt-utils                    0.6.45ubuntu14          APT utility programs
ii  aptitude                     0.4.1-1.1ubuntu7        terminal-based apt frontend
ii  at                           3.1.10ubuntu3           Delayed job execution and batch processing
ii  base-files                   3.1.13ubuntu2           Debian base system miscellaneous files
ii  base-passwd                  3.5.11                  Debian base system master password and group
ii  bash                         3.1-5ubuntu3            The GNU Bourne Again SHell
ii  belocs-locales-bin           2.4-1ubuntu6            tools for compiling locale data files
ii  bind9-host                   9.3.2-2ubuntu3          Version of 'host' bundled with BIND 9.X
ii  bsdmainutils                 6.1.3ubuntu2            collection of more utilities from FreeBSD
ii  bsdutils                     2.12r-11ubuntu2         Basic utilities from 4.4BSD-Lite
ii  busybox-initramfs            1.1.3-2ubuntu3          Standalone shell setup for initramfs
ii  bzip2                        1.0.3-3                 high-quality block-sorting file compressor -
ii  console-setup                1.7ubuntu19             Setup the font and the keyboard on the conso
ii  console-terminus             4.20-2                  Fixed-width fonts for fast reading on the Li
ii  console-tools                0.2.3dbs-62ubuntu10     Linux console and font utilities
ii  coreutils                    5.96-5ubuntu4           The GNU core utilities
ii  cpio                         2.6-17                  GNU cpio -- a program to manage archives of
ii  cron                         3.0pl1-94ubuntu2        management of regular background processing
ii  dash                         0.5.3-3ubuntu4          The Debian Almquist Shell
ii  debconf                      1.5.2ubuntu2            Debian configuration management system
ii  debconf-i18n                 1.5.2ubuntu2            full internationalization support for debcon
ii  debianutils                  2.16.2                  Miscellaneous utilities specific to Debian
ii  dhcp3-client                 3.0.4-6ubuntu6          DHCP Client
ii  dhcp3-common                 3.0.4-6ubuntu6          Common files used by all the dhcp3* packages
ii  diff                         2.8.1-11ubuntu3         File comparison utilities
ii  dmidecode                    2.8-2                   Dump Desktop Management Interface data
ii  dnsutils                     9.3.2-2ubuntu3          Clients provided with BIND
ii  dosfstools                   2.11-2.1ubuntu1         Utilities to create and check MS-DOS FAT fil
ii  dpkg                         1.13.22ubuntu7          package maintenance system for Debian
ii  dselect                      1.13.22ubuntu7          user tool to manage Debian packages
ii  e2fslibs                     1.39-1                  ext2 filesystem libraries
ii  e2fsprogs                    1.39-1                  ext2 file system utilities and libraries
ii  ed                           0.2-20                  The classic unix line editor
ii  eject                        2.1.4-2ubuntu1          ejects CDs and operates CD-Changers under Li
ii  ethtool                      3-1                     Display or change ethernet card settings
ii  fdutils                      5.5-20060227-1          Linux floppy utilities
ii  file                         4.17-2ubuntu1           Determines file type using "magic" numbers
ii  findutils                    4.2.27-3                utilities for finding files--find, xargs, an
ii  ftp                          0.17-16                 The FTP client
ii  gcc-4.1-base                 4.1.1-13ubuntu5         The GNU Compiler Collection (base package)
ii  gettext-base                 0.15-2ubuntu1           GNU Internationalization utilities for the b
ii  gnupg                        1.4.3-2ubuntu3          GNU privacy guard - a free PGP replacement
ii  grep                         2.5.1.ds2-5             GNU grep, egrep and fgrep
ii  grepmap                      1.1.0-1                 Parse module map files produced by depmod
ii  groff-base                   1.18.1.1-12             GNU troff text-formatting system (base syste
ii  grub                         0.97-11ubuntu14         GRand Unified Bootloader
ii  gzip                         1.3.5-14ubuntu1         The GNU compression utility
ii  hdparm                       6.6-1ubuntu3            tune hard disk parameters for high performan
ii  hostname                     2.92                    utility to set/show the host name or domain
ii  ifupdown                     0.6.7ubuntu7            high level tools to configure network interf
ii  info                         4.8.dfsg.1-1            Standalone GNU Info documentation browser
ii  initramfs-tools              0.69ubuntu20            tools for generating an initramfs
ii  initscripts                  2.86.ds1-14.1ubuntu16   Scripts for initializing and shutting down t
ii  inputattach                  1.23-0ubuntu1           utility to attach serial devices to the inpu
ii  installation-report          2.17ubuntu1             system installation report
ii  iproute                      20051007-4ubuntu2       Professional tools to control the networking
ii  iptables                     1.3.5.0debian1-1ubuntu2 Linux kernel 2.4+ iptables administration to
ii  iputils-arping               20020927-3ubuntu2       Tool to send ICMP echo requests to an ARP ad
ii  iputils-ping                 20020927-3ubuntu2       Tools to test the reachability of network ho
ii  iputils-tracepath            20020927-3ubuntu2       Tools to trace the network path to a remote
ii  klibc-utils                  1.4.10-0ubuntu3         small statically-linked utilities built with
ii  klogd                        1.4.1-18ubuntu6         Kernel Logging Daemon
ii  laptop-detect                0.12.1-ubuntu2          attempt to detect a laptop
ii  less                         394-2                   Pager program similar to more
ii  libacl1                      2.2.39-1ubuntu2         Access control list shared library
ii  libapache2-mod-php5          5.1.6-1ubuntu2          server-side, HTML-embedded scripting languag
ii  libapr0                      2.0.55-4ubuntu4         the Apache Portable Runtime
ii  libasound2                   1.0.11-7ubuntu3         ALSA library
ii  libatm1                      2.4.1-17                shared library for ATM (Asynchronous Transfe
ii  libattr1                     2.4.32-1ubuntu1         Extended attribute shared library
ii  libbind9-0                   9.3.2-2ubuntu3          BIND9 Shared Library used by BIND
ii  libblkid1                    1.39-1                  block device id library
ii  libbz2-1.0                   1.0.3-3                 high-quality block-sorting file compressor l
ii  libc6                        2.4-1ubuntu12           GNU C Library: Shared libraries
ii  libc6-i686                   2.4-1ubuntu12           GNU C Library: Shared libraries [i686 optimi
ii  libcap1                      1.10-14                 support for getting/setting POSIX.1e capabil
ii  libcomerr2                   1.39-1                  common error description library
ii  libconsole                   0.2.3dbs-62ubuntu10     Shared libraries for Linux console and font
ii  libdb4.3                     4.3.29-5build1          Berkeley v4.3 Database Libraries [runtime]
ii  libdb4.4                     4.4.20-6ubuntu1         Berkeley v4.4 Database Libraries [runtime]
ii  libdbd-mysql-perl            3.0006-1                A Perl5 database interface to the MySQL data
ii  libdbi-perl                  1.51-2                  Perl5 database interface by Tim Bunce
ii  libdevmapper1.02             1.02.07-1ubuntu2        The Linux Kernel Device Mapper userspace lib
ii  libdns21                     9.3.2-2ubuntu3          DNS Shared Library used by BIND
ii  libedit2                     2.9.cvs.20050518-2.2    BSD editline and history libraries
ii  libelfg0                     0.8.6-3                 an ELF object file access library
ii  libexpat1                    1.95.8-3.2              XML parsing C library - runtime library
ii  libfribidi0                  0.10.7-3                Free Implementation of the Unicode BiDi algo
ii  libgc1c2                     6.7-2ubuntu1            conservative garbage collector for C and C++
ii  libgcc1                      4.1.1-13ubuntu5         GCC support library
ii  libgcrypt11                  1.2.2-2                 LGPL Crypto library - runtime library
ii  libgdbm3                     1.8.3-3                 GNU dbm database routines (runtime version)
ii  libgnutls13                  1.4.0-3ubuntu1          the GNU TLS library - runtime library
ii  libgpg-error0                1.2-1                   library for common error values and messages
ii  libgpmg1                     1.19.6-22ubuntu1        General Purpose Mouse - shared library
ii  libisc11                     9.3.2-2ubuntu3          ISC Shared Library used by BIND
ii  libisccc0                    9.3.2-2ubuntu3          Command Channel Library used by BIND
ii  libisccfg1                   9.3.2-2ubuntu3          Config File Handling Library used by BIND
ii  libiw28                      28-1ubuntu2             Wireless tools - library
ii  libklibc                     1.4.10-0ubuntu3         minimal libc subset for use with initramfs
ii  libkrb53                     1.4.3-9ubuntu1          MIT Kerberos runtime libraries
ii  libldap2                     2.1.30-13build1         OpenLDAP libraries
ii  liblocale-gettext-perl       1.05-1                  Using libc functions for internationalizatio
ii  liblwres9                    9.3.2-2ubuntu3          Lightweight Resolver Library used by BIND
ii  liblzo1                      1.08-3                  data compression library (old version)
ii  libmagic1                    4.17-2ubuntu1           File type determination library using "magic
ii  libmysqlclient15off          5.0.24a-9               mysql database client library
ii  libncurses5                  5.5-2ubuntu1            Shared libraries for terminal handling
ii  libncursesw5                 5.5-2ubuntu1            Shared libraries for terminal handling (wide
ii  libnet-daemon-perl           0.38-1.1                Perl module for building portable Perl daemo
ii  libnewt0.52                  0.52.2-5.1ubuntu1       Not Erik's Windowing Toolkit - text mode win
ii  libopencdk8                  0.5.8-1                 Open Crypto Development Kit (OpenCDK) (runti
ii  libpam-foreground            0.3                     create lockfiles describing which users own
ii  libpam-modules               0.79-3.1ubuntu1         Pluggable Authentication Modules for PAM
ii  libpam-runtime               0.79-3.1ubuntu1         Runtime support for the PAM library
ii  libpam0g                     0.79-3.1ubuntu1         Pluggable Authentication Modules library
ii  libparted1.7-1               1.7.1-2.1ubuntu3        The GNU Parted disk partitioning shared libr
ii  libpcap0.8                   0.9.4-2                 System interface for user-level packet captu
ii  libpci2                      2.1.11-2                Obsolete shared library for accessing pci de
ii  libpcre3                     6.4-2ubuntu1            Perl 5 Compatible Regular Expression Library
ii  libplrpc-perl                0.2017-1.1              Perl extensions for writing PlRPC servers an
ii  libpopt0                     1.10-2                  lib for parsing cmdline parameters
ii  libreadline5                 5.1-7build1             GNU readline and history libraries, run-time
ii  libsasl2                     2.1.19.dfsg1-0.2ubuntu3 Authentication abstraction library
ii  libsasl2-modules             2.1.19.dfsg1-0.2ubuntu3 Pluggable Authentication Modules for SASL
ii  libselinux1                  1.30-1ubuntu1           SELinux shared libraries
ii  libsepol1                    1.12-1                  Security Enhanced Linux policy library for c
ii  libsigc++-2.0-0c2a           2.0.16-3                type-safe Signal Framework for C++ - runtime
ii  libslang2                    2.0.6-2                 The S-Lang programming library - runtime ver
ii  libss2                       1.39-1                  command-line interface parsing library
ii  libssl0.9.8                  0.9.8b-2ubuntu2         SSL shared libraries
ii  libstdc++6                   4.1.1-13ubuntu5         The GNU Standard C++ Library v3
ii  libsysfs2                    2.0.0-7                 interface library to sysfs
ii  libtasn1-3                   0.3.5-1                 Manage ASN.1 structures (runtime)
ii  libtext-charwidth-perl       0.04-4                  get display widths of characters on the term
ii  libtext-iconv-perl           1.4-3                   converts between character sets in Perl
ii  libtext-wrapi18n-perl        0.06-5                  internationalized substitute of Text::Wrap
ii  libusb-0.1-4                 0.1.12-2                userspace USB programming library
ii  libuuid1                     1.39-1                  universally unique id library
ii  libvolumeid0                 093-0ubuntu18           volume identification library
ii  libwrap0                     7.6.dbs-9               Wietse Venema's TCP wrappers library
ii  libxml2                      2.6.26.dfsg-2ubuntu4    GNOME XML library
ii  linux-image-2.6.17-10-server 2.6.17-10.33            Linux kernel image for version 2.6.17 on x86
ii  linux-image-server           2.6.17.10               Linux kernel image on Server Equipment.
ii  linux-server                 2.6.17.10               Complete Linux kernel on Server Equipment.
ii  linux-sound-base             1.0.11-5ubuntu1         base package for ALSA and OSS sound systems
ii  locales                      2.3.22                  common files for locale support
ii  login                        4.0.16-2ubuntu4         system login tools
ii  logrotate                    3.7.1-3                 Log rotation utility
ii  lsb-base                     3.1-10ubuntu4           Linux Standard Base 3.1 init script function
ii  lsb-release                  3.1-10ubuntu4           Linux Standard Base version reporting utilit
ii  lshw                         02.06-3ubuntu1          information about hardware configuration
ii  lsof                         4.77.dfsg.1-3           List open files
ii  ltrace                       0.4-1                   Tracks runtime library calls in dynamically
ii  makedev                      2.3.1-82ubuntu3         creates device files in /dev
ii  man-db                       2.4.3-3                 The on-line manual pager
ii  manpages                     2.34-1                  Manual pages about using a GNU/Linux system
ii  mawk                         1.3.3-11ubuntu2         a pattern scanning and text processing langu
ii  memtest86+                   1.65-1ubuntu2           thorough real-mode memory tester
ii  mii-diag                     2.11-2                  A little tool to manipulate network cards
ii  mime-support                 3.36-1                  MIME files 'mime.types' & 'mailcap', and sup
ii  mktemp                       1.5-2                   Makes unique filenames for temporary files
ii  module-init-tools            3.2.2-3ubuntu3          tools for managing Linux kernel modules
ii  mount                        2.12r-11ubuntu2         Tools for mounting and manipulating filesyst
ii  mtr-tiny                     0.71-2                  Full screen ncurses traceroute tool
ii  mysql-client-5.0             5.0.24a-9               mysql database client binaries
ii  mysql-common                 5.0.24a-9               mysql database common files (e.g. /etc/mysql
ii  mysql-server                 5.0.24a-9               mysql database server (current version)
ii  mysql-server-5.0             5.0.24a-9               mysql database server binaries
ii  nano                         1.3.12-2                free Pico clone with some new features
ii  ncurses-base                 5.5-2ubuntu1            Descriptions of common terminal types
ii  ncurses-bin                  5.5-2ubuntu1            Terminal-related programs and man pages
ii  net-tools                    1.60-17ubuntu1          The NET-3 networking toolkit
ii  netbase                      4.25ubuntu2             Basic TCP/IP networking system
ii  netcat                       1.10-32                 TCP/IP swiss army knife
ii  ntpdate                      4.2.0a+stable-9ubuntu2  The ntpdate client for setting system time f
ii  openssh-client               4.3p2-5ubuntu1          Secure shell client, an rlogin/rsh/rcp repla
ii  openssl                      0.9.8b-2ubuntu2         Secure Socket Layer (SSL) binary and related
ii  parted                       1.7.1-2.1ubuntu3        The GNU Parted disk partition resizing progr
ii  passwd                       4.0.16-2ubuntu4         change and administer password and group dat
ii  pciutils                     2.2.1-2ubuntu2          Linux PCI Utilities
ii  pcmciautils                  014-1ubuntu2            PCMCIA utilities for Linux 2.6
ii  perl                         5.8.8-6                 Larry Wall's Practical Extraction and Report
ii  perl-base                    5.8.8-6                 The Pathologically Eclectic Rubbish Lister
ii  perl-modules                 5.8.8-6                 Core Perl modules
ii  php5-common                  5.1.6-1ubuntu2          Common files for packages built from the php
ii  php5-mysql                   5.1.6-1ubuntu2          MySQL module for php5
ii  php5-mysqli                  5.1.6-1ubuntu2          MySQL Improved module for php5
ii  popularity-contest           1.33ubuntu2             Vote for your favourite packages automatical
ii  ppp                          2.4.4rel-1ubuntu1       Point-to-Point Protocol (PPP) daemon
ii  pppconfig                    2.3.12ubuntu1           A text menu based utility for configuring pp
ii  pppoeconf                    1.10ubuntu3             configures PPPoE/ADSL connections
ii  procps                       3.2.7-2ubuntu3          /proc file system utilities
ii  psmisc                       22.2-1                  Utilities that use the proc filesystem
ii  python                       2.4.3-11ubuntu3         An interactive high-level object-oriented la
ii  python-minimal               2.4.3-11ubuntu3         A minimal subset of the Python language (def
ii  python2.4                    2.4.4~c1-0ubuntu1       An interactive high-level object-oriented la
ii  python2.4-minimal            2.4.4~c1-0ubuntu1       A minimal subset of the Python language (ver
ii  readline-common              5.1-7build1             GNU readline and history libraries, common f
ii  reiserfsprogs                3.6.19-3ubuntu1         User-level tools for ReiserFS filesystems
ii  rsync                        2.6.8-2ubuntu3          fast remote file copy program (like rcp)
ii  sed                          4.1.5-1                 The GNU sed stream editor
ii  ssl-cert                     1.0.13                  Simple debconf wrapper for openssl
ii  startup-tasks                0.2.7-7                 definitions of essential tasks to run on sta
ii  strace                       4.5.14-1ubuntu2         A system call tracer
ii  sudo                         1.6.8p12-4ubuntu5       Provide limited super user privileges to spe
ii  sysklogd                     1.4.1-18ubuntu6         System Logging Daemon
ii  system-services              0.2.7-7                 definitions of essential system services
ii  sysv-rc                      2.86.ds1-14.1ubuntu16   System-V-like runlevel change mechanism
ii  sysvutils                    2.86.ds1-14.1ubuntu16   System-V-like utilities
ii  tar                          1.15.91-2               GNU tar
ii  tasksel                      2.50ubuntu7             Tool for selecting tasks for installation on
ii  tasksel-data                 2.50ubuntu7             Official tasks used for installation of Debi
ii  tcpd                         7.6.dbs-9               Wietse Venema's TCP wrapper utilities
ii  tcpdump                      3.9.4-4                 A powerful tool for network monitoring and d
ii  telnet                       0.17-32                 The telnet client
ii  time                         1.7-21                  The GNU time program for measuring cpu resou
ii  tzdata                       2006m-1ubuntu1          Time Zone and Daylight Saving Time Data
ii  ubuntu-keyring               2005.01.12.1            GnuPG keys of the Ubuntu archive
ii  ubuntu-minimal               1.30                    Minimal core of Ubuntu
ii  ubuntu-standard              1.30                    The Ubuntu standard system
ii  udev                         093-0ubuntu18           rule-based device node and kernel event mana
ii  upstart                      0.2.7-7                 event-based init daemon
ii  upstart-compat-sysv          0.2.7-7                 compatibility for System-V-like init
ii  upstart-logd                 0.2.7-7                 boot logging daemon
ii  usbutils                     0.72-4ubuntu2           USB console utilities
ii  util-linux                   2.12r-11ubuntu2         Miscellaneous system utilities
ii  util-linux-locales           2.12r-11ubuntu2         Locales files for util-linux
ii  vim-common                   7.0-035+1ubuntu5        Vi IMproved - Common files
ii  vim-tiny                     7.0-035+1ubuntu5        Vi IMproved - enhanced vi editor - compact v
ii  volumeid                     093-0ubuntu18           volume identification tool
ii  w3m                          0.5.1-4ubuntu2          WWW browsable pager with excellent tables/fr
ii  wget                         1.10.2-2ubuntu1         retrieves files from the web
ii  whiptail                     0.52.2-5.1ubuntu1       Displays user-friendly dialog boxes from she
ii  wireless-tools               28-1ubuntu2             Tools for manipulating Linux Wireless Extens
ii  wpasupplicant                0.5.4-5                 Client support for WPA and WPA2 (IEEE 802.11
ii  x11-common                   7.1.1ubuntu6            X Window System (X.Org) infrastructure
ii  xkb-data                     0.8-7ubuntu2            XKB data
ii  zlib1g                       1.2.3-13ubuntu2         compression library - runtime

使用容量

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda1              3652684    505300   2961836  15% /
varrun                  192924        44    192880   1% /var/run
varlock                 192924         0    192924   0% /var/lock
procbususb               10240        76     10164   1% /proc/bus/usb
udev                     10240        76     10164   1% /dev
devshm                  192924         0    192924   0% /dev/shm