Lab cài WordPress xài Unix Domain Socket
Xài VMware Workstation hoặc Oracle VM VirtualBox
→cài Ubuntu Server 22.04→ tắt máy →take snapshot
→ mỗi lần làmlab thì Revert lại bản take snapshot
u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-red-coloru0022u003e0.u003c/marku003eu003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-cyan-blue-coloru0022u003e Tắt các dịch vụ không cần thiết có thể ảnh hưởng đến bài labu003c/marku003e
→ 2 lệnh sau tăng tốc độ làm lab→ bài tập cho các bạn á
1 2 3 4 5 6 7 | cat/etc/os-release systemctl stop apparmor unattended-upgrades&& systemctl status apparmor unattended-upgrades--no-pager echo'Acquire::Languages "none";'>>/etc/apt/apt.conf.d/99translation-en&& mv/etc/apt/apt.conf.d/50command-not-found/etc/apt/ |
u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-red-coloru0022u003e→u003c/marku003e u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-cyan-blue-coloru0022u003ekết quả lệnhu003c/marku003e
u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-red-coloru0022u003e1.u003c/marku003eu003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-cyan-blue-coloru0022u003e Cài Apache web serveru003c/marku003e
1 2 3 | apt update&& apt install-yapache2&& systemctl status--no-pager apache2 |
u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-red-coloru0022u003e→u003c/marku003e u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-cyan-blue-coloru0022u003ekết quả lệnhu003c/marku003e
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | root@ubuntu2204:~# apt update && apt install-yapache2&& systemctl status--no-pager apache2 Hit:1http://vn.archive.ubuntu.com/ubuntu jammy InRelease Get:2http://vn.archive.ubuntu.com/ubuntu jammy-updates InRelease[114kB] Get:3http://vn.archive.ubuntu.com/ubuntu jammy-backports InRelease[99.8kB] Get:4http://vn.archive.ubuntu.com/ubuntu jammy-security InRelease[110kB] Get:5http://vn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages[427kB] Get:6http://vn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages[612kB] Get:7http://vn.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages[344kB] Get:8http://vn.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages[7,220B] Get:9http://vn.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages[6,752B] Get:10http://vn.archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages[3,008B] Get:11http://vn.archive.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages[308kB] Get:12http://vn.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages[353kB] Get:13http://vn.archive.ubuntu.com/ubuntu jammy-security/universe amd64 Packages[288kB] Fetched2,673kB in1s(2,989kB/s) Reading packagelists...Done Building dependency tree...Done Reading state information...Done 84packages can be upgraded.Run'apt list --upgradable'tosee them. Reading packagelists...Done Building dependency tree...Done Reading state information...Done The following additional packages will be installed: apache2-bin apache2-data apache2-utils bzip2 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.3-0mailcap mime-support ssl-cert Suggested packages: apache2-doc apache2-suexec-pristine|apache2-suexec-custom www-browser bzip2-doc The following NEWpackages will be installed: apache2 apache2-bin apache2-data apache2-utils bzip2 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.3-0 mailcap mime-support ssl-cert 0upgraded,13newly installed,0toremove and84notupgraded. Need toget2,138kB of archives. After thisoperation,8,501kB of additional disk space will be used. Get:1http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libapr1 amd641.7.0-8build1[107kB] Get:2http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libaprutil1 amd641.6.1-5ubuntu4[92.4kB] Get:3http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libaprutil1-dbd-sqlite3 amd641.6.1-5ubuntu4[11.3kB] Get:4http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libaprutil1-ldap amd641.6.1-5ubuntu4[9,162B] Get:5http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 liblua5.3-0amd645.3.6-1build1[140kB] Get:6http://vn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 apache2-bin amd642.4.52-1ubuntu4.1[1,347kB] Get:7http://vn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 apache2-data all2.4.52-1ubuntu4.1[165kB] Get:8http://vn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 apache2-utils amd642.4.52-1ubuntu4.1[89.1kB] Get:9http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 mailcap all3.70+nmu1ubuntu1[23.8kB] Get:10http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 mime-support all3.66[3,696B] Get:11http://vn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 apache2 amd642.4.52-1ubuntu4.1[97.8kB] Get:12http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 bzip2 amd641.0.8-5build1[34.8kB] Get:13http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 ssl-cert all1.1.2[17.4kB] Fetched2,138kB in1s(2,694kB/s) Preconfiguring packages... Selecting previously unselected packagelibapr1:amd64. (Reading database...73325files anddirectories currently installed.) Preparing tounpack.../00-libapr1_1.7.0-8build1_amd64.deb... Unpacking libapr1:amd64(1.7.0-8build1)... Selecting previously unselected packagelibaprutil1:amd64. Preparing tounpack.../01-libaprutil1_1.6.1-5ubuntu4_amd64.deb... Unpacking libaprutil1:amd64(1.6.1-5ubuntu4)... Selecting previously unselected packagelibaprutil1-dbd-sqlite3:amd64. Preparing tounpack.../02-libaprutil1-dbd-sqlite3_1.6.1-5ubuntu4_amd64.deb... Unpacking libaprutil1-dbd-sqlite3:amd64(1.6.1-5ubuntu4)... Selecting previously unselected packagelibaprutil1-ldap:amd64. Preparing tounpack.../03-libaprutil1-ldap_1.6.1-5ubuntu4_amd64.deb... Unpacking libaprutil1-ldap:amd64(1.6.1-5ubuntu4)... Selecting previously unselected packageliblua5.3-0:amd64. Preparing tounpack.../04-liblua5.3-0_5.3.6-1build1_amd64.deb... Unpacking liblua5.3-0:amd64(5.3.6-1build1)... Selecting previously unselected packageapache2-bin. Preparing tounpack.../05-apache2-bin_2.4.52-1ubuntu4.1_amd64.deb... Unpacking apache2-bin(2.4.52-1ubuntu4.1)... Selecting previously unselected packageapache2-data. Preparing tounpack.../06-apache2-data_2.4.52-1ubuntu4.1_all.deb... Unpacking apache2-data(2.4.52-1ubuntu4.1)... Selecting previously unselected packageapache2-utils. Preparing tounpack.../07-apache2-utils_2.4.52-1ubuntu4.1_amd64.deb... Unpacking apache2-utils(2.4.52-1ubuntu4.1)... Selecting previously unselected packagemailcap. Preparing tounpack.../08-mailcap_3.70+nmu1ubuntu1_all.deb... Unpacking mailcap(3.70+nmu1ubuntu1)... Selecting previously unselected packagemime-support. Preparing tounpack.../09-mime-support_3.66_all.deb... Unpacking mime-support(3.66)... Selecting previously unselected packageapache2. Preparing tounpack.../10-apache2_2.4.52-1ubuntu4.1_amd64.deb... Unpacking apache2(2.4.52-1ubuntu4.1)... Selecting previously unselected packagebzip2. Preparing tounpack.../11-bzip2_1.0.8-5build1_amd64.deb... Unpacking bzip2(1.0.8-5build1)... Selecting previously unselected packagessl-cert. Preparing tounpack.../12-ssl-cert_1.1.2_all.deb... Unpacking ssl-cert(1.1.2)... Setting up libapr1:amd64(1.7.0-8build1)... Setting up bzip2(1.0.8-5build1)... Setting up ssl-cert(1.1.2)... Setting up liblua5.3-0:amd64(5.3.6-1build1)... Setting up apache2-data(2.4.52-1ubuntu4.1)... Setting up mailcap(3.70+nmu1ubuntu1)... Setting up libaprutil1:amd64(1.6.1-5ubuntu4)... Setting up mime-support(3.66)... Setting up libaprutil1-ldap:amd64(1.6.1-5ubuntu4)... Setting up libaprutil1-dbd-sqlite3:amd64(1.6.1-5ubuntu4)... Setting up apache2-utils(2.4.52-1ubuntu4.1)... Setting up apache2-bin(2.4.52-1ubuntu4.1)... Setting up apache2(2.4.52-1ubuntu4.1)... Enabling module mpm_event. Enabling module authz_core. Enabling module authz_host. Enabling module authn_core. Enabling module auth_basic. Enabling module access_compat. Enabling module authn_file. Enabling module authz_user. Enabling module alias. Enabling module dir. Enabling module autoindex. Enabling module env. Enabling module mime. Enabling module negotiation. Enabling module setenvif. Enabling module filter. Enabling module deflate. Enabling module status. Enabling module reqtimeout. Enabling conf charset. Enabling conf localized-error-pages. Enabling conf other-vhosts-access-log. Enabling conf security. Enabling conf serve-cgi-bin. Enabling site000-default. Created symlink/etc/systemd/system/multi-user.target.wants/apache2.service→/lib/systemd/system/apache2.service. Created symlink/etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service→/lib/systemd/system/apache-htcacheclean.service. Processing triggers forufw(0.36.1-4build1)... Processing triggers forman-db(2.10.2-1)... Processing triggers forlibc-bin(2.35-0ubuntu3)... Scanning processes... Scanning linux images... Running kernel seems tobe up-to-date. No services need tobe restarted. No containers need tobe restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor(qemu)binaries on thishost. ●apache2.service-The Apache HTTP Server Loaded:loaded(/lib/systemd/system/apache2.service;enabled;vendor preset:enabled) Active:active(running)since Sun2022-10-0917:53:29UTC;3sago Docs:https://httpd.apache.org/docs/2.4/ Main PID:2118(apache2) Tasks:55(limit:4534) Memory:5.0M CPU:23ms CGroup:/system.slice/apache2.service ├─2118/usr/sbin/apache2-kstart ├─2119/usr/sbin/apache2-kstart └─2120/usr/sbin/apache2-kstart Oct0917:53:29ubuntu2204 systemd[1]:Starting The Apache HTTP Server... Oct0917:53:29ubuntu2204 apachectl[2117]:AH00558:apache2:Could notreliably determine the server'sfully qualified domai…smessage Oct0917:53:29ubuntu2204 systemd[1]:Started The Apache HTTP Server. Hint:Some lines were ellipsized,use-ltoshow infull. |
u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-red-coloru0022u003e2. u003c/marku003eu003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-cyan-blue-coloru0022u003eCài MariaDB database serveru003c/marku003e
1 2 3 4 5 6 7 8 | apt-yinstall mariadb-server&& mysql-e"CREATE USER'username'@'localhost'IDENTIFIED BY'password'; CREATE DATABASE wordpress; GRANT ALL ON wordpress.*TO'username'@'localhost'; FLUSH PRIVILEGES; SELECT user,host from mysql.user; SHOW DATABASES"&& mysql-e'status'|grep^UNIX |
u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-red-coloru0022u003e→u003c/marku003e u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-cyan-blue-coloru0022u003ekết quả lệnhu003c/marku003e
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | root@ubuntu2204:~# apt -y install mariadb-server && mysql-e"CREATE USER'username'@'localhost'IDENTIFIED BY'password'; CREATE DATABASE wordpress; GRANT ALL ON wordpress.*TO'username'@'localhost'; FLUSH PRIVILEGES; SELECT user,host from mysql.user; SHOW DATABASES"&& mysql-e'status'|grep^UNIX Reading packagelists...Done Building dependency tree...Done Reading state information...Done The following additional packages will be installed: galera-4libcgi-fast-perl libcgi-pm-perl libclone-perl libconfig-inifiles-perl libdaxctl1 libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-bin libfcgi-perl libfcgi0ldbl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libmariadb3 libmysqlclient21 libndctl6 libpmem1 libsnappy1v5 libtimedate-perl liburi-perl liburing2 mariadb-client-10.6mariadb-client-core-10.6mariadb-common mariadb-server-10.6 mariadb-server-core-10.6mysql-common socat Suggested packages: libmldbm-perl libnet-daemon-perl libsql-statement-perl libdata-dump-perl libipc-sharedcache-perl libbusiness-isbn-perl libwww-perl mailxmariadb-test The following NEWpackages will be installed: galera-4libcgi-fast-perl libcgi-pm-perl libclone-perl libconfig-inifiles-perl libdaxctl1 libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-bin libfcgi-perl libfcgi0ldbl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libmariadb3 libmysqlclient21 libndctl6 libpmem1 libsnappy1v5 libtimedate-perl liburi-perl liburing2 mariadb-client-10.6mariadb-client-core-10.6mariadb-common mariadb-server mariadb-server-10.6mariadb-server-core-10.6mysql-common socat 0upgraded,35newly installed,0toremove and84notupgraded. Need toget18.4MB of archives. After thisoperation,163MB of additional disk space will be used. Get:1http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 mysql-common all5.8+1.0.8[7,212B] Get:2http://vn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-common all1:10.6.7-2ubuntu1.1[16.2kB] Get:3http://vn.archive.ubuntu.com/ubuntu jammy/universe amd64 galera-4amd6426.4.9-1build1[720kB] Get:4http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libdbi-perl amd641.643-3build3[741kB] Get:5http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libconfig-inifiles-perl all3.000003-1[40.5kB] Get:6http://vn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libmariadb3 amd641:10.6.7-2ubuntu1.1[169kB] Get:7http://vn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-client-core-10.6amd641:10.6.7-2ubuntu1.1[917kB] Get:8http://vn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-client-10.6amd641:10.6.7-2ubuntu1.1[1,630kB] Get:9http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libdaxctl1 amd6472.1-1[19.8kB] Get:10http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libndctl6 amd6472.1-1[57.7kB] Get:11http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libpmem1 amd641.11.1-3build1[81.4kB] Get:12http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libsnappy1v5 amd641.1.8-1build3[17.5kB] Get:13http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 liburing2 amd642.1-2build1[10.3kB] Get:14http://vn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-server-core-10.6amd641:10.6.7-2ubuntu1.1[7,547kB] Get:15http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 socat amd641.7.4.1-3ubuntu4[349kB] Get:16http://vn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-server-10.6amd641:10.6.7-2ubuntu1.1[4,031kB] Get:17http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libhtml-tagset-perl all3.20-4[12.5kB] Get:18http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 liburi-perl all5.10-1[78.8kB] Get:19http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libhtml-parser-perl amd643.76-1build2[88.4kB] Get:20http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libcgi-pm-perl all4.54-1[188kB] Get:21http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libfcgi0ldbl amd642.4.2-2build2[28.0kB] Get:22http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libfcgi-perl amd640.82+ds-1build1[22.8kB] Get:23http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libcgi-fast-perl all1:2.15-1[10.5kB] Get:24http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libclone-perl amd640.45-1build3[11.0kB] Get:25http://vn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libmysqlclient21 amd648.0.30-0ubuntu0.22.04.1[1,301kB] Get:26http://vn.archive.ubuntu.com/ubuntu jammy/universe amd64 libdbd-mysql-perl amd644.050-5[87.6kB] Get:27http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libencode-locale-perl all1.05-1.1[11.8kB] Get:28http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libfcgi-bin amd642.4.2-2build2[11.2kB] Get:29http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libhtml-template-perl all2.97-1.1[59.1kB] Get:30http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libtimedate-perl all2.3300-2[34.0kB] Get:31http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libhttp-date-perl all6.05-1[9,920B] Get:32http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libio-html-perl all1.004-2[15.4kB] Get:33http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 liblwp-mediatypes-perl all6.04-1[19.5kB] Get:34http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libhttp-message-perl all6.36-1[76.8kB] Get:35http://vn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-server all1:10.6.7-2ubuntu1.1[11.8kB] Fetched18.4MB in12s(1,523kB/s) Extracting templates from packages:100% Preconfiguring packages... Selecting previously unselected packagemysql-common. (Reading database...74094files anddirectories currently installed.) Preparing tounpack.../00-mysql-common_5.8+1.0.8_all.deb... Unpacking mysql-common(5.8+1.0.8)... Selecting previously unselected packagemariadb-common. Preparing tounpack.../01-mariadb-common_1%3a10.6.7-2ubuntu1.1_all.deb... Unpacking mariadb-common(1:10.6.7-2ubuntu1.1)... Selecting previously unselected packagegalera-4. Preparing tounpack.../02-galera-4_26.4.9-1build1_amd64.deb... Unpacking galera-4(26.4.9-1build1)... Selecting previously unselected packagelibdbi-perl:amd64. Preparing tounpack.../03-libdbi-perl_1.643-3build3_amd64.deb... Unpacking libdbi-perl:amd64(1.643-3build3)... Selecting previously unselected packagelibconfig-inifiles-perl. Preparing tounpack.../04-libconfig-inifiles-perl_3.000003-1_all.deb... Unpacking libconfig-inifiles-perl(3.000003-1)... Selecting previously unselected packagelibmariadb3:amd64. Preparing tounpack.../05-libmariadb3_1%3a10.6.7-2ubuntu1.1_amd64.deb... Unpacking libmariadb3:amd64(1:10.6.7-2ubuntu1.1)... Selecting previously unselected packagemariadb-client-core-10.6. Preparing tounpack.../06-mariadb-client-core-10.6_1%3a10.6.7-2ubuntu1.1_amd64.deb... Unpacking mariadb-client-core-10.6(1:10.6.7-2ubuntu1.1)... Selecting previously unselected packagemariadb-client-10.6. Preparing tounpack.../07-mariadb-client-10.6_1%3a10.6.7-2ubuntu1.1_amd64.deb... Unpacking mariadb-client-10.6(1:10.6.7-2ubuntu1.1)... Selecting previously unselected packagelibdaxctl1:amd64. Preparing tounpack.../08-libdaxctl1_72.1-1_amd64.deb... Unpacking libdaxctl1:amd64(72.1-1)... Selecting previously unselected packagelibndctl6:amd64. Preparing tounpack.../09-libndctl6_72.1-1_amd64.deb... Unpacking libndctl6:amd64(72.1-1)... Selecting previously unselected packagelibpmem1:amd64. Preparing tounpack.../10-libpmem1_1.11.1-3build1_amd64.deb... Unpacking libpmem1:amd64(1.11.1-3build1)... Selecting previously unselected packagelibsnappy1v5:amd64. Preparing tounpack.../11-libsnappy1v5_1.1.8-1build3_amd64.deb... Unpacking libsnappy1v5:amd64(1.1.8-1build3)... Selecting previously unselected packageliburing2:amd64. Preparing tounpack.../12-liburing2_2.1-2build1_amd64.deb... Unpacking liburing2:amd64(2.1-2build1)... Selecting previously unselected packagemariadb-server-core-10.6. Preparing tounpack.../13-mariadb-server-core-10.6_1%3a10.6.7-2ubuntu1.1_amd64.deb... Unpacking mariadb-server-core-10.6(1:10.6.7-2ubuntu1.1)... Selecting previously unselected packagesocat. Preparing tounpack.../14-socat_1.7.4.1-3ubuntu4_amd64.deb... Unpacking socat(1.7.4.1-3ubuntu4)... Setting up mysql-common(5.8+1.0.8)... update-alternatives:using/etc/mysql/my.cnf.fallbacktoprovide/etc/mysql/my.cnf(my.cnf)inauto mode Setting up mariadb-common(1:10.6.7-2ubuntu1.1)... update-alternatives:using/etc/mysql/mariadb.cnftoprovide/etc/mysql/my.cnf(my.cnf)inauto mode Selecting previously unselected packagemariadb-server-10.6. (Reading database...74551files anddirectories currently installed.) Preparing tounpack.../00-mariadb-server-10.6_1%3a10.6.7-2ubuntu1.1_amd64.deb... Unpacking mariadb-server-10.6(1:10.6.7-2ubuntu1.1)... Selecting previously unselected packagelibhtml-tagset-perl. Preparing tounpack.../01-libhtml-tagset-perl_3.20-4_all.deb... Unpacking libhtml-tagset-perl(3.20-4)... Selecting previously unselected packageliburi-perl. Preparing tounpack.../02-liburi-perl_5.10-1_all.deb... Unpacking liburi-perl(5.10-1)... Selecting previously unselected packagelibhtml-parser-perl:amd64. Preparing tounpack.../03-libhtml-parser-perl_3.76-1build2_amd64.deb... Unpacking libhtml-parser-perl:amd64(3.76-1build2)... Selecting previously unselected packagelibcgi-pm-perl. Preparing tounpack.../04-libcgi-pm-perl_4.54-1_all.deb... Unpacking libcgi-pm-perl(4.54-1)... Selecting previously unselected packagelibfcgi0ldbl:amd64. Preparing tounpack.../05-libfcgi0ldbl_2.4.2-2build2_amd64.deb... Unpacking libfcgi0ldbl:amd64(2.4.2-2build2)... Selecting previously unselected packagelibfcgi-perl:amd64. Preparing tounpack.../06-libfcgi-perl_0.82+ds-1build1_amd64.deb... Unpacking libfcgi-perl:amd64(0.82+ds-1build1)... Selecting previously unselected packagelibcgi-fast-perl. Preparing tounpack.../07-libcgi-fast-perl_1%3a2.15-1_all.deb... Unpacking libcgi-fast-perl(1:2.15-1)... Selecting previously unselected packagelibclone-perl. Preparing tounpack.../08-libclone-perl_0.45-1build3_amd64.deb... Unpacking libclone-perl(0.45-1build3)... Selecting previously unselected packagelibmysqlclient21:amd64. Preparing tounpack.../09-libmysqlclient21_8.0.30-0ubuntu0.22.04.1_amd64.deb... Unpacking libmysqlclient21:amd64(8.0.30-0ubuntu0.22.04.1)... Selecting previously unselected packagelibdbd-mysql-perl:amd64. Preparing tounpack.../10-libdbd-mysql-perl_4.050-5_amd64.deb... Unpacking libdbd-mysql-perl:amd64(4.050-5)... Selecting previously unselected packagelibencode-locale-perl. Preparing tounpack.../11-libencode-locale-perl_1.05-1.1_all.deb... Unpacking libencode-locale-perl(1.05-1.1)... Selecting previously unselected packagelibfcgi-bin. Preparing tounpack.../12-libfcgi-bin_2.4.2-2build2_amd64.deb... Unpacking libfcgi-bin(2.4.2-2build2)... Selecting previously unselected packagelibhtml-template-perl. Preparing tounpack.../13-libhtml-template-perl_2.97-1.1_all.deb... Unpacking libhtml-template-perl(2.97-1.1)... Selecting previously unselected packagelibtimedate-perl. Preparing tounpack.../14-libtimedate-perl_2.3300-2_all.deb... Unpacking libtimedate-perl(2.3300-2)... Selecting previously unselected packagelibhttp-date-perl. Preparing tounpack.../15-libhttp-date-perl_6.05-1_all.deb... Unpacking libhttp-date-perl(6.05-1)... Selecting previously unselected packagelibio-html-perl. Preparing tounpack.../16-libio-html-perl_1.004-2_all.deb... Unpacking libio-html-perl(1.004-2)... Selecting previously unselected packageliblwp-mediatypes-perl. Preparing tounpack.../17-liblwp-mediatypes-perl_6.04-1_all.deb... Unpacking liblwp-mediatypes-perl(6.04-1)... Selecting previously unselected packagelibhttp-message-perl. Preparing tounpack.../18-libhttp-message-perl_6.36-1_all.deb... Unpacking libhttp-message-perl(6.36-1)... Selecting previously unselected packagemariadb-server. Preparing tounpack.../19-mariadb-server_1%3a10.6.7-2ubuntu1.1_all.deb... Unpacking mariadb-server(1:10.6.7-2ubuntu1.1)... Setting up libconfig-inifiles-perl(3.000003-1)... Setting up galera-4(26.4.9-1build1)... Setting up libmysqlclient21:amd64(8.0.30-0ubuntu0.22.04.1)... Setting up libfcgi0ldbl:amd64(2.4.2-2build2)... Setting up libclone-perl(0.45-1build3)... Setting up libhtml-tagset-perl(3.20-4)... Setting up liblwp-mediatypes-perl(6.04-1)... Setting up libfcgi-bin(2.4.2-2build2)... Setting up libencode-locale-perl(1.05-1.1)... Setting up libsnappy1v5:amd64(1.1.8-1build3)... Setting up socat(1.7.4.1-3ubuntu4)... Setting up libio-html-perl(1.004-2)... Setting up libmariadb3:amd64(1:10.6.7-2ubuntu1.1)... Setting up libdaxctl1:amd64(72.1-1)... Setting up libtimedate-perl(2.3300-2)... Setting up libndctl6:amd64(72.1-1)... Setting up libfcgi-perl:amd64(0.82+ds-1build1)... Setting up liburing2:amd64(2.1-2build1)... Setting up libpmem1:amd64(1.11.1-3build1)... Setting up liburi-perl(5.10-1)... Setting up libdbi-perl:amd64(1.643-3build3)... Setting up mariadb-server-core-10.6(1:10.6.7-2ubuntu1.1)... Setting up libhttp-date-perl(6.05-1)... Setting up mariadb-client-core-10.6(1:10.6.7-2ubuntu1.1)... Setting up libdbd-mysql-perl:amd64(4.050-5)... Setting up libhtml-parser-perl:amd64(3.76-1build2)... Setting up mariadb-client-10.6(1:10.6.7-2ubuntu1.1)... Setting up libhttp-message-perl(6.36-1)... Setting up libcgi-pm-perl(4.54-1)... Setting up libhtml-template-perl(2.97-1.1)... Setting up mariadb-server-10.6(1:10.6.7-2ubuntu1.1)... Created symlink/etc/systemd/system/multi-user.target.wants/mariadb.service→/lib/systemd/system/mariadb.service. Setting up libcgi-fast-perl(1:2.15-1)... Setting up mariadb-server(1:10.6.7-2ubuntu1.1)... Processing triggers forman-db(2.10.2-1)... Processing triggers forlibc-bin(2.35-0ubuntu3)... Scanning processes... Scanning linux images... Running kernel seems tobe up-to-date. No services need tobe restarted. No containers need tobe restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor(qemu)binaries on thishost. +-------------+-----------+ |User |Host | +-------------+-----------+ |mariadb.sys|localhost| |mysql |localhost| |root |localhost| |username |localhost| +-------------+-----------+ +--------------------+ |Database | +--------------------+ |information_schema| |mysql | |performance_schema| |sys | |wordpress | +--------------------+ UNIX socket: /run/mysqld/mysqld.sock |
u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-red-coloru0022u003e3. u003c/marku003eu003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-cyan-blue-coloru0022u003eCài PHP để chạy WordPressu003c/marku003e
1 2 3 4 5 | apt-yinstall php-fpm php-common php-gd php-mysql php-enchant hunspell&& a2enmod proxy_fcgi setenvif&& systemctl restart apache2&& a2enconf php8.1-fpm&& systemctl reload apache2 |
u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-red-coloru0022u003e→u003c/marku003e kết quả lệnh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 | root@ubuntu2204:~# apt -y install php-fpm php-common php-gd php-mysql php-enchant hunspell && a2enmod proxy_fcgi setenvif&& systemctl restart apache2&& a2enconf php8.1-fpm&& systemctl reload apache2 Reading packagelists...Done Building dependency tree...Done Reading state information...Done The following additional packages will be installed: aspell aspell-en dictionaries-common emacsen-common enchant-2fontconfig-config fonts-dejavu-core hunspell-en-us libaspell15 libdeflate0 libenchant-2-2libfontconfig1 libgd3 libhunspell-1.7-0libjbig0 libjpeg-turbo8 libjpeg8 libtiff5 libwebp7 libxpm4 php8.1-cli php8.1-common php8.1-enchant php8.1-fpm php8.1-gd php8.1-mysql php8.1-opcache php8.1-readline Suggested packages: aspell-doc spellutils wordlist unzip openoffice.org-hunspell|openoffice.org-core libenchant-2-voikko libgd-tools php-pear The following NEWpackages will be installed: aspell aspell-en dictionaries-common emacsen-common enchant-2fontconfig-config fonts-dejavu-core hunspell hunspell-en-us libaspell15 libdeflate0 libenchant-2-2libfontconfig1 libgd3 libhunspell-1.7-0libjbig0 libjpeg-turbo8 libjpeg8 libtiff5 libwebp7 libxpm4 php-common php-enchant php-fpm php-gd php-mysql php8.1-cli php8.1-common php8.1-enchant php8.1-fpm php8.1-gd php8.1-mysql php8.1-opcache php8.1-readline 0upgraded,34newly installed,0toremove and84notupgraded. Need toget8,862kB of archives. After thisoperation,33.8MB of additional disk space will be used. Get:1http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libaspell15 amd640.60.8-4build1[325kB] Get:2http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 emacsen-common all3.0.4[14.9kB] Get:3http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 dictionaries-common all1.28.14[185kB] Get:4http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 aspell amd640.60.8-4build1[87.7kB] Get:5http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 aspell-en all2018.04.16-0-1[299kB] Get:6http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 hunspell-en-us all1:2020.12.07-2[280kB] Get:7http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libhunspell-1.7-0amd641.7.0-4build1[175kB] Get:8http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libenchant-2-2amd642.3.2-1ubuntu2[50.9kB] Get:9http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 enchant-2amd642.3.2-1ubuntu2[13.0kB] Get:10http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 fonts-dejavu-core all2.37-2build1[1,041kB] Get:11http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 fontconfig-config all2.13.1-4.2ubuntu5[29.1kB] Get:12http://vn.archive.ubuntu.com/ubuntu jammy/universe amd64 hunspell amd641.7.0-4build1[67.9kB] Get:13http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libdeflate0 amd641.10-2[70.9kB] Get:14http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libfontconfig1 amd642.13.1-4.2ubuntu5[131kB] Get:15http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libjpeg-turbo8 amd642.1.2-0ubuntu1[134kB] Get:16http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libjpeg8 amd648c-2ubuntu10[2,264B] Get:17http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libjbig0 amd642.1-3.1build3[28.9kB] Get:18http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libwebp7 amd641.2.2-2[206kB] Get:19http://vn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libtiff5 amd644.3.0-6ubuntu0.1[183kB] Get:20http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libxpm4 amd641:3.5.12-1build2[36.2kB] Get:21http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 libgd3 amd642.3.0-2ubuntu2[129kB] Get:22http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 php-common all2:92ubuntu1[12.4kB] Get:23http://vn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 php8.1-common amd648.1.2-1ubuntu2.5[1,124kB] Get:24http://vn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 php8.1-enchant amd648.1.2-1ubuntu2.5[10.2kB] Get:25http://vn.archive.ubuntu.com/ubuntu jammy/universe amd64 php-enchant all2:8.1+92ubuntu1[1,834B] Get:26http://vn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 php8.1-opcache amd648.1.2-1ubuntu2.5[365kB] Get:27http://vn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 php8.1-readline amd648.1.2-1ubuntu2.5[13.5kB] Get:28http://vn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 php8.1-cli amd648.1.2-1ubuntu2.5[1,834kB] Get:29http://vn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 php8.1-fpm amd648.1.2-1ubuntu2.5[1,840kB] Get:30http://vn.archive.ubuntu.com/ubuntu jammy/universe amd64 php-fpm all2:8.1+92ubuntu1[2,838B] Get:31http://vn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 php8.1-gd amd648.1.2-1ubuntu2.5[32.6kB] Get:32http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 php-gd all2:8.1+92ubuntu1[1,828B] Get:33http://vn.archive.ubuntu.com/ubuntu jammy-updates/main amd64 php8.1-mysql amd648.1.2-1ubuntu2.5[130kB] Get:34http://vn.archive.ubuntu.com/ubuntu jammy/main amd64 php-mysql all2:8.1+92ubuntu1[1,834B] Fetched8,862kB in3s(3,527kB/s) Extracting templates from packages:100% Preconfiguring packages... Selecting previously unselected packagelibaspell15:amd64. (Reading database...75004files anddirectories currently installed.) Preparing tounpack.../00-libaspell15_0.60.8-4build1_amd64.deb... Unpacking libaspell15:amd64(0.60.8-4build1)... Selecting previously unselected packageemacsen-common. Preparing tounpack.../01-emacsen-common_3.0.4_all.deb... Unpacking emacsen-common(3.0.4)... Selecting previously unselected packagedictionaries-common. Preparing tounpack.../02-dictionaries-common_1.28.14_all.deb... Adding'diversion of /usr/share/dict/words to /usr/share/dict/words.pre-dictionaries-common by dictionaries-common' Unpacking dictionaries-common(1.28.14)... Selecting previously unselected packageaspell. Preparing tounpack.../03-aspell_0.60.8-4build1_amd64.deb... Unpacking aspell(0.60.8-4build1)... Selecting previously unselected packageaspell-en. Preparing tounpack.../04-aspell-en_2018.04.16-0-1_all.deb... Unpacking aspell-en(2018.04.16-0-1)... Selecting previously unselected packagehunspell-en-us. Preparing tounpack.../05-hunspell-en-us_1%3a2020.12.07-2_all.deb... Unpacking hunspell-en-us(1:2020.12.07-2)... Selecting previously unselected packagelibhunspell-1.7-0:amd64. Preparing tounpack.../06-libhunspell-1.7-0_1.7.0-4build1_amd64.deb... Unpacking libhunspell-1.7-0:amd64(1.7.0-4build1)... Selecting previously unselected packagelibenchant-2-2:amd64. Preparing tounpack.../07-libenchant-2-2_2.3.2-1ubuntu2_amd64.deb... Unpacking libenchant-2-2:amd64(2.3.2-1ubuntu2)... Selecting previously unselected packageenchant-2. Preparing tounpack.../08-enchant-2_2.3.2-1ubuntu2_amd64.deb... Unpacking enchant-2(2.3.2-1ubuntu2)... Selecting previously unselected packagefonts-dejavu-core. Preparing tounpack.../09-fonts-dejavu-core_2.37-2build1_all.deb... Unpacking fonts-dejavu-core(2.37-2build1)... Selecting previously unselected packagefontconfig-config. Preparing tounpack.../10-fontconfig-config_2.13.1-4.2ubuntu5_all.deb... Unpacking fontconfig-config(2.13.1-4.2ubuntu5)... Selecting previously unselected packagehunspell. Preparing tounpack.../11-hunspell_1.7.0-4build1_amd64.deb... Unpacking hunspell(1.7.0-4build1)... Selecting previously unselected packagelibdeflate0:amd64. Preparing tounpack.../12-libdeflate0_1.10-2_amd64.deb... Unpacking libdeflate0:amd64(1.10-2)... Selecting previously unselected packagelibfontconfig1:amd64. Preparing tounpack.../13-libfontconfig1_2.13.1-4.2ubuntu5_amd64.deb... Unpacking libfontconfig1:amd64(2.13.1-4.2ubuntu5)... Selecting previously unselected packagelibjpeg-turbo8:amd64. Preparing tounpack.../14-libjpeg-turbo8_2.1.2-0ubuntu1_amd64.deb... Unpacking libjpeg-turbo8:amd64(2.1.2-0ubuntu1)... Selecting previously unselected packagelibjpeg8:amd64. Preparing tounpack.../15-libjpeg8_8c-2ubuntu10_amd64.deb... Unpacking libjpeg8:amd64(8c-2ubuntu10)... Selecting previously unselected packagelibjbig0:amd64. Preparing tounpack.../16-libjbig0_2.1-3.1build3_amd64.deb... Unpacking libjbig0:amd64(2.1-3.1build3)... Selecting previously unselected packagelibwebp7:amd64. Preparing tounpack.../17-libwebp7_1.2.2-2_amd64.deb... Unpacking libwebp7:amd64(1.2.2-2)... Selecting previously unselected packagelibtiff5:amd64. Preparing tounpack.../18-libtiff5_4.3.0-6ubuntu0.1_amd64.deb... Unpacking libtiff5:amd64(4.3.0-6ubuntu0.1)... Selecting previously unselected packagelibxpm4:amd64. Preparing tounpack.../19-libxpm4_1%3a3.5.12-1build2_amd64.deb... Unpacking libxpm4:amd64(1:3.5.12-1build2)... Selecting previously unselected packagelibgd3:amd64. Preparing tounpack.../20-libgd3_2.3.0-2ubuntu2_amd64.deb... Unpacking libgd3:amd64(2.3.0-2ubuntu2)... Selecting previously unselected packagephp-common. Preparing tounpack.../21-php-common_2%3a92ubuntu1_all.deb... Unpacking php-common(2:92ubuntu1)... Selecting previously unselected packagephp8.1-common. Preparing tounpack.../22-php8.1-common_8.1.2-1ubuntu2.5_amd64.deb... Unpacking php8.1-common(8.1.2-1ubuntu2.5)... Selecting previously unselected packagephp8.1-enchant. Preparing tounpack.../23-php8.1-enchant_8.1.2-1ubuntu2.5_amd64.deb... Unpacking php8.1-enchant(8.1.2-1ubuntu2.5)... Selecting previously unselected packagephp-enchant. Preparing tounpack.../24-php-enchant_2%3a8.1+92ubuntu1_all.deb... Unpacking php-enchant(2:8.1+92ubuntu1)... Selecting previously unselected packagephp8.1-opcache. Preparing tounpack.../25-php8.1-opcache_8.1.2-1ubuntu2.5_amd64.deb... Unpacking php8.1-opcache(8.1.2-1ubuntu2.5)... Selecting previously unselected packagephp8.1-readline. Preparing tounpack.../26-php8.1-readline_8.1.2-1ubuntu2.5_amd64.deb... Unpacking php8.1-readline(8.1.2-1ubuntu2.5)... Selecting previously unselected packagephp8.1-cli. Preparing tounpack.../27-php8.1-cli_8.1.2-1ubuntu2.5_amd64.deb... Unpacking php8.1-cli(8.1.2-1ubuntu2.5)... Selecting previously unselected packagephp8.1-fpm. Preparing tounpack.../28-php8.1-fpm_8.1.2-1ubuntu2.5_amd64.deb... Unpacking php8.1-fpm(8.1.2-1ubuntu2.5)... Selecting previously unselected packagephp-fpm. Preparing tounpack.../29-php-fpm_2%3a8.1+92ubuntu1_all.deb... Unpacking php-fpm(2:8.1+92ubuntu1)... Selecting previously unselected packagephp8.1-gd. Preparing tounpack.../30-php8.1-gd_8.1.2-1ubuntu2.5_amd64.deb... Unpacking php8.1-gd(8.1.2-1ubuntu2.5)... Selecting previously unselected packagephp-gd. Preparing tounpack.../31-php-gd_2%3a8.1+92ubuntu1_all.deb... Unpacking php-gd(2:8.1+92ubuntu1)... Selecting previously unselected packagephp8.1-mysql. Preparing tounpack.../32-php8.1-mysql_8.1.2-1ubuntu2.5_amd64.deb... Unpacking php8.1-mysql(8.1.2-1ubuntu2.5)... Selecting previously unselected packagephp-mysql. Preparing tounpack.../33-php-mysql_2%3a8.1+92ubuntu1_all.deb... Unpacking php-mysql(2:8.1+92ubuntu1)... Setting up php-common(2:92ubuntu1)... Created symlink/etc/systemd/system/timers.target.wants/phpsessionclean.timer→/lib/systemd/system/phpsessionclean.timer. Setting up libxpm4:amd64(1:3.5.12-1build2)... Setting up php8.1-common(8.1.2-1ubuntu2.5)... Creating config file/etc/php/8.1/mods-available/calendar.iniwith newversion Creating config file/etc/php/8.1/mods-available/ctype.iniwith newversion Creating config file/etc/php/8.1/mods-available/exif.iniwith newversion Creating config file/etc/php/8.1/mods-available/fileinfo.iniwith newversion Creating config file/etc/php/8.1/mods-available/ffi.iniwith newversion Creating config file/etc/php/8.1/mods-available/ftp.iniwith newversion Creating config file/etc/php/8.1/mods-available/gettext.iniwith newversion Creating config file/etc/php/8.1/mods-available/iconv.iniwith newversion Creating config file/etc/php/8.1/mods-available/pdo.iniwith newversion Creating config file/etc/php/8.1/mods-available/phar.iniwith newversion Creating config file/etc/php/8.1/mods-available/posix.iniwith newversion Creating config file/etc/php/8.1/mods-available/shmop.iniwith newversion Creating config file/etc/php/8.1/mods-available/sockets.iniwith newversion Creating config file/etc/php/8.1/mods-available/sysvmsg.iniwith newversion Creating config file/etc/php/8.1/mods-available/sysvsem.iniwith newversion Creating config file/etc/php/8.1/mods-available/sysvshm.iniwith newversion Creating config file/etc/php/8.1/mods-available/tokenizer.iniwith newversion Setting up libaspell15:amd64(0.60.8-4build1)... Setting up libdeflate0:amd64(1.10-2)... Setting up libjbig0:amd64(2.1-3.1build3)... Setting up emacsen-common(3.0.4)... Setting up php8.1-mysql(8.1.2-1ubuntu2.5)... Creating config file/etc/php/8.1/mods-available/mysqlnd.iniwith newversion Creating config file/etc/php/8.1/mods-available/mysqli.iniwith newversion Creating config file/etc/php/8.1/mods-available/pdo_mysql.iniwith newversion Setting up fonts-dejavu-core(2.37-2build1)... Setting up libjpeg-turbo8:amd64(2.1.2-0ubuntu1)... Setting up libwebp7:amd64(1.2.2-2)... Setting up php8.1-readline(8.1.2-1ubuntu2.5)... Creating config file/etc/php/8.1/mods-available/readline.iniwith newversion Setting up libhunspell-1.7-0:amd64(1.7.0-4build1)... Setting up php8.1-opcache(8.1.2-1ubuntu2.5)... Creating config file/etc/php/8.1/mods-available/opcache.iniwith newversion Setting up libjpeg8:amd64(8c-2ubuntu10)... Setting up php-mysql(2:8.1+92ubuntu1)... Setting up dictionaries-common(1.28.14)... Setting up fontconfig-config(2.13.1-4.2ubuntu5)... Setting up php8.1-cli(8.1.2-1ubuntu2.5)... update-alternatives:using/usr/bin/php8.1toprovide/usr/bin/php(php)inauto mode update-alternatives:using/usr/bin/phar8.1toprovide/usr/bin/phar(phar)inauto mode update-alternatives:using/usr/bin/phar.phar8.1toprovide/usr/bin/phar.phar(phar.phar)inauto mode Creating config file/etc/php/8.1/cli/php.iniwith newversion Setting up aspell(0.60.8-4build1)... Setting up hunspell-en-us(1:2020.12.07-2)... Setting up libtiff5:amd64(4.3.0-6ubuntu0.1)... Setting up libfontconfig1:amd64(2.13.1-4.2ubuntu5)... Setting up hunspell(1.7.0-4build1)... Setting up libenchant-2-2:amd64(2.3.2-1ubuntu2)... Setting up aspell-en(2018.04.16-0-1)... Setting up enchant-2(2.3.2-1ubuntu2)... Setting up php8.1-enchant(8.1.2-1ubuntu2.5)... Creating config file/etc/php/8.1/mods-available/enchant.iniwith newversion Setting up php8.1-fpm(8.1.2-1ubuntu2.5)... Creating config file/etc/php/8.1/fpm/php.iniwith newversion NOTICE:Notenabling PHP8.1FPM by default. NOTICE:Toenable PHP8.1FPM inApache2 do: NOTICE:a2enmod proxy_fcgi setenvif NOTICE:a2enconf php8.1-fpm NOTICE:You are seeing thismessage because you have apache2 packageinstalled. Created symlink/etc/systemd/system/multi-user.target.wants/php8.1-fpm.service→/lib/systemd/system/php8.1-fpm.service. Setting up libgd3:amd64(2.3.0-2ubuntu2)... Setting up php-fpm(2:8.1+92ubuntu1)... Setting up php-enchant(2:8.1+92ubuntu1)... Setting up php8.1-gd(8.1.2-1ubuntu2.5)... Creating config file/etc/php/8.1/mods-available/gd.iniwith newversion Setting up php-gd(2:8.1+92ubuntu1)... Processing triggers forman-db(2.10.2-1)... Processing triggers forlibc-bin(2.35-0ubuntu3)... Processing triggers fordictionaries-common(1.28.14)... aspell-autobuildhash:processing:en[en-common]. aspell-autobuildhash:processing:en[en-variant_0]. aspell-autobuildhash:processing:en[en-variant_1]. aspell-autobuildhash:processing:en[en-variant_2]. aspell-autobuildhash:processing:en[en-w_accents-only]. aspell-autobuildhash:processing:en[en-wo_accents-only]. aspell-autobuildhash:processing:en[en_AU-variant_0]. aspell-autobuildhash:processing:en[en_AU-variant_1]. aspell-autobuildhash:processing:en[en_AU-w_accents-only]. aspell-autobuildhash:processing:en[en_AU-wo_accents-only]. aspell-autobuildhash:processing:en[en_CA-variant_0]. aspell-autobuildhash:processing:en[en_CA-variant_1]. aspell-autobuildhash:processing:en[en_CA-w_accents-only]. aspell-autobuildhash:processing:en[en_CA-wo_accents-only]. aspell-autobuildhash:processing:en[en_GB-ise-w_accents-only]. aspell-autobuildhash:processing:en[en_GB-ise-wo_accents-only]. aspell-autobuildhash:processing:en[en_GB-ize-w_accents-only]. aspell-autobuildhash:processing:en[en_GB-ize-wo_accents-only]. aspell-autobuildhash:processing:en[en_GB-variant_0]. aspell-autobuildhash:processing:en[en_GB-variant_1]. aspell-autobuildhash:processing:en[en_US-w_accents-only]. aspell-autobuildhash:processing:en[en_US-wo_accents-only]. Processing triggers forphp8.1-cli(8.1.2-1ubuntu2.5)... Processing triggers forphp8.1-fpm(8.1.2-1ubuntu2.5)... NOTICE:Notenabling PHP8.1FPM by default. NOTICE:Toenable PHP8.1FPM inApache2 do: NOTICE:a2enmod proxy_fcgi setenvif NOTICE:a2enconf php8.1-fpm NOTICE:You are seeing thismessage because you have apache2 packageinstalled. Scanning processes... Scanning linux images... Running kernel seems tobe up-to-date. No services need tobe restarted. No containers need tobe restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor(qemu)binaries on thishost. Considering dependency proxy forproxy_fcgi: Enabling module proxy. Enabling module proxy_fcgi. Module setenvif already enabled Toactivate the newconfiguration,you need torun: systemctl restart apache2 Enabling conf php8.1-fpm. Toactivate the newconfiguration,you need torun: systemctl reload apache2 |
u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-red-coloru0022u003e4. u003c/marku003eCài WordPress từ source web mới nhất
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | apt-yinstall wget&& wget https://wordpress.org/latest.tar.gz&& tar zxf latest.tar.gz-C/var/www/&& chown-Rwww-data./var/www/wordpress cat>/etc/apache2/conf-available/wordpress.conf<<EOF Timeout600 Alias/wordpress"/var/www/wordpress/" <Directory"/var/www/wordpress"> Options FollowSymLinks AllowOverride All Require all granted </Directory> EOF a2enconf wordpress&& systemctl reload apache2 |
u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-red-coloru0022u003e→u003c/marku003e kết quả lệnh
u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-red-coloru0022u003e5.u003c/marku003e Cấu hình WordPress xài Unix Domain Socket
Xem lại Unix Domain Socket của MariaDB + địa chỉ IP của máy ảo để chạy web
1 | mysql-e'status'&&ipa |
u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-red-coloru0022u003e→u003c/marku003e kết quả lệnh
→ wào web WordPress bằng http://ip_address/wordpress
u003cmark style=u0022background-color:rgba(0, 0, 0, 0)u0022 class=u0022has-inline-color has-vivid-red-coloru0022u003e5.1 u003c/marku003ePHẦN CHÍNH CỦA BÀI LAB Ở ĐÂY, KHOA HÃY NHẤN SUBMIT NHA
Mí cái lệnh ở trên đã tạo Database Name, Username, Password trùng với giá trị default roài
→ giờ chỉ cần thay localhost bằng Unix Domain Socket là /run/mysqld/mysqld.sock thoai
Khoan đã trước khi nhấn Submit thử xem /run/mysqld/mysqld.sock có gì thay đổi trước và sau khi Submit hem
1 | apt-yinstall lsof&&lsof|egrep'PID|mysqld'&&lsof|grep'mysqld'|wc-l |
→ có 7 file /run/mysqld/mysqld.sock đang mở nhen
Rồi Submit hen → tiếp tuc quá trình cài đặt WordPress
Đến đây đã chạy WordPress vi vu roài, vào tới panel quản trị luôn roài
Giờ mình coi lại Unix Domain Socket có gì mới hem
1 | lsof|egrep'PID|mysqld'&&lsof|grep'mysqld'|wc-l |
Từ 7 file /run/mysqld/mysqld.sock được mở giờ đã tăng lên 11
→ số lượng file /run/mysqld/mysqld.sock có thể lên xuống tùy vào kết nối từ WordPress vào DB nha các bạn
Dậy thì WordPress chạy Database là MariaDB xài Unix Domain Socket ok nhen các bạn!
Cơm thêm
1 2 3 4 5 | ps-T-p`pidof mariadbd` grepHOST/var/www/wordpress/wp-config.php ss-xa|egrep'Netid|mysqld' |