Install and configure apache ubuntu in Linux initialize the root password sudo passwd root and then enter the password twice. The root password is set. getting software: http://httpd.apache.org/httpd-2.2.21.tar.gz 2. installation Steps: extract the source file: 1 tar zvxf httpd-2.2.21.tar.gz 2 cd httpd-2.2.213. /configure -- prefix =/usr/local/apache2 -- enable-so -- enable-rewrite 4 make5 make install run. the/configure command is used to compile the source code. -- prefix =/usr/local/apach2 is the system directory to which the compilation is installed. The -- enable-s parameter enables the httpd service to dynamically load the module function, -- enable-rewrite is to enable h The ttpd service has the web address rewriting function. 3. start apache:/usr/local/apache2/bin/apachectl start 4. add apache to the system service and use the service command to control apache startup and stop. First, use the apachectl script as the template to generate the Apache service control script: grep-v "#"/usr/local/apache2/bin/apachectl>/etc/init. d/apache use vi to edit the Apache service control script/etc/init. d/apache: vi/etc/init. d/apache inserts the following line at the beginning of the file to support the chkconfig command :#! /Bin/sh # chkconfig: 2345 85 15 # description: Apache is a World Wide Web server. save and exit the vi editor. Run the following command to add the Apache service control script execution permission: chmod + x/etc/init. d/apache: run the following command to add the Apache service to the System Service: chkconfig -- add apache: run the following command to check whether the Apache service has taken effect: the chkconfig -- list apache command outputs results similar to the following: apache 0: off 1: off 2: on 3: on 4: on 5: on 6: off indicates that the apache service has taken effect, the running Levels 2, 3, 4, and 5 are automatically started with the system startup. In the future, you can use the service command to control Apache startup and stop. Start Apache service: service apache start stop Apache service: service apache stop run the following command to disable automatic startup: chkconfig apache off