Difference between revisions of "OLS: instalasi"

From OnnoWiki
Jump to navigation Jump to search
Line 78: Line 78:
 
  FLUSH PRIVILEGES;
 
  FLUSH PRIVILEGES;
 
  exit
 
  exit
 +
 +
 +
==Konfigurasi OpenLiteSpeed==
 +
 +
Set admin password
 +
 +
sudo /usr/local/lsws/admin/misc/admpass.sh
 +
 +
Default
 +
 +
username admin
 +
password [harus kita isi]
 +
 +
Akses Web Konfigurasi
 +
 +
http://<YOURSERVERIP>:7080
 +
 +
 +
===Switch Port ke 80===
 +
 +
Klik Listeners > View > Edit > Port = 80 > Save

Revision as of 08:34, 10 November 2020

Siapkan Repo

sudo apt update
sudo apt install net-tools

Siapkan Firewall

Jika di perlukan saja,

sudo ufw allow OpenSSH
sudo ufw allow http
sudo ufw allow https
sudo ufw allow 7080/tcp
sudo ufw allow 8088/tcp
sudo ufw enable

Default Server Ubuntu 20.04.1, kondisi firewall terbuka.

Install OpenLiteSpeed

wget -qO - https://rpms.litespeedtech.com/debian/lst_repo.gpg | sudo apt-key add -
echo "deb http://rpms.litespeedtech.com/debian/ focal main" | sudo tee /etc/apt/sources.list.d/openlitespeed.list
sudo apt update
sudo apt -y install openlitespeed

Cek Status atau Restart

sudo /usr/local/lsws/bin/lswsctrl status
sudo /usr/local/lsws/bin/lswsctrl start


Cek Web di

http://<YOURSERVERIP>:8088

Install PHP7

Upgrade ke php7.4

sudo apt -y install lsphp74 lsphp74-common lsphp74-mysql lsphp74-curl

Cek

/usr/local/lsws/lsphp74/bin/php7.4 -v
/usr/local/lsws/lsphp74/bin/php7.4 --modules

Install MariaDB

sudo apt install mariadb-server

Restart & Enable

sudo systemctl start mariadb
sudo systemctl enable mariadb

Secure Installation

sudo mysql_secure_installation
Enter current password for root (enter for none): 
Set root password? [Y/n] y
New password: 
Re-enter new password: 
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

Cek & Test

sudo mysql -u root -p
CREATE DATABASE testdb;
CREATE USER 'testuser' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON testdb.* TO 'testuser';
FLUSH PRIVILEGES;
exit


Konfigurasi OpenLiteSpeed

Set admin password

sudo /usr/local/lsws/admin/misc/admpass.sh

Default

username admin
password [harus kita isi]

Akses Web Konfigurasi

http://<YOURSERVERIP>:7080


Switch Port ke 80

Klik Listeners > View > Edit > Port = 80 > Save