同时安装了nginx和apache的情况下,怎样给apache升级?

问答中心分类: OneinStack同时安装了nginx和apache的情况下,怎样给apache升级?
海浪 asked 7 年 ago
安装了lnmpa环境,使用upgrade.sh,升级web,就直接让输入nginx的版本进行升级了,怎样升级apache呢?

3 Answers
oneinstack answered 7 年 ago
升级完nginx后,如果不要升级写相同版本, nginx完成后,应该会有apache升级版本输入。

海浪 answered 7 年 ago
输入相同版本号后,出现这样的提示:
input error! Upgrade Nginx version is the same as the old version              
Please input upgrade Nginx Version(default: 1.12.2):                           

oneinstack answered 7 年 ago

将upgrade.sh 中如下:

 80 if [ -e "$nginx_install_dir/sbin/nginx" ]; then
81 Upgrade_Nginx
82 elif [ -e "$tengine_install_dir/sbin/nginx" ]; then
83 Upgrade_Tengine
84 elif [ -e "$openresty_install_dir/nginx/sbin/nginx" ]; then
85 Upgrade_OpenResty
86 elif [ -e "${apache_install_dir}/conf/httpd.conf" ]; then
87 Upgrade_Apache
88 fi

改成: 

 80 if [ -e "${apache_install_dir}/conf/httpd.conf" ]; then
87 Upgrade_Apache
82 elif [ -e "$tengine_install_dir/sbin/nginx" ]; then
83 Upgrade_Tengine
84 elif [ -e "$openresty_install_dir/nginx/sbin/nginx" ]; then
85 Upgrade_OpenResty
86 elif [ -e "$nginx_install_dir/sbin/nginx" ]; then
81 Upgrade_Nginx
88 fi