The experiment was to install Apache, and I turned on the rh6-2 virtual machine.
First step: Prepare the Environment package, package
- To create a yum repository:
Mount Device:
First switch to the ETC directory:
The following are the last items in the directory listing:
The Yum repository is established under the YUM.REPOS.D directory (delete all contents of this directory):
Delete and then re-build a directory and edit it with the VI editor:
Enter A to enter:
Note: The path in BASEURL=FILE:///MNT is the path that is mounted, file://is the fixed format,/mnt mount Path, this experiment is mounted to the MNT directory.
After input, press: Return to the last line mode, enter Wq save, then return to the following interface with Cat view:
Then enter the Yum list to see if the Yum repository can be used:
- File sharing:
I put the package in the Lamp folder under the C drive.
Then click "Add" and the following screen will appear:
Right is the permission setting, select Read, and then select Share:
Unblock guest and set local policy permissions (user rights Assignment and security options) I've written about it in previous experiments, and it's not clear that I can look through my previous blogs.
Next scan the shared file:
Create an empty folder and mount it:
Since the compression package is under/lamp, switch to/lamp for decompression:
Unzip three compressed packets (all extracted to/opt):
For the compression pack to be used, place them under httpd):
Step Two: Install the package
Since we have already built a yum warehouse, we use the Yum warehouse to install it directly:
GCC gcc-c++ pcre Pcre-devel is the package we want to install:
Step Three: Configure the software module
You must first switch to httpd-2.4.2:
Then enter the following:
Note: There may be an error here, and if there is an error, enter the content again.
Fourth step: Convert the configuration file to binary
A single statement can:
Fifth Step: Install
Make install is the command to install
Sixth step: Search for XXX startup scripts and service profiles
Service startup script:
First, be aware that the service startup script is under/usr/local/apache/:
/ETC/INIT.D/HTTPD the script file and overwrite it with the following:
To turn httpd into an executable script file:
Edit using the VI Editor:
o Enter on the previous line of the cursor:
Wq to Save:
To see if httpd is executable:
If it is not executable, enter "chmod +x/etc/init.d/httpd" to
To view the startup status of the HTTPD service:
3 is the character interface, 5 is a graphical interface, you can set 3 and 5 to boot from:
Service configuration file:
Service configuration file under/usr/local/apache/conf/httpd.conf
Editing with the VI editor
Find Listen (that is, port):
To modify the contents of:
Open the IPV4 port and remove the # number
Close the IPV6 port and add the # number
Find ServerName:
To modify the content:
To turn on the ServerName function:
To open the HTTPD service:
Check to see if the HTTPD port 80 is open:
To gain access to Linux, you must turn off the firewall and turn on secure XXX:
The following can be accessed by Linux:
Enter your Linux IP address in the URL:
Manually Compile and install Apache