Ubuntu LAMP Server
Get this content from link
http://www.zaphu.com/2007/08/07/ubuntu-lamp-server-setup-guide-with-desktop-gui/
Step 1: Install Ubuntu Server Edition with LAMP server components.
Download the disk image (*iso) for Ubuntu Server Edition (currently version 8.04 Hardy Heron) and burn it to a CD. Ensure that your BIOS is configured to boot from the CD-ROM drive. Restart with the Ubuntu disk in the drive and the machine should boot into the Ubuntu installation shell. If you would like to configure a static IP address, select F6 - Other Options and enter
netcfg/disable_dhcp=true
at the end of the options string, and the install script will prompt you for network information during the installation. Otherwise, the static IP must be configured post installation as per the second part of step 2 below, and your network will be automatically configured using DHCP (as long as DHCP is enabled on your router). In either scenario, you must enter a hostname when prompted.
As you work through the installation (most of which is self explanatory), you will also be prompted to select a partitioning method. The most straightforward method is “use entire disk”, which will format a drive of your choice before installing system files to it. Finally, you will be prompted to enter a full name and a short name for a non-administrator account (separate from root). After a few more trivial questions (like “What is your time zone?”), and a plethora of file copying, the install shell will ask you to select optional software to install. Select LAMP (using the arrow keys and spacebar). If you wish to install a name server as well, you may select DNS and follow the instructions of this post. You may also elect to install an OpenSSH server at this point and bypass the first component of step 3 below. After making selections, continue the installation by pressing enter. At some point, you will be prompted to enter a mysql root user password. If you wish, this password can be left blank for now.
Step 2: Enable root access and configure a static IP address.
After installation finishes and the system reboots, log in using the non-administrator account created during installation. (Note: my system hung after reboot and I had to press enter to get the login prompt.) The first thing you will probably want to do once you log in is set the root password (by default the password is left blank). To do so, type the following at the command prompt.
sudo passwd root
Since you are planning to use the machine as a web server, you will also need to specify a static IP address (if not already configured during the installation). To do so, you must edit the interfaces configuration file (use your favorite text editor; I use vi here).
sudo vi /etc/network/interfaces
If DHCP was enabled during installation, a chunk of this file should look like the following:
auto eth0
iface eth0 inet dhcp
Change dhcp to static and add the lines shown below. Of course you need to use your IP address, netmask, and gateway instead of mine.
auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
You also need to specify the DNS server(s) in the resolv.conf file.
sudo vi /etc/resolv.conf
Replace the xxx.xxx.xxx.xxx in the nameserver xxx.xxx.xxx.xxx line with the address of your DNS server. You can add multiple DNS servers if you like by duplicating this line using other DNS server addresses. Now restart your network components.
sudo /etc/init.d/networking restart
Ping www.zaphu.com (or some weblog of lesser quality) to make sure your network configuration is working.
Step 3: Install OpenSSH and Ubuntu Desktop components.
If you didn’t do so during the installation, you will probably want to install an SSH server at this point so you can login to your new LAMP server from other machines on your local area network. Installing packages is a snap with Ubuntu using the built in aptitude package management software. The first step is to update the packages database by typing
sudo aptitude update
Then install the openssh-server package.
sudo aptitude install openssh-server
You need to insert the Ubuntu Server installation disk to complete the installation. Installation of the Ubuntu desktop environment (and all of the goodies that go with it) is also a snap using aptitude. Type
sudo aptitude update
sudo aptitude install ubuntu-desktop
Because a significant number of files need to be downloaded, the Ubuntu GUI installation may take some time. Near the middle of the installation you will be asked to configure the Postfix mail transfer agent. Since my machine is not going to be a mail server I selected ‘no configuration’ and continued, but you may want to configure Postfix differently. Check out Ubuntu Forums for information on configuring Postfix. When the Ubuntu desktop installation finishes, fire up the GUI.
sudo /etc/init.d/gdm start
Congratulations, you now have a fully operational Ubuntu LAMP server with the niceties of the Ubuntu desktop environment. In a follow-up post, I walk you through the setup of a website on your new server and the installation of phpMyAdmin to help manage all of those mySQL databases you will be creating.
If this guide leaves you scratching your head, check out the related posts on these weblogs: Debian Admin, spoffle
If you liked this guide, show support by leaving comments and visiting our sponsors.
Nhận xét
Đăng nhận xét