In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
How do I install apache and make the working mode work? This problem may be often seen in our daily work. Through this question, I hope you can gain more. Here are the steps to solve this problem.
I. View of apache mode
If apache is already installed, we can use the httpd-l command to view the current mode (there is only one possible). If we find prefork.c, we are currently working in prefork mode, while worker.c is working in worker mode.
If apache is not installed, we can add-- with-pem= (prefork | worker) when compiling.
Option determines which mode is enabled.
Of course, if you have installed it (the author's mode is prefork), you can also use the following command to switch
Mv httpd httpd.prefork
Mv httpd.worker httpd
After reboot, the mode will change.
Second, install apche
Because Apache depends on APR, APR-Util, and PCRE, you need to download:
APR + APR-Util: http://apr.apache.org/download.cgi
PCRE: http://sourceforge.net/projects/pcre/files/pcre/
1. Install apr
Tar zxvf apr-1.5.1.tar.gz (extract the file to the directory / home/gaoqing/software/apache)
. / configure--prefix=/home/gaoqing/software/apache/apr configuration installation directory
Make
Make install
2. Install apr-util
. / configure--prefix=/home/gaoqing/software/apache/apr-util-- with-apr=/home/gaoqing/software/apache/apr
Make & & make install
3. Install pcre
. / configure-- prefix=/home/gaoqing/software/apache/pcre
4. Install apache and specify the working mode as work
Download address: http://httpd.apache.org/
. / configure-prefix=/home/gaoqing/software/apache/apache-with-apr=/home/gaoqing/software/apache/apr-with-apr-util=/home/gaoqing/software/apache/apr-util-with-pcre=/home/gaoqing/software/apache/pcre-with-mpm=worker
Make & & make install
III. Configuration
Modify the configuration file, or there will be problems:
AH00558: httpd: Could notreliably determine the server's fully qualified domain name, using 127.0.1.1.Set the 'ServerName' directive globally to suppress this message
Solution: modify conf/httpd.conf to:
# ServerNamewww.example.com:80
Change to:
ServerNamelocalhost:80
IV: start, stop and restart apache services
Suppose your apahce installation directory is / usr/local/apache2, these methods are suitable for any situation
Apahce start command:
Recommended / usr/local/apache2/bin/apachectl start apaceh startup
Apache stop command
/ usr/local/apache2/bin/apachectl stop stop
Apache restart command:
/ usr/local/apache2/bin/apachectl restart restart
To restart the Apache server without interrupting the current connection, run:
/ usr/local/sbin/apachectl graceful
Service httpd start start
Service httpd restart restart
Servicehttpd stop out of service
On the compilation and installation of apache knowledge is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you like this article, you might as well share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.