0% found this document useful (0 votes)
16 views2 pages

Membangun Web Server Dengan Ubuntu

Uploaded by

Dzyan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Membangun Web Server Dengan Ubuntu

Uploaded by

Dzyan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Mengetahui spek komputer

lshw | grep -i cpu


nproc

Membangun web server dengan Ubuntu

sudo apt-get install apache2


sudo apt-get install php
sudo apt-get install php-mbstring
sudo apt-get install php-gd
sudo apt-get install mariadb-server mariadb-client
sudo apt-get install phpmyadmin

buat conf baru pada /etc/apache2/sites-available/ dengan conf baru


cd /etc/apache2/sites-available/
scp 000-default.conf myweb.conf
nano myweb.conf
chmod 777 /var/www/myweb/
chmod 777 /etc/apache2/sites-available/
a2ensite myweb.conf

Rubah myweb.conf dengan:


<VirtualHost 127.0.0.2:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName www.myweb.local
ServerAlias myweb.local
ServerAdmin webmaster@localhost
DocumentRoot /var/www/myweb

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,


# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are


# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Reload apache2 dengan

systemctl reload apache2


service apache2 start
install phpmyadmin

setelah instal lakukan:


sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
sudo systemctl restart apache2
Reset database phpmyadmin
dpkg-reconfigure phpmyadmin

import database mysql


mysql -u root -p newlinuxhint < linuxhint_dump.sql

login ke mysql dan lakukan:


mysql -u root -p
Kemudian lalukan perintah berikut:
mysql > use mysql;
mysql > update user set plugin='' where User='root';
mysql > flush privileges;
mysql > quit

You might also like