GNU/Linux >> Linux Esercitazione >  >> Cent OS

Script:installa Joomla 3.7 su CentOS

In uno dei nostri post precedenti, abbiamo spiegato come installare Joomla 3 su Ubuntu 14.04. Joomla è un sistema di gestione dei contenuti (abbreviato in CMS):questo è un software intuitivo che ti consente di creare siti Web e gestire i contenuti dei tuoi siti Web in modo più semplice che mai.

In questo tutorial, a differenza della precedente guida all'installazione di Joomla, abbiamo scritto uno script per aiutarti a rendere l'installazione di Joomla 3.7 su un CentOS/Fedora VPS ancora più veloce e semplice. Questo script eseguirà automaticamente tutto ciò che dovrebbe essere fatto sul tuo server, inclusa la creazione di un database MySQL mentre creerà anche un host virtuale Apache per il tuo sito Web Joomla. Tutto quello che devi fare è creare un file sul tuo server contenente lo script seguente, quindi eseguire semplicemente lo script e inserire i tuoi dettagli quando richiesto.

(Nota:dovrai avere MySQL e Apache installati sul tuo server affinché questo script funzioni correttamente.

Dovrai anche indirizzare il tuo dominio all'indirizzo IP del tuo server modificando le informazioni del tuo server DNS. )

Crea un file sul tuo server con il tuo editor di testo preferito e copia questo script nel tuo file:

#!/bin/bash
# Install Joomla on a CentoOS/Fedora VPS
#

# Create MySQL database
read -p "Enter your MySQL root password: " rootpass
read -p "Database name: " dbname
read -p "Database username: " dbuser
read -p "Enter a password for user $dbuser: " userpass
read -p "Enter your server's public IP address: " address
mysql -uroot <<MYSQL_SCRIPT
CREATE DATABASE $dbname;
delete from mysql.user
where user='$dbuser'
and host = 'localhost';
flush privileges;
CREATE USER $dbuser@localhost;
GRANT ALL PRIVILEGES ON $dbname.* TO $dbuser@localhost IDENTIFIED BY '$userpass';
FLUSH PRIVILEGES;
MYSQL_SCRIPT
echo "New MySQL database has been successfully created"
sleep 2

# Download, unpack and configure Joomla
read -r -p "Enter your Joomla URL? [e.g. mydomain.com]: " joomlaurl
mkdir -p /var/www/html/$joomlaurl && \
wget -P /var/www/html/$joomlaurl \
https://downloads.joomla.org/cms/joomla3/3-7-2/Joomla_3-7.2-Stable-Full_Package.zip && \
cd /var/www/html/$joomlaurl
echo "Installing unzip package if necessary..." && yum -yq install unzip
sleep 3
unzip Joomla*.zip && rm -f Joomla_*.zip && \
chown apache: -R /var/www/html/$joomlaurl
killall httpd

# Create the Apache virtual host
echo "

<VirtualHost $address:80>
 ServerName www.$joomlaurl
 DocumentRoot "/var/www/html/$joomlaurl"
 DirectoryIndex index.php
 Options FollowSymLinks
 ErrorLog logs/$joomlaurl-error_log
 CustomLog logs/$joomlaurl-access_log common
</VirtualHost>

" >> /etc/httpd/conf/httpd.conf
service httpd restart

echo -en "\aPlease go to http://www.$joomlaurl and finish the installation\n"

#End of script

Rendi eseguibile lo script, quindi esegui lo script:

chmod +x <script name> && ./<script name>

(Sostituisci con il nome che hai assegnato al tuo file)

Dopo aver eseguito lo script, avrai installato correttamente Joomla 3.7 sul tuo CentOS o Fedora VPS! Tutto ciò che resta da fare è configurare il resto di Joomla nel tuo dominio web.

Ovviamente, non devi fare nulla di tutto ciò se utilizzi uno dei nostri servizi di hosting Joomla VPS, nel qual caso puoi semplicemente chiedere ai nostri esperti amministratori Linux di installare Joomla per te. Sono disponibili 24 ore su 24, 7 giorni su 7 e si prenderanno immediatamente cura della tua richiesta.

PS. Se ti è piaciuto questo post, condividilo con i tuoi amici attraverso i social network utilizzando i pulsanti qui sotto, o semplicemente lascia una risposta qui sotto. Grazie.


Cent OS
  1. Installa MariaDB 10.0 su CentOS 6

  2. Installa PHP 7.4 su CentOS 8

  3. Installa ownCloud su CentOS 6

  4. Installa Fail2ban su CentOS

  5. Come installare Joomla 3 su CentOS 7

Come installare R su CentOS 8

Come installare Joomla 3.7.2 su CentOS 7 / RHEL 7

Installa Keepalived su CentOS 8

Come installare Joomla su CentOS 7

Come installare Joomla su CentOS 6

Come installare Joomla su CentOS 8