Cainiao O & M notes: install and configure the Apache server, apache

Source: Internet
Author: User
Tags apache download

Cainiao O & M notes: install and configure the Apache server, apache

A few days ago, I spent 49.5 yuan on a month's host in Alibaba. Try again.

  • Region: Qingdao
  • ZONE: Qingdao Zone
  • CPU: 1 core
  • Memory: 512 MB
  • Bandwidth: 1 Mbps
  • Operating System: CentOS 6.5 64-bit
  • Yundun: Yes

Install the apache server

2014/10/27

Apache download package

Http://mirrors.hust.edu.cn/apache/httpd/

Download the latest version, including *. gz and *. bz2. The file compressed by the bz2 algorithm is a little smaller, but this file is not big, almost.

Upload two downloaded files to the server through ftp
  • Httpd-2.4.10.tar.bz2
  • Httpd-2.4.10-deps.tar.bz2 // The dependent package required

If the dependency already exists on the host, you do not need to download it.

Decompress the package to the same directory.

My directory is document

tar xvf httpd-2.4.10.tar.bz2 -C document/tar xvf httpd-2.4.10-deps.tar.bz2 -C document/
Start Compilation
./configure --prefix=/usr/local/apache2 --with-included-aprmake make install

Note:Prefix =The following directory is my installation directory, which can be specified at will
When executing the first line, the system prompts me That the pcre (a perl Library) is missing, and I wrote another pcre and compiled and installed it myself.

I went to the pcre official website to download small things, but it was not good for a long time. I had no choice but Baidu made a copy of domestic resources, and soon it was ready, and then compiled and installed.

Start apache
/usr/local/apache2/bin/apachectl start

An error is reported.AH0058Solution: Go to the conf directory under the installation directory of apache2, and open httpd. confServerNameComment on that line # Remove (My line is 189), and change the uri to your own domain name or IP address. For example:

ServerName localhost: 80

Change localhost to your public IP address or domain name. If you buy an Alibaba Cloud host, you will be given a public ip address.

In addition, you must note that the service must be enabled as root; otherwise, an error is reported.AH00072.

Test

Access it in your local browser! Enter the Host IP address in the browser. You do not need to specify port 80.
Then, the screen displays:

It works! The html file is in the htdocs directory under the apache installation directory. That is, the root directory of your website.

Which of the following is the path to the apache configuration file?

Hey, I have encountered the same situation as you. You must have used the following items in the etc file. The usr file is the new apache configuration file you have installed. This is not the case if you want to upgrade it, you should first Delete the one that comes with the system and then install the new one. Your phpmyadmin is a new version. Upgrade apache + php + mysql and try again. Good luck!

Apache server configuration problems

You have disabled Microsoft's "Internet Information Service". You can only use other servers if it is related to it or the port number is changed.

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.