0% found this document useful (0 votes)
57 views5 pages

Install On Linux

Download as txt, pdf, or txt
Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1/ 5

apt-get update

apt-get upgrade
apt-get install apache2 mysql-server php libapache2-mod-php php-mysql phpmyadmin
php-mbstring php-zip php-json gconf-service libasound2 libatk1.0-0 libc6 libcairo2
libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-
pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0
libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1
libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates
fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libgbm1
ufw app list
ufw allow 'Apache'
mysql
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
<<< wajib ada passwordNya kalo mau phpmyadmin akses luar
mysql> FLUSH PRIVILEGES;
mysql> SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
<<< supaya apps mystok berjalan lancar
mysql> CREATE DATABASE wapiku3;
mysql> exit

==== supaya phpmyadmin bisa diakses dari luar localhost ====


ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
a2enconf phpmyadmin
systemctl restart apache2
==== supaya phpmyadmin bisa diakses dari luar localhost ====

/var/www/html/* <<< folder htdocs


mysql -u root -p wapiku3 < 01_wapiku3.sql

//INSTALL GOOGLE CHROME


wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt install ./google-chrome-stable_current_amd64.deb

//SUPAYA FILE APP.JS, PACKAGE.JSON & SESSION.SON TIDAK BISA DIAKSES DARI WEB
HOSTING SECARA LANGSUNG
nano /etc/apache2/apache2.conf
===cari ini===
<FileMatch "^\.ht">
Require all denied
</FileMatch>
=== lalu isi dibawahnya ===
<FileMatch "app\.js|package\.json|session\.json">
Require all denied
</FileMatch>

//CARA INSTALL NODEJS VERSI BRP SAJA, CUKUP GANTI ANGKANYA SAJA
cd ~
curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt-get install nodejs

npm i -g nodemon
npm i -g npm-check-updates
ncu -u
npm install

INSTALL VIA TERMINAL SHARED HOSTING, GAGAL TERNYATA


curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh -o
install_nvm.sh
bash install_nvm.sh
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 10.24.0 ATAU 14.16.0

masalahNya skrng cmn perlu install: apt-get install libgbm-dev <<< PERLU INI BISA D
INSTALL DI SHARED HOSTINGNYA

==============================================================
[scamyid@iix15 cs]$ node app.js
(node:30630) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser
process!
/home/scamyid/cs/node_modules/puppeteer/.local-chromium/linux-818858/chrome-
linux/chrome: error while loading shared libraries: libatk-bridge-2.0.so.0: cannot
open shared object file: No such file or directory

TROUBLESHOOTING:
https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

at onClose
(/home/scamyid/cs/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:19
3:20)
at Interface.<anonymous>
(/home/scamyid/cs/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:18
3:68)
at Interface.emit (events.js:327:22)
at Interface.close (readline.js:424:8)
at Socket.onend (readline.js:202:10)
at Socket.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:30630) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). To terminate
the node process on unhandled promise rejection, use the CLI flag `--unhandled-
rejections=strict` (see
https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:30630) [DEP0018] DeprecationWarning: Unhandled promise rejections are
deprecated. In the future, promise rejections that are not handled will terminate
the Node.js process with a non-zero exit code.
==============================================================
mysqldump -uscamyid_root -pCemara123? -hlocalhost scamyid_sca | gzip >
/home/scamyid/public_html/backup_database/BACKUP_$(date +"%Y.%m.%d.%S.%N").sql.gz

crontab -e

mysqldump -uscamyid_root -pCemara123? -hlocalhost scamyid_sca | gzip >


/home/scamyid/public_html/backup_database/BACKUP_$(date +"%Y.%m.%d.%S.%N").sql.gz

0 0 * * * mysqldump -uscamyid_root -pCemara123? -hlocalhost


scamyid_sca | gzip > /home/scamyid/public_html/backup_database/BACKUP_$(date +"\
%Y.\%m.\%d.\%S.\%N").sql.gz

macOS: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

Windows: C:/Program Files (x86)/Google/Chrome/Application/chrome.exe

Linux: /usr/bin/google-chrome-stable

https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-
server-on-ubuntu-20-04-id
apt-get update
apt-get upgrade
apt-get install apache2
ufw app list

Output
Available applications:
Apache <<< Profil ini hanya membuka porta 80 (lalu lintas web normal dan tidak
terenkripsi)
Apache Full <<< Profil ini membuka baik porta 80 (lalu lintas web normal dan
tidak terenkripsi) serta porta 443 (lalu lintas terenkripsi TLS/SSL)
Apache Secure <<< Profile ini hanya membuka porta 443 (lalu lintas terenkripsi
TLS/SSL)
OpenSSH

ufw allow 'Apache'


ufw status

Output
Status: active
To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
Apache ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
Apache (v6) ALLOW Anywhere (v6)

curl -4 icanhazip.com <<< untuk tau IP Public

http://your_server_ip

systemctl restart apache2 <<< restart service

systemctl reload apache2 <<< restart tanpa putus service

systemctl disable apache2 <<< mematikan service autostart

systemctl enable apache2 <<< menyalakan service autostart

https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-20-
04-id
apt-get install mysql-server
mysql_secure_installation #opsional kalo pingin aman saja
mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
FLUSH PRIVILEGES;

GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'localhost';


FLUSH PRIVILEGES;
====membuat user baru====
CREATE USER USERNAME IDENTIFIED by 'PASSWORD';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost';
FLUSH PRIVILEGES;
=========================
CREATE DATABASE wapiku3;
exit
mysql -u root -p wapiku3 < 01_wapiku3.sql

https://stackoverflow.com/questions/23921117/disable-only-full-group-by
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-
php-lamp-stack-on-ubuntu-20-04-id
apt-get install php libapache2-mod-php php-mysql

https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-
phpmyadmin-on-ubuntu-18-04
apt-get install phpmyadmin php-mbstring php-gettext
phpenmod mbstring
apt-get install nodejs npm

apt-get install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2


libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0
libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6
libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6
libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-
liberation libappindicator1 libnss3 lsb-release xdg-utils wget libgbm1

You might also like