JOOMLA je podobný CMS redakčný systém, ako je napríklad WordPress. Nižšie si ukážeme inštaláciu JOMMLA na Debian 9
apt-get update -y
apt-get upgrade -y
Nainštalujte Apache
apt-get install apache2 libapache2-mod-php7.0 -y
Teraz spustite Apache a povoľte Apache pri spustení systému
systemctl start apache2
systemctl enable apache2
Nainštalujte PHP7
apt-get install php7.0 php7.0-cli php7.0-mcrypt php7.0-intl php7.0-mysql php7.0-curl php7.0-gd php7.0-soap php7.0-xml php7.0-zip php7.0-readline php7.0-opcache php7.0-json php7.0-gd -y
Upravte php.ini Musíte upraviť následovné riadky.
nano /etc/php/7.0/apache2/php.ini
memory_limit = 256M
upload_max_filesize = 32M
post_max_size = 32M
date.timezone = Europe/Bratislava
Nainštalujte a nakonfigurujte MariaDB
apt-get install mariadb-server -y
Po inštalácií spustite službu a nastavte, aby sa spúšťala priamo so systémom
systemctl start mysql
systemctl enable mysql
mysql_secure_installation
Budete mať otázky, niečo v tomto tvare
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
You already have a root password set, so you can safely answer 'n'.
Change the root password? [Y/n] n
... skipping.
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] Y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] Y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] Y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
Vytvorte užívateľa root
mysql -u root -p
CREATE DATABASE joomla_db;
CREATE USER joomla@localhost;
SET PASSWORD FOR 'joomla'@'localhost' = PASSWORD("password");
GRANT ALL PRIVILEGES ON joomla_db.* TO 'joomla'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit;
Nainštalujte JOOMLA
wget https://github.com/joomla/joomla-cms/releases/download/3.7.3-rc1/Joomla_3.7.3-rc1-Release_Candidate-Full_Package.tar.gz
Vytvorte priečinok joomla
mkdir /var/www/html/joomla
tar -xvzf Joomla_3.7.3-rc1-Release_Candidate-Full_Package.tar.gz -C /var/www/html/joomla
Zmeňte práva
chown -R www-data:www-data /var/www/html/joomla
chmod -R 750 /var/www/html/joomla
Teraz vytvorte Apache virtualhost pre Joomla. Vytvorte joomla.conf
nano /etc/apache2/sites-available/joomla.conf
<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DirectoryIndex index.php
DocumentRoot /var/www/html/joomla
ServerName 80-211.164.25
ServerAlias www.yourdomain.com
<Directory /var/www/html/joomla>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/joomla-error_log
CustomLog /var/log/apache2/joomla-access_log common
</VirtualHost>
Uložte to
Teraz zakážte defaultný virtualhost a povoľte Joomla virtualhost file
a2dissite 000-default
a2ensite joomla
Nakoniec reštartujte Apache a aplikujte zmeny
systemctl restart apache2
Prístup na JOOMLA
Nainštalujte ufw
apt install ufw
apt ufw enable
apt install ufw
Povoľte práva pre Firewall
ufw allow http
utf allow ssh
Teraz sa prihláste buď cez IP adresu na server, alebo cez doménu. Ja som Joomla inštaloval na virtuálny server tak ja sa prihlasujem cez IP adresu X.X.X.X
Zvoľte:
Zvoľte inštalácia
Na úvodnú stánku sa dostanete pomocou X.X.X.X/administrator