Thursday, December 15, 2022
Wednesday, March 6, 2019
PHP based Information System Installation in the Ubuntu
Joomla, Drupal, Wordpress, Magneto CE, and other PHP based Information System Installation in the Ubuntu.
--------------------------------------------------------------------
Install and Configure apache2
--------------------------------------------------------------------
# apt update
# apt install apache2
# systemctl stop apache2.service
# systemctl start apache2.service
# systemctl enable apache2.service
--------------------------------------------------------------------
Install and Configure the database (MySql or MariaDB)
--------------------------------------------------------------------
# apt-get install mariadb-server mariadb-client -y
# systemctl start mariadb.service
# systemctl enable mariadb.service
# systemctl stop mariadb.service
-----------------------------------------------------------
Create Database in the MySql or MariaDB server.
-----------------------------------------------------------
# mysql -u root -p
mysql> CREATE DATABASE (DATABASE NAME);
mysql> CREATE USER 'USERNAME'@' web_server_IP' IDENTIFIED BY 'PASSWORD';
mysql> GRANT ALL ON DATABASE NAME.* TO ' USERNAME '@'localhost' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO 'WEB_SERVER_USER'@'WEB_SERVER_IP';
mysql> FLUSH PRIVILEGES;
mysql> SET GLOBAL innodb_file_format = barracuda;
mysql> SET GLOBAL innodb_file_per_table = 1;
mysql> SET GLOBAL innodb_large_prefix = 'on';
mysql> EXIT;
CREATE USER 'admin'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpass';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
CREATE USER 'admin'@'%' IDENTIFIED WITH mysql_native_password BY 'yourpass';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;
--------------------------------------------------------------------
--------------------------------------------------------------------
# mysql_secure_installation
--------------------------------------------------------------------
--------------------------------------------------------------------
# apt-get install software-properties-common -y
# add-apt-repository ppa:ondrej/php -y
# apt update -y
# apt install php -y
# apt install libapache2-mod-php -y
# apt install php-common -y
# apt install php-gmp -y
# apt install php-curl -y
# apt install php-soap -y
# apt install php-bcmath -y
# apt install php-intl -y
# apt install php-mbstring -y
# apt install php-xmlrpc -y
Note: In Ubuntu 18.04, We have to use
# apt install php7.1-mcrypt -y
Note: In Ubuntu 16.04, We have to use
# apt install php-mcrypt -y
# apt install php-mysql -y
# apt install php-gd -y
# apt install php-xml -y
# apt install php-cli -y
# apt install php-zip -y
# apt install zip -y
# apt install upzip -y
# apt install curl -y
# apt install git -y
--------------------------------------------------------------------
--------------------------------------------------------------------
# nano /etc/php/7.1/apache2/php.ini
Note: Update these lines in the file.
file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 2G
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = America/Chicago
--------------------------------------------------------------------
Create php information file in the root directory
# nano /var/www/html/phpinfo.php
// php information file creator
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
--------------------------------------------------------------------
Edit the apache configuration file in the etc directory.
--------------------------------------------------------------------
# nano /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
ServerAdmin
admin@example.com
DocumentRoot
/var/www/html/FOLDER
NAME/
ServerName
example.com
ServerAlias
www.example.com
<Directory
/var/www/html/FOLDER
NAME/>
Options Indexes FollowSymLinks MultiViews
AllowOverride
All
Order
allow,deny
allow from all
</Directory>
ErrorLog
${APACHE_LOG_DIR}/error.log
CustomLog
${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
--------------------------------------------------------------------
Download the CMS and install in the Root Directory
--------------------------------------------------------------------
// Here, we are going to install Magento 2
// Here, we are going to download Magento 2 from github download
# cd /var/www/html/
# cd /var/www/html
# curl -sS https://getcomposer.org/installer | sudo php --
--install-dir=/usr/local/bin --filename=composer
# cd /var/www/html
# composer create-project
--repository=https://repo.magento.com/ magento/project-community-edition (FOLDER NAME)
--------------------------------------------------------------------
For downloading the Magento 2, we will have to generate a set of public and private key in the Magento stie.
--------------------------------------------------------------------
Public Key 060f1460c97de693f3de3a8525db0ae8
Private Key b5c35b486038e871d5baca9fb326988e
# chmod 777 -R /var/www/html/
# chown -R www-data:www-data /var/www/html/FOLDER NAME
/
# chmod -R 777 /var/www/html/FOLDER NAME/
# a2ensite magento2.conf
# a2enmod rewrite
# systemctl restart apache2.service
# chmod 777 -R /var/www/html/ // Most Important command in the installation
--------------------------------------------------------------------
After installation command
--------------------------------------------------------------------
--------------------------------------------------------------------
# cd /var/www/html/magento2
# bin/magento maintenance:enable
# php bin/magento indexer:reindex
# php bin/magento cron:install
# php bin/magento maintenance:disable
# php bin/magento setup:store-config:set --base-url="http://www.cellon.com/ma/"
--------------------------------------------------------------------
Magento Update command
--------------------------------------------------------------------
# composer require magento/product-community-edition 2.3.0 --no-update
# composer update
# php bin/magento setup:upgrade
# php bin/magento setup:di:compile
Monday, January 14, 2019
SSH Remote Host Identification Has Changed
[user@hostname ~]$ ssh root@pong
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
6e:45:f9:a8:af:38:3d:a1:a5:c7:76:1d:02:f8:77:00.
Please contact your system administrator.
Add correct host key in /home/hostname /.ssh/known_hosts to get rid of this message.
Offending RSA key in /var/lib/sss/pubconf/known_hosts:4
RSA host key for pong has changed and you have requested strict checking.
Host key verification failed.
Here is the simplest solution
# ssh-keygen -R <host name or IP address>
An example of an IP address/hostname would be:
# ssh-keygen -R 192.168.3.10
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
6e:45:f9:a8:af:38:3d:a1:a5:c7:76:1d:02:f8:77:00.
Please contact your system administrator.
Add correct host key in /home/hostname /.ssh/known_hosts to get rid of this message.
Offending RSA key in /var/lib/sss/pubconf/known_hosts:4
RSA host key for pong has changed and you have requested strict checking.
Host key verification failed.
Here is the simplest solution
# ssh-keygen -R <host name or IP address>
An example of an IP address/hostname would be:
# ssh-keygen -R 192.168.3.10
Sunday, January 13, 2019
Sunday, December 23, 2018
HTTP, PHP and Maria DB service on CentOS 7
HTTP Server on CENTOS 7
# setenforce 0
# sed -i 's/enforcing/disabled/g' /etc/selinux/config
# yum install httpd
# yum install epel-release -y
# yum install httpd -y
# yum install php -y
# yum install php-common -y
# yum install php-mysqlnd -y
# yum install php-mbstring -y
# yum install php-gd -y
# yum install mariadb-server -y
# yum install mod_ssl -y
# yum install zip -y
# yum install wget -y
# yum install unzip -y
Manage Apache HTTP Server on CentOS 7
# systemctl start httpd
# systemctl start mariadb
# systemctl enable httpd
# systemctl status httpd
Configure FIREWALL to Allow Apache Traffic
# firewall-cmd --zone=public --permanent --add-service=http
# firewall-cmd --zone=public --permanent --add-service=https
# firewall-cmd --reload
Configure Name-based Virtual Hosts on CentOS 7
# vi /etc/httpd/conf.d/vhost.conf
Please write down these following line in the file.
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@mytecmint.com
ServerName mytecmint.com
ServerAlias www.mytecmint.com
DocumentRoot /var/www/html/mytecmint.com/
ErrorLog /var/log/httpd/mytecmint.com/error.log
CustomLog /var/log/httpd/mytecmint.com/access.log combined
</VirtualHost>
# setenforce 0
# sed -i 's/enforcing/disabled/g' /etc/selinux/config
# yum install httpd
# yum install epel-release -y
# yum install httpd -y
# yum install php -y
# yum install php-common -y
# yum install php-mysqlnd -y
# yum install php-mbstring -y
# yum install php-gd -y
# yum install mariadb-server -y
# yum install mod_ssl -y
# yum install zip -y
# yum install wget -y
# yum install unzip -y
To change the http configuration file
# sed -i 's/AllowOverride none/AllowOverride all/g' /etc/httpd/conf/httpd.conf
Manage Apache HTTP Server on CentOS 7
# systemctl start httpd
# systemctl start mariadb
# systemctl enable httpd
# systemctl status httpd
Configure FIREWALL to Allow Apache Traffic
# firewall-cmd --zone=public --permanent --add-service=http
# firewall-cmd --zone=public --permanent --add-service=https
# firewall-cmd --reload
Configure Name-based Virtual Hosts on CentOS 7
# vi /etc/httpd/conf.d/vhost.conf
Please write down these following line in the file.
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@mytecmint.com
ServerName mytecmint.com
ServerAlias www.mytecmint.com
DocumentRoot /var/www/html/mytecmint.com/
ErrorLog /var/log/httpd/mytecmint.com/error.log
CustomLog /var/log/httpd/mytecmint.com/access.log combined
</VirtualHost>
Firewall - To access from a remote location by SSH or Putty
To access the CentOS 7 from remote by SSH or Putty, we need to open the firewall for logging the server.
#firewall-cmd --permanent --add-port=100/tcp
#firewall-cmd --reload
#firewall-cmd --list-ports
#firewall-cmd --permanent --add-port=100/tcp
#firewall-cmd --reload
#firewall-cmd --list-ports
Network Configuration
To configure the network, we need to use those command and steps in the CentOS 7.
#nmcli d (To check the ethernet card)
#nmtui (To open Network manager.)
After opening Network manager chose “Edit connection” and press Enter Here, we will use TAB button for choosing options. To connect with a DHCP network. We don't need to insert an IP address in the system just check the "Automatically Connect" in the Edit connection. Go to the OK Option and press enter. Then go to the QUIT option and press enter.
#service network restart (To restart the network service)
#ip address (Here, we can see our IP address with the ethernet card)
#nmcli d (To check the ethernet card)
#nmtui (To open Network manager.)
After opening Network manager chose “Edit connection” and press Enter Here, we will use TAB button for choosing options. To connect with a DHCP network. We don't need to insert an IP address in the system just check the "Automatically Connect" in the Edit connection. Go to the OK Option and press enter. Then go to the QUIT option and press enter.
#service network restart (To restart the network service)
#ip address (Here, we can see our IP address with the ethernet card)
Subscribe to:
Posts (Atom)
Posts
test
Dear All, Today is my last day in the office. As I wrap up my time here, I express my deepest gratitude for the opportunity to work with suc...
-
Dear All, Today is my last day in the office. As I wrap up my time here, I express my deepest gratitude for the opportunity to work with suc...
-
To access the CentOS 7 from remote by SSH or Putty, we need to open the firewall for logging the server. #firewall-cmd --permanent --add-...
-
Joomla, Drupal, Wordpress, Magneto CE, and other PHP based Information System Installation in the Ubuntu. -------------------------...
