Posts

Showing posts with the label Linux

HTTPS Setup With Certbot in Digital Ocean Droplets

For Installation sudo apt install python3-certbot-apache For Activation sudo certbot --apache --expand -d domainname.com

Plain php text showing issue solve

Solution: 1 sudo systemctl status php8.1-fpm sudo apt-get install php8.1-fpm sudo apt install apache2 libapache2-mod-fcgid sudo apt install libapache2-mod-fcgid sudo a2enmod actions fcgid alias proxy_fcgi Solution: 2 sudo a2dismod mpm_event sudo systemctl restart apache2 sudo a2enmod mpm_prefork sudo systemctl restart apache2 sudo a2enmod php7.0 sudo systemctl restart apache2

Fixed: Requested URL Was Not Found on this Server Apache2 Ubuntu

When you install Apache2 on a Linux server. At that time mod_Rewrite module is not enabled by default on apache 2. And of which website or app you run on the server, and you open any url of this, then you see the message “the requested url was not found on this server apache2 ubuntu”. So in the tutorial “the requested url was not found on this server apache2 ubuntu” you will learn how to enable rewrite_module and solve this error. The apache Mod_rewrite is very popular for rewriting human-readable URLs in dynamic websites. This makes the URL’s look cleaner and SEO-friendly on websites. In this tutorial, we will show you how to enable the apache/2.4.5 ubuntu mod_rewrite module and configure it for use .htaccess files available with apache 2 ubuntu web server at port 443, 80. Step 1 – Update dependencies sudo apt-get update If you want to enable mod_rewrite apache in ubuntu. So, you can connect your instance or web server to ssh terminal. And then type a2enmod command to enable any modul...

Understanding file permissions

Image
This string of letters, drwxrwxrwx , represents the permissions that are set for the directory. Each number can have one of eight values ranging from 0 to 7 . Each value corresponds to a certain setting of the read, write and execute permissions, as explained in the following table. For Example: 777 is the same as rwxrwxrwx 755 is the same as rwxr-xr-x 666 is the same as rw-rw-rw- 744 is the same as rwxr--r--

Deploy laravel application to digital ocean droplet

ssh root@192.168.0.1 adduser coderstation usermod -aG sudo coderstation su - coderstation sudo apt-get install apache2 sudo apt-get install php sudo apt-get install git sudo apt-get install composer sudo apt install mysql-server sudo mysql mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; mysql> exit mysql -u root -p mysql>ALTER USER 'root'@'localhost' IDENTIFIED WITH auth_socket; sudo mysql_secure_installation mysql>CREATE USER 'sammy'@'localhost' IDENTIFIED BY 'password'; mysql>ALTER USER 'sammy'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; mysql>GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES, RELOAD on *.* TO 'sammy'@'localhost' WITH GRANT OPTION; mysql>FLUSH PRIVILEGES; mysql> exit cd /var/www/htm git clone project cd project sudo apt-get install php-xml sudo apt-get install...

Server setup basic guide

 BASIC GUIDE ssh root@192.168.0.1 -p 22 adduser hasib ssh -l hasib 192.168.0.1 Update OS Install Apache Install MySQL Install PHP Install Composer (Composer install and globalization) sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin –filename=composer Install Git Set DNS Server Name to Domain Name Provider Panel

Directory ownership change and mode change - Linux

- sudo chown hasib:hasib html/ - sudo chmod +x html/ - sudo chmod -R 777 html/

When failed to start MariaDB database server (Solution - Again Installation)

In the tutorial you should install mariadb-server in place of mysql-server. sudo apt purge mysql* sudo apt purge mariadb* sudo apt autoremove sudo apt autoclean Check if still something in the system : dpkg -l | grep -e mysql -e mariadb  if the list is empty then install mariadb server : sudo apt install mariadb-server Now try to check status on stop and start the database : Status after install : sudo systemctl status mysql.service ● mariadb.service - MariaDB database server    Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)    Active: active (running) since Wed 2018-03-21 16:08:49 CET; 2min 1s ago  Main PID: 15699 (mysqld)    Status: "Taking your SQL requests now..."    CGroup: /system.slice/mariadb.service            └─15699 /usr/sbin/mysqld .../.. Check the PID : sudo more /var/run/mysqld/mysqld.pid  15699 Stop the database : su...

Export MySQL database from terminal

1. Export Database mysqldump -u root -p database_name > /home/ubuntu/database_name.sql 2. Download Database scp ubuntu@192.168.0.01:/home/ubuntu/database_name.sql /home/shahlal/Desktop

MySQL for Python in Ubuntu

Install pip and upgrade to the latest version apt-get install python-pip pip install -U pip Next, install the required development packages apt-get install python-dev libmysqlclient-dev then pip install MySQL-python

Google chrome installation in ubuntu 14.4 by terminal command

1-> wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -  2-> sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'  3-> sudo apt-get update  4-> sudo apt-get install google-chrome-stable

Linux Terminal Commad (Move,Delete,Edit,Rename)

Move sudo su mv /home/your-local-file.txt /your-server-destination-path/your-local-file.txt Edit vim mongod.conf :qw or :q Delete rm x_mongod.conf Rename mv mongod.conf x_mongod.conf

Bangla UniBijoy installing in Ubuntu OS

sudo apt-get install ibus-m17n m17n-db m17n-contrib ibus-gtk ibus-daemon -xdr https://www.youtube.com/watch?v=0jYQZ6PSpbs

Putty and Filefizlla installation on Fedora

Putty Installation on Fedora su- yum install putty Filezilla Installation on Fedora yum -y install filezilla

UBUNTU>TERMINAL>MYSQL>DATABASE>TABLE

How to Install MySQL sudo apt-get install mysql-server How to Access the MySQL shell mysql -u root -p How to Create and Delete a MySQL Database mysql> SHOW DATABASES; mysql> CREATE DATABASE db_name; mysql> DROP DATABASE db_name ; mysql> USE db_name; mysql> SHOW tables; How to Create a MySQL Table CREATE TABLE tbl_name (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(20), food VARCHAR(30), confirmed CHAR(1), signup_date DATE); mysql> SHOW TABLES; mysql> DESCRIBE tbl_name; How to Add Information to a MySQL Table INSERT INTO `tbl_name` (`id`,`name`,`food`,`confirmed`,`signup_date`) VALUES (NULL, "John", "Casserole","Y", '2012-04-11'); mysql> SELECT * FROM tbl_name; How to Update Information in the Table UPDATE `tbl_name` SET `confirmed` = 'Y' WHERE `tbl_name`.`name`='Sandy'; How to Add and Delete a Column ALTER TABLE tbl_name ADD email VARCHAR(40); ALTER TABLE tbl_name ADD email VARCHAR(40)...

APACHE SERVER (START || STOP || RESTART)

START> sudo service apache2 start STOP> sudo service apache2 stop RESTART> sudo service apache2 restart

PhpStrom INSTALLATION ON UBUNTU

->Install Oracle Java 8 on Ubuntu 15.10/16.04 sudo apt-get remove openjdk* sudo add-apt-repository ppa:webupd8team/java  sudo apt-get update sudo apt-get install java-common oracle-java8-installer sudo apt-get install oracle-java8-set-default source /etc/profile ->Install phpstorm on Ubuntu 15.10/16.04 wget https://download-cf.jetbrains.com/webide/PhpStorm-2016.1.2.tar.gz tar xvf PhpStorm-2016.1.2.tar.gz sudo mv PhpStorm-145.1616.3/ /opt/phpstorm/ sudo ln -s /opt/phpstorm/bin/phpstorm.sh /usr/local/bin/phpstorm phpstorm https://www.linuxbabe.com/desktop-linux/install-phpstorm-ubuntu-15-10

SOME IMPORTANT UBUNTU INSTALLATION

TRASH COMMAND INSTALLATION ->sudo apt install trash-cli ANY LINUX SUPPORTED SOFTWARE INSTALLATION ->sudo dpkg -i software-name-details CAT -> cat>text {Enter} -> echo "Hasib Kamal Chowdhury" {Enter} -> ctrl+d {Enter} -> chmod +x text -> sh text

SNIPPING TOOL FOR UBUNTU

> sudo apt-get install shutter

INSTALL COMPOSER ON UBUNTU

Procedures are Given Below : sudo updates-alternatives --install "/usr/bin/php" "php" "/opt/lampp/bin/php" 1 php -v su sudo apt-get install curl curl -V sudo apt-get install git git curl -sS https://getcomposer.org/installer | php php composer.phar sudo mv composer.phar /usr/local/bin/composer sudo apt-get install composer