How to install flatpress cms using lamp in centos 7.5
- 0:05 rpm -q centos-release
- 1:07 yum install httpd
- 2:02 yum install mariadb-server mariadb
- 2:51 mysql_secure_installation
- 3:27 yum install php php-cli php-common php-gd php-mbstring php-mcrypt php-mysqlnd php-xml php-imap php-curl php-gd php-fpm
- 3:55 systemctl restart httpd
- 4:07 mysql -u root -p
- 5:46 wget https://github.com/flatpressblog/flatpress/archive/1.1.zip
- 6:06 unzip 1.1.zip
- 6:32 mv flatpress-1.1 /var/www/flatpress
- 7:14 chown -R apache:apache /var/www/flatpress
- 7:49 vim /etc/httpd/conf.d/flatpress.conf
- 8:53 vim /etc/hosts
- 9:24 systemctl restart httpd
Installation of Flatpress cms using lamp in centos7.5
Checking centos version
[root@linuxhelp ~]#rpm -q centos-release
Configuring LAMP Setup
Install the apache by using the Following command
[root@linuxhelp ~]#yum install httpd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.mirrors.estointernet.in
* epel: epel.scopesky.iq
* extras: centos.mirrors.estointernet.in
* remi-php70: fr2.rpmfind.net
* remi-safe: remirepo.reloumirrors.net
* updates: mirrors.123host.vn
Resolving Dependencies
--> Running transaction check
.
.
.
Running transaction test
Transaction test succeeded
Running transaction
Installing : httpd-2.4.6-88.el7.centos.x86_64 1/1
Verifying : httpd-2.4.6-88.el7.centos.x86_64 1/1
Installed:
httpd.x86_64 0:2.4.6-88.el7.centos
Once the Installation of apache Is completed start the service
[root@linuxhelp ~]# systemctl start httpd
Enable the service of apache by using the Following Command
[root@linuxhelp ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
Next step will be installing mariadb and mariadb-server
[root@linuxhelp ~]# yum install mariadb-server mariadb
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.mirrors.estointernet.in
* epel: mirror.xeonbd.com
* extras: centos.mirrors.estointernet.in
* remi-php70: mirror.xeonbd.com
* remi-safe: mirror.xeonbd.com
* updates: mirrors.123host.vn
Resolving Dependencies
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.60-1.el7_5 will be installed
.
.
.
Installing : 1:mariadb-5.5.60-1.el7_5.x86_64 1/2
Installing : 1:mariadb-server-5.5.60-1.el7_5.x86_64 2/2
Verifying : 1:mariadb-server-5.5.60-1.el7_5.x86_64 1/2
Verifying : 1:mariadb-5.5.60-1.el7_5.x86_64 2/2
Installed:
mariadb.x86_64 1:5.5.60-1.el7_5 mariadb-server.x86_64 1:5.5.60-1.el7_5
Complete!
Once the mariadb Installation is completed start the service
[root@linuxhelp ~]# systemctl start mariadb
Enable the mariadb service by using the Following command
[root@linuxhelp ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
After completing secure the root password for mysql database as Follows
[root@linuxhelp ~]#mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorization.
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
Once mariadb is Installed, install the php and php modules
[root@linuxhelp ~]# yum install php php-cli php-common php-gd php-mbstring php-mcrypt php-mysqlnd php-xml php-imap php-curl php-gd php-fpm
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.iitm.ac.in
* epel: ftp.jaist.ac.jp
* extras: centos-hcm.viettelidc.com.vn
* remi-php70: remi.xpg.com.br
* remi-safe: remi.xpg.com.br
* updates: mirrors.123host.vn
Package php-mysql is obsoleted by php-mysqlnd, trying to install php-mysqlnd-7.0.33-5.el7.remi.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:7.0.33-5.el7.remi will be installed
--> Processing Dependency: php-cli(x86-64) = 7.0.33-5.el7.remi for package: php-7.0.33-5.el7.remi.x86_64
---> Package php-common.x86_64 0:7.0.33-5.el7.remi will be installed
---> Package php-json.x86_64 0:7.0.33-5.el7.remi will be installed
.
.
.
Installed:
php.x86_64 0:7.0.33-5.el7.remi php-common.x86_64 0:7.0.33-5.el7.remi php-json.x86_64 0:7.0.33-5.el7.remi
php-mbstring.x86_64 0:7.0.33-5.el7.remi php-mysqlnd.x86_64 0:7.0.33-5.el7.remi php-pdo.x86_64 0:7.0.33-5.el7.remi
php-pecl-zip.x86_64 0:1.15.4-1.el7.remi.7.0 php-xml.x86_64 0:7.0.33-5.el7.remi
Dependency Installed:
libzip5.x86_64 0:1.5.2-1.el7.remi php-cli.x86_64 0:7.0.33-5.el7.remi
Restart the apache service by using following command
[root@linuxhelp ~]# systemctl restart httpd
Next,Configure the MySQL database. Log into MySQL as a root user and make the necessary settings.
[root@linuxhelp ~]#mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.60-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> create database flatpress1;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> create user 'flatuser'@localhost identified by '123456';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> grant all privileges on flatpress1.* to 'flatuser'@localhost;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> Ctrl-C -- exit!
Aborted
Once the database configuration is done,Download the Flatpress cms by using the following command.
[root@linuxhelp ~]# wget https://github.com/flatpressblog/flatpress/archive/1.1.zip
--2019-03-27 04:21:59-- https://github.com/flatpressblog/flatpress/archive/1.1.zip
Resolving github.com (github.com)... 192.30.253.112, 192.30.253.113
Connecting to github.com (github.com)|192.30.253.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/flatpressblog/flatpress/zip/1.1 [following]
--2019-03-27 04:22:01-- https://codeload.github.com/flatpressblog/flatpress/zip/1.1
Resolving codeload.github.com (codeload.github.com)... 192.30.253.121, 192.30.253.120
Connecting to codeload.github.com (codeload.github.com)|192.30.253.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘1.1.zip’
[ <=> ] 1,045,826 261KB/s in 3.9s
2019-03-27 04:22:06 (261 KB/s) - ‘1.1.zip’ saved [1045826]
Once the installation package is downloaded, Extract it as follows.
[root@linuxhelp ~]# unzip 1.1.zip
Archive: 1.1.zip
0b3fdc7d4e583f8be840b7130a9e4320a3f85200
creating: flatpress-1.1/
inflating: flatpress-1.1/.gitignore
inflating: flatpress-1.1/CHANGELOG.md
inflating: flatpress-1.1/LICENSE.md
inflating: flatpress-1.1/README.md
inflating: flatpress-1.1/admin.php
creating: flatpress-1.1/admin/
inflating: flatpress-1.1/admin/admin-inline.tpl
creating: flatpress-1.1/admin/imgs/
extracting: flatpress-1.1/admin/imgs/config.png
extracting: flatpress-1.1/admin/imgs/entries.png
Now move the flatpress directory to /var/www/ location.
[root@linuxhelp ~]# mv flatpress-1.1 /var/www/flatpress
Change the ownership for the Flatpress directory with the help of the following command.
[root@linuxhelp ~]# chown -R apache:apache /var/www/flatpress
Next step is very crucial. You need to configure the Apache VirtualHost for Flatpress. Open the .conf file for Flatpress.
[root@linuxhelp ~]# vim /etc/httpd/conf.d/flatpress.conf
<Virtualhost *:80>
Servername www.linuxhelp1.com
Documentroot /var/www/flatpress
</Virtualhost>
Configure the host entry by using the following command
[root@linuxhelp ~]#vim /etc/hosts
<ipaddress> <domain name>
Once it is completed, Restart the Apache Web Server by running the following command.
[root@linuxhelp ~]# systemctl restart httpd
Next, open the web browser and navigate to domain name .When the installation page appears, click on the Start the installation.
Configuration of flatpress cms
Enter the required details to create a new user. Click next.
The installation is now complete. Click login now for login the Flatpress cms
Enter the required admin credentials and click login.
Now enter into the admin panel
This is the dashboard of FlatPress CMS admin page
With this the Method to install flatpress cms in centos7.5 comes to an end
Comments ( 0 )
No comments available