Introduction:
Apache (transliterated as Apache) is the world's number one Web server software. It can run on almost all widely used computer platforms and is one of the most popular web server-side software due to its cross-platform and security features. It is fast, reliable and can be extended through a simple API to compile interpreters such as Perl/Python into the server.
The specific method is as follows:
1: Check whether apache has been installed on the server, stop and uninstall the system's own apache service
The command is:
rpm -qa|grep httpd rpm -e --nodeps httpd-tools..
2: After the uninstallation is completed, upload all the packages required for httpd service installation
The installation package cloud disk address is: http: //pan.baidu.com/s/1qYTgomo Password: nk7z
I uploaded it to the /usr/local directory, then decompressed and installed
Three: Install the above installation packages in order Installation
Install apr, solve the problem of apr not found
##Install apr-util, solve the problem of apr-util not foundInstall pcre and solve the problem of pcre not foundInstall httpd[root@zdhcs5 local]# tar zxvf httpd-2.4.7.tar.gz [root@zdhcs5 local]# cd httpd-2.4.7 [root@zdhcs5 httpd-2.4.7]# ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre (除了指定Apache的安装目录外,还要安装apr、apr-util、pcre,并指定参数) [root@zdhcs5 httpd-2.4.7]# make [root@zdhcs5 httpd-2.4.7]# make install
1 [root@zdhcs5 bin]# cd /usr/local/apache2/bin/ 2 [root@zdhcs5 bin]# ./apachectl start
1 [root@zdhcs5 local]# vi /usr/local/apache2/conf/httpd.conf
1 [root@zdhcs5 local]# cd /usr/local/apache2/bin 2 [root@zdhcs5 bin]# ./apachectl stop 3 [root@zdhcs5 bin]# ./apachectl start
1 [autotest@zdhcs5 html]$ chmod -R 775 /home/autotest/workspace/auto-project/test-output/html
Now you have installed apache under Linux and modified the default path to a custom path. Related recommendations:
The above is the detailed content of Modify the default path of apache server under linux. For more information, please follow other related articles on the PHP Chinese website!