Simple way to install Apache under aliyun linux server

  • 2020-05-09 19:47:53
  • OfStack

With the hot launch of ali cloud host, a lot of webmaster friends, also began to use ali cloud server.
The php program, for the most part, still runs on the host of the linux system.

Today, I will introduce the method of installing apache on the linux host of aliyun.

Cloud server operating system: CentOS 6.2 64-bit

Client operating environment: Mac OSX Teminal

Operation steps:

1. Run Terminal and enter the command:


ssh username@ip , and then enter your password. 

2. Install Apache software:


yum install httpd

3. Set Apache to run at server startup:


chkconfig --levels 235 httpd on

4. Configure the domain name in the Apache profile:


vi /etc/httpd/conf/httpd.conf To find  ServerName  , add "domain name :80 ", save and exit. 

5. Restart Apache:


service httpd restart

6. Visit the domain name configured in step 4 in the browser. If the page "Apache 2 Test Page powered by CentOS" appears, the configuration is successful.

Simple, however, the above is only to achieve the installation of apache service, the specific configuration, we still have to do it.


Related articles: