编译httpd2.4的版本,需要的安装包如下,需要准备1.4+版本的apr和apr-util包,并安装开开发环境(yum -y groupinstall "Desktop Platform Development" ),还需要确保本机有openssl-devel及pcre-devel包组件,避免编译时出现报错信息。
首先先基于module的方式进行编译
[root@Lab6-1 bin]# ls apr-1.5.0.tar.bz2 httpd-2.4.10.tar.bz2 phpMyAdmin-4.4.14.1-all-languages.zip apr-util-1.5.3.tar.bz2 mariadb-5.5.43-linux-x86_64.tar.gzphp-5.4.40.tar.bz2
需要先解决安装包的依赖关系,httpd依赖于apr和apr-util包,apr-util还依赖于apr,所以请注意我的安装次序。
先安装apr,解压并进入程序包解压目录
[root@Lab6-1 bin]# tar xf apr-1.5.0.tar.bz2 [root@Lab6-1 bin]# cd apr-1.5.0 [root@Lab6-1 apr-1.5.0]# ls apr-config.in atomic config.layout file_io LICENSE network_io READMENaNake time apr.dep build configure helpers locks NOTICE shmem tools apr.dsp buildconf configure.in include Makefile.in NWGNUmakefile strings user apr.dsw build.conf docs libapr.dep Makefile.win passwd support apr.mak build-outputs.mk dso libapr.dsp memory poll tables apr.pc.in CHANGES emacs-mode libapr.mak misc random test apr.spec CMakeLists.txt encoding libapr.rc mmap README threadproc
开始编译安装 --prefix=/usr/local/apr是指定文件的安装路径为/usr/local/apr
[root@Lab6-1 apr-1.5.0]# ./configure --prefix=/usr/local/apr ......... ......... configure: creating ./config.status config.status: creating Makefile config.status: creating include/apr.h config.status: creating build/apr_rules.mk config.status: creating build/pkg/pkginfo config.status: creating apr-1-config config.status: creating apr.pc config.status: creating test/Makefile config.status: creating test/internal/Makefile config.status: creating include/arch/unix/apr_private.h config.status: executing libtool commands rm: cannot remove `libtoolT': No such file or directory config.status: executing default commands [root@Lab6-1 apr-1.5.0]#
贴出编译完成尾部的提示信息,如果没有出现error的错误信息说明你已经成功了!!
下面我们就来安装程序包
[root@Lab6-1 apr-1.5.0]# make && make install ...... ...... /usr/bin/install -c -m 644 apr.exp /usr/local/apr/lib/apr.exp /usr/bin/install -c -m 644 apr.pc /usr/local/apr/lib/pkgconfig/apr-1.pc for f in libtool shlibtool; do \ if test -f ${f}; then /usr/bin/install -c -m 755 ${f} /usr/local/apr/build-1; fi; \ done /usr/bin/install -c -m 755 /root/bin/apr-1.5.0/build/mkdir.sh /usr/local/apr/build-1 for f in make_exports.awk make_var_export.awk; do \ /usr/bin/install -c -m 644 /root/bin/apr-1.5.0/build/${f} /usr/local/apr/build-1; \ done /usr/bin/install -c -m 644 build/apr_rules.out /usr/local/apr/build-1/apr_rules.mk /usr/bin/install -c -m 755 apr-config.out /usr/local/apr/bin/apr-1-config [root@Lab6-1 apr-1.5.0]#
从上面的尾部输出信息可以看出系统已经安装完成apr了~~
下面我们来安装apr-util这个程序包,方法根apr基本一致 唯一有区别的在于编译时多个选项.
首先先回到我们的程序包bin目录下 进行解压apr-util
[root@Lab6-1 apr-1.5.0]# cd .. [root@Lab6-1 bin]# ls apr-1.5.0 apr-util-1.5.3.tar.bz2 mariadb-5.5.43-linux-x86_64.tar.gz apr-1.5.0.tar.bz2 httpd-2.4.10.tar.bz2 phpMyAdmin-4.4.14.1-all-languages.zip [root@Lab6-1 bin]# tar xf apr-util-1.5.3.tar.bz2 [root@Lab6-1 bin]# cd apr-util-1.5.3 [root@Lab6-1 apr-util-1.5.3]# ls aprutil.dep buckets config.layout encoding libaprutil.mak NOTICE uri aprutil.dsp build configure export_vars.sh.in libaprutil.rc NWGNUmakefile xlate aprutil.dsw buildconf configure.in hooks LICENSE README xml aprutil.mak build.conf crypto include Makefile.in READMENaNake apr-util.pc.in build-outputs.mk dbd ldap Makefile.win renames_pending apr-util.spec CHANGES dbm libaprutil.dep memcache strmatch apu-config.in CMakeLists.txt docs libaprutil.dsp misc test
请注意这里,唯一与apr编译安装有区别的就是这里,因为apr-util依赖于apr 所有安装时候要明确告诉apr-util它所依赖的apr在哪里可以找到 --with-apr=./usr/local/apr就是明确告诉了apr-util去哪里找apr,如果没有报错信息在次执行make && make install即可.
[[email protected]]#./configure --prefix=/usr/lcoal/apr-util --with-apr=/usr/local/apr/ [root@Lab6-1 apr-util-1.5.3]# make && make install 安装完成apr和apr-util这两个依赖包之后 我们就可以开始正式编译httpd了! [root@Lab6-1 bin]# cd .. [root@Lab6-1 bin]# tar xf httpd-2.4.10.tar.bz2 [root@Lab6-1 bin]# ls apr-1.5.0.tar.bz2 httpd-2.4.10 mariadb-5.5.43-linux-x86_64.tar.gz apr-util-1.5.3.tar.bz2 httpd-2.4.10.tar.bz2 phpMyAdmin-4.4.14.1-all-languages.zip php-5.4.40.tar.bz2 [root@Lab6-1 bin]# cd httpd-2.4.10 [root@Lab6-1 httpd-2.4.10]# ls ABOUT_APACHE build config.layout httpd.spec LICENSE os srclib acinclude.m4 BuildAll.dsp configure include Makefile.in README support Apache-apr2.dsw BuildBin.dsp configure.in INSTALL Makefile.win READMENaNake test Apache.dsw buildconf docs InstallBin.dsp modules README.platforms VERSIONING apache_probes.d CHANGES emacs-style LAYOUT NOTICE ROADMAP ap.d CMakeLists.txt httpd.dsp libhttpd.dsp NWGNUmakefile server
不过在编译之前我们需要先创建好 apache的系统用户和系统组
[root@Lab6-1 httpd-2.4.10]# groupadd -r apache [root@Lab6-1 httpd-2.4.10]# useradd -r -g apache apache [root@Lab6-1 httpd-2.4.10]# id apache uid=305(apache) gid=305(apache) groups=305(apache)
下面我们正式开始编译httpd服务,安装的选项很多,如httpd的安装路径,配置文件的存放路径,是否启用ssl功能,是否启用cgi、压缩存储的数据、重写,依赖的apr和apr-util路径以及模块等..
这里我们默认使用event模块
[root@Lab6-1 httpd-2.4.10]# ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd24 --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modules=most --enable-mpms-shared=all --with-mpm=event ........ ........ config.status: creating support/log_server_status config.status: creating support/logresolve.pl config.status: creating support/phf_abuse_log.cgi config.status: creating support/split-logfile config.status: creating build/rules.mk config.status: creating build/pkg/pkginfo config.status: creating build/config_vars.sh config.status: creating include/ap_config_auto.h config.status: executing default commands [root@Lab6-1 httpd-2.4.10]# make && make install ........... .......... .......... Installing man pages and online manual mkdir /usr/local/apache/man mkdir /usr/local/apache/man/man1 mkdir /usr/local/apache/man/man8 mkdir /usr/local/apache/manual make[1]: Leaving directory `/root/bin/httpd-2.4.10' [root@Lab6-1 httpd-2.4.10]#
可以看出上面编译没有出现报错信息,如果出现报错信息请确保openssl和pcre的devel包都安装完成。所以我们下一步 make && make install,可能较之apr和apr-util可能会慢,只要没有error报错信息即可。安装完成!接下来我们需要配置一下httpd服务了!
将httpd加入开启服务,在2345级别下启动
[root@Lab6-1 apache]# chkconfig httpd on [root@Lab6-1 apache]# chkconfig --list httpd httpd 0:off1:off2:on3:on4:on5:on6:off [root@Lab6-1 apache]#
拷贝一份服务脚本,重命名为httpd24,左侧是原文件,右侧是我们修改内容后的文件
[root@Lab6-1 apache]# cp /etc/rc.d/init.d/httpd /etc/rc.d/init.d/httpd24
导出二进制的路径到PATH的环境变量中;默认PATH环境是查找不到编译httpd的所在路径的
[root@Lab6-1 ~]# vim /etc/profile.d/httpd.sh//在/etc/profile.d下建立一个.sh结尾的文件即可 export PATH=/usr/local/apache/bin:$PATH// 将内容添加至文件内会永久生效,不过不会立即生效 [root@Lab6-1 ~]# source source /etc/profile.d/httpd.sh// 重读文件让其立即生效
开启httpd的服务,可以看出PATH环境变量已经成功导入,并且服务开启成功,并监听在80端口
[root@Lab6-1 init.d]# which httpd /usr/local/apache/bin/httpd [root@Lab6-1 init.d]# service httpd24 start Starting httpd: [ OK ] [root@Lab6-1 init.d]# ss -tan | grep :80 LISTEN 0 128 :::80 :::*
这样我们就完成第一部分了!http服务编译安装完成!
下面我们来安装MariaDB服务,MariaDB是MySQL数据库的开源分支,是原作者发起的另一个开源数据库比MySQL更强大,CentOS7 上默认的数据库已经不是MySQL了已经被MariaDB取代,所以们我们快来看一下吧!
首先我们先回到我们的bin目录,此处的MariaDB的安装包为二进制格式包,不是源码包,所以不用编译操作,操作相对简单得多.
[root@Lab6-1 etc]# cd ~/bin [root@Lab6-1 bin]# ls apr-1.5.0 apr-util-1.5.3 httpd-2.4.10 mariadb-5.5.43-linux-x86_64.tar.gz apr-1.5.0.tar.bz2 apr-util-1.5.3.tar.bz2 httpd-2.4.10.tar.bz2 phpMyAdmin-4.4.14.1-all-languages.zip php-5.4.40.tar.bz2
解压并展开此压缩包, -C选项为指定展开文件的存放路径为/usr/local
[root@Lab6-1 bin]# tar xf mariadb-5.5.43-linux-x86_64.tar.gz -C /usr/local/
解压展开后切换到/usr/local目录下,为了方便以后的管理我们为MariaDB做一个软链接
[root@Lab6-1 bin]# cd /usr/local/ [root@Lab6-1 local]# ls apache apr-util etc include lib64 mariadb-5.5.43-linux-x86_64 share apr bin games lib libexec sbin src [root@Lab6-1 local]# ln -sv mariadb-5.5.43-linux-x86_64/ mysql `mysql' -> `mariadb-5.5.43-linux-x86_64/'
数据的数据目录都应该存放于一个单独的磁盘,这里我们简单的创建一个目录,如果真的在生产环境可不要学我呀!~
[root@Lab6-1 mysql]# mkdir -pv /mydata/data mkdir: created directory `/mydata' mkdir: created directory `/mydata/data'
创建mysql系统组和mysql系统用户 指定其用户ID为306 组为306 方便管理.
[root@Lab6-1 mysql]# groupadd -r -g 306 mysql [root@Lab6-1 mysql]# useradd -r -u 306 -g mysql mysql [root@Lab6-1 mysql]# id mysql uid=306(mysql) gid=306(mysql) groups=306(mysql)
需要注意的是需要在当前目录下才可以执行此脚本, --datadir指定数据存放目录,--user指定运行的用户
[root@Lab6-1 mysql]# pwd /usr/local/mysql [root@Lab6-1 mysql]# scripts/mysql_install_db --datadir=/mydata/data/ --user=mysql
在/usr/local/mysql/support-files下有启动服务脚本模板,只需要拷贝并重命名放置启动服务目录即可
[root@Lab6-1 mysql]# cp support-files/mysql.server /etc/rc.d/init.d/mysqld
在从/usr/local/mysql/support-files文件里拷贝配置文件模板,根据自己的配置进行选择
[root@Lab6-1 mysql]# cd support-files/ [root@Lab6-1 support-files]# ls binary-configure my-huge.cnf my-large.cnf my-small.cnf mysql-log-rotate SELinux magic my-innodb-heavy-4G.cnf my-medium.cnf mysqld_multi.server mysql.server
这里我们选择innodb-heavy模板,创建mysql配置文件的存放目录,将模块拷贝至此,并重命名
[root@Lab6-1 support-files]# mkdir /etc/mysql/ [root@Lab6-1 support-files]# cp my-innodb-heavy-4G.cnf /etc/mysql/my.cnf 编译my.cnf配置文件进行如下修改 [root@Lab6-1 support-files]# vim /etc/mysql/my.cnf
操作步骤和编译httpd时候的操作基本相同,只是换了个方式而已,可以看到我们编译的MariaDB已经可以成功启动运行!!
[root@Lab6-1 support-files]# echo "export PATH=/usr/local/mysql/bin:$PATH" >> /etc/profile.d/mysql.sh [root@Lab6-1 support-files]# . /etc/profile.d/mysql.sh // . 是 source另一种表现方式 [root@Lab6-1 support-files]# echo $PATH /usr/local/mysql/bin:/usr/local/apache/bin:/usr/lib64/qt-3.3/bin:/usr/local/apache/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin [root@Lab6-1 support-files]# service mysqld start Starting MySQL............ [ OK ] [root@Lab6-1 support-files]# which mysql /usr/local/mysql/bin/mysql [root@Lab6-1 support-files]# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 2 Server version: 5.5.43-MariaDB-log MariaDB Server Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
为了安装我们应该为管理员设好密码,并删除掉匿名用户,mysql自带安全初始化脚本,就不用我们麻烦了~~呵呵
[root@Lab6-1 bin]# cd bin [root@Lab6-1 bin]# pwd /usr/local/mysql/bin [root@Lab6-1 bin]# ./mysql_secure_installation ./mysql_secure_installation: line 379: find_mysql_client: command not found NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): // 没有密码直接回车即可 OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. New password: // 设置当前root的新密码 Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB 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? [Y/n] y// 是否删除匿名用户 ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y// 是否禁止root用户远程登录 ... skipping. By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] n// 是否移除测试数据库 ... skipping. Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y// 是否刷新重读授权表 ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB!
进行LAMP的最后一步,P-->PHP!
编译PHP还需要准备依赖包,
[root@Lab6-1 support-files]# yum -y install bzip2-devel libmcrypt-devel libxml2-devel
这里我们已经提前安装准备好,所以直接开始编译安装
[root@Lab6-1 etc]# cd ~/bin/ [root@Lab6-1 bin]# ls apr-1.5.0 apr-util-1.5.3.tar.bz2 mariadb-5.5.43-linux-x86_64.tar.gz apr-1.5.0.tar.bz2 httpd-2.4.10 php-5.4.40.tar.bz2 apr-util-1.5.3 httpd-2.4.10.tar.bz2 phpMyAdmin-4.4.14.1-all-languages.zip [root@Lab6-1 bin]# tar xf php-5.4.40.tar.bz2 [root@Lab6-1 bin]# cd php php-5.4.40/ phpMyAdmin-4.4.14.1-all-languages.zip php-5.4.40.tar.bz2 [root@Lab6-1 bin]# cd php-5.4.40 [root@Lab6-1 php-5.4.40]# ls acinclude.m4 install-sh README.EXTENSIONS run-tests.php aclocal.m4 LICENSE README.EXT_SKEL sapi build ltmain.sh README.GIT-RULES scripts buildconf main README.input_filter server-tests-config.php buildconf.bat makedist README.MAILINGLIST_RULES server-tests.php CODING_STANDARDS Makefile.frag README.namespaces snapshot config.guess Makefile.gcov README.NEW-OUTPUT-API stamp-h.in config.sub Makefile.global README.PARAMETER_PARSING_API stub.c configure makerpm README.PHP4-TO-PHP5-THIN-CHANGES svnclean.bat configure.in missing README.REDIST.BINS tests CREDITS mkinstalldirs README.RELEASE_PROCESS TSRM ext netware README.SELF-CONTAINED-EXTENSIONS UPGRADING EXTENSIONS NEWS README.STREAMS UPGRADING.INTERNALS footer pear README.SUBMITTING_PATCH vcsclean generated_lists php5.spec.in README.TESTING win32 genfiles php.gif README.TESTING2 Zend header php.ini-development README.UNIX-BUILD-SYSTEM INSTALL php.ini-production README.WIN32-BUILD-SYSTEM [root@Lab6-1 php-5.4.40]# ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-openssl --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --enable-sockets --with-apxs2=/usr/local/apache/bin/apxs --with-mcrypt --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2 --enable-maintainer-zts ......... ......... ........ +--------------------------------------------------------------------+ | License: | | This software is subject to the PHP License, available in this | | distribution in the file LICENSE. By continuing this installation | | process, you are bound by the terms of this license agreement. | | If you do not agree with the terms of this license, you must abort | | the installation process at this point. | +--------------------------------------------------------------------+ Thank you for using PHP. config.status: creating php5.spec config.status: creating main/build-defs.h config.status: creating scripts/phpize config.status: creating scripts/man1/phpize.1 config.status: creating scripts/php-config config.status: creating scripts/man1/php-config.1 config.status: creating sapi/cli/php.1 config.status: creating sapi/cgi/php-cgi.1 config.status: creating ext/phar/phar.1 config.status: creating ext/phar/phar.phar.1 config.status: creating main/php_config.h config.status: executing default commands [root@Lab6-1 php-5.4.40]# make && make install .......... .......... Installing man pages: /usr/local/php/php/man/man1/ page: phpize.1 page: php-config.1 Installing PEAR environment: /usr/local/php/lib/php/ [PEAR] Archive_Tar - installed: 1.3.12 [PEAR] Console_Getopt - installed: 1.3.1 [PEAR] Structures_Graph- installed: 1.0.4 [PEAR] XML_Util - installed: 1.2.3 [PEAR] PEAR - installed: 1.9.5 Wrote PEAR system config file at: /usr/local/php/etc/pear.conf You may want to add: /usr/local/php/lib/php to your php.ini include_path /root/bin/php-5.4.40/build/shtool install -c ext/phar/phar.phar /usr/local/php/bin ln -s -f /usr/local/php/bin/phar.phar /usr/local/php/bin/phar Installing PDO headers: /usr/local/php/include/php/ext/pdo/ [root@Lab6-1 php-5.4.40]#
下面我们需要编辑httpd.conf以支持php文件,在文件内查找AddType及DirectoryIndex进行添加如下:
[root@Lab6-1 php-5.4.40]# cd /etc/httpd24/ [root@Lab6-1 httpd24]# ls extra httpd.conf httpd.conf.bak magic mime.types original [root@Lab6-1 httpd24]# vim httpd.conf
到这里我们LAMP就编译安装完成了,下面我们来测试一下!
[root@Lab6-1 ~]# cd /usr/local/apache/ [root@Lab6-1 apache]# ls bin build cgi-bin error htdocs icons include logs man manual modules [root@Lab6-1 apache]# cd htdocs/ [root@Lab6-1 htdocs]# ls index.html [root@Lab6-1 htdocs]# mv index.html index.php [root@Lab6-1 htdocs]# vim index.php
添加如下:
<?php $link = mysql_connect('127.0.0.1','root','');// 这里根据自己登陆的主机和用户进行设置即可 if ($link) echo "Success..."; else echo "Failure..."; mysql_close(); ?>
下面我们先检查一下是否有配置错误
[root@Lab6-1 htdocs]# httpd -t Syntax OK
重新启动httpd服务~~
[root@Lab6-1 htdocs]# service httpd24 restart
打开浏览器,测试网站可以正常打开访问,可以连接数据库,到这里我们基于模块的方式编译安装的LAMP粗略搭建完成!!!好好高兴一下~~哈哈,不过这还还没有结束,我们还需要进行完善~
下面我们安装phpMyAdmin进行应用部署,并重命名放置网站程序目录htdocs目录下即可
[root@Lab6-1 bin]# unzip phpMyAdmin-4.4.14.1-all-languages.zip [root@Lab6-1 bin]# ll total 245296 drwxr-xr-x. 28 1000 1000 4096 Sep 23 11:25 apr-1.5.0 -rw-r--r--. 1 root root 813976 Mar 18 2014 apr-1.5.0.tar.bz2 drwxr-xr-x. 20 1000 1000 4096 Sep 23 11:51 apr-util-1.5.3 -rw-r--r--. 1 root root 695303 Mar 18 2014 apr-util-1.5.3.tar.bz2 drwxr-xr-x. 12 501 games 4096 Sep 23 11:56 httpd-2.4.10 -rw-r--r--. 1 root root 5031834 Dec 16 2014 httpd-2.4.10.tar.bz2 -rw-r--r--. 1 root root 222275456 Apr 29 15:16 mariadb-5.5.43-linux-x86_64.tar.gz drwxr-xr-x. 17 502 games 4096 Sep 23 13:52 php-5.4.40 -rw-r--r--. 1 root root 12272787 May 1 00:16 php-5.4.40.tar.bz2 drwxr-xr-x. 10 root root 4096 Sep 8 12:07 phpMyAdmin-4.4.14.1-all-languages -rw-r--r--. 1 root root 10057503 Sep 17 23:38 phpMyAdmin-4.4.14.1-all-languages.zip [root@Lab6-1 bin]# mv phpMyAdmin-4.4.14.1-all-languages /usr/local/apache/htdocs/pma [root@Lab6-1 pma]# ls browse_foreigners.php error_report.php server_binlog.php tbl_find_replace.php ChangeLog examples server_collations.php tbl_get_field.php changelog.php export.php server_databases.php tbl_gis_visualization.php chk_rel.php favicon.ico server_engines.php tbl_import.php composer.json file_echo.php server_export.php tbl_indexes.php config.sample.inc.php gis_data_editor.php server_import.php tbl_operations.php CONTRIBUTING.md import.php server_plugins.php tbl_printview.php db_central_columns.php import_status.php server_privileges.php tbl_recent_favorite.php db_create.php index.php server_replication.php tbl_relation.php db_datadict.php js server_sql.php tbl_replace.php db_designer.php libraries server_status_advisor.php tbl_row_action.php db_events.php LICENSE server_status_monitor.php tbl_select.php db_export.php license.php server_status.php tbl_sql.php db_import.php locale server_status_processes.php tbl_structure.php db_operations.php navigation.php server_status_queries.php tbl_tracking.php db_printview.php normalization.php server_status_variables.php tbl_triggers.php db_qbe.php phpinfo.php server_user_groups.php tbl_zoom_select.php db_routines.php phpmyadmin.css.php server_variables.php themes db_search.php phpunit.xml.hhvm setup themes.php db_sql_autocomplete.php phpunit.xml.nocoverage show_config_errors.php transformation_overview.php db_sql_format.php prefs_forms.php sql transformation_wrapper.php db_sql.php prefs_manage.php sql.php url.php db_structure.php print.css tbl_addfield.php user_password.php db_tracking.php README tbl_change.php version_check.php db_triggers.php RELEASE-DATE-4.4.14.1 tbl_chart.php view_create.php DCO robots.txt tbl_create.php view_operations.php doc schema_export.php tbl_export.php webapp.php
找到config.sample.inc.php 文件并拷贝一份,重命名为config.inc.php
[root@Lab6-1 pma]# cd /usr/local/apache/htdocs/pma [root@Lab6-1 pma]# cp config.sample.inc.php config.inc.php [root@Lab6-1 ~]# openssl rand -base64 40// 生成随机数命令,40是生成随机数的长度 C2QKeyJheS8s0WJxnsuW5vmssyFpBxHwM7Ugp/zt+LVsJTxhNuHZEA== [root@Lab6-1 pma]# vim config.inc.php
设置完成,我们登录网页进行查看,这里已经提示让我们登录了,需要注意的是 root管理员空密码phpMyAdmin是不让登录的!幸好我们已经做好了安装初始化~设置完成密码,下面我们就登录吧~
输入账号密码完成后 进入mysqlGUI的设置网站页面如下:
未完,待续。