如何安装 WordPress 3.9 和 Apache2 MySQL 5.5 PHP_MySQL
WordPressApache
WordPress 是用 PHP 和 MySQlas 默认数据库编写的免费开源博客工具。它可能是当今最简单、最强大的博客和网站内容管理系统(orCMS)。此外, WordPress 是一种在网络上获取信息的方式。它最初是为博客作者设置的,现在用于构建大大小小的网站。它现在是世界上最大的自托管网站建设工具。
本教程将描述如何在 Ubuntu Server 14.04 LTS 中安装带有 Apache2、Mysql5.5 和 PHP 5.5 的全新 WordPress 3.9 的基本步骤。
第 1 步:设置 LAMP 堆栈
在安装 WordPress 之前,您需要在 Ubuntu Server14.04 上安装 LAMP(Linux、Apache2、MySQL5 和 PHP5)堆栈。如果您尚未安装和配置这些组件,您可以使用本教程来了解如何在 Ubuntu Server 14.04 上安装 LAMP Stack。
第 2 步:为 WordPress 创建数据库和用户
通过键入以下命令以 root 用户身份登录到 mysqlserver
mysql -u root -p
成功登录到 Mysql Server 后,使用这些命令为 WordPress 创建数据库。在本例中,我会将 WordPress 数据库的名称指定为 dbwordpress, 您可以随意命名它。
CREATE DATABASE dbwordpress;
接下来,我们将创建一个单独的 MySQL 用户帐户并为该用户提供密码。在这种情况下,我将调用新帐户 “wpuser” 和新帐户的密码“ wpP@5sw0Rd ”,您一定要更改安装的密码,并且可以将用户命名为任何名称你愿意。 您可以通过键入以下命令来完成此操作:
CREATE USER wpuser@localhost IDENTIFIED BY 'wpP@5sw0Rd';
接下来,通过运行以下命令将刚刚创建的数据库的所有权限授予新用户
GRANT ALL PRIVILEGES ON dbwordpress.* TO wpuser@localhost;
我们需要刷新权限,以便 MySQL 的当前实例知道我们最近所做的权限更改:
FLUSH PRIVILEGES;
最后,我们通过输入以下内容退出 MySQL 终端:
exit;
第 3 步:下载 WordPress 最新版本
进入 Apache 的文档根目录:
cd /var/www/html
使用以下命令从项目网站下载 WordPress 最新版本:
sudo wget http://wordpress.org/latest.tar.gz
提取文件“latest.tar.gz”以使用以下命令重建 WordPress 目录:
sudo tar -zxvf latest.tar.gz
这将在目录 / 中创建一个名为 wordpress
的目录var/www/html
将 wordpress 目录中的所有文件复制到 Apache 的文档根目录,我们建议使用 rsync 命令来保留权限和数据完整性:
sudo rsync -avP wordpress/ /var/www/html
或者,您可以在不提及 Apache 文档根目录的情况下执行此操作:
sudo rsync -avP wordpress/ .
复制 WordPress 目录上的所有文件完成后。删除wordpress目录和文件latest.tar.gz
sudo rm -rf wordpress/ latest.tar.gz
授予用户和组(www-data)对目录/var/www/html下所有内容的权限
sudo chown -R www-data:www-data /var/www/html
第 4 步:通过网络浏览器安装 WordPress
通过网络浏览器完成 WordPress 安装,在网络浏览器中,导航到服务器的域名或公共 IP 地址 [http://ip_public] 或 [http://domain]
您应该看到此图片:
Click on Create Configuration File, followed by Let’s Go in the next step. In the 3rd step, enter the details as follows:
Database Name: dbwordpress
User Name: wpuser
Password: wpP@5sw0Rd
Database Host: localhost
Table Prefix: wp_
After click on Submit. you should get the following page. Click Run Install
Now you will see the WordPress initial configuration page, Fill out the information for the site such as Site title, Username, Password and Your Email, Check list on privacy option if you allow search engine crawling your site. Then and click Install WordPress
WordPress will confirm the installation process is success. It also show you login account that have been created on previous step.
Hit the log in button if you want login to wordpress dashboard.
Additonal Setting – WordPress Permalinks
By default, WordPress create URLs dynamically that look something like this [ domain/?page_id=4 ] to enable URL friendly you need to have an .htaccess file on root directory where wordpress installed, The first thing you do is edit the file /etc/apache2/sites-available/000-default.conf.
sudo nano /etc/apache2/sites-available/000-default.conf
Add the following line under option ( DocumentRoot /var/www/html) on section
ServerName domain_or_IP<Directory /var/www/html/>AllowOverride All</Directory>
Example:
Enable the rewrite module with these command:
sudo a2enmod rewrite
Restart apache2 service:
sudo service apache2 restart
Create empty file .htaccess in your document root
sudo touch /var/ww/html/.htaccess
Give permission file .htaccess with username and group (www-data)
sudo chown www-data:www-data /var/ww/html/.htaccess
Set permission file /var/www/html/.htaccess to 644
sudo chmod 664 /var/www/html/.htaccess
Now you can setting wordpress permaliks from wordpress dashboard, navigate to Settings -> Permalinks
The following video created by LinuxScoop and is describes How to install WordPress 3.9 with Apache2 + MySQL 5.5 + PHP5.5 in Ubuntu Server 14.04 LTS . Original video you can found here
Note: This tutorial have been tested on VPS DigitalOcean 512MB
Link Reference :

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

热门话题

全表扫描在MySQL中可能比使用索引更快,具体情况包括:1)数据量较小时;2)查询返回大量数据时;3)索引列不具备高选择性时;4)复杂查询时。通过分析查询计划、优化索引、避免过度索引和定期维护表,可以在实际应用中做出最优选择。

InnoDB的全文搜索功能非常强大,能够显着提高数据库查询效率和处理大量文本数据的能力。 1)InnoDB通过倒排索引实现全文搜索,支持基本和高级搜索查询。 2)使用MATCH和AGAINST关键字进行搜索,支持布尔模式和短语搜索。 3)优化方法包括使用分词技术、定期重建索引和调整缓存大小,以提升性能和准确性。

是的,可以在 Windows 7 上安装 MySQL,虽然微软已停止支持 Windows 7,但 MySQL 仍兼容它。不过,安装过程中需要注意以下几点:下载适用于 Windows 的 MySQL 安装程序。选择合适的 MySQL 版本(社区版或企业版)。安装过程中选择适当的安装目录和字符集。设置 root 用户密码,并妥善保管。连接数据库进行测试。注意 Windows 7 上的兼容性问题和安全性问题,建议升级到受支持的操作系统。

聚集索引和非聚集索引的区别在于:1.聚集索引将数据行存储在索引结构中,适合按主键查询和范围查询。2.非聚集索引存储索引键值和数据行的指针,适用于非主键列查询。

文章讨论了流行的MySQL GUI工具,例如MySQL Workbench和PhpMyAdmin,比较了它们对初学者和高级用户的功能和适合性。[159个字符]

MySQL是一个开源的关系型数据库管理系统。1)创建数据库和表:使用CREATEDATABASE和CREATETABLE命令。2)基本操作:INSERT、UPDATE、DELETE和SELECT。3)高级操作:JOIN、子查询和事务处理。4)调试技巧:检查语法、数据类型和权限。5)优化建议:使用索引、避免SELECT*和使用事务。

MySQL 数据库中,用户和数据库的关系通过权限和表定义。用户拥有用户名和密码,用于访问数据库。权限通过 GRANT 命令授予,而表由 CREATE TABLE 命令创建。要建立用户和数据库之间的关系,需创建数据库、创建用户,然后授予权限。
