首页 > 编程知识 正文

安装apache服务的命令,Apache安装

时间:2023-05-03 12:57:25 阅读:114269 作者:1192

绿色脚本#!/bin/bash Apache=httpd-2.4.41.tar.gz path=/usr/local/htpdconfig='-- prefix=$ path-- enable-so-- enable-rewrite-- enable-charset-lite-- enable-CGI ' evellibdb-devel OpenLDAP-devel/dev/nullif [-e $ Apache ]; thenecho-e ' 033 [ 32 mthehttpdpackageinstallsuccessfully! 033 [ 0m ' tar-zxf $ Apache-c/root if [ $? -eq 0 ]; thenecho-e ' 033 [ 32 munzipiscomplete! 033 [ 0m ' cdhttpd-2.4.41./configure $ config/dev/nullif [ $? -eq 0 ]; thenecho-e ' 033 [ 32 mconfigiscomplete! 33[0m'make /dev/nullif [ $? -eq 0 ]; thenecho-e ' 033 [ 32 mmakeissuccessfully! 033 [ 0m ' make install/dev/nullif [ $? -eq 0 ]; thenecho-e '33 [ 32 mmakeinstalliscomplete! ]33 [ 0m ' else echo-e '33 [ 31 mmakeinsatllisfailed! ]! 033 [ 0m ' exitfielseecho-e ' 033 [ 31 mmakeisfailed! 033 [ 0m ' eixtfielseecho-e ' 033 [ 31 mconfigisfailed! 033 [ 0m ' exitfielseecho-e '33 [ 31 munzipiserror! ]! 033 [ 0m ' exitfielseecho-e '33 [ 31 mthehttpdpackageisnotexists! ]! (033 ) 0m'EXITfiif(-e$path/bin ); then CP $ path/bin/apachectl/etc/init.d/httpd/dev/nullif [ $? -eq 0 ]; then sed-I ' 3i # chkconfig :358521n # description 3360 startupscriptfortheapachehttpdservier '/etc/init.d/httpp thenchkconfig --add httpdif [ $? -eq 0 ]; thenecho-e ' 033 [ 32 maddsystemserverissuccessfully! 033 [ 0m ' else echo-e '33 [ 31 maddsystemserverisfailed! ]! 033 [ 0m ' exitfielseecho-e ' 033 [ 31 msedacpachectlerror! ]! 033 [ 0m ' exitfielseecho-e '33 [ 31 mcpacpachectlerror! ]! 033 [ 0m ' exitfielseecho-e '33 [ 31 mthe $ pathisnotexists! 033 [ 0m ' exitfisystemctlstarthttpd/dev/nullif [ $? -eq 0 ]; thenecho-e '33 [ 32 mtheapacheserverisrun! ] 033 [ 0m ' elsesystemctlrestarthttpd/dev/nullif [ $? -eq 0 ]; thenecho-e '33 [ 32 mtheapacheserverisrun! ]33 [ 0m ' else echo-e '33 [ 31 mtheapacheserveruperror! ] 033 [ 0m ' exit Fifi [ root @ haha~] # sh Apache.shthehttpdpackageinstallsuccessfully! unzip is完成! Config is complete! Make is successfully! 制造安装is完成! Add system server is successfully! The apache server is run!

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。