失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > Ubuntu Linux上的Joomla安装

Ubuntu Linux上的Joomla安装

时间:2023-08-02 21:48:29

相关推荐

Ubuntu Linux上的Joomla安装

您想了解如何在Ubuntu Linux上安装Joomla吗? 在本教程中,我们将向您展示如何在运行Ubuntu Linux的计算机上安装,配置和访问Joomla CMS。

•Ubuntu Linux版本:18.04

硬件清单:

以下部分介绍了用于创建此Joomla教程的设备列表。

处理器

主机板

硬盘

电源

电源线

上面列出的每一件硬件都可以在亚马逊网站上找到。

Joomla相关教程:

在此页面上,我们提供了与Joomla相关的教程列表的快速访问。

教程列表

教程 - Ubuntu Linux上的NTP

首先,我们将使用NTP配置系统以使用正确的日期和时间。

在Linux控制台上,使用以下命令设置正确的时区。

# dpkg-reconfigure tzdata

安装Ntpdate包并立即设置正确的日期和时间。

# apt-get update

# apt-get install ntpdate

#ntpdate pool.ntp.br

Ntpdate命令用于使用server:pool.ntp.br设置正确的日期和时间

我们来安装NTP服务。

# apt-get install ntp

NTP是保持我们的服务器更新的服务。

使用命令日期检查Ubuntu Linux上配置的日期和时间。

# date

如果系统显示正确的日期和时间,则表示您已正确执行所有步骤。

教程 - 在Ubuntu Linux上安装MySQL

现在,我们可以继续安装数据库服务。

在Linux控制台上,使用以下命令安装所需的软件包。

# apt-get update

# apt-get install mysql-server mysql-client

完成安装后,使用以下命令访问MySQL数据库服务器。

# mysql -u root -p

使用以下SQL命令创建名为Joomla的数据库。

CREATE DATABASE joomla CHARACTER SET UTF8 COLLATE UTF8_BIN;

使用以下SQL命令创建名为joomla的数据库。

CREATE USER 'joomla'@'%' IDENTIFIED BY 'kamisama123';

为名为joomla的数据库提供名为joomla的sql用户权限。

GRANT ALL PRIVILEGES ON joomla.* TO 'joomla'@'%';

quit;

教程 - 在Linux上安装Apache

现在,我们需要安装Apache Web服务器和所有必需的软件。

在Linux控制台上,使用以下命令安装所需的软件包。

#apt-get install apache2 php7.2 php7.2-mysql libapache2-mod-php7.2

#apt-get install php7.2-mbstring php7.2-xmlphp7.2-zip

启用Apache mod_rewrite并编辑apache2.conf文件。

# a2enmod rewrite

# vi /etc/apache2/apache2.conf

在配置之前,这是原始文件。

DefaultRuntimeDir ${APACHE_RUN_DIR}

PidFile ${APACHE_PID_FILE}

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 5

User ${APACHE_RUN_USER}

Group ${APACHE_RUN_GROUP}

HostnameLookups Off

ErrorLog ${APACHE_LOG_DIR}/error.log

LogLevel warn

IncludeOptional mods-enabled/*.load

IncludeOptional mods-enabled/*.conf

Include ports.conf

<Directory />

Options FollowSymLinks

AllowOverride None

Require all denied

</Directory>

<Directory /usr/share>

AllowOverride None

Require all granted

</Directory>

<Directory /var/www/>

Options Indexes FollowSymLinks

AllowOverride None

Require all granted

</Directory>

AccessFileName .htaccess

<FilesMatch "^.ht">

Require all denied

</FilesMatch>

LogFormat "%v:%p %h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" vhost_combined

LogFormat "%h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" combined

LogFormat "%h %l %u %t "%r" %>s %O" common

LogFormat "%{Referer}i -> %U" referer

LogFormat "%{User-agent}i" agent

IncludeOptional conf-enabled/*.conf

IncludeOptional sites-enabled/*.conf

在文件末尾添加以下行。

<Directory /var/www/html>

AllowOverride All

</Directory>

这是我们配置的新文件。

DefaultRuntimeDir ${APACHE_RUN_DIR}

PidFile ${APACHE_PID_FILE}

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 5

User ${APACHE_RUN_USER}

Group ${APACHE_RUN_GROUP}

HostnameLookups Off

ErrorLog ${APACHE_LOG_DIR}/error.log

LogLevel warn

IncludeOptional mods-enabled/*.load

IncludeOptional mods-enabled/*.conf

Include ports.conf

<Directory />

Options FollowSymLinks

AllowOverride None

Require all denied

</Directory>

<Directory /usr/share>

AllowOverride None

Require all granted

</Directory>

<Directory /var/www/>

Options Indexes FollowSymLinks

AllowOverride None

Require all granted

</Directory>

AccessFileName .htaccess

<FilesMatch "^.ht">

Require all denied

</FilesMatch>

LogFormat "%v:%p %h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" vhost_combined

LogFormat "%h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" combined

LogFormat "%h %l %u %t "%r" %>s %O" common

LogFormat "%{Referer}i -> %U" referer

LogFormat "%{User-agent}i" agent

IncludeOptional conf-enabled/*.conf

IncludeOptional sites-enabled/*.conf

<Directory /var/www/html>

AllowOverride All

</Directory>

现在,您应该在系统上找到php.ini文件的位置。

找到后,您需要编辑php.ini文件。

#updatedb

#locate php.ini

#vi/etc/php/7.2/apache2/php.ini

请记住,您的PHP版本和文件的位置可能与我的不同。

在配置之前,这是原始文件。

file_uploads = On

max_execution_time = 30

memory_limit = 128M

post_max_size = 8M

max_input_time = 60

; max_input_vars = 1000

output_buffering = 4096

这是我们配置的新文件。

file_uploads = On

max_execution_time = 300

memory_limit = 256M

post_max_size = 32M

max_input_time = 60

max_input_vars = 4440

output_buffering = off

您还应该手动重启apache并验证服务状态。

#service apache2 stop

#service apache2 start

#service apache2 status

以下是APache服务状态输出的示例。

● apache2.service - LSB: Apache2 web server

Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)

Drop-In: /lib/systemd/system/apache2.service.d

└─apache2-systemd.conf

Active: active (running) since Mon -04-23 00:02:09 -03; 1min 4s ago

教程 - Ubuntu上的Joomla安装

现在,我们需要在Ubuntu Linux上安装Joomla CMS。

在Linux控制台上,使用以下命令下载Joomla软件包。

# mkdir /downloads/joomla

# cd /downloads/joomla

# wget -O joomla_3-9-1-stable-full_package-tar.gz /cms/joomla3/3-9-1/joomla_3-9-1-stable-full_package-tar-gz?format=gz

#tar -zxvf joomla_3-9-1-stable-full_package-tar.gz

将所有Joomla文件移动到Apache安装的根目录。

为所有移动的文件设置正确的文件权限。

# mv /downloads/joomla /var/www/html/

# chown www-data.www-data /var/www/html/joomla/* -R

打开浏览器并输入Web服务器的IP地址和/ joomla。

在我们的示例中,在浏览器中输入了以下URL:

•http://35.162.85.57/joomla

应该呈现Joomla Web界面界面。

选择所需的语言。

您必须输入以下信息:

•您的网站名称。

•您的网站说明。

•您的管理员用户名。

•您的管理员密码。

•您的管理员电子邮件帐户。

输入Joomla数据库的MySQL连接信息。

验证是否成功满足所有Joomla PHP要求。

选择None选项,然后单击Install按钮。

等待Joomla安装完成。

完成安装后,您需要删除Joomla安装文件夹。

在Linux控制台上,使用以下命令删除安装文件夹。

#rm /var/www/html/joomla/installation -rf

单击“管理员”按钮。

单击Administrator按钮后,您将被发送到Joomla登录屏幕。

在Joomla登录屏幕上,输入管理员用户名和密码。

成功登录后,您将被发送到Joomla仪表板。

恭喜,您已经在Ubuntu Linux上安装了Joomla。

如果觉得《Ubuntu Linux上的Joomla安装》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。