---- 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
bash shell 研究
組合按鍵
Ctrl + C -> 終止目前的命令
Ctrl + D -> 輸入結束(EOF) ,例如郵件結束的時候
Ctrl + M -> Enter
Ctrl + S -> 暫停屏幕的輸出
Ctrl + Q -> 恢復屏幕的輸出
Ctrl + U -> 在提示字元下,將整列命令刪除
Ctrl + Z -> 「暫停」目前的命令
Linux 學習要點
1. 學習bash shell
2. 學習常用指令
3. 學習檔案系統
4. 學習用戶權限
Linux 常用指令
ls : 顯示目錄與檔案
tar : 打包 , 壓縮 , 解壓縮目錄與檔案
dump : 備份磁碟分區 , 檔案系統
chown : 改變擁有者
chgrp : 改變群組
chmod : 改變權限
cd : 改變目錄
pwd : 顯示目前所在目錄
mkdir : 新增目錄
rmdir : 删除空目錄
cp : 複制檔案或目錄
rm : 删除檔案或目錄
mv : 移動檔案或目錄
top : 顯示進程
vim : txt(文本)編輯 , 系統設定修改