1.安裝Apache
創(chuàng)新互聯(lián)公司服務(wù)項目包括荔浦網(wǎng)站建設(shè)、荔浦網(wǎng)站制作、荔浦網(wǎng)頁制作以及荔浦網(wǎng)絡(luò)營銷策劃等。多年來,我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢、行業(yè)經(jīng)驗、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,荔浦網(wǎng)站推廣取得了明顯的社會效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到荔浦省份的部分城市,未來相信會繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!
yum install httpd #根據(jù)提示,輸入Y安裝即可成功安裝
systemctl start httpd.service #啟動apache
systemctl stop httpd.service #停止apache
systemctl restart httpd.service #重啟apache
systemctl enable httpd.service #設(shè)置apache開機(jī)啟動
2.安裝Mariadb
yum install mariadb mariadb-server #詢問是否要安裝,輸入Y即可自動安裝,直到安裝完成
systemctl start mariadb.service #啟動MariaDB
systemctl stop mariadb.service #停止MariaDB
systemctl restart mariadb.service #重啟MariaDB
systemctl enable mariadb.service #設(shè)置開機(jī)啟動
cp /usr/share/MySQL/my-huge.cnf /etc/my.cnf #拷貝配置文件(注意:如果/etc目錄下面默認(rèn)有一個my.cnf,直接覆 蓋即可)
2.1 初始化數(shù)據(jù)庫
mysql_secure_installation
回車,根據(jù)提示輸入Y
輸入2次密碼,回車
根據(jù)提示一路輸入Y
最后出現(xiàn):Thanks for using MySQL!
MySql密碼設(shè)置完成,重新啟動 MySQL:
systemctl restart mariadb.service #重啟MariaDB
3.安裝PHP
yum install php #根據(jù)提示輸入Y直到安裝完成
3.1 安裝PHP組件,使PHP支持 MariaDB
yum install php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-bcmath php-mhash #這里選擇以上安裝包進(jìn)行安裝,根據(jù)提示輸入Y回車
systemctl restart mariadb.service #重啟MariaDB
systemctl restart httpd.service #重啟apache
4.安裝phpMyadmin
yum install phpmyadmin php-mcrypt
phpMyAdmin 的默認(rèn)安裝目錄是 /usr/share/phpMyAdmin,同時會在 Apache 的配置文件目錄中自動創(chuàng)建虛擬主機(jī) 配置文件 /etc/httpd/conf.d/phpMyAdmin.conf(區(qū)分大小寫)。默認(rèn)情況下,CentOS 7上的phpMyAdmin只允許從 回環(huán)地址(127.0.0.1)訪問。為了能遠(yuǎn)程連接,你需要改動它的配置。
vi /etc/httpd/conf.d/phpMyadmin.conf
<Directory /usr/share/phpMyAdmin/> AddDefaultCharset UTF-8 <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> # Require ip 127.0.0.1 #注釋掉 # Require ip ::1 #注釋掉 Require all granted #新添加 </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 </IfModule> </Directory> <Directory /usr/share/phpMyAdmin/setup/> <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> #Require ip 127.0.0.1 #注釋掉 #Require ip ::1 #注釋掉 Require all granted #新添加 </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 </IfModule> </Directory> :wq
systemctl restart httpd
瀏覽器訪問地址http://ip/phpmyadmin
網(wǎng)站名稱:centos7lamp環(huán)境
URL標(biāo)題:http://bm7419.com/article0/gipioo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信小程序、網(wǎng)站收錄、全網(wǎng)營銷推廣、網(wǎng)站建設(shè)、品牌網(wǎng)站制作、網(wǎng)站設(shè)計公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)