免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項超值服

開通VIP
CentOS7 配置LAMP環(huán)境

一、關(guān)閉防火墻

1.查看防火墻狀態(tài)

systemctl status firewalld

  • inactive 關(guān)閉狀態(tài)
  • active? 開啟狀態(tài)

2.關(guān)閉防火墻

systemctl stop firewalld

3.永久關(guān)閉防火墻

systemctl disable firewalld

二、安裝Apache

1.安裝Apache服務(wù)及擴(kuò)展包

yum -y install httpd httpd-manual mod_ssl mod_perl mod_auth_mysql

2.啟動Apache服務(wù)

systemctl start httpd

3.設(shè)置Apache服務(wù)開機(jī)自啟動

systemctl enable httpd

4.查看apache是否安裝成功

在瀏覽器地址欄輸入 http://ip地址,運(yùn)行,出現(xiàn)如下頁面即安裝成功

?

?

三、安裝并配置MySQL

? 1.更新YUM源

rpm -Uvh  http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm

 2.安裝MySQL

yum -y install mysql-community-server

  如果出現(xiàn)”No match for argument“錯誤,請先運(yùn)行yum module disable mysql禁用默認(rèn)的mysql模塊,再安裝MySQL

 3.查看MySQL版本號

mysql -V

 出現(xiàn)如下信息即表示安裝成功,注意”V“要大寫

?

?

 ?4.啟動mysql

systemctl start mysqld

 5.設(shè)置開機(jī)自啟動

systemctl enable mysqldsystemctl daemon-reload

 6.查看初始密碼

grep "password" /var/log/mysqld.log

  

 7.配置MySQL的安全性

mysql_secure_installation
  • 重置root賬號的密碼
Enter password for user root: #輸入上一步獲取的root用戶初始密碼The 'validate_password' plugin is installed on the server.The subsequent steps will run with the existing configuration of the plugin.Using existing password for root.Estimated strength of the password: 100 Change the password for root ? (Press y|Y for Yes, any other key for No) : Y #是否更改root用戶密碼,輸入YNew password: #輸入新密碼,長度為8至30個字符,必須同時包含大小寫英文字母、數(shù)字和特殊符號。特殊符號可以是()` ~!@#$%^&*- =|{}[]:;‘<>,.?/Re-enter new password: #再次輸入新密碼Estimated strength of the password: 100 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : Y
  • 輸入Y刪除匿名用戶賬號
By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL 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? (Press y|Y for Yes, any other key for No) : Y  #是否刪除匿名用戶,輸入YSuccess.
  • 輸入Y禁止root賬號遠(yuǎn)程登錄
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y #禁止root遠(yuǎn)程登錄,輸入YSuccess.
  • 輸入Y刪除test庫以及對test庫的訪問權(quán)限
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y #是否刪除test庫和對它的訪問權(quán)限,輸入Y- Dropping test database...Success.
  • 輸入Y重新加載授權(quán)表
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y #是否重新加載授權(quán)表,輸入YSuccess.All done!

四、安裝PHP

 1.更新YUM源

  • 添加epel源
yum install -y https://repo.ius.io/ius-release-el7.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  • 添加Webtatic源
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

  2.安裝PHP

yum -y install php70w-devel php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64  php70w-pdo.x86_64   php70w-mysqlnd  php70w-fpm php70w-opcache php70w-pecl-redis php70w-pecl-mongodb

  3.查看PHP版本

php -v

  出現(xiàn)如下結(jié)果即表示php安裝成功

 4.在Apache網(wǎng)站根目錄創(chuàng)建測試文件

echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php

 5.重啟Apache服務(wù)

systemctl restart httpd

 6.運(yùn)行。在瀏覽器地址欄輸入http://ip地址/phpinfo.php,出現(xiàn)如下頁面即表示安裝成功

?

?

?五、安裝phpMyAdmin

 1.創(chuàng)建phpMyAdmin數(shù)據(jù)存放目錄

mkdir -p /var/www/html/phpmyadmin

 2.下載phpMyAdmin壓縮包并解壓

  • 下載
wget https://files.phpmyadmin.net/phpMyAdmin/4.0.10.20/phpMyAdmin-4.0.10.20-all-languages.zip
  • 解壓
yum install -y unzipunzip phpMyAdmin-4.0.10.20-all-languages.zip

 3.復(fù)制phpMyAdmin文件到準(zhǔn)備好的數(shù)據(jù)存放目錄

mv phpMyAdmin-4.0.10.20-all-languages/*  /var/www/html/phpmyadmin

 4.檢查是否安裝成功。在瀏覽器地址欄輸入http://ip地址/phpmyadmin,運(yùn)行,出現(xiàn)如下頁面即表示安裝成功

 

?

LAMP環(huán)境配置完成!

如果使用navicat連接數(shù)據(jù)庫報錯,ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server,是無法給遠(yuǎn)程連接的用戶權(quán)限問題,就是”7.配置MySQL的安全性“中第三步設(shè)置了禁止遠(yuǎn)程登陸

解決辦法:

mysql -u root -p密碼

  進(jìn)入Mysql控制臺

  • 提權(quán)
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '密碼' WITH GRANT OPTION; 
  • 刷新
flush privileges;
來源:https://www.icode9.com/content-3-781951.html
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
centos 7 搭建wordpress 網(wǎng)站詳細(xì)教程
Centos 搭建LAMP環(huán)境
CentOS 7 使用OwnCloud建立私有云儲存網(wǎng)盤
RHEL / CentOS 7 安裝 Nginx, MySQL, PHP (LEMP) | Linux 技術(shù)手札
CentOS?6.4?配置LAMP?環(huán)境?與安裝?phpmyadmin
linux CentOS LAMP安裝配置文檔(apache+mysql+php+phpmyadmin)
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服