{"id":656,"date":"2026-04-24T16:51:25","date_gmt":"2026-04-24T08:51:25","guid":{"rendered":"https:\/\/blog.zhouhonghe.com\/?p=656"},"modified":"2026-04-24T16:54:54","modified_gmt":"2026-04-24T08:54:54","slug":"ubuntu-server-26-04-lts-%e5%ae%89%e8%a3%85mysql8nginxphp8","status":"publish","type":"post","link":"https:\/\/blog.zhouhonghe.com\/?p=656","title":{"rendered":"Ubuntu Server 26.04 LTS \u5b89\u88c5mysql8+nginx+php8"},"content":{"rendered":"<p># \u66f4\u65b0\u7cfb\u7edf<br \/>\n<code>sudo apt update && sudo apt upgrade -y<\/code><\/p>\n<p><strong>----- \u5b89\u88c5 MySQL 8.0 -----<\/strong><\/p>\n<p># \u5b89\u88c5 MySQL \u670d\u52a1<br \/>\n<code>sudo apt install mysql-server -y<\/code><\/p>\n<p># \u7f16\u8f91\u914d\u7f6e<br \/>\n<code>vi \/etc\/mysql\/mysql.conf.d\/mysqld.cnf<\/code><\/p>\n<p># \u542f\u52a8\u5e76\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f<br \/>\n<code>sudo systemctl start mysql<br \/>\nsudo systemctl enable mysql<\/code><\/p>\n<p># \u8fd0\u884c\u5b89\u5168\u914d\u7f6e\u811a\u672c<br \/>\n<code>sudo mysql_secure_installation<\/code><\/p>\n<p># \u767b\u5f55\u5e76\u4fee\u6539\u5bc6\u7801<br \/>\n<code>sudo mysql -u root<\/code><\/p>\n<p><code>ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY '<strong><em>your_strong_password<\/em><\/strong>';<br \/>\nFLUSH PRIVILEGES;<br \/>\nEXIT;<\/code><\/p>\n<p><strong>----- \u5b89\u88c5 Nginx -----<\/strong><\/p>\n<p># \u5b89\u88c5 Nginx<br \/>\n<code>sudo apt install nginx -y<\/code><\/p>\n<p># \u542f\u52a8\u5e76\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f<br \/>\n<code>sudo systemctl start nginx<br \/>\nsudo systemctl enable nginx<\/code><\/p>\n<p><strong>----- \u5b89\u88c5 PHP -----<\/strong><\/p>\n<p># \u5b89\u88c5 PHP-FPM \u53ca\u5e38\u7528\u6269\u5c55<br \/>\n<code>sudo apt install php-fpm php-mysql php-cli php-curl php-gd php-mbstring php-xml php-zip -y<\/code><\/p>\n<p># \u67e5\u770bPHP\u7248\u672c<br \/>\n<code>php -v<\/code><\/p>\n<p># \u542f\u52a8\u5e76\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\uff08\u670d\u52a1\u540d\u8bf7\u6839\u636e\u5b9e\u9645\u5b89\u88c5\u8c03\u6574\uff0c\u5982 php8.5-fpm\uff09<br \/>\n<code>sudo systemctl start <em><strong>php8.5-fpm<\/strong><\/em><br \/>\nsudo systemctl enable <em><strong>php8.5-fpm<\/strong><\/em><\/code><\/p>\n<p># \u914d\u7f6e Nginx \u89e3\u6790 PHP<br \/>\n<code>sudo vi \/etc\/nginx\/sites-available\/default<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p># \u66f4\u65b0\u7cfb\u7edf sudo apt update &#038;& sudo apt upgrade -y ----- \u5b89\u88c5  [&hellip;]<\/p>... ","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-656","post","type-post","status-publish","format-standard","hentry","category-others"],"_links":{"self":[{"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=\/wp\/v2\/posts\/656","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=656"}],"version-history":[{"count":4,"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=\/wp\/v2\/posts\/656\/revisions"}],"predecessor-version":[{"id":660,"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=\/wp\/v2\/posts\/656\/revisions\/660"}],"wp:attachment":[{"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=656"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zhouhonghe.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}