Configuring Servers from scratch

Source: Internet
Author: User
Tags gz file interface mysql ssh access phpmyadmin root directory linux
Configuring Servers from scratch

(i) Hardware preparation

One hp ProLiant DL160 G5 Server (hard drive extends to 480G)

A personal computer (Windows operating system)

One Lenovo 4G Flash memory (FAT32 format)

(b) The production of Guide U disk

There are many online production of Linux guide U disk articles, but really can use a few, during the trial of several methods, have failed. The most feasible and simplest method is described directly below.

Download u disk boot tool, a total of three files, has been packaged, download address: http://www.filesavr.com/u-boot

Unzip the syslinux-3.73.tar.gz file, ctrl+r enter cmd to open a command prompt, and then use the CD command to enter the Win32 folder in the syslinux-3.73 directory

Syslinux.exe-m-A x:x is a U disk letter

After the command has been completed, a bootable file has been set up on the USB drive, which is, of course, hidden.

Create this file in the U disk syslinux.cfg (edit with Notepad or WordPad, note that you first select the display suffix in the Control Panel-folder option) and add it inside

Default Vmlinuz

Append initrd=initrd.gz

Then transfer the vmlinuz,initrd.gz in the U-boot package to the U disk.

Finally from the http://cdimage.debian.org/debian-cd/5.0.3/i386/iso-cd/download Debian-503-i386-cd-1.iso image and transfer to the U disk.

At this point, U disk boot disk production completed.

(iii) installation of Debian

Insert the U disk, start the server, BIOS by default from the U disk boot, so I do not need to set up here.

Enter the character installation interface, as prompted to operate, to detect the disk that step out of the USB drive, to be completed after the partition plug, back to press ERC to choose to mount the ISO image, install the basic system, select the package (here only select the desktop environment and the standard system, the desktop environment is installed for easy configuration), install GRUB, Install Debian complete, unplug u disk and reboot the server.

After I reboot, after a blue selection of Debian mode interface, I am prompted not to find root error-root (hd1,0).

Don't panic, then press ERC to return to the Debian mode selection interface, press C, this is the fix grub interface, move to root (hd1,0), press E to edit root, change to

Root (hd0,0)

Enter, and finally press B to start normally.

Access to systems, landings, attachments, terminals

Su enters the root password to exercise root privileges

Vim/boot/grub/menu.lst

Pull to the bottom and find the "#" prefix in front.

Root (hd0,1)

To

Root (hd0,0)

This installation of Debian is complete.

(iv) Configuration source

After the installation, found that Apt-get install any software failed to view the source configuration file, the problem is that there is only one underlying source, and no software source. Direct Google:debian source. Select one randomly according to your network and then enter the terminal

Apt-get Install Apt-spy

If the source is not a problem, you can use Apt-spy once the installation is complete.

Cp/etc/apt/sources.list/etc/apt/sources.list.bak Backup Source

Apt-spy-d lenny-a Asia searches for the fastest source of Asian territory

Scan to generate/etc/apt/sources.list.d/apt-spy.list files, this can actually be used as a sources.list file.

Cp/etc/apt/sources.list.d/apt-spy.list/etc/apt/sources.list overwrite the original sources.list file

(v) Rapid set-up of the environment

Terminal input:

Apt-get Install lighttpd php5-cgi php5-mysql mysql-server php5-gd phpMyAdmin

Then follow the method of my article to configure LIGHTTPD, address: http://youling.wordpress.com.cn/debian-lighttpd-php-mysql.html

VSFTPD according to the information here based on their own needs configuration, address: HTTP://WIKI.UBUNTU.ORG.CN/VSFTPD Service installation settings

If you need extranet access phpMyAdmin, enter the following command to establish a soft connection:

Ln-s/usr/share/phpmyadmin//var/www/root permission mode.

Finally, the SSH installation configuration.

Apt-get Install Openssh-server

Configuring SSH

Vim/etc/ssh/sshd_config

Here are the relevant information, according to their own needs configuration, address: http://www.diybl.com/course/6_system/linux/Linuxjs/20090903/173704.html

At this point, the server configuration is complete.

(vi) test work

Use the FTP software to upload a probe to the Web root directory.

Access http://127.0.0.1 to view the final results.

Zend or other PHP accelerators can be installed on their own, very simply, here is no longer tired.

Tip: If you modify a service's configuration file, use the/etc/init.d/service name Resart to complete the reboot, for example:

/etc/init.d/ssh Resart



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.