Current File : //proc/thread-self/root/usr/share/fastpanel2/bin/install-web.sh |
function InstallNginxRepository {
Debug "Configuring nginx repository.\n"
source /etc/os-release
Debug "Adding repository file /etc/yum.repos.d/nginx.repo "
echo -e "[nginx]\nname=nginx repo\nbaseurl=http://nginx.org/packages/centos/8/x86_64/\ngpgcheck=0\nenabled=1\nmodule_hotfixes=true\n" > /etc/yum.repos.d/nginx.repo || InstallationFailed
}
function InstallWebService {
Message "Installing web service: nginx, httpd, php\n"
InstallNginxRepository
yum install -y nginx httpd httpd-itk php php-fpm php-json php-mysqlnd.x86_64 php-gd php-opcache mod_fcgid mod_rpaf || InstallationFailed
# yum install -y nginx httpd httpd-itk php php-fpm php-mysqlnd.x86_64 php-gd php-ioncube mod_fcgid mod_rpaf || InstallationFailed
/usr/local/fastpanel2/fastpanel services configure -f -p nginx
/usr/local/fastpanel2/fastpanel services handle --name=nginx --action=enable
/usr/local/fastpanel2/fastpanel services handle --name=nginx --action=restart
/usr/local/fastpanel2/fastpanel services configure -f -p apache2
/usr/local/fastpanel2/fastpanel services handle --name=apache2 --action=enable
/usr/local/fastpanel2/fastpanel services handle --name=apache2 --action=restart
/usr/local/fastpanel2/fastpanel services handle --name=php7.2-fpm --action=enable
/usr/local/fastpanel2/fastpanel services handle --name=php7.2-fpm --action=restart
Success
}