{"id":341,"date":"2024-11-10T18:58:24","date_gmt":"2024-11-10T10:58:24","guid":{"rendered":"http:\/\/192.168.5.24\/?p=341"},"modified":"2025-04-16T18:07:38","modified_gmt":"2025-04-16T10:07:38","slug":"%e7%bc%96%e8%af%91%e6%96%b9%e5%bc%8f%e9%85%8d%e7%bd%aelamp%e7%8e%af%e5%a2%83%ef%bc%8c%e5%b9%b6%e5%ae%89%e8%a3%85phpmyadmin","status":"publish","type":"post","link":"https:\/\/bigvip.dpdns.org\/?p=341","title":{"rendered":"\u7f16\u8bd1\u65b9\u5f0f\u914d\u7f6eLAMP\u73af\u5883\uff0c\u5e76\u5b89\u88c5phpMyAdmin"},"content":{"rendered":"\n<p>1\u3001\u7f16\u8bd1\u5b89\u88c5apache<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u5148\u5b89\u88c5\u4f9d\u8d56\uff1a\n#yum -y install gcc* make* apr apr-util pcre apr-devel apr-util-devel  pcre-devel  expat-devel libxml2-devel expat-devel openssl-devel oniguruma oniguruma-devel    systemd-devel  sqlite-devel  libcurl-devel libpng-devel <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u5b89\u88c5apr\n tar zxvf apr-1.7.0.tar.gz \n cd apr-1.7.0\n .\/configure --prefix=\/usr\/local\/apr\n make &amp;&amp; make install\n \n\u5b89\u88c5apr-util\ntar zxvf apr-util-1.6.1.tar.gz \ncd apr-util-1.6.1\n.\/configure --prefix=\/usr\/local\/apr-util --with-apr=\/usr\/local\/apr\/bin\/apr-1-config \nmake &amp;&amp; make install\n\n\u5b89\u88c5pcre\ntar zxvf pcre-8.44.tar.gz \ncd pcre-8.44\n.\/configure --prefix=\/usr\/local\/pcre \nmake &amp;&amp; make install\n\n\u5b89\u88c5httpd\ntar zxvf httpd-2.4.46.tar.gz \ncd httpd-2.4.46\nls\n.\/configure --prefix=\/usr\/local\/httpd --with-apr=\/usr\/local\/apr  --with-apr-util=\/usr\/local\/apr-util --with-pcre=\/usr\/local\/pcre --with-mpm=prefork --enable-so --enable-rewite --enable-charset-lite \nmake &amp;&amp; make install<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u914d\u7f6ehttpd\u811a\u672c\n&#91;root@T1 httpd]# cp bin\/apachectl \/etc\/init.d\/httpd\nvi \/etc\/init.d\/httpd\n#!\/bin\/sh\n#chkconfig:35 50 50\n\u2026\u2026\n\nchkconfig --add httpd<\/code><\/pre>\n\n\n\n<p>2\u3001\u5b89\u88c5mysql<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>useradd -M -s \/sbin\/nologin mysql\n\ntar zxvf mysql-5.7.32-el7-x86_64.tar.gz\nmv  mysql-5.7.32-el7-x86_64 \/usr\/local\/mysqld\n\nmkdir \/var\/log\/mariadb\ntouch \/var\/log\/mariadb\/mariadb.log\nchown -R mysql:mysql \/var\/log\/mariadb\/mariadb.log\n\nvi \/etc\/profile  \n\u5728\u6700\u540e\u884c\u52a0\u5165\uff1a\nPATH=$PATH:\/usr\/local\/mysqld\/bin\n\n . \/etc\/profile\n\ncd \/usr\/local\/mysqld\/\ncp support-files\/mysql.server \/etc\/init.d\/mysql\nvi \/etc\/init.d\/mysql\n\u2026\u2026\nbasedir=\/usr\/local\/mysqld\ndatadir=\/mysql\nmysql_pid_file_path=\/tmp\n\u2026\u2026\n\nvi \/etc\/my.cnf\n&#91;mysqld]\ndatadir=\/mysql\nsocket=\/tmp\/mysql.sock\n\nmysqld --initialize -b \/usr\/local\/mysqld -h \/mysql -u mysql\nchkconfig --add mysql\nsystemctl start mysql\n\n\u4fee\u6539mysql\u521d\u59cb\u5bc6\u7801\uff1a\n&#91;root@T1 mysqld]# mysqladmin -u root -p password 123456\nEnter password: \nmysqladmin: &#91;Warning] Using a password on the command line interface can be insecure.\nWarning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.<\/code><\/pre>\n\n\n\n<p>3\u3001\u5b89\u88c5PHP<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># tar xvfj php-7.4.16.tar.bz2\n# cd php-7.4.16\/\n.\/configure --prefix=\/usr\/local\/php --enable-mysqlnd --with-pdo-mysql --with-mysqli  --with-openssl --enable-gd --with-zlib-dir --with-curl --with-pear --enable-inline-optimization --enable-soap --enable-sockets --enable-mbstring --enable-fpm --with-fpm-user=mysql --with-fpm-group=mysql --with-fpm-systemd --with-apxs2=\/usr\/local\/httpd\/bin\/apxs &amp;&amp; make &amp;&amp; make install<\/code><\/pre>\n\n\n\n<p>4\u3001\u4fee\u6539httpd.conf<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi httpd.conf\n\u2026\u2026\n&lt;IfModule dir_module&gt;\nDirectoryIndex index.html index.php #\u6dfb\u52a0PHP\u9996\u9875\n&lt;\/IfModule&gt;\n\u2026\u2026\nAddType application\/x-httpd-php .php\n\u2026\u2026<\/code><\/pre>\n\n\n\n<p>5\u3001\u521b\u5efa\u6d4b\u8bd5\u9875\u9762<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@localhost ~]# vim \/usr\/local\/httpd\/htdocs\/index.php\n&lt;?php\n$link = mysqli_connect(\n'localhost',\n'root', \/*\u8d26\u6237*\/\n'root', \/*\u5bc6\u7801*\/\n'mysql'); \/*\u6570\u636e\u5e93*\/\nif($link){\nprintf(\"Congratulations!\");\n}\n?&gt;<\/code><\/pre>\n\n\n\n<p>6\u3001\u914d\u7f6ephpMyAdmin<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd php-7.4.16\/ext\/openssl\/\nln config0.m4 config.m4\n\/usr\/local\/php\/bin\/phpize \n.\/configure --with-openssl --with-php-config=\/usr\/local\/php\/bin\/php-config &amp;&amp;make &amp;&amp; make install\n\ncp \/usr\/local\/php\/lib\/php\/extensions\/no-debug-non-zts-20190902\/openssl.so \/usr\/local\/php\/etc\/\n\n\u62f7\u8d1dphp\u914d\u7f6e\u6587\u4ef6\u5e76\u7f16\u8f91php.ini\u6587\u4ef6\uff1a\ncp php-7.4.16\/php.ini-development \/usr\/local\/php\/php.ini\n\u5728\u6587\u4ef6\u6700\u540e\u6dfb\u52a0\nextension=openssl.so\n\n\u91cd\u542fhttpd\n# systemctl restart httpd\n\n\u89e3\u538bphpMyAdmin\u5230httpd\u7f51\u9875\u6839\u76ee\u5f55\n\nunzip -d \/usr\/local\/httpd\/htdocs\/ phpMyAdmin-5.1.0-all-languages.zip \nmv \/usr\/local\/httpd\/htdocs\/phpMyAdmin-5.1.0-all-languages \/usr\/local\/httpd\/htdocs\/php<\/code><\/pre>\n\n\n\n<p>7\u3001\u6d4b\u8bd5<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"528\" height=\"486\" src=\"http:\/\/192.168.5.24\/wp-content\/uploads\/2024\/11\/image.png\" alt=\"\" class=\"wp-image-347\" srcset=\"https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/11\/image.png 528w, https:\/\/bigvip.dpdns.org\/wp-content\/uploads\/2024\/11\/image-300x276.png 300w\" sizes=\"auto, (max-width: 528px) 100vw, 528px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u7f16\u8bd1\u5b89\u88c5apache 2\u3001\u5b89\u88c5mysql 3\u3001\u5b89\u88c5PHP 4\u3001\u4fee\u6539httpd.conf 5\u3001\u521b\u5efa\u6d4b\u8bd5\u9875\u9762  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"aside","meta":{"footnotes":""},"categories":[20],"tags":[58,25,15,26],"class_list":["post-341","post","type-post","status-publish","format-aside","hentry","category-linux","tag-apache","tag-lamp","tag-mysql","tag-php","post_format-post-format-aside"],"_links":{"self":[{"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/posts\/341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=341"}],"version-history":[{"count":25,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/posts\/341\/revisions"}],"predecessor-version":[{"id":1042,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=\/wp\/v2\/posts\/341\/revisions\/1042"}],"wp:attachment":[{"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bigvip.dpdns.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}