最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Linux使用yum安裝lamp以及部署wordpress實(shí)踐

 更新時(shí)間:2025年08月20日 10:21:57   作者:xx.ii  
文章指導(dǎo)如何通過yum安裝LAMP環(huán)境并部署WordPress,需關(guān)閉防火墻和SELinux,配置阿里云yum源,安裝Apache、MySQL和PHP,設(shè)置時(shí)區(qū)為上海,初始化數(shù)據(jù)庫,調(diào)整權(quán)限,部署站點(diǎn)后訪問驗(yàn)證

Linux使用yum安裝lamp,部署wordpress

實(shí)驗(yàn)前需要關(guān)閉防火墻和selinux

yum源使用網(wǎng)絡(luò)yum源(wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo)

1.同步時(shí)鐘服務(wù)器

[root@lamp ~]# systemctl restart chronyd
[root@lamp ~]# systemctl enable chronyd
[root@lamp ~]# hwclock -w

2.安裝httpd和mariadb(mysql)數(shù)據(jù)庫

yum install httpd mariadb mariadb-server

3.初始化數(shù)據(jù)庫

systemctl restart mariadb
systemctl enable mariadb
mysql_secure_installation

(除了不允許用戶遠(yuǎn)程登錄選n,其他全都是y,密碼為redhat)

Set root password? [Y/n]y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

安裝php

[root@xieyuhui2 ~]# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y
[root@xieyuhui2 ~]# yum install yum-utils -y
[root@xieyuhui2 ~]# yum-config-manager --enable remi-php70

安裝php相關(guān)插件

[root@xieyuhui2 ~]# yum install php php-cli php-fpm php-gd php-curl php-zip php-mbstring php-opcache php-intl php-mysqlnd -y

配置php文件,將時(shí)區(qū)改為亞洲/上海

[root@xieyuhui2 ~]# vim /etc/php.ini

重啟服務(wù)

[root@xieyuhui2 ~]# systemctl restart php-fpm
[root@xieyuhui2 ~]# systemctl enable php-fpm

配置默認(rèn)網(wǎng)頁

[root@xieyuhui2 ~]# vim /etc/httpd/conf/httpd.conf

[root@xieyuhui2 ~]# vim /var/www/html/index.php 

重啟服務(wù)

[root@xieyuhui2 ~]# systemctl restart httpd
[root@xieyuhui2 ~]# systemctl enable httpd

查看php版本是否正確

上傳wordpress壓縮包然后解壓

將wordpress復(fù)制到/var/www/html內(nèi)

[root@xieyuhui2 ~]# cp -R wordpress /var/www/html/

設(shè)置wordpress所屬者和所屬組為apache,權(quán)限為775

[root@xieyuhui2 ~]# chown -R apache.apache /
var/www/html/wordpress/
[root@xieyuhui2 ~]# chmod -R 775 /var/www/html/wordpress/

配置wordpress數(shù)據(jù)庫

[root@xieyuhui2 html]# mysql -uroot -p
MariaDB [(none)]> create database wordpress;
MariaDB [(none)]> create user 'wordpress_use'@'localhost' identified by 'redhat';
MariaDB [(none)]> grant all on wordpress.* to 'wordpress_user'@'localhost';
MariaDB [(none)]> flush privileges;

為wordpress配置站點(diǎn)

[root@xieyuhui2 ~]# cp -p /usr/share/doc/httpd-2.4.6/httpd-vhosts.conf /etc/httpd/conf.d/ #覆蓋虛擬機(jī)主配置文件,<Directory>是httpd/conf/httpd.conf里的配置文件

重啟服務(wù)

[root@xieyuhui2 ~]# systemctl restart httpd

在瀏覽器訪問wordpress站點(diǎn)(192.168.100.20/wp-admin)

總結(jié)

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • Liunx和Windows中如何重啟MySql

    Liunx和Windows中如何重啟MySql

    這篇文章主要介紹了Liunx和Windows中如何重啟MySql的問題,具有很好的參考價(jià)值,希望對大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2025-06-06
  • linux修改文件所屬用戶和組的實(shí)例方法

    linux修改文件所屬用戶和組的實(shí)例方法

    在本篇文章里小編給大家整理的是一篇關(guān)于linux修改文件所屬用戶和組的實(shí)例方法,對此有興趣的朋友們可以跟著學(xué)習(xí)下。
    2021-12-12
  • Linux環(huán)境變量和進(jìn)程地址空間介紹

    Linux環(huán)境變量和進(jìn)程地址空間介紹

    大家好,本篇文章主要講的是Linux環(huán)境變量和進(jìn)程地址空間介紹,感興趣的同學(xué)趕快來看一看,對你有幫助的話記得收藏一下,方便下次瀏覽
    2021-12-12
  • linux中ssh免密通信的實(shí)現(xiàn)

    linux中ssh免密通信的實(shí)現(xiàn)

    這篇文章主要介紹了linux中ssh免密通信的實(shí)現(xiàn),詳細(xì)的介紹了什么是ssh及其ssh免密通信,非常具有實(shí)用價(jià)值,需要的朋友可以參考下
    2018-11-11
  • linux corosync+pacemaker+drbd+mysql配置安裝詳解

    linux corosync+pacemaker+drbd+mysql配置安裝詳解

    這篇文章主要介紹了corosync+pacemaker+drbd+mysql配置安裝詳解,需要的朋友可以參考下
    2016-05-05
  • Linux磁盤空間釋放問題整理

    Linux磁盤空間釋放問題整理

    在本篇文章里小編給大家分享了一篇關(guān)于Linux磁盤空間釋放問題整理內(nèi)容,有需要的朋友們可以學(xué)習(xí)參考下。
    2020-12-12
  • Apache 網(wǎng)站速度更快

    Apache 網(wǎng)站速度更快

    Apache2.0在性能上的改善最吸引人.在支持POSIX線程的Unix系統(tǒng)上,Apache可以通過不同的MPM運(yùn)行在一種多進(jìn)程與多線程相混合的模式下,增強(qiáng)部分配置的可擴(kuò)充性能.相比于Apache
    2009-07-07
  • CentOS8.0 安裝配置ftp服務(wù)器的實(shí)現(xiàn)方法

    CentOS8.0 安裝配置ftp服務(wù)器的實(shí)現(xiàn)方法

    這篇文章主要介紹了CentOS8.0 安裝配置ftp服務(wù)器的實(shí)現(xiàn)方法,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2019-10-10
  • Linux信號機(jī)制之信號的保存與處理技巧分享

    Linux信號機(jī)制之信號的保存與處理技巧分享

    本文旨在為廣大Linux學(xué)習(xí)者提供一份詳盡而實(shí)用的指南,幫助他們深入理解Linux中的信號機(jī)制,掌握信號的保存與處理技巧,我們將從信號的基本概念出發(fā),逐步深入到信號的捕獲、保存、處理以及恢復(fù)等各個(gè)環(huán)節(jié),通過生動(dòng)的實(shí)例和詳細(xì)的解釋,讓讀者能夠輕松掌握
    2024-10-10
  • linux系統(tǒng)之間通過nfs網(wǎng)絡(luò)文件系統(tǒng)掛載設(shè)置方法

    linux系統(tǒng)之間通過nfs網(wǎng)絡(luò)文件系統(tǒng)掛載設(shè)置方法

    NFS允許一個(gè)系統(tǒng)在網(wǎng)絡(luò)上與他人共享目錄和文件,通過使用NFS,用戶和程序可以像訪問本地文件一樣訪問遠(yuǎn)端系統(tǒng)上的文件,下面介紹linux系統(tǒng)之間通過nfs網(wǎng)絡(luò)文件系統(tǒng)掛載的設(shè)置方法
    2014-01-01

最新評論

广安市| 中方县| 泽州县| 贵定县| 涞水县| 丹寨县| 宾阳县| 黄梅县| 灵川县| 美姑县| 凉城县| 宣汉县| 疏附县| 喀什市| 江安县| 海宁市| 农安县| 灵山县| 石狮市| 土默特左旗| 黔江区| 孙吴县| 达孜县| 恩平市| 岳阳市| 酉阳| 麻城市| 曲松县| 梅河口市| 肥城市| 临沧市| 西峡县| 武穴市| 扎囊县| 喀喇沁旗| 榆社县| 保康县| 贺州市| 钟山县| 津南区| 松滋市|