Setelah server berhasil terkonfigurasi, langkah selanjutnya adalah unduh file WordPress ke direktori /tmp kemudian pindahkan ke direktori yang sudah diatur sebagai document root di virtual host domain. (kalau di saya di PC server)
root@debian:~# cd /tmp
root@debian:/tmp# curl -LO https://wordpress.org/latest.tar.gz
-bash: curl: command not found
root@debian:/tmp# wget -c https://wordpress.org/latest.tar.gz
--2021-12-10 09:42:24-- https://wordpress.org/latest.tar.gz
Resolving wordpress.org (wordpress.org)... 198.143.164.252
Connecting to wordpress.org (wordpress.org)|198.143.164.252|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15085301 (14M) [application/octet-stream]
Saving to: 'latest.tar.gz'
latest.tar.gz 100%[==============>] 14.39M 5.19MB/s in 2.8s
2021-12-10 09:42:28 (5.19 MB/s) - 'latest.tar.gz' saved [15085301/15085301]
root@debian:/tmp# tar -xzf latest.tar.gz
root@debian:/tmp# cp -a /tmp/wordpress/. /var/www/html/
root@debian:/tmp# cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.php
root@debian:~# apt install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
curl
0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded.
Need to get 265 kB of archives.
After this operation, 411 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 curl amd64 7.64.0-4+deb10u2 [265 kB]
Fetched 265 kB in 0s (585 kB/s)
apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_TIME = "id_ID.UTF-8",
LC_MONETARY = "id_ID.UTF-8",
LC_ADDRESS = "id_ID.UTF-8",
LC_TELEPHONE = "id_ID.UTF-8",
LC_NAME = "id_ID.UTF-8",
LC_MEASUREMENT = "id_ID.UTF-8",
LC_IDENTIFICATION = "id_ID.UTF-8",
LC_NUMERIC = "id_ID.UTF-8",
LC_PAPER = "id_ID.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package curl.
(Reading database ... 127461 files and directories currently installed.)
Preparing to unpack .../curl_7.64.0-4+deb10u2_amd64.deb ...
Unpacking curl (7.64.0-4+deb10u2) ...
Setting up curl (7.64.0-4+deb10u2) ...
Processing triggers for man-db (2.8.5-2) ...
Grab WordPress Secret Key Generator dengan:
$ curl -s https://api.wordpress.org/secret-key/1.1/salt/
Maka akan keluar output seperti di bawah ini.
define('AUTH_KEY', '2j5F@hR;--,4SN^q+sK0U<`BQ3x(gyx>A})8`sB)t-vXBx}rl/(Y,7aN&|3oUZ|3'); define('SECURE_AUTH_KEY', 'y|;lz4I>7T6-|AckUy2Gpbx.j9mv,6R~`-t,MCBAoWxegJ t9l|*|Ht+:>D736t-'); define('LOGGED_IN_KEY', '~LmVf`(.Yu)<yR0^+{DJvgDXlUU)Yu;DQ<do@>H&z2dZoCF-fG*|he6C&y+D+q+F'); define('NONCE_KEY', 'HEKq-Cgzo071a;G_,7NJ}+6I/z;Znc$w}1$mIilWvc!A.]N&=df8G^.yxmHw}(M9'); define('AUTH_SALT', 'd7=T|-:T^xM|8l:qSUoN.;h1v_h[Hb@o?#O-mq-}-G=&2^YN$Dk1~Y^p&pb!jt~s'); define('SECURE_AUTH_SALT', '!OhWQ{J,||b0T4JFfEbxp+SmyTmeD(P&.)i6L%T#,V#~b^jQ$hH:&S#&x)sqfJ`['); define('LOGGED_IN_SALT', 'N`D+t@+4w|<_&-E_>z%,79C.~CAHWcE#e+JX:sJ-S+jOuq7fB3~!{q<:;$6-RA[C'); define('NONCE_SALT', '8FK[G1%R~eP+q+<[/k/6H?HWYt:ooDsFT7@1CD+%fXVnX7cE2AB!)/k-Zk!Z|BQ3');
Simpan secret key tersebut ke Notepad karena nantinya akan disalin dan tempel (copy–paste) ke wp-config.php.
root@debian:~# nano /var/www/html/wp-config.php
nano /var/www/html/wp-config.php
/** The name of the database for WordPress */
Ubah konfigurasi database-nya:
define( 'DB_NAME', 'wp' ); /** MySQL database username */ define( 'DB_USER', 'wpuser' ); /** MySQL database password */ define( 'DB_PASSWORD', 'p4ssw0rd123' ); /** MySQL hostname */ define( 'DB_HOST', 'localhost' );
Kemudian tempelkan hasil salinan kode key di atas pada “key”. Jika sudah, simpan dan keluar.
akses http://192.168.100.9/wp-admin/
0 comments:
Post a Comment