Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Ubuntuserver

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

//perbaiki update unable sudo nano /etc/resolv.conf ganti dns 8.8.8.

sudo apt update


sudo apt upgrade

ifconfig
sudo nano /etc/netplan/00-installer-config.yaml
network:
ethernets:
enp0s3:
dhcp4: false
addresses: [192.168.220.54/24]
gateway4: 192.168.220.1
version: 2
sudo netplan apply

sudo apt -y install apache2


sudo systemctl enable --now apache2
sudo ufw allow Apache
sudo apt -y install php libapache2-mod-php php-{gd,common,mail,mail-
mime,mysql,pear,db,mbstring,xml,curl}
php -v
sudo nano /var/www/html/phpinfo.php
<?php
phpinfo();
sudo rm /var/www/html/phpinfo.php

sudo apt -y install mariadb-server


mysql --version
sudo mysql_secure_installation

//backup export file dulu

sudo apt install phpmyadmin


sudo ln -s /usr/share/phpmyadmin var/www/html/phpmyadmin
sudo mysql -u root
CREATE USER 'root'@'localhost' IDENTIFIED BY '@Crazylags1';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit

sudo apt -y install freeradius freeradius-mysql freeradius-utils -y


sudo systemctl stop freeradius
sudo freeradius -X
sudo systemctl enable --now freeradius
sudo ufw allow to any port 1812 proto udp
sudo ufw allow to any port 1813 proto udp
sudo mysql -u root -p
CREATE DATABASE radius;
CREATE USER 'radius'@'localhost' IDENTIFIED by '@Crazylags1';
GRANT ALL PRIVILEGES ON radius.* TO 'radius'@'localhost';
FLUSH PRIVILEGES;
quit;

sudo su -
mysql -u root -p radius < /etc/freeradius/3.0/mods-config/sql/main/mysql/schema.sql
exit
sudo mysql -u root -p -e "use radius;show tables;"
sudo ln -s /etc/freeradius/3.0/mods-available/sql /etc/freeradius/3.0/mods-enabled/
sudo apt install nano
sudo nano /etc/freeradius/3.0/mods-enabled/sql
ubah jadi dialect ="mysql"
ubah jadi driver = "rlm_sql_${dialect}"

mysql {
# If any of the files below are set, TLS encryption is enabled
# tls {
# ca_file = "/etc/ssl/certs/my_ca.crt"
# ca_path = "/etc/ssl/certs/"
# certificate_file = "/etc/ssl/certs/private/client.crt"
# private_key_file = "/etc/ssl/certs/private/client.key"
# cipher = "DHE-RSA-AES256-SHA:AES128-SHA"

# tls_required = yes
# tls_check_cert = no
# tls_check_cert_cn = no
#}

# If yes, (or auto and libmysqlclient reports warnings are


# available), will retrieve and log additional warnings from
# the server if an error has occured. Defaults to 'auto'
warnings = auto
}
server = "localhost"
port = 3306
login = "radius"
password = "@Crazylags1"
radius_db = "radius"
read_clients = yes
client_table = "nas"

sudo chgrp -h freerad /etc/freeradius/3.0/mods-available/sql


sudo chown -R freerad:freerad /etc/freeradius/3.0/mods-enabled/sql
sudo systemctl restart freeradius.service
sudo systemctl stop freeradius.service
sudo freeradius -X
sudo systemctl start freeradius.service

sudo apt -y install wget unzip


wget https://github.com/lirantal/daloradius/archive/1.3.zip
unzip 1.3.zip
cd daloradius-1.3
sudo mysql -u root -p radius < contrib/db/fr2-mysql-daloradius-and-freeradius.sql
sudo mysql -u root -p radius < contrib/db/mysql-daloradius.sql
cd ..
sudo mv daloradius-1.3 /var/www/html/daloradius
sudo chown -R www-data:www-data /var/www/html/daloradius/
sudo cp /var/www/html/daloradius/library/daloradius.conf.php.sample
/var/www/html/daloradius/library/daloradius.conf.php
sudo chmod 664 /var/www/html/daloradius/library/daloradius.conf.php
sudo nano /var/www/html/daloradius/library/daloradius.conf.php
$configValues['CONFIG_DB_USER'] = 'root';
$configValues['CONFIG_DB_PASS'] = '';
$configValues['CONFIG_DB_NAME'] = 'radius';
$configValues['CONFIG_DB_USER'] = 'radius';
$configValues['CONFIG_DB_PASS'] = '@Crazylags1';
$configValues['CONFIG_DB_NAME'] = 'radius'
sudo systemctl restart freeradius.service apache2
sudo systemctl restart freeradius.service

cd /etc/freeradius/3.0/
sudo nano /etc/freeradius/3.0/clients.conf
client 192.168.220.1 {
secret = radius
nastype = other
}

sudo nano /etc/freeradius/3.0/users


coba Cleartext-Password := "123"

radtest coba 123 localhost 1812 testing123

cd /var/www/html/
unzip ilham.zip
sudo chown -R www-data:www-data /var/www/html/OLT/
sudo chmod 777 /var/www/html -R

sudo apt-get remove --purge mysql*


sudo apt-get purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get remove dbconfig-mysql

You might also like