Sudo Apt Install Openssh-Server

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

Virtual Box Manager

- Setup Ubuntu Server


- network to bridge adapter
- upload Ubuntu to Storage CD (Check live cd/dvd)

Start

Install Ubuntu default settings

- Include SSH for installation


else: manual installation CODE: sudo apt install openssh-server

INPUT

- username
- servername
- password

Get IP ADDRESS

- CODE: ifconfig
- make sure your network in VBM is bridge adapter.
- IF “ifconfig” not found type this CODE: sudo apt install net-tools

INSTALL APACHE

- CODE: sudo apt-get install apache2


 IF UNABLE TO SETUP SSH.
 MANUAL INSTALLATION CODE: sudo apt install openssh-server

CHECK IF SERVICES ARE INSTALLED PROPERLY

- CODE: sudo service ssh status (FOR SSH)


- CODE: sudo service apache2 status (FOR APACHE)

(TO CHECK IF IP ADDRESS IS WORKING. GO TO CMD AND PING IP ADDRESS)

COPY IP ADDRESS AND PASTE IN BROWSER (UBUNTU HOMEPAGE WILL BE DISPLAYED)

INSTALL PUTTY

https://www.putty.org/
- CLICK HERE

- CHOOSE 64-bit x86

OPEN APP = PUTTY

- input ip address then,


- click open
- ACCEPT
- login as: “USERNAME”
- password: “password”

USE PUTTY AS YOUR MAIN SHELL FOR CODING

INSTALL FILEZILLA

https://filezilla-project.org/

- CLICK FILEZILLA CLIENT


- CLICK DOWNLOAD FILEZILLA CLIENT

GO BACK TO PUTTY

- INSTALL VSFTPD
o CODE: sudo apt-get install vsftpd

OPEN FILE ZILLA


INPUT

-IP ADDRESS

- USERNAME

- PASSWORD

- CLICK QUICK CONNECT and OKAY.

CREATE A SAMPLE HTML FILE

- save in desktop or any folder


- find your html file in LOCAL SITE using filezilla

- set your remote site directory to (/var/www/html )

FAILED TRANSFER FILE:

- GO TO PUTTY

cd /

cd etc

ls

sudo nano vsftpd.conf

*delete the # in line: #write_enable=YES

to exit file edit: ctrl x - yes – enter

sudo service vstfpd restart

cd var/www
sudo chown –R (username):(username) html

example : sudo chown –R user:user html

DRAG THE HTML FILE IN LOCAL SITE TO THE REMOTE SITE OR DPUBLE CLICK THE HTML FILE IN THE
LOCAL SITE

- CLICK OK

TRY RELOADING THE OPENED BROWSER OF SITE OF YOUR IP ADDRESS IF IT SUCCESSFULLY CHANGED

DATABASE:

Download php, mysql, client to read php

sudo apt-get install php

sudo apt-get install mysql-server

sudo apt-get install mysql-server mysql-client php-mysql

GO TO MYSQL:

sudo mysql –u root

CREATE DATABASE:

create database (database name); -> create database login;

use (database name) -> use login

create table (table name)(username varchar(30),password varchar(30));

-> create table account(username varchar(30),password varchar(30));

insert into (table name) values(“user”,”user123”);

-> insert into account values(“user”,”user123”);

select * from (table name); -> select * from account;

CREATE USER TO CONNECT THE PHP MYSQL QUERY

CREATE USER ‘usernamesainyonglinux’@’localhost’ IDENTIFIED BY ‘passwordsainyonguser’;

-> CREATE USER ‘user’@’localhost’ IDENTIFIED BY ‘user123’;


GRANT ALL PRIVILEGES ON (databasename).* TO ‘usernamesainyonglinux’@’localhost’;

-> GRANT ALL PRIVILEGES ON login.* TO ‘user’@’localhost’;

CREATE YOUR HTML/PHP GUI FOR LOGIN FORM

CREATE PHP CODE NARA EXAMPLE OH KABALO KO MAG LISOD MO HAHAHHA

NOTE : MAKE SURE NGA GE TAWAG NINYO ANG login.php or kaning php file sa inyong index.html like
dizzzz :

NOTE: DOUBLE CHECK SA MGA VARIABLES/NAME SA INYONG FIELDS SA LOGIN FORM GUI like
username and password

TRANSFER ALL FILE NA DAYON SA FILEZILLA SAME SA GE BUHAT LAST TIME

OPEN IP ADDRESS IN BROWSER CHECK IF ITS WORKING 

IF ERROR: NOT FOUND, The requested URL was not found on this server:

cd var/www/
sudo chmod -R 755 html

IF ERROR 500 :

cd /

sudo cat /var/log/apache2/error.log ---- (to check the error)

sudo apt-get update

sudo service apache2 restart

DOWNLOAD SQL FILE FROM LINUX:

cd /

sudo mysql –u root

grant process on *.* to 'user'@'localhost'; ----- (user na gi create sa mysql ganina)

exit

cd /var/www/html

mysqldump -u user -p login > login.sql

NOTE: NAA SA FILE ZILA MAKITA ANG SQL NA FILE..


E FILE TRANSFER LANG DAYUN REMOTE TO LOCAL
777 - all can read/write/execute (full access).
755 - owner can read/write/execute, group/others can read/execute.
644 - owner can read/write, group/others can read only.

Some directory permission examples:

777 - all can read/write/search.


755 - owner can read/write/search, others and group can only search.

Common permissions settings:

777 - directories with proper permissions on files in directory, use this one very carefully
755 - web store folder, CGI scripts
751 - log folder
701 - webalizer and modlogan folders
666 - data files
644 - configuration files (files not updated by scripts, html, gif,etc...)

You might also like