数据库管理工具:phpMyAdmin

[root@wallet01 ~]# rpm -ivh epel-release-6-8.noarch.rpm
[root@wallet01 ~]# yum install -y expat-devel openssl openssl-devel pcre pcre-devel

[root@wallet01 ~]# groupadd apache
[root@wallet01 ~]# useradd apache -g apache -s /bin/nologin

[root@wallet01 ~]# tar zxvf apr-1.6.3.tar.gz
[root@wallet01 ~]# cd apr-1.6.3
[root@wallet01 apr-1.6.3]# ./configure --prefix=/usr/local/apr 
[root@wallet01 apr-1.6.3]# make
[root@wallet01 apr-1.6.3]# make install

[root@wallet01 ~]# tar zxvf apr-util-1.6.1.tar.gz
[root@wallet01 ~]# cd apr-util-1.6.1
[root@wallet01 apr-util-1.6.1]# ./configure --with-apr=/usr/local/apr/bin/apr-1-config
[root@wallet01 apr-util-1.6.1]# make
[root@wallet01 apr-util-1.6.1]# make install

[root@wallet01 ~]# tar zxvf httpd-2.4.29.tar.gz 
[root@wallet01 ~]# cd httpd-2.4.29
[root@wallet01 httpd-2.4.29]# ./configure --prefix=/usr/local/apache \
--sysconfdir=/etc/httpd \
--enable-ssl \
--enable-so \
--enable-cgi \
--enable-rewrite \
--with-pcre \
--with-zlib \
--enable-modules=most \
--enable-mods-shared=most \
--enable-mpms-shared=all \
--with-mpm=worker \
--with-apr=/usr/local/apr/bin/apr-1-config \
--with-apr-util=/usr/local/apr/bin/apu-1-config

[root@wallet01 httpd-2.4.29]# make
[root@wallet01 httpd-2.4.29]# make install

[root@wallet01 httpd-2.4.29]# cd build/rpm
[root@wallet01 rpm]# cp httpd.init /etc/init.d/httpd
[root@wallet01 rpm]# vi /etc/init.d/httpd
httpd=${HTTPD-/usr/local/apache/bin/httpd}
pidfile=${PIDFILE-/usr/local/apache/logs/${prog}.pid}
CONFFILE=/etc/httpd/httpd.conf

[root@wallet01 ~]# vim /etc/httpd/httpd.conf
ServerName 192.168.1.201:80
User apache
Group apache

[root@wallet01 ~]# chkconfig --add httpd
[root@wallet01 ~]# chkconfig --level 345 httpd on
[root@wallet01 ~]# chkconfig --list |grep http
httpd           0:off   1:off   2:off   3:on    4:on    5:on    6:off
[root@wallet01 ~]# service httpd start
Starting httpd:                                            [  OK  ]

[root@wallet01 ~]# service httpd status
httpd (pid  8954) is running...

[root@wallet01 ~]# yum install libjpeg libpng freetype libjpeg-devel libpng-devel freetype-devel libxml2 libxml2-devel
[root@wallet01 ~]# tar zxvf php-7.2.14.tar.gz
[root@wallet01 ~]# cd 7.2.14
[root@wallet01 php-7.2.14]# 
./configure --prefix=/usr/local/php \
--with-config-file-path=/etc \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-zlib \
--with-bz2 \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-freetype-dir \
--with-openssl \
--with-mysqli=/usr/bin/mysql_config \
--without-sqlite3 \
--without-pdo-sqlite \
--enable-xml \
--enable-sockets \
--enable-mbstring \
--disable-ipv6

[root@wallet01 php-7.2.14]# make
[root@wallet01 php-7.2.14]# make install

[root@wallet01 php-7.2.14]# cp php.ini-production /etc/php.ini
[root@wallet01 ~]# vi /etc/php.ini 
date.timezone = Asia/Shanghai

[root@wallet01 ~]# vi /etc/httpd/httpd.conf
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
<IfModule dir_module>
    DirectoryIndex index.php index.html
</IfModule>

[root@wallet01 ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

[root@wallet01 ~]# unzip phpMyAdmin-4.8.5-all-languages.zip
[root@wallet01 ~]# cd phpMyAdmin-4.8.5-all-languages
[root@wallet01 phpMyAdmin-4.8.5-all-languages]# mv * /usr/local/apache/htdocs/

[root@wallet01 ~]# cd /usr/local/apache/htdocs
[root@wallet01 htdocs]# mv config.sample.inc.php config.inc.php
[root@wallet01 htdocs]# vi config.inc.php
$cfg['blowfish_secret'] = 'ZqyAObzVjSLpq3EhELzGZSoNOTyAZoNziePBfjqhjGhRHCG2kKNzH2fN777h';
$cfg['TempDir'] = '/var/tmp';


猜你喜欢

转载自blog.51cto.com/13598811/2348479