發表於 Linux 學習 與 研究

CentOS 7 安裝 phpMyAdmin 設定

----
CentOS 7 安裝 phpMyAdmin 設定
----

# 安裝 httpd and php
[root@hnamenode2 ~]# yum -y install httpd httpd-devel httpd-manual php-mysql php-mbstring \
php php-soap php-xml php-mcrypt php-pear php-cli php-devel php-gd 

[root@hnamenode2 conf.d]# systemctl restart httpd.service 
[root@hnamenode2 conf.d]# systemctl status httpd.service 
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
   Active: active (running) since 六 2015-09-26 22:54:14 CST; 7s ago
  Process: 11956 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
 Main PID: 11961 (httpd)
   Status: "Processing requests..."
   CGroup: /system.slice/httpd.service
           ├─11961 /usr/sbin/httpd -DFOREGROUND
           ├─11963 /usr/sbin/httpd -DFOREGROUND
           ├─11964 /usr/sbin/httpd -DFOREGROUND
           ├─11965 /usr/sbin/httpd -DFOREGROUND
           ├─11966 /usr/sbin/httpd -DFOREGROUND
           └─11967 /usr/sbin/httpd -DFOREGROUND

 9月 26 22:54:14 hnamenode2 systemd[1]: Started The Apache HTTP Server.

# EPEL 套件庫安裝
[root@hnamenode2 ~]# yum install epel-release

# 安裝 centos7 的 phpmyadmin
[root@hnamenode2 ~]# yum install phpmyadmin

# 設定允許登入的 ip 範圍,預設為 127.0.0.1 不允需其他位置登入
[root@hnamenode2 conf.d]# cat /etc/httpd/conf.d/phpMyAdmin.conf
   
     # Apache 2.4
     
       Require ip 110.111.0.0/16
       Require ip 127.0.0.1
       Require ip ::1
   
 

# 重新載入設定值
[root@hnamenode2 conf.d]# systemctl restart httpd.service 

# http://ooxx/phpMyAdmin/ 登入驗證
發表於 Linux 學習 與 研究

在 CentOS 7.x 安裝 Apache / MariaDB / PHP

安裝 Apache
 # yum install httpd
啟動 Web Server
 # service httpd start
 Redirecting to /bin/systemctl start  httpd.service
 或
 # systemctl start httpd
在防火牆開啟 http 服務
 # firewall-cmd --permanent --add-service=http
 # systemctl restart firewalld
設定開機時啟動 Web Server
 # systemctl enable httpd
 安裝 PHP
 # yum install php php-mysql php-pdo php-gd php-mbstring
修改時區設定
 # sed -i 's/;date.timezone =/date.timezone = Asia\/Taipei/' /etc/php.ini
重新啟動 Web Server
 # service httpd restart
 Redirecting to /bin/systemctl restart  httpd.service
 或
 # systemctl restart httpd
安裝 MariaDB
 # yum install mariadb-server mariadb
啟動 MariaDB
 # systemctl start mariadb
初始化資料庫設定
 # /usr/bin/mysql_secure_installation
設定開機時啟動 MariaDB
 # systemctl enable mariadb