Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mkdir admin di htdocs
- <?php
- echo "selamat datang admin user";
- echo "<hr>";
- ?>
- <a herf="tampil_mhs.php" > Tampil Mahasiswa
- (index.php)
- #PRAKTIKUM SUB BAB 2
- cd /opt/lampp/htdocs/
- sudo su
- mkdir gambar
- cd gambar/
- touch gambar_1.jpg
- touch gambar_2.jpg
- touch gambar_3.jpg
- cd ..
- mkdir lagu
- cd lagu/
- touch lagu_1.m4a
- touch lagu_2.m4a
- touch lagu_3.m4a
- cd ..
- chmod -Rf 777 gambar/
- chmod -Rf 777 lagu/
- chown -Rf nobody nogrp gambar/
- chown -Rf nobody nogrp lagu/
- /opt/lampp/lampp start
- ifconfig : untuk mendapatkan ip address
- http://localhost/gambar/
- http://ip/gambar/
- http://ip/lagu/
- http://ip-teman/gambar : melihat folder milik teman yang sejaringan.
- cd /opt/lampp/htdocs/
- mkdir admin
- nano admin/index.php
- isinya :
- <?php
- echo "Selamat Datang Admin User";
- echo "<Hr>";
- ?>
- <a href="tampil_mhs.php" > tampil mahasiswa </a>
- nano admin/tampil_mhs.php
- isinya :
- <?php
- $username="root";
- $password="";
- $database="akademik_db";
- $server="localhost";
- $db_handle=mysqli_connect($server, $username, $password, $database$
- if($db_handle){
- $SQL="select * from mahasiswa";
- $result=mysqli_query($db_handle,$SQL);
- while($db_field = mysqli_fetch_assoc($result)){
- print "<H3></H3>";
- print "<Hr>";
- print "NIM : ".$db_field['nim']."<br>";
- print "Nama Lengkap : ".$db_field['nama']."<br>";
- print "Jurusan : ".$db_field['jurusan']."<br>";
- print "Asal Daerah : ".$db_field['asal_daerah']."<br>";
- }
- mysqli_close($db_handle);
- } else {
- print "Database tidak ditemukan !" ;
- mysqli_close($db_handle);
- }
- ?>
- chmod -Rf 777 admin/
- chmod -Rf 777 admin/*
- # SUB BAB 3
- cd /opt/lampp/htdocs
- wget http://wordpress.org/latest.tar.gz
- ls
- tar -xzvf latest.tar.gz
- /opt/lampp/bin/mysql
- > create database wordpress;
- > set password for wordpressuser@localhost=PASSWORD("password");
- > grant all privileges on wordpress.* to wordpressuser@localhost identified by 'password';
- > exit
- cp wordpress/wp-config-sample.php wordpress/wp-config.php
- nano wordpress/wp-config.php
- #isi sesuai :
- /** The name of the database for WordPress */
- define( 'DB_NAME', 'wordpress' );
- /** MySQL database username */
- define( 'DB_USER', 'wordpressuser' );
- /** MySQL database password */
- define( 'DB_PASSWORD', 'password' );
- /opt/lampp/lampp restart
- chown www-data:www-data * -R
- whoami : berisi user
- usermod -a -G www-data asaromi
- # access : localhost/wordpress
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement